diff --git a/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs index eff5dd73..ba37e995 100644 --- a/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs @@ -28,37 +28,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator AllOf(T1 value) => new AllOf((T1?)value); +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif /// /// /// - public static implicit operator T1?(AllOf @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public AllOf(T1? value) - { - Value1 = value; - } + public static implicit operator AllOf(T1 value) => new AllOf((T1?)value); /// /// /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif + public static implicit operator T1?(AllOf @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public AllOf(T1? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs deleted file mode 100644 index 411096bb..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct AnyOf - { - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize>( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.g.cs deleted file mode 100644 index b5503c52..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.g.cs +++ /dev/null @@ -1,159 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct AnyOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? 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 AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - - /// - /// - /// - public AnyOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// - public object? Object => - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AnyOf other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) - ; - } - - /// - /// - /// - public static bool operator ==(AnyOf obj1, AnyOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AnyOf obj1, AnyOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AnyOf o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs index 9f12f4e2..7aaec176 100644 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs @@ -28,37 +28,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value); +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif /// /// /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public AnyOf(T1? value) - { - Value1 = value; - } + public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value); /// /// /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif + public static implicit operator T1?(AnyOf @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public AnyOf(T1? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs index e00cf181..8cf51ef1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs @@ -28,72 +28,71 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif /// /// /// - public AnyOf(T1? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// #if NET6_0_OR_GREATER - public T2? Value2 { get; init; } + public T3? Value3 { get; init; } #else - public T2? Value2 { get; } + public T3? Value3 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsValue3 => Value3 != null; /// /// /// - public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value); + public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value); /// /// /// - public static implicit operator T2?(AnyOf @this) => @this.Value2; + public static implicit operator T1?(AnyOf @this) => @this.Value1; /// /// /// - public AnyOf(T2? value) + public AnyOf(T1? value) { - Value2 = value; + Value1 = value; } /// /// /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? Value3 { get; } -#endif + public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator T2?(AnyOf @this) => @this.Value2; + + /// + /// + /// + public AnyOf(T2? value) + { + Value2 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs deleted file mode 100644 index a00313dc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct AnyOf - { - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize>( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.g.cs deleted file mode 100644 index e1576318..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.g.cs +++ /dev/null @@ -1,325 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct AnyOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? 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 AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - - /// - /// - /// - public AnyOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? 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 AnyOf(T2 value) => new AnyOf((T2?)value); - - /// - /// - /// - public static implicit operator T2?(AnyOf @this) => @this.Value2; - - /// - /// - /// - public AnyOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? 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 AnyOf(T3 value) => new AnyOf((T3?)value); - - /// - /// - /// - public static implicit operator T3?(AnyOf @this) => @this.Value3; - - /// - /// - /// - public AnyOf(T3? value) - { - Value3 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T4? Value4 { get; init; } -#else - public T4? 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 AnyOf(T4 value) => new AnyOf((T4?)value); - - /// - /// - /// - public static implicit operator T4?(AnyOf @this) => @this.Value4; - - /// - /// - /// - public AnyOf(T4? value) - { - Value4 = value; - } - - /// - /// - /// - public AnyOf( - T1? value1, - T2? value2, - T3? value3, - T4? value4 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - } - - /// - /// - /// - public object? Object => - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() ?? - Value4?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 || IsValue2 || IsValue3 || IsValue4; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = 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!); - } - - 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, - 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!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - Value2, - typeof(T2), - Value3, - typeof(T3), - Value4, - typeof(T4), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AnyOf 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) - ; - } - - /// - /// - /// - public static bool operator ==(AnyOf obj1, AnyOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AnyOf obj1, AnyOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AnyOf o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs deleted file mode 100644 index 2baf5f30..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct AnyOf - { - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize>( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.g.cs deleted file mode 100644 index 6ecace0c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.g.cs +++ /dev/null @@ -1,377 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct AnyOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? 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 AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - - /// - /// - /// - public AnyOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? 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 AnyOf(T2 value) => new AnyOf((T2?)value); - - /// - /// - /// - public static implicit operator T2?(AnyOf @this) => @this.Value2; - - /// - /// - /// - public AnyOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? 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 AnyOf(T3 value) => new AnyOf((T3?)value); - - /// - /// - /// - public static implicit operator T3?(AnyOf @this) => @this.Value3; - - /// - /// - /// - public AnyOf(T3? value) - { - Value3 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T4? Value4 { get; init; } -#else - public T4? 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 AnyOf(T4 value) => new AnyOf((T4?)value); - - /// - /// - /// - public static implicit operator T4?(AnyOf @this) => @this.Value4; - - /// - /// - /// - public AnyOf(T4? value) - { - Value4 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T5? Value5 { get; init; } -#else - public T5? 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 AnyOf(T5 value) => new AnyOf((T5?)value); - - /// - /// - /// - public static implicit operator T5?(AnyOf @this) => @this.Value5; - - /// - /// - /// - public AnyOf(T5? value) - { - Value5 = value; - } - - /// - /// - /// - public AnyOf( - T1? value1, - T2? value2, - T3? value3, - T4? value4, - T5? 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 override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() ?? - Value4?.ToString() ?? - Value5?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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(T1), - Value2, - typeof(T2), - Value3, - typeof(T3), - Value4, - typeof(T4), - Value5, - typeof(T5), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AnyOf 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 ==(AnyOf obj1, AnyOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AnyOf obj1, AnyOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AnyOf o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs deleted file mode 100644 index a81b9a2d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct AnyOf - { - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// 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::tryAGI.OpenAI.AnyOf? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize>( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs deleted file mode 100644 index 450470b4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs +++ /dev/null @@ -1,429 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct AnyOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? 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 AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - - /// - /// - /// - public AnyOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? 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 AnyOf(T2 value) => new AnyOf((T2?)value); - - /// - /// - /// - public static implicit operator T2?(AnyOf @this) => @this.Value2; - - /// - /// - /// - public AnyOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? 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 AnyOf(T3 value) => new AnyOf((T3?)value); - - /// - /// - /// - public static implicit operator T3?(AnyOf @this) => @this.Value3; - - /// - /// - /// - public AnyOf(T3? value) - { - Value3 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T4? Value4 { get; init; } -#else - public T4? 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 AnyOf(T4 value) => new AnyOf((T4?)value); - - /// - /// - /// - public static implicit operator T4?(AnyOf @this) => @this.Value4; - - /// - /// - /// - public AnyOf(T4? value) - { - Value4 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T5? Value5 { get; init; } -#else - public T5? 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 AnyOf(T5 value) => new AnyOf((T5?)value); - - /// - /// - /// - public static implicit operator T5?(AnyOf @this) => @this.Value5; - - /// - /// - /// - public AnyOf(T5? value) - { - Value5 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T6? Value6 { get; init; } -#else - public T6? 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 AnyOf(T6 value) => new AnyOf((T6?)value); - - /// - /// - /// - public static implicit operator T6?(AnyOf @this) => @this.Value6; - - /// - /// - /// - public AnyOf(T6? value) - { - Value6 = value; - } - - /// - /// - /// - public AnyOf( - T1? value1, - T2? value2, - T3? value3, - T4? value4, - T5? value5, - T6? value6 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - } - - /// - /// - /// - public object? Object => - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() ?? - Value4?.ToString() ?? - Value5?.ToString() ?? - Value6?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6; - } - - /// - /// - /// - 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, - 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!); - } - - 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, - 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!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - Value2, - typeof(T2), - Value3, - typeof(T3), - Value4, - typeof(T4), - Value5, - typeof(T5), - Value6, - typeof(T6), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AnyOf 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) - ; - } - - /// - /// - /// - public static bool operator ==(AnyOf obj1, AnyOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AnyOf obj1, AnyOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AnyOf o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs index df9b1a28..23c85365 100644 --- a/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs @@ -28,37 +28,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif /// /// /// - public static implicit operator T1?(OneOf @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public OneOf(T1? value) - { - Value1 = value; - } + public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); /// /// /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif + public static implicit operator T1?(OneOf @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public OneOf(T1? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs new file mode 100644 index 00000000..7d583374 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OneOf + { + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize>( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.3.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.g.cs new file mode 100644 index 00000000..4ad02ec9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.g.cs @@ -0,0 +1,272 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? 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 OneOf(T1 value) => new OneOf((T1?)value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + } + + /// + /// + /// + public object? Object => + Value3 as object ?? + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() ?? + Value3?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 && !IsValue3 || !IsValue1 && IsValue2 && !IsValue3 || !IsValue1 && !IsValue2 && IsValue3; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + global::System.Func? value3 = 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!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? value1 = null, + global::System.Action? value2 = null, + global::System.Action? value3 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + else if (IsValue3) + { + value3?.Invoke(Value3!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf 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) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs new file mode 100644 index 00000000..8d38ba36 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OneOf + { + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize>( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.4.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.g.cs new file mode 100644 index 00000000..2a04552a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.g.cs @@ -0,0 +1,324 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T4? Value4 { get; init; } +#else + public T4? 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 OneOf(T1 value) => new OneOf((T1?)value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T4 value) => new OneOf((T4?)value); + + /// + /// + /// + public static implicit operator T4?(OneOf @this) => @this.Value4; + + /// + /// + /// + public OneOf(T4? value) + { + Value4 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3, + T4? value4 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + } + + /// + /// + /// + public object? Object => + Value4 as object ?? + Value3 as object ?? + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() ?? + Value3?.ToString() ?? + Value4?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + global::System.Func? value3 = null, + global::System.Func? value4 = 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!); + } + + 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, + 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!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + Value4, + typeof(T4), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf 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) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.5.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.5.Json.g.cs new file mode 100644 index 00000000..be119bdb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.5.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OneOf + { + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize>( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.5.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.5.g.cs new file mode 100644 index 00000000..ab0ad5a5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.5.g.cs @@ -0,0 +1,376 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T4? Value4 { get; init; } +#else + public T4? Value4 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T5? Value5 { get; init; } +#else + public T5? 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 OneOf(T1 value) => new OneOf((T1?)value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T4 value) => new OneOf((T4?)value); + + /// + /// + /// + public static implicit operator T4?(OneOf @this) => @this.Value4; + + /// + /// + /// + public OneOf(T4? value) + { + Value4 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T5 value) => new OneOf((T5?)value); + + /// + /// + /// + public static implicit operator T5?(OneOf @this) => @this.Value5; + + /// + /// + /// + public OneOf(T5? value) + { + Value5 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3, + T4? value4, + T5? 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 override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() ?? + Value3?.ToString() ?? + Value4?.ToString() ?? + Value5?.ToString() + ; + + /// + /// + /// + 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(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + Value4, + typeof(T4), + Value5, + typeof(T5), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf 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 ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.9.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.9.Json.g.cs new file mode 100644 index 00000000..e49a2b67 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.9.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OneOf + { + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// 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::tryAGI.OpenAI.OneOf? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize>( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OneOf), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OneOf?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.9.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.9.g.cs new file mode 100644 index 00000000..91e630b7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.9.g.cs @@ -0,0 +1,584 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T4? Value4 { get; init; } +#else + public T4? Value4 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T5? Value5 { get; init; } +#else + public T5? Value5 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] +#endif + public bool IsValue5 => Value5 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T6? Value6 { get; init; } +#else + public T6? Value6 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] +#endif + public bool IsValue6 => Value6 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T7? Value7 { get; init; } +#else + public T7? Value7 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] +#endif + public bool IsValue7 => Value7 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T8? Value8 { get; init; } +#else + public T8? Value8 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] +#endif + public bool IsValue8 => Value8 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public T9? Value9 { get; init; } +#else + public T9? 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 OneOf(T1 value) => new OneOf((T1?)value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf((T3?)value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T4 value) => new OneOf((T4?)value); + + /// + /// + /// + public static implicit operator T4?(OneOf @this) => @this.Value4; + + /// + /// + /// + public OneOf(T4? value) + { + Value4 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T5 value) => new OneOf((T5?)value); + + /// + /// + /// + public static implicit operator T5?(OneOf @this) => @this.Value5; + + /// + /// + /// + public OneOf(T5? value) + { + Value5 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T6 value) => new OneOf((T6?)value); + + /// + /// + /// + public static implicit operator T6?(OneOf @this) => @this.Value6; + + /// + /// + /// + public OneOf(T6? value) + { + Value6 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T7 value) => new OneOf((T7?)value); + + /// + /// + /// + public static implicit operator T7?(OneOf @this) => @this.Value7; + + /// + /// + /// + public OneOf(T7? value) + { + Value7 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T8 value) => new OneOf((T8?)value); + + /// + /// + /// + public static implicit operator T8?(OneOf @this) => @this.Value8; + + /// + /// + /// + public OneOf(T8? value) + { + Value8 = value; + } + + /// + /// + /// + public static implicit operator OneOf(T9 value) => new OneOf((T9?)value); + + /// + /// + /// + public static implicit operator T9?(OneOf @this) => @this.Value9; + + /// + /// + /// + public OneOf(T9? value) + { + Value9 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3, + T4? value4, + T5? value5, + T6? value6, + T7? value7, + T8? value8, + T9? value9 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + Value5 = value5; + Value6 = value6; + Value7 = value7; + Value8 = value8; + Value9 = value9; + } + + /// + /// + /// + public object? 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 override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() ?? + Value3?.ToString() ?? + Value4?.ToString() ?? + Value5?.ToString() ?? + Value6?.ToString() ?? + Value7?.ToString() ?? + Value8?.ToString() ?? + Value9?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9; + } + + /// + /// + /// + 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, + 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!); + } + + 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, + 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!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + Value4, + typeof(T4), + Value5, + typeof(T5), + Value6, + typeof(T6), + Value7, + typeof(T7), + Value8, + typeof(T8), + Value9, + typeof(T9), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf 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) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs index 627eab8e..2658754d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs @@ -13,40 +13,16 @@ namespace tryAGI.OpenAI DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, Converters = new global::System.Type[] { - typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantObjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantObjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsCodeTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsCodeTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchRankerJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchRankerNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchRankerJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchRankerNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFunctionTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFunctionTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ThreadObjectObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ThreadObjectObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventVariant1EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventVariant1EventNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectLastErrorCodeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectLastErrorCodeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunToolCallObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunToolCallObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectRequiredActionTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectRequiredActionTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatTextTypeJsonConverter), @@ -55,16 +31,30 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonSchemaTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonSchemaTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventVariant1EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventVariant1EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadObjectObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadObjectObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant1EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant1EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectRequiredActionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectRequiredActionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunToolCallObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunToolCallObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectLastErrorCodeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectLastErrorCodeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectIncompleteDetailsReasonNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TruncationObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TruncationObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsNamedToolChoiceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsNamedToolChoiceTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TruncationObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TruncationObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant1EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant1EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant2EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant2EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant3EventJsonConverter), @@ -83,48 +73,52 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant9EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant10EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant10EventNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant1EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant1EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsMessageCreationObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsMessageCreationObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputLogsObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputLogsObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputImageObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFunctionObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFunctionObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant1EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant1EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant2EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant2EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant3EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant3EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsMessageCreationObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsMessageCreationObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFileSearchObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFileSearchObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFunctionObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFunctionObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant3EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant3EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant4EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant4EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant5EventJsonConverter), @@ -133,80 +127,80 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant6EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant7EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant7EventNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectImageFileDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectImageFileDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant1EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant1EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectImageUrlDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectImageUrlDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectImageFileDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectImageFileDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectImageUrlDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectImageUrlDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFileCitationObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFileCitationObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentRefusalObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentRefusalObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant1EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant1EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeOnlyTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant2EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant2EventNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectImageFileDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectImageFileDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant3EventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant3EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectImageFileDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectImageFileDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFileCitationObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFileCitationObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentRefusalObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentRefusalObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant3EventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant3EventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant4EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant4EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant5EventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant5EventNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ErrorEventEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ErrorEventEventNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantSupportedModelsJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantSupportedModelsNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AudioResponseFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AudioResponseFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AudioTranscriptionModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AudioTranscriptionModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorApiKeyTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorApiKeyTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorApiKeyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorApiKeyTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AutoChunkingStrategyRequestParamTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AutoChunkingStrategyRequestParamTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.BatchObjectJsonConverter), @@ -215,8 +209,6 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.BatchStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.BatchFileExpirationAfterAnchorJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.BatchFileExpirationAfterAnchorNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CertificateObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CertificateObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionAllowedToolsModeJsonConverter), @@ -225,52 +217,52 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionAllowedToolsChoiceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionDeletedObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionDeletedObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseChoiceFinishReasonJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseChoiceFinishReasonNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageAnnotationTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageAnnotationTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageCustomToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageCustomToolCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageAnnotationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageAnnotationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionResponseMessageRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartTextTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartTextTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallChunkTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallChunkTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1ItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1ItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceCustomTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceCustomTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartRefusalTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartRefusalTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestDeveloperMessageRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestDeveloperMessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestFunctionMessageRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestFunctionMessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioInputAudioFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartFileTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartFileTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageRoleJsonConverter), @@ -285,154 +277,276 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionToolTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOptionEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOptionEnumNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChatModelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ClickTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ClickTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterFileOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterFileOutputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputImageTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputImageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputLogsTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputLogsTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterTextOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterTextOutputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerMemoryLimitJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerMemoryLimitNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputLogsTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputLogsTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputImageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputImageTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComparisonFilterTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComparisonFilterTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CompoundFilterTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CompoundFilterTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DragTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DragTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MoveTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MoveTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ScrollTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ScrollTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TypeType1JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TypeType1NullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WaitTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WaitTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClickParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClickParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DragParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DragParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressActionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressActionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MoveParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MoveParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ScrollParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ScrollParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TypeParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TypeParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WaitParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WaitParamTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotImageTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotImageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileListResourceObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileListResourceObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceExpiresAfterAnchorJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceExpiresAfterAnchorNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ContainerListResourceObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ContainerListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceExpiresAfterAnchorJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceExpiresAfterAnchorNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioInputAudio1FormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioInputAudio1FormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileInputDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileInputDetailNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputTextContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputTextContentTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RefusalContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RefusalContentTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningTextContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningTextContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TextContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TextContentTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTextContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTextContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchSourceTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchSourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchSourceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionOpenPageTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionOpenPageTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionFindTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionFindTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RankerVersionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RankerVersionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolConnectorIdJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolConnectorIdNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputFidelityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputFidelityNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenActionEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenActionEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GrammarSyntax1JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GrammarSyntax1NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SearchContentTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SearchContentTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellExecActionTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellExecActionTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MCPListToolsTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MCPListToolsTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalRequestTypeJsonConverter), @@ -441,6 +555,8 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseResourceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallOutputTypeJsonConverter), @@ -449,36 +565,40 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ConversationItemListObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CostsResultObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CostsResultObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1ItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1ItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedEnumNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2FunctionCallJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2FunctionCallNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2AudioFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.PredictionContentTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.PredictionContentTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2FunctionCallJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2FunctionCallNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionStreamResponseChoiceFinishReasonJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionStreamResponseChoiceFinishReasonNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionStreamResponseObjectJsonConverter), @@ -491,56 +611,46 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.CreateCompletionResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateContainerBodyExpiresAfterAnchorJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateContainerBodyExpiresAfterAnchorNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EmbeddingObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EmbeddingObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessagePhaseJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessagePhaseNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioInputAudio1FormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioInputAudio1FormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileContentSourceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileContentSourceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileIdSourceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileIdSourceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsSourceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsSourceTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCustomDataSourceConfigTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCustomDataSourceConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalJsonlRunDataSourceTypeJsonConverter), @@ -550,79 +660,35 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalLogsDataSourceConfigTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalLogsDataSourceConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalStoredCompletionsDataSourceConfigTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalStoredCompletionsDataSourceConfigTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalStoredCompletionsDataSourceConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderPythonTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderPythonTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderScoreModelTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderScoreModelTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatJsonSchemaTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatJsonSchemaTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RankerVersionTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RankerVersionTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolConnectorIdJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolConnectorIdNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageInputFidelityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageInputFidelityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalResponsesSourceTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalResponsesSourceTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FileExpirationAfterAnchorJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FileExpirationAfterAnchorNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FilePurposeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FilePurposeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestModelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestHyperparametersBatchSizeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestHyperparametersBatchSizeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestHyperparametersLearningRateMultiplierJsonConverter), @@ -631,68 +697,66 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestHyperparametersNEpochsNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestIntegrationTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestIntegrationTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBatchSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBatchSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersBatchSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersBatchSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersLearningRateMultiplierJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersLearningRateMultiplierNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersNEpochsJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersNEpochsNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBetaJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBetaNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBatchSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersBatchSizeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersLearningRateMultiplierJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersLearningRateMultiplierNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersNEpochsJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneDPOHyperparametersNEpochsNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderMultiTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.GraderMultiTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersBatchSizeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersBatchSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersComputeMultiplierJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersComputeMultiplierNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalIntervalJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalIntervalNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalSamplesJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalSamplesNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersLearningRateMultiplierJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersLearningRateMultiplierNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersNEpochsJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersNEpochsNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersReasoningEffortJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersReasoningEffortNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersBatchSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersBatchSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersLearningRateMultiplierJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersLearningRateMultiplierNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersNEpochsJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneSupervisedHyperparametersNEpochsNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateFineTuningJobRequestModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersComputeMultiplierJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersComputeMultiplierNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalIntervalJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalIntervalNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalSamplesJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersEvalSamplesNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestOutputFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestQualityJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestQualityJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestResponseFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestResponseFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestSizeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestStyleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestStyleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageVariationRequestModelJsonConverter), @@ -701,34 +765,34 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageVariationRequestResponseFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageVariationRequestSizeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageVariationRequestSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageRequestContentTextObjectTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageRequestContentTextObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateMessageRequestRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateMessageRequestRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageRequestContentTextObjectTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MessageRequestContentTextObjectTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHateItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHateItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstructionJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstructionNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstructionJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstructionNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSexualItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSexualItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinorJsonConverter), @@ -739,12 +803,16 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsResponsesEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsResponsesEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningSummary2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningSummary2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2NullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceOptionsJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceOptionsNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedModeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedModeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedModeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedModeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceTypesTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceTypesTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceFunctionTypeJsonConverter), @@ -753,10 +821,76 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceMCPTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceCustomTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceCustomTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.IncludableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.IncludableNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallItemStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallItemStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DetailEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DetailEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileDetailEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileDetailEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.IncludeEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.IncludeEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateSpeechRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateSpeechRequestModelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateSpeechRequestResponseFormatJsonConverter), @@ -767,24 +901,32 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.SpeechAudioDeltaEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.SpeechAudioDoneEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.SpeechAudioDoneEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionIncludeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionIncludeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestModelJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionIncludeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionIncludeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestTimestampGranularitieJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestTimestampGranularitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageTokensTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageTokensTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageDurationTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageDurationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDeltaEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDeltaEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDoneEventTypeJsonConverter), @@ -815,20 +957,28 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.DeleteVectorStoreResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.DeletedConversationResourceObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.DeletedConversationResourceObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DetailEnumJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DetailEnumNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2NullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalCustomDataSourceConfigTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalCustomDataSourceConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalLogsDataSourceConfigTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalLogsDataSourceConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsDataSourceConfigTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsDataSourceConfigTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalListObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalListObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunObjectJsonConverter), @@ -843,6 +993,8 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningCheckpointPermissionObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningIntegrationTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningIntegrationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1NullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersLearningRateMultiplierJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersLearningRateMultiplierNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersNEpochsJsonConverter), @@ -853,78 +1005,90 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobCheckpointObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobCheckpointObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventLevelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventLevelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventLevelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventLevelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallItemStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallItemStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventQualityNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseBackgroundJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseBackgroundNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseOutputFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseOutputFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseSizeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InviteProjectRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InviteProjectRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InviteProjectRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InviteProjectRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteDeleteResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteDeleteResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteListResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteListResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestProjectRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestProjectRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestProjectRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InviteRequestProjectRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListAuditLogsResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListAuditLogsResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListBatchesResponseObjectJsonConverter), @@ -943,18 +1107,22 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobCheckpointsResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobEventsResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobEventsResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListModelsResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListModelsResponseObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListPaginatedFineTuningJobsResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListPaginatedFineTuningJobsResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OtherChunkingStrategyResponseParamTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectStatusJsonConverter), @@ -963,26 +1131,36 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.NoiseReductionTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputAudioTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputAudioTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactionBodyTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactionBodyTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyOwnerTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyOwnerTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyDeleteResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyDeleteResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyListResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyListResponseObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectListResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectListResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectRateLimitObjectJsonConverter), @@ -1005,12 +1183,16 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserDeleteResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserUpdateRequestRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserUpdateRequestRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemTypeJsonConverter), @@ -1021,8 +1203,6 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemContentItemTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemContentItemTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemDeleteTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemDeleteTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemRetrieveTypeJsonConverter), @@ -1039,54 +1219,54 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventOutputAudioBufferClearTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCancelTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCancelTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsConversationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsConversationNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsMaxOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsMaxOutputTokensNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCreateTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCreateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsModalitieJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsModalitieNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsOutputAudioFormatJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsOutputAudioFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsToolTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsToolTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCreateTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCreateTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestMaxResponseOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestMaxResponseOutputTokensNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsMaxOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsMaxOutputTokensNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsConversationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsConversationNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestModalitieJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestModalitieNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestTracingEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestTracingEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestMaxResponseOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestMaxResponseOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestIncludeItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestIncludeItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestInputAudioFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestInputAudioFormatNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventTranscriptionSessionUpdateTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventTranscriptionSessionUpdateTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseMaxOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseMaxOutputTokensNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestInputAudioFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestInputAudioFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestIncludeItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestIncludeItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsReasonJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsReasonNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsReasonJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsReasonNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseModalitieJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseMaxOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseMaxOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemCreatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemDeletedTypeJsonConverter), @@ -1119,10 +1299,10 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsFailedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsInProgressTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsInProgressTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedRateLimitNameJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedRateLimitNameNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedRateLimitNameJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedRateLimitNameNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDeltaTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDeltaTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDoneTypeJsonConverter), @@ -1131,14 +1311,14 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDeltaTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDoneTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDoneTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDoneTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDoneTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseCreatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseDoneTypeJsonConverter), @@ -1165,6 +1345,8 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDeltaTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDoneTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDoneTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionVoiceJsonConverter), @@ -1177,16 +1359,30 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionToolChoiceNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionMaxOutputTokensJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionMaxOutputTokensNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionUpdatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionUpdatedTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseModalitieNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionCreatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionCreatedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseModalitieJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseModalitieNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionUpdatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionUpdatedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAOutputModalitieJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAOutputModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAModelNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAIncludeItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAIncludeItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATracingEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATracingEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAMaxOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAMaxOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemDeleteTypeJsonConverter), @@ -1205,106 +1401,94 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsConversationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsConversationNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsMaxOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsMaxOutputTokensNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsOutputModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsOutputModalitieNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAIncludeItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAIncludeItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAMaxOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAMaxOutputTokensNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAOutputModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGAOutputModalitieNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATracingEnumJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATracingEnumNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGAIncludeItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGAIncludeItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsOutputModalitieJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsOutputModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsMaxOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsMaxOutputTokensNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsConversationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateParamsConversationNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGAIncludeItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGAIncludeItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventTranscriptionSessionUpdateTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventTranscriptionSessionUpdateTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemContentItemTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemContentItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemContentItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemContentItemTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserStatusJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserStatusNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceRoleJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceStatusNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceRoleJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceRoleNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeCreateClientSecretRequestExpiresAfterAnchorJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeCreateClientSecretRequestExpiresAfterAnchorNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAOutputModalitieJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAOutputModalitieNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAModelNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAIncludeItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAIncludeItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAMaxOutputTokensJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAMaxOutputTokensNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAModelNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAOutputModalitieJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGAOutputModalitieNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGAIncludeItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGAIncludeItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGATypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGATypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGAIncludeItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGAIncludeItemNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalRequestTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalRequestTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalResponseTypeJsonConverter), @@ -1385,8 +1569,6 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeRateLimitsUpdatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeRateLimitsUpdatedRateLimitNameJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeRateLimitsUpdatedRateLimitNameNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemAddedTypeJsonConverter), @@ -1415,6 +1597,8 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter), @@ -1433,10 +1617,10 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferStartedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferStoppedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferStoppedTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedRateLimitNameJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedRateLimitNameNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedRateLimitNameJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedRateLimitNameNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeJsonConverter), @@ -1445,14 +1629,14 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseDoneTypeJsonConverter), @@ -1487,24 +1671,20 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventTranscriptionSessionUpdatedTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseIncludeItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseIncludeItemNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseMaxOutputTokensJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseMaxOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseOutputModalitieJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseOutputModalitieNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseTracingEnumJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseTracingEnumNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningSummaryJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningSummaryNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseMaxOutputTokensJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseMaxOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3ObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3ObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3StatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3StatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDeltaEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDeltaEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDoneEventTypeJsonConverter), @@ -1591,14 +1771,14 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextAnnotationAddedEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseQueuedEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseQueuedEventTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventPartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventPartTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventPartTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventPartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventPartTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventPartTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDeltaEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDeltaEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDoneEventTypeJsonConverter), @@ -1621,10 +1801,18 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallInProgressEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallSearchingEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallSearchingEventTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RoleListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnumNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UploadStatusJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UploadStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UploadPartObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UploadPartObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesResultObjectJsonConverter), @@ -1641,24 +1829,26 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.UsageImagesResultObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageModerationsResultObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageModerationsResultObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageTimeBucketObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageTimeBucketObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresResultObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresResultObjectNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserDeleteResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserDeleteResponseObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserListResourceObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserListResponseObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserListResponseObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleUpdateRequestRoleJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleUpdateRequestRoleNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileBatchObjectObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileBatchObjectObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileBatchObjectStatusJsonConverter), @@ -1671,6 +1861,14 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultContentObjectTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultsPageObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultsPageObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceResourceObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebhookBatchCancelledObjectJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebhookBatchCancelledObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebhookBatchCancelledTypeJsonConverter), @@ -1731,6 +1929,108 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.WebhookResponseIncompleteObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebhookResponseIncompleteTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebhookResponseIncompleteTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OrderEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OrderEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoModelEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoModelEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoSizeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoSizeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoSecondsJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoSecondsNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoContentVariantJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoContentVariantNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TruncationEnumJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TruncationEnumNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CompactResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AttachmentTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AttachmentTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallStatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallStatusNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ActiveStatusTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ActiveStatusTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LockedStatusTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.LockedStatusTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClosedStatusTypeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ClosedStatusTypeNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventTypeNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionUpdateTypeJsonConverter), @@ -1759,10 +2059,10 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCreateResponseMaxOutputTokensNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCancelTypeJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeResponseCancelTypeNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestEndpointJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestEndpointNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListAssistantsOrderJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListAssistantsOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListChatCompletionsOrderJsonConverter), @@ -1801,8 +2101,18 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.UsageCostsBucketWidthNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageCostsGroupByItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageCostsGroupByItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupsOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupUsersOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListGroupUsersOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectCertificatesOrderJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectCertificatesOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListRolesOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListRolesOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesBucketWidthJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesBucketWidthNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesGroupByItemJsonConverter), @@ -1839,6 +2149,14 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresBucketWidthNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresGroupByItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresGroupByItemNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectRolesOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectRolesOrderNullableJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrderJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListInputItemsOrderJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListInputItemsOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListMessagesOrderJsonConverter), @@ -1863,25 +2181,13 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ListVectorStoreFilesOrderNullableJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListVectorStoreFilesFilterJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ListVectorStoreFilesFilterNullableJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnnotationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantStreamEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStepDetailsJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TextAnnotationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentDeltaJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TextAnnotationDeltaJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPartJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageJsonConverter), @@ -1890,182 +2196,251 @@ namespace tryAGI.OpenAI typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPartJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOptionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ChunkingStrategyRequestParamJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ChunkingStrategyResponseJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputsItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicy2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputsVariant1ItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FiltersItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerActionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputResourceJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.Content5JsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputContentJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputContentJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ConversationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnnotationJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ConversationItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContentItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContentItem3JsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallResourceJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputResourceJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionAndCustomToolCallOutputJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallActionJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.Filters2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EnvironmentVariant1JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicy3JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillsItem2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.Format2JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolsItem13JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EnvironmentVariant12JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutcomeJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OperationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ConversationParamJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateModelResponsePropertiesJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsSharedJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.StopConfigurationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolsItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.Format2JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageContentJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessagesJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SourceJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.SkillsItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicyJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.Source2JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalRequestDataSourceConfigJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.TestingCriteriaItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalGraderStringCheckJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalGraderTextSimilarityJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalGraderPythonJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalGraderScoreModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputMessages2JsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatConfigurationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FormatJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.Source3JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolsItem2JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ContentVariant2ItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.InputVariant3ItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateResponseJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsResponsesJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoice5JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceParamJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputParamJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.InputItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageContentJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OutputVariant2ItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.EnvironmentVariant13JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputOutcomeParamJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParamJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateSpeechResponseStreamEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseJsonUsageJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonUsageJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseStreamEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.DeletedConversationJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalDataSourceConfigJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.EvalGraderLabelModelJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunDataSourceJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.FiltersJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessageJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.IntegrationsItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditStreamEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenStreamEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageResourceJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ItemResourceJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsCompactionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OutputItemJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1JsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ToolsItem5JsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.SessionJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.Session2JsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.ResponseStreamEventJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.RunGraderRequestGraderJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.ResultItemJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesClientEventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesServerEventJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.VideoModelJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ItemFieldJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ContentItem4JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnnotationsItem3JsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.ThreadItemJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.StatusJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::tryAGI.OpenAI.MCPToolFilter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList>>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, byte[]>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, byte[]>), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), - typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), + typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter), typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter), })] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelRun.g.cs index a1d2ca22..061c158a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelRun.g.cs @@ -24,16 +24,12 @@ partial void ProcessCancelRunResponseContent( ref string content); /// - /// Cancel a run
/// Cancels a run that is `in_progress`. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CancelRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateAssistant.g.cs deleted file mode 100644 index eed5eea1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateAssistant.g.cs +++ /dev/null @@ -1,261 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AssistantsClient - { - partial void PrepareCreateAssistantArguments( - global::System.Net.Http.HttpClient httpClient, - global::tryAGI.OpenAI.CreateAssistantRequest request); - partial void PrepareCreateAssistantRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::tryAGI.OpenAI.CreateAssistantRequest request); - partial void ProcessCreateAssistantResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateAssistantResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create assistant
- /// Create an assistant with a model and instructions. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task CreateAssistantAsync( - global::tryAGI.OpenAI.CreateAssistantRequest request, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateAssistantArguments( - httpClient: HttpClient, - request: request); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: "/assistants", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateAssistantRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateAssistantResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateAssistantResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::tryAGI.OpenAI.AssistantObject.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - using var __content = await __response.Content.ReadAsStreamAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return - await global::tryAGI.OpenAI.AssistantObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - - /// - /// Create assistant
- /// Create an assistant with a model and instructions. - ///
- /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
- /// Example: gpt-4o - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. - /// - /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task CreateAssistantAsync( - global::tryAGI.OpenAI.AnyOf model, - string? description = default, - string? instructions = default, - global::System.Collections.Generic.Dictionary? metadata = default, - string? name = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - object? responseFormat = default, - double? temperature = default, - global::tryAGI.OpenAI.CreateAssistantRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, - double? topP = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::tryAGI.OpenAI.CreateAssistantRequest - { - Description = description, - Instructions = instructions, - Metadata = metadata, - Model = model, - Name = name, - ReasoningEffort = reasoningEffort, - ResponseFormat = responseFormat, - Temperature = temperature, - ToolResources = toolResources, - Tools = tools, - TopP = topP, - }; - - return await CreateAssistantAsync( - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs index a5e73c53..fa62c3d5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs @@ -24,18 +24,15 @@ partial void ProcessCreateMessageResponseContent( ref string content); /// - /// Create message
/// Create a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, + global::tryAGI.OpenAI.CreateMessageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -176,45 +173,33 @@ partial void ProcessCreateMessageResponseContent( } /// - /// Create message
/// Create a message. ///
/// - /// - /// A list of files attached to the message, and the tools they should be added to. - /// - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The role of the entity that is creating the message. Allowed values include:
/// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
/// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. /// + /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, - global::tryAGI.OpenAI.AnyOf> content, global::tryAGI.OpenAI.CreateMessageRequestRole role, - global::System.Collections.Generic.IList? attachments = default, + global::tryAGI.OpenAI.OneOf>> content, + global::System.Collections.Generic.IList? attachments = default, global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateMessageRequest { - Attachments = attachments, + Role = role, Content = content, + Attachments = attachments, Metadata = metadata, - Role = role, }; return await CreateMessageAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs index 01479cca..89f1e02a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs @@ -26,7 +26,6 @@ partial void ProcessCreateRunResponseContent( ref string content); /// - /// Create run
/// Create a run. ///
/// @@ -34,11 +33,9 @@ partial void ProcessCreateRunResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateRunAsync( string threadId, + global::tryAGI.OpenAI.CreateRunRequest request, global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -56,7 +53,7 @@ partial void ProcessCreateRunResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/threads/{threadId}/runs", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("include[]", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); @@ -185,129 +182,105 @@ partial void ProcessCreateRunResponseContent( } /// - /// Create run
/// Create a run. ///
/// /// - /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - /// - /// - /// Adds additional messages to the thread before creating the run. - /// /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Adds additional messages to the thread before creating the run. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateRunAsync( string threadId, string assistantId, global::System.Collections.Generic.IList? include = default, + global::tryAGI.OpenAI.AnyOf? model = default, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort = default, + string? instructions = default, string? additionalInstructions = default, global::System.Collections.Generic.IList? additionalMessages = default, - string? instructions = default, - int? maxCompletionTokens = default, - int? maxPromptTokens = default, + global::System.Collections.Generic.IList>? tools = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - bool? parallelToolCalls = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, - bool? stream = default, double? temperature = default, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice = default, - global::System.Collections.Generic.IList? tools = default, double? topP = default, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy = default, + bool? stream = default, + int? maxPromptTokens = default, + int? maxCompletionTokens = default, + global::tryAGI.OpenAI.AllOf? truncationStrategy = default, + global::tryAGI.OpenAI.AllOf? toolChoice = default, + bool? parallelToolCalls = default, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateRunRequest { - AdditionalInstructions = additionalInstructions, - AdditionalMessages = additionalMessages, AssistantId = assistantId, - Instructions = instructions, - MaxCompletionTokens = maxCompletionTokens, - MaxPromptTokens = maxPromptTokens, - Metadata = metadata, Model = model, - ParallelToolCalls = parallelToolCalls, ReasoningEffort = reasoningEffort, - ResponseFormat = responseFormat, - Stream = stream, - Temperature = temperature, - ToolChoice = toolChoice, + Instructions = instructions, + AdditionalInstructions = additionalInstructions, + AdditionalMessages = additionalMessages, Tools = tools, + Metadata = metadata, + Temperature = temperature, TopP = topP, + Stream = stream, + MaxPromptTokens = maxPromptTokens, + MaxCompletionTokens = maxCompletionTokens, TruncationStrategy = truncationStrategy, + ToolChoice = toolChoice, + ParallelToolCalls = parallelToolCalls, + ResponseFormat = responseFormat, }; return await CreateRunAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs index 79d0dc1e..e0bede56 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs @@ -22,16 +22,13 @@ partial void ProcessCreateThreadResponseContent( ref string content); /// - /// Create thread
/// Create a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateThreadAsync( + global::tryAGI.OpenAI.CreateThreadRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -170,38 +167,26 @@ partial void ProcessCreateThreadResponseContent( } /// - /// Create thread
/// Create a thread. ///
/// - /// A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// A list of [messages](/docs/api-reference/messages) to start the thread with. /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateThreadAsync( global::System.Collections.Generic.IList? messages = default, + global::tryAGI.OpenAI.CreateThreadRequestToolResources2? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.CreateThreadRequestToolResources? toolResources = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateThreadRequest { Messages = messages, - Metadata = metadata, ToolResources = toolResources, + Metadata = metadata, }; return await CreateThreadAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs index 63c89921..16bef5c5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs @@ -22,16 +22,13 @@ partial void ProcessCreateThreadAndRunResponseContent( ref string content); /// - /// Create thread and run
/// Create a thread and run it in one request. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateThreadAndRunAsync( + global::tryAGI.OpenAI.CreateThreadAndRunRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -170,116 +167,99 @@ partial void ProcessCreateThreadAndRunResponseContent( } /// - /// Create thread and run
/// Create a thread and run it in one request. ///
/// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// Options to create a new thread. If no thread is provided when running a
+ /// request, an empty thread will be created. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// 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. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// 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. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task CreateThreadAndRunAsync( string assistantId, + global::tryAGI.OpenAI.CreateThreadRequest? thread = default, + global::tryAGI.OpenAI.AnyOf? model = default, string? instructions = default, - int? maxCompletionTokens = default, - int? maxPromptTokens = default, + global::System.Collections.Generic.IList>? tools = default, + global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - bool? parallelToolCalls = default, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, - bool? stream = default, double? temperature = default, - global::tryAGI.OpenAI.CreateThreadRequest? thread = default, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice = default, - global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, double? topP = default, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy = default, + bool? stream = default, + int? maxPromptTokens = default, + int? maxCompletionTokens = default, + global::tryAGI.OpenAI.AllOf? truncationStrategy = default, + global::tryAGI.OpenAI.AllOf? toolChoice = default, + bool? parallelToolCalls = default, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateThreadAndRunRequest { AssistantId = assistantId, + Thread = thread, + Model = model, Instructions = instructions, - MaxCompletionTokens = maxCompletionTokens, - MaxPromptTokens = maxPromptTokens, + Tools = tools, + ToolResources = toolResources, Metadata = metadata, - Model = model, - ParallelToolCalls = parallelToolCalls, - ResponseFormat = responseFormat, - Stream = stream, Temperature = temperature, - Thread = thread, - ToolChoice = toolChoice, - ToolResources = toolResources, - Tools = tools, TopP = topP, + Stream = stream, + MaxPromptTokens = maxPromptTokens, + MaxCompletionTokens = maxCompletionTokens, TruncationStrategy = truncationStrategy, + ToolChoice = toolChoice, + ParallelToolCalls = parallelToolCalls, + ResponseFormat = responseFormat, }; return await CreateThreadAndRunAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteAssistant.g.cs deleted file mode 100644 index f689ed3c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteAssistant.g.cs +++ /dev/null @@ -1,164 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AssistantsClient - { - partial void PrepareDeleteAssistantArguments( - global::System.Net.Http.HttpClient httpClient, - ref string assistantId); - partial void PrepareDeleteAssistantRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string assistantId); - partial void ProcessDeleteAssistantResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessDeleteAssistantResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Delete assistant
- /// Delete an assistant. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task DeleteAssistantAsync( - string assistantId, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteAssistantArguments( - httpClient: HttpClient, - assistantId: ref assistantId); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: $"/assistants/{assistantId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteAssistantRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - assistantId: assistantId); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessDeleteAssistantResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeleteAssistantResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::tryAGI.OpenAI.DeleteAssistantResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - using var __content = await __response.Content.ReadAsStreamAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return - await global::tryAGI.OpenAI.DeleteAssistantResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs index 81fc8434..196e611c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs @@ -24,16 +24,12 @@ partial void ProcessDeleteMessageResponseContent( ref string content); /// - /// Delete message
/// Deletes a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task DeleteMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs index e441a65c..1504374a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs @@ -22,15 +22,11 @@ partial void ProcessDeleteThreadResponseContent( ref string content); /// - /// Delete thread
/// Delete a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task DeleteThreadAsync( string threadId, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetAssistant.g.cs deleted file mode 100644 index 64481d2e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetAssistant.g.cs +++ /dev/null @@ -1,164 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AssistantsClient - { - partial void PrepareGetAssistantArguments( - global::System.Net.Http.HttpClient httpClient, - ref string assistantId); - partial void PrepareGetAssistantRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string assistantId); - partial void ProcessGetAssistantResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetAssistantResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Retrieve assistant
- /// Retrieves an assistant. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task GetAssistantAsync( - string assistantId, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetAssistantArguments( - httpClient: HttpClient, - assistantId: ref assistantId); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: $"/assistants/{assistantId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetAssistantRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - assistantId: assistantId); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessGetAssistantResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetAssistantResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::tryAGI.OpenAI.AssistantObject.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - using var __content = await __response.Content.ReadAsStreamAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return - await global::tryAGI.OpenAI.AssistantObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetMessage.g.cs index 75a4a4a0..b276c790 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetMessage.g.cs @@ -24,16 +24,12 @@ partial void ProcessGetMessageResponseContent( ref string content); /// - /// Retrieve message
/// Retrieve a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task GetMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRun.g.cs index 7186e5b4..28b33ca1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRun.g.cs @@ -24,16 +24,12 @@ partial void ProcessGetRunResponseContent( ref string content); /// - /// Retrieve run
/// Retrieves a run. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task GetRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRunStep.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRunStep.g.cs index d35061fa..984d198f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRunStep.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetRunStep.g.cs @@ -28,7 +28,6 @@ partial void ProcessGetRunStepResponseContent( ref string content); /// - /// Retrieve run step
/// Retrieves a run step. ///
/// @@ -37,9 +36,6 @@ partial void ProcessGetRunStepResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task GetRunStepAsync( string threadId, string runId, @@ -59,7 +55,7 @@ partial void ProcessGetRunStepResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/threads/{threadId}/runs/{runId}/steps/{stepId}", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("include[]", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetThread.g.cs index 8706d80b..7181ae14 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.GetThread.g.cs @@ -22,15 +22,11 @@ partial void ProcessGetThreadResponseContent( ref string content); /// - /// Retrieve thread
/// Retrieves a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task GetThreadAsync( string threadId, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListAssistants.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListAssistants.g.cs deleted file mode 100644 index bcb467ba..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListAssistants.g.cs +++ /dev/null @@ -1,192 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AssistantsClient - { - partial void PrepareListAssistantsArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? limit, - ref global::tryAGI.OpenAI.ListAssistantsOrder? order, - ref string? after, - ref string? before); - partial void PrepareListAssistantsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? limit, - global::tryAGI.OpenAI.ListAssistantsOrder? order, - string? after, - string? before); - partial void ProcessListAssistantsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListAssistantsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List assistants
- /// Returns a list of assistants. - ///
- /// - /// Default Value: 20 - /// - /// - /// Default Value: desc - /// - /// - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task ListAssistantsAsync( - int? limit = default, - global::tryAGI.OpenAI.ListAssistantsOrder? order = default, - string? after = default, - string? before = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListAssistantsArguments( - httpClient: HttpClient, - limit: ref limit, - order: ref order, - after: ref after, - before: ref before); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: "/assistants", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("before", before) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListAssistantsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - limit: limit, - order: order, - after: after, - before: before); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessListAssistantsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessListAssistantsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::tryAGI.OpenAI.ListAssistantsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - using var __content = await __response.Content.ReadAsStreamAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return - await global::tryAGI.OpenAI.ListAssistantsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs index 4d67315c..4e550aa7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs @@ -32,7 +32,6 @@ partial void ProcessListMessagesResponseContent( ref string content); /// - /// List messages
/// Returns a list of messages for a given thread. ///
/// @@ -47,9 +46,6 @@ partial void ProcessListMessagesResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ListMessagesAsync( string threadId, int? limit = default, @@ -73,11 +69,11 @@ partial void ProcessListMessagesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/threads/{threadId}/messages", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("before", before) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) .AddOptionalParameter("run_id", runId) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs index fa679cc9..ef9b9bbe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs @@ -34,7 +34,6 @@ partial void ProcessListRunStepsResponseContent( ref string content); /// - /// List run steps
/// Returns a list of run steps belonging to a run. ///
/// @@ -50,9 +49,6 @@ partial void ProcessListRunStepsResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ListRunStepsAsync( string threadId, string runId, @@ -78,11 +74,11 @@ partial void ProcessListRunStepsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/threads/{threadId}/runs/{runId}/steps", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("before", before) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) .AddOptionalParameter("include[]", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs index acf16138..a4ebdaed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs @@ -30,7 +30,6 @@ partial void ProcessListRunsResponseContent( ref string content); /// - /// List runs
/// Returns a list of runs belonging to a thread. ///
/// @@ -44,9 +43,6 @@ partial void ProcessListRunsResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ListRunsAsync( string threadId, int? limit = default, @@ -68,10 +64,10 @@ partial void ProcessListRunsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/threads/{threadId}/runs", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("before", before) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyAssistant.g.cs deleted file mode 100644 index 4ff84ae4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyAssistant.g.cs +++ /dev/null @@ -1,269 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AssistantsClient - { - partial void PrepareModifyAssistantArguments( - global::System.Net.Http.HttpClient httpClient, - ref string assistantId, - global::tryAGI.OpenAI.ModifyAssistantRequest request); - partial void PrepareModifyAssistantRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string assistantId, - global::tryAGI.OpenAI.ModifyAssistantRequest request); - partial void ProcessModifyAssistantResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessModifyAssistantResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Modify assistant
- /// Modifies an assistant. - ///
- /// - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task ModifyAssistantAsync( - string assistantId, - global::tryAGI.OpenAI.ModifyAssistantRequest request, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareModifyAssistantArguments( - httpClient: HttpClient, - assistantId: ref assistantId, - request: request); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: $"/assistants/{assistantId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareModifyAssistantRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - assistantId: assistantId, - request: request); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessModifyAssistantResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModifyAssistantResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::tryAGI.OpenAI.AssistantObject.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - using var __content = await __response.Content.ReadAsStreamAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return - await global::tryAGI.OpenAI.AssistantObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - - /// - /// Modify assistant
- /// Modifies an assistant. - ///
- /// - /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. - /// - /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - public async global::System.Threading.Tasks.Task ModifyAssistantAsync( - string assistantId, - string? description = default, - string? instructions = default, - global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - string? name = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - object? responseFormat = default, - double? temperature = default, - global::tryAGI.OpenAI.ModifyAssistantRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, - double? topP = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::tryAGI.OpenAI.ModifyAssistantRequest - { - Description = description, - Instructions = instructions, - Metadata = metadata, - Model = model, - Name = name, - ReasoningEffort = reasoningEffort, - ResponseFormat = responseFormat, - Temperature = temperature, - ToolResources = toolResources, - Tools = tools, - TopP = topP, - }; - - return await ModifyAssistantAsync( - assistantId: assistantId, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs index 9845d443..94666ca8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs @@ -26,7 +26,6 @@ partial void ProcessModifyMessageResponseContent( ref string content); /// - /// Modify message
/// Modifies a message. ///
/// @@ -34,12 +33,10 @@ partial void ProcessModifyMessageResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyMessageAsync( string threadId, string messageId, + global::tryAGI.OpenAI.ModifyMessageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -182,23 +179,13 @@ partial void ProcessModifyMessageResponseContent( } /// - /// Modify message
/// Modifies a message. ///
/// /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs index edf0c3c5..4bdede7c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs @@ -26,7 +26,6 @@ partial void ProcessModifyRunResponseContent( ref string content); /// - /// Modify run
/// Modifies a run. ///
/// @@ -34,12 +33,10 @@ partial void ProcessModifyRunResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyRunAsync( string threadId, string runId, + global::tryAGI.OpenAI.ModifyRunRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -182,23 +179,13 @@ partial void ProcessModifyRunResponseContent( } /// - /// Modify run
/// Modifies a run. ///
/// /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs index 08d8e359..fb45e542 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs @@ -24,18 +24,15 @@ partial void ProcessModifyThreadResponseContent( ref string content); /// - /// Modify thread
/// Modifies a thread. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyThreadAsync( string threadId, + global::tryAGI.OpenAI.ModifyThreadRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -176,35 +173,23 @@ partial void ProcessModifyThreadResponseContent( } /// - /// Modify thread
/// Modifies a thread. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. - /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ModifyThreadAsync( string threadId, + global::tryAGI.OpenAI.ModifyThreadRequestToolResources2? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.ModifyThreadRequestToolResources? toolResources = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.ModifyThreadRequest { - Metadata = metadata, ToolResources = toolResources, + Metadata = metadata, }; return await ModifyThreadAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs index d3e25913..0af6f57d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs @@ -26,7 +26,6 @@ partial void ProcessSubmitToolOuputsToRunResponseContent( ref string content); /// - /// Submit tool outputs to run
/// When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. ///
/// @@ -34,12 +33,10 @@ partial void ProcessSubmitToolOuputsToRunResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task SubmitToolOuputsToRunAsync( string threadId, string runId, + global::tryAGI.OpenAI.SubmitToolOutputsRunRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -182,22 +179,16 @@ partial void ProcessSubmitToolOuputsToRunResponseContent( } /// - /// Submit tool outputs to run
/// When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. ///
/// /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// /// /// A list of tools for which the outputs are being submitted. /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task SubmitToolOuputsToRunAsync( string threadId, string runId, @@ -207,8 +198,8 @@ partial void ProcessSubmitToolOuputsToRunResponseContent( { var __request = new global::tryAGI.OpenAI.SubmitToolOutputsRunRequest { - Stream = stream, ToolOutputs = toolOutputs, + Stream = stream, }; return await SubmitToolOuputsToRunAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs deleted file mode 100644 index 715dc12b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs +++ /dev/null @@ -1,216 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial class AudioClient - { - partial void PrepareCreateSpeechArguments( - global::System.Net.Http.HttpClient httpClient, - global::tryAGI.OpenAI.CreateSpeechRequest request); - partial void PrepareCreateSpeechRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::tryAGI.OpenAI.CreateSpeechRequest request); - partial void ProcessCreateSpeechResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateSpeechResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref byte[] content); - - /// - /// Create speech
- /// Generates audio from the input text. - ///
- /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateSpeechAsync( - global::tryAGI.OpenAI.CreateSpeechRequest request, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateSpeechArguments( - httpClient: HttpClient, - request: request); - - var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( - path: "/audio/speech", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateSpeechRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateSpeechResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsByteArrayAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - ProcessCreateSpeechResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - - var __content = await __response.Content.ReadAsByteArrayAsync( -#if NET5_0_OR_GREATER - cancellationToken -#endif - ).ConfigureAwait(false); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::tryAGI.OpenAI.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - } - - /// - /// Create speech
- /// Generates audio from the input text. - ///
- /// - /// The text to generate audio for. The maximum length is 4096 characters. - /// - /// - /// Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. - /// - /// - /// One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. - /// - /// - /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
- /// Default Value: mp3 - /// - /// - /// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.
- /// Default Value: 1 - /// - /// - /// The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.
- /// Default Value: audio - /// - /// - /// Example: ash - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateSpeechAsync( - string input, - global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.VoiceIdsShared voice, - string? instructions = default, - global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? responseFormat = default, - double? speed = default, - global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? streamFormat = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::tryAGI.OpenAI.CreateSpeechRequest - { - Input = input, - Instructions = instructions, - Model = model, - ResponseFormat = responseFormat, - Speed = speed, - StreamFormat = streamFormat, - Voice = voice, - }; - - return await CreateSpeechAsync( - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeechAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeechAsStream.g.cs new file mode 100644 index 00000000..2a33f554 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeechAsStream.g.cs @@ -0,0 +1,194 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareCreateSpeechAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateSpeechRequest request); + partial void PrepareCreateSpeechAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateSpeechRequest request); + partial void ProcessCreateSpeechAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Generates audio from the input text.
+ /// Returns the audio file content, or a stream of audio events. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateSpeechAsStreamAsync( + + global::tryAGI.OpenAI.CreateSpeechRequest request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateSpeechAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/audio/speech", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateSpeechAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateSpeechAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// Generates audio from the input text.
+ /// Returns the audio file content, or a stream of audio events. + ///
+ /// + /// One of the available [TTS models](/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + /// + /// + /// The text to generate audio for. The maximum length is 4096 characters. + /// + /// + /// Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. + /// + /// + /// The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech#voice-options). + /// + /// + /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
+ /// Default Value: mp3 + /// + /// + /// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.
+ /// Default Value: 1 + /// + /// + /// The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.
+ /// Default Value: audio + /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateSpeechAsStreamAsync( + global::tryAGI.OpenAI.AnyOf model, + string input, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice, + string? instructions = default, + global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? responseFormat = default, + double? speed = default, + global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? streamFormat = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateSpeechRequest + { + Model = model, + Input = input, + Instructions = instructions, + Voice = voice, + ResponseFormat = responseFormat, + Speed = speed, + StreamFormat = streamFormat, + }; + + var __enumerable = CreateSpeechAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs index aba2d000..d4902483 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs @@ -22,13 +22,15 @@ partial void ProcessCreateTranscriptionResponseContent( ref string content); /// - /// Create transcription
- /// Transcribes audio into the input language. + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. ///
/// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + public async global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + global::tryAGI.OpenAI.CreateTranscriptionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -68,60 +70,87 @@ partial void ProcessCreateTranscriptionResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); - if (request.ChunkingStrategy != default) - { - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.ChunkingStrategy}"), - name: "chunking_strategy"); - } + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), - name: "file", - fileName: request.Filename ?? string.Empty); - if (request.Include != default) + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) { - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.Include, x => x.ToValueString()))}]"), - name: "include"); - } + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model.ToString() ?? string.Empty), + name: "\"model\""); if (request.Language != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Language}"), - name: "language"); + name: "\"language\""); } - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent(request.Model.ToString() ?? string.Empty), - name: "model"); if (request.Prompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); } if (request.ResponseFormat != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), - name: "response_format"); + name: "\"response_format\""); } - if (request.Stream != default) + if (request.Temperature != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Stream}"), - name: "stream"); + content: new global::System.Net.Http.StringContent($"{request.Temperature}"), + name: "\"temperature\""); } - if (request.Temperature != default) + if (request.Include != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Temperature}"), - name: "temperature"); + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.Include, x => x.ToValueString()))}]"), + name: "\"include\""); } if (request.TimestampGranularities != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.TimestampGranularities, x => x.ToValueString()))}]"), - name: "timestamp_granularities"); + name: "\"timestamp_granularities\""); + } + if (request.Stream != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Stream}"), + name: "\"stream\""); + } + if (request.ChunkingStrategy != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ChunkingStrategy}"), + name: "\"chunking_strategy\""); + } + if (request.KnownSpeakerNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.KnownSpeakerNames, x => x))}]"), + name: "\"known_speaker_names\""); + } + if (request.KnownSpeakerReferences != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.KnownSpeakerReferences, x => x))}]"), + name: "\"known_speaker_references\""); } __httpRequest.Content = __httpRequestContent; @@ -167,7 +196,7 @@ partial void ProcessCreateTranscriptionResponseContent( __response.EnsureSuccessStatusCode(); return - global::tryAGI.OpenAI.AnyOf.FromJson(__content, JsonSerializerContext) ?? + global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -198,7 +227,7 @@ partial void ProcessCreateTranscriptionResponseContent( ).ConfigureAwait(false); return - await global::tryAGI.OpenAI.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) @@ -218,82 +247,87 @@ partial void ProcessCreateTranscriptionResponseContent( } /// - /// Create transcription
- /// Transcribes audio into the input language. + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. ///
- /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// - /// - /// Additional information to include in the transcription response.
- /// `logprobs` will return the log probabilities of the tokens in the
- /// response to understand the model's confidence in the transcription.
- /// `logprobs` only works with response_format set to `json` and only with
- /// the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. + /// + /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
+ /// Example: gpt-4o-transcribe /// /// /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. /// - /// - /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).
- /// Example: gpt-4o-transcribe - /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. /// /// - /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
+ /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// Default Value: json /// - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
- /// for more information.
- /// Note: Streaming is not supported for the `whisper-1` model and will be ignored.
- /// Default Value: false - /// /// /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
/// Default Value: 0 /// + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// /// /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
/// Default Value: [segment] /// + /// + /// + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + public async global::System.Threading.Tasks.Task> CreateTranscriptionAsync( byte[] file, string filename, global::tryAGI.OpenAI.AnyOf model, - object? chunkingStrategy = default, - global::System.Collections.Generic.IList? include = default, string? language = default, string? prompt = default, global::tryAGI.OpenAI.AudioResponseFormat? responseFormat = default, - bool? stream = default, double? temperature = default, + global::System.Collections.Generic.IList? include = default, global::System.Collections.Generic.IList? timestampGranularities = default, + bool? stream = default, + global::tryAGI.OpenAI.AnyOf? chunkingStrategy = default, + global::System.Collections.Generic.IList? knownSpeakerNames = default, + global::System.Collections.Generic.IList? knownSpeakerReferences = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateTranscriptionRequest { - ChunkingStrategy = chunkingStrategy, File = file, Filename = filename, - Include = include, - Language = language, Model = model, + Language = language, Prompt = prompt, ResponseFormat = responseFormat, - Stream = stream, Temperature = temperature, + Include = include, TimestampGranularities = timestampGranularities, + Stream = stream, + ChunkingStrategy = chunkingStrategy, + KnownSpeakerNames = knownSpeakerNames, + KnownSpeakerReferences = knownSpeakerReferences, }; return await CreateTranscriptionAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs new file mode 100644 index 00000000..c4ad6322 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs @@ -0,0 +1,306 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareCreateTranscriptionAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateTranscriptionRequest request); + partial void PrepareCreateTranscriptionAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateTranscriptionRequest request); + partial void ProcessCreateTranscriptionAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateTranscriptionAsStreamAsync( + + global::tryAGI.OpenAI.CreateTranscriptionRequest request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTranscriptionAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/audio/transcriptions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model.ToString() ?? string.Empty), + name: "\"model\""); + if (request.Language != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Language}"), + name: "\"language\""); + } + if (request.Prompt != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + } + if (request.ResponseFormat != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), + name: "\"response_format\""); + } + if (request.Temperature != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Temperature}"), + name: "\"temperature\""); + } + if (request.Include != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.Include, x => x.ToValueString()))}]"), + name: "\"include\""); + } + if (request.TimestampGranularities != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.TimestampGranularities, x => x.ToValueString()))}]"), + name: "\"timestamp_granularities\""); + } + if (request.Stream != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Stream}"), + name: "\"stream\""); + } + if (request.ChunkingStrategy != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ChunkingStrategy}"), + name: "\"chunking_strategy\""); + } + if (request.KnownSpeakerNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.KnownSpeakerNames, x => x))}]"), + name: "\"known_speaker_names\""); + } + if (request.KnownSpeakerReferences != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.KnownSpeakerReferences, x => x))}]"), + name: "\"known_speaker_references\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateTranscriptionAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateTranscriptionAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. + ///
+ /// + /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. + /// + /// + /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. + /// + /// + /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
+ /// Example: gpt-4o-transcribe + /// + /// + /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. + /// + /// + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// + /// + /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
+ /// Default Value: json + /// + /// + /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
+ /// Default Value: 0 + /// + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// + /// + /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
+ /// Default Value: [segment] + /// + /// + /// + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateTranscriptionAsStreamAsync( + byte[] file, + string filename, + global::tryAGI.OpenAI.AnyOf model, + string? language = default, + string? prompt = default, + global::tryAGI.OpenAI.AudioResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? timestampGranularities = default, + bool? stream = default, + global::tryAGI.OpenAI.AnyOf? chunkingStrategy = default, + global::System.Collections.Generic.IList? knownSpeakerNames = default, + global::System.Collections.Generic.IList? knownSpeakerReferences = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateTranscriptionRequest + { + File = file, + Filename = filename, + Model = model, + Language = language, + Prompt = prompt, + ResponseFormat = responseFormat, + Temperature = temperature, + Include = include, + TimestampGranularities = timestampGranularities, + Stream = stream, + ChunkingStrategy = chunkingStrategy, + KnownSpeakerNames = knownSpeakerNames, + KnownSpeakerReferences = knownSpeakerReferences, + }; + + var __enumerable = CreateTranscriptionAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs index dfec9e9c..7bac6341 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateTranslationResponseContent( ref string content); /// - /// Create translation
/// Translates audio into English. ///
/// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> CreateTranslationAsync( + public async global::System.Threading.Tasks.Task> CreateTranslationAsync( + global::tryAGI.OpenAI.CreateTranslationRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -68,30 +68,38 @@ partial void ProcessCreateTranslationResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), - name: "file", - fileName: request.Filename ?? string.Empty); + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Model.ToString() ?? string.Empty), - name: "model"); + name: "\"model\""); if (request.Prompt != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); + name: "\"prompt\""); } if (request.ResponseFormat != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), - name: "response_format"); + name: "\"response_format\""); } if (request.Temperature != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Temperature}"), - name: "temperature"); + name: "\"temperature\""); } __httpRequest.Content = __httpRequestContent; @@ -137,7 +145,7 @@ partial void ProcessCreateTranslationResponseContent( __response.EnsureSuccessStatusCode(); return - global::tryAGI.OpenAI.AnyOf.FromJson(__content, JsonSerializerContext) ?? + global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -168,7 +176,7 @@ partial void ProcessCreateTranslationResponseContent( ).ConfigureAwait(false); return - await global::tryAGI.OpenAI.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) @@ -188,7 +196,6 @@ partial void ProcessCreateTranslationResponseContent( } /// - /// Create translation
/// Translates audio into English. ///
/// @@ -202,7 +209,7 @@ partial void ProcessCreateTranslationResponseContent( /// Example: whisper-1 /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should be in English. /// /// /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
@@ -214,7 +221,7 @@ partial void ProcessCreateTranslationResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> CreateTranslationAsync( + public async global::System.Threading.Tasks.Task> CreateTranslationAsync( byte[] file, string filename, global::tryAGI.OpenAI.AnyOf model, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs new file mode 100644 index 00000000..83fd87d2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs @@ -0,0 +1,225 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareCreateVoiceArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateVoiceRequest request); + partial void PrepareCreateVoiceRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateVoiceRequest request); + partial void ProcessCreateVoiceResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVoiceResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a custom voice.
+ /// Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVoiceAsync( + + global::tryAGI.OpenAI.CreateVoiceRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateVoiceArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/audio/voices", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Name}"), + name: "\"name\""); + var __contentAudioSample = new global::System.Net.Http.ByteArrayContent(request.AudioSample ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentAudioSample, + name: "\"audio_sample\"", + fileName: request.AudioSamplename != null ? $"\"{request.AudioSamplename}\"" : string.Empty); + if (__contentAudioSample.Headers.ContentDisposition != null) + { + __contentAudioSample.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Consent}"), + name: "\"consent\""); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateVoiceRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateVoiceResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateVoiceResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Creates a custom voice.
+ /// Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The name of the new voice. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent recording ID (for example, `cons_1234`). + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVoiceAsync( + string name, + byte[] audioSample, + string audioSamplename, + string consent, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateVoiceRequest + { + Name = name, + AudioSample = audioSample, + AudioSamplename = audioSamplename, + Consent = consent, + }; + + return await CreateVoiceAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs new file mode 100644 index 00000000..76fa6f6d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs @@ -0,0 +1,225 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareCreateVoiceConsentArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateVoiceConsentRequest request); + partial void PrepareCreateVoiceConsentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateVoiceConsentRequest request); + partial void ProcessCreateVoiceConsentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVoiceConsentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Upload a voice consent recording.
+ /// Upload a consent recording that authorizes creation of a custom voice.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVoiceConsentAsync( + + global::tryAGI.OpenAI.CreateVoiceConsentRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateVoiceConsentArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/audio/voice_consents", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Name}"), + name: "\"name\""); + var __contentRecording = new global::System.Net.Http.ByteArrayContent(request.Recording ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentRecording, + name: "\"recording\"", + fileName: request.Recordingname != null ? $"\"{request.Recordingname}\"" : string.Empty); + if (__contentRecording.Headers.ContentDisposition != null) + { + __contentRecording.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Language}"), + name: "\"language\""); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateVoiceConsentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateVoiceConsentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateVoiceConsentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Upload a voice consent recording.
+ /// Upload a consent recording that authorizes creation of a custom voice.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The label to use for this consent recording. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVoiceConsentAsync( + string name, + byte[] recording, + string recordingname, + string language, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateVoiceConsentRequest + { + Name = name, + Recording = recording, + Recordingname = recordingname, + Language = language, + }; + + return await CreateVoiceConsentAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs new file mode 100644 index 00000000..ea9eabc5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareDeleteVoiceConsentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string consentId); + partial void PrepareDeleteVoiceConsentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string consentId); + partial void ProcessDeleteVoiceConsentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteVoiceConsentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a voice consent recording.
+ /// Delete a consent recording that was uploaded for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteVoiceConsentAsync( + string consentId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteVoiceConsentArguments( + httpClient: HttpClient, + consentId: ref consentId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/audio/voice_consents/{consentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteVoiceConsentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + consentId: consentId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteVoiceConsentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteVoiceConsentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.GetVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.GetVoiceConsent.g.cs new file mode 100644 index 00000000..ede5aff1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.GetVoiceConsent.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareGetVoiceConsentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string consentId); + partial void PrepareGetVoiceConsentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string consentId); + partial void ProcessGetVoiceConsentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVoiceConsentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieves a voice consent recording.
+ /// Retrieve consent recording metadata used for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetVoiceConsentAsync( + string consentId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetVoiceConsentArguments( + httpClient: HttpClient, + consentId: ref consentId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/audio/voice_consents/{consentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetVoiceConsentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + consentId: consentId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetVoiceConsentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetVoiceConsentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs new file mode 100644 index 00000000..ae16c465 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs @@ -0,0 +1,174 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareListVoiceConsentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? after, + ref int? limit); + partial void PrepareListVoiceConsentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? after, + int? limit); + partial void ProcessListVoiceConsentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListVoiceConsentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Returns a list of voice consent recordings.
+ /// List consent recordings available to your organization for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// Default Value: 20 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListVoiceConsentsAsync( + string? after = default, + int? limit = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListVoiceConsentsArguments( + httpClient: HttpClient, + after: ref after, + limit: ref limit); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/audio/voice_consents", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListVoiceConsentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + after: after, + limit: limit); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListVoiceConsentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListVoiceConsentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceConsentListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceConsentListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs new file mode 100644 index 00000000..be48fe5c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs @@ -0,0 +1,204 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class AudioClient + { + partial void PrepareUpdateVoiceConsentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string consentId, + global::tryAGI.OpenAI.UpdateVoiceConsentRequest request); + partial void PrepareUpdateVoiceConsentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string consentId, + global::tryAGI.OpenAI.UpdateVoiceConsentRequest request); + partial void ProcessUpdateVoiceConsentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateVoiceConsentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a voice consent recording (metadata only).
+ /// Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateVoiceConsentAsync( + string consentId, + + global::tryAGI.OpenAI.UpdateVoiceConsentRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateVoiceConsentArguments( + httpClient: HttpClient, + consentId: ref consentId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/audio/voice_consents/{consentId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateVoiceConsentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + consentId: consentId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateVoiceConsentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateVoiceConsentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Updates a voice consent recording (metadata only).
+ /// Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// The updated label for this consent recording. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateVoiceConsentAsync( + string consentId, + string name, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.UpdateVoiceConsentRequest + { + Name = name, + }; + + return await UpdateVoiceConsentAsync( + consentId: consentId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs index 000951ef..f81c8464 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs @@ -38,7 +38,6 @@ partial void ProcessListAuditLogsResponseContent( ref string content); /// - /// List audit logs
/// List user actions and configuration changes within this organization. ///
/// @@ -83,18 +82,18 @@ partial void ProcessListAuditLogsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/audit_logs", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("gt", effectiveAt?.Gt?.ToString()) - .AddOptionalParameter("gte", effectiveAt?.Gte?.ToString()) - .AddOptionalParameter("lt", effectiveAt?.Lt?.ToString()) - .AddOptionalParameter("lte", effectiveAt?.Lte?.ToString()) - .AddOptionalParameter("project_ids[]", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("event_types[]", eventTypes, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("actor_ids[]", actorIds, delimiter: ",", explode: true) - .AddOptionalParameter("actor_emails[]", actorEmails, delimiter: ",", explode: true) - .AddOptionalParameter("resource_ids[]", resourceIds, delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("gt", effectiveAt?.Gt?.ToString()) + .AddOptionalParameter("gte", effectiveAt?.Gte?.ToString()) + .AddOptionalParameter("lt", effectiveAt?.Lt?.ToString()) + .AddOptionalParameter("lte", effectiveAt?.Lte?.ToString()) + .AddOptionalParameter("project_ids[]", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("event_types[]", eventTypes, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("actor_ids[]", actorIds, delimiter: ",", explode: true) + .AddOptionalParameter("actor_emails[]", actorEmails, delimiter: ",", explode: true) + .AddOptionalParameter("resource_ids[]", resourceIds, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("before", before) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs index 88d49fe9..348f954b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs @@ -22,7 +22,6 @@ partial void ProcessCancelBatchResponseContent( ref string content); /// - /// Cancel batch
/// Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs index d0c9ec10..4015aa10 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateBatchResponseContent( ref string content); /// - /// Create batch
/// Creates and executes a batch from an uploaded file of requests ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateBatchAsync( + global::tryAGI.OpenAI.CreateBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,35 +167,28 @@ partial void ProcessCreateBatchResponseContent( } /// - /// Create batch
/// Creates and executes a batch from an uploaded file of requests ///
- /// - /// The time frame within which the batch should be processed. Currently only `24h` is supported. - /// - /// - /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. - /// /// /// The ID of an uploaded file that contains requests for the new batch.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
- /// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
+ /// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// + /// + /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The time frame within which the batch should be processed. Currently only `24h` is supported. /// + /// /// /// The expiration policy for the output and/or error file that are generated for a batch. /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateBatchAsync( - global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, string inputFileId, + global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow completionWindow = default, global::System.Collections.Generic.Dictionary? metadata = default, global::tryAGI.OpenAI.BatchFileExpirationAfter? outputExpiresAfter = default, @@ -203,9 +196,9 @@ partial void ProcessCreateBatchResponseContent( { var __request = new global::tryAGI.OpenAI.CreateBatchRequest { - CompletionWindow = completionWindow, - Endpoint = endpoint, InputFileId = inputFileId, + Endpoint = endpoint, + CompletionWindow = completionWindow, Metadata = metadata, OutputExpiresAfter = outputExpiresAfter, }; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs index b62e309d..4031d714 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs @@ -24,7 +24,6 @@ partial void ProcessListBatchesResponseContent( ref string content); /// - /// List batch
/// List your organization's batches. ///
/// @@ -48,8 +47,8 @@ partial void ProcessListBatchesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/batches", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("after", after) .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs index 87158a1e..7d075464 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveBatchResponseContent( ref string content); /// - /// Retrieve batch
/// Retrieves a batch. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateOrganizationCertificates.g.cs index 11ce44c2..2e551422 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateOrganizationCertificates.g.cs @@ -22,7 +22,6 @@ partial void ProcessActivateOrganizationCertificatesResponseContent( ref string content); /// - /// Activate certificates for organization
/// Activate certificates at the organization level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
@@ -30,6 +29,7 @@ partial void ProcessActivateOrganizationCertificatesResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task ActivateOrganizationCertificatesAsync( + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,7 +168,6 @@ partial void ProcessActivateOrganizationCertificatesResponseContent( } /// - /// Activate certificates for organization
/// Activate certificates at the organization level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateProjectCertificates.g.cs index b7c2e882..4adb5299 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateProjectCertificates.g.cs @@ -24,7 +24,6 @@ partial void ProcessActivateProjectCertificatesResponseContent( ref string content); /// - /// Activate certificates for project
/// Activate certificates at the project level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
@@ -34,6 +33,7 @@ partial void ProcessActivateProjectCertificatesResponseContent( /// public async global::System.Threading.Tasks.Task ActivateProjectCertificatesAsync( string projectId, + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -174,7 +174,6 @@ partial void ProcessActivateProjectCertificatesResponseContent( } /// - /// Activate certificates for project
/// Activate certificates at the project level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateOrganizationCertificates.g.cs index c98b5a5c..dbbc6743 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateOrganizationCertificates.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeactivateOrganizationCertificatesResponseContent( ref string content); /// - /// Deactivate certificates for organization
/// Deactivate certificates at the organization level.
/// You can atomically and idempotently deactivate up to 10 certificates at a time. ///
@@ -30,6 +29,7 @@ partial void ProcessDeactivateOrganizationCertificatesResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task DeactivateOrganizationCertificatesAsync( + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,7 +168,6 @@ partial void ProcessDeactivateOrganizationCertificatesResponseContent( } /// - /// Deactivate certificates for organization
/// Deactivate certificates at the organization level.
/// You can atomically and idempotently deactivate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateProjectCertificates.g.cs index e7596988..97726a7e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateProjectCertificates.g.cs @@ -24,7 +24,6 @@ partial void ProcessDeactivateProjectCertificatesResponseContent( ref string content); /// - /// Deactivate certificates for project
/// Deactivate certificates at the project level. You can atomically and
/// idempotently deactivate up to 10 certificates at a time. ///
@@ -34,6 +33,7 @@ partial void ProcessDeactivateProjectCertificatesResponseContent( /// public async global::System.Threading.Tasks.Task DeactivateProjectCertificatesAsync( string projectId, + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -174,7 +174,6 @@ partial void ProcessDeactivateProjectCertificatesResponseContent( } /// - /// Deactivate certificates for project
/// Deactivate certificates at the project level. You can atomically and
/// idempotently deactivate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs index e8e8f88b..05e9ee06 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteCertificateResponseContent( ref string content); /// - /// Delete certificate
/// Delete a certificate from the organization.
/// The certificate must be inactive for the organization and all projects. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs index 23bbe0bb..6ec0bcb6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs @@ -24,7 +24,6 @@ partial void ProcessGetCertificateResponseContent( ref string content); /// - /// Get certificate
/// Get a certificate that has been uploaded to the organization.
/// You can get a certificate regardless of whether it is active or not. ///
@@ -47,7 +46,7 @@ partial void ProcessGetCertificateResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/certificates/{certificateId}", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs index 5337c15c..b0018efc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs @@ -26,7 +26,6 @@ partial void ProcessListOrganizationCertificatesResponseContent( ref string content); /// - /// List organization certificates
/// List uploaded certificates for this organization. ///
/// @@ -55,9 +54,9 @@ partial void ProcessListOrganizationCertificatesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/certificates", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs index 5e9a2159..d6ed3286 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs @@ -28,7 +28,6 @@ partial void ProcessListProjectCertificatesResponseContent( ref string content); /// - /// List project certificates
/// List certificates for this project. ///
/// @@ -60,9 +59,9 @@ partial void ProcessListProjectCertificatesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/projects/{projectId}/certificates", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs index be98b249..e488cc82 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs @@ -24,7 +24,6 @@ partial void ProcessModifyCertificateResponseContent( ref string content); /// - /// Modify certificate
/// Modify a certificate. Note that only the name can be modified. ///
/// @@ -33,6 +32,7 @@ partial void ProcessModifyCertificateResponseContent( /// public async global::System.Threading.Tasks.Task ModifyCertificateAsync( string certificateId, + global::tryAGI.OpenAI.ModifyCertificateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -173,7 +173,6 @@ partial void ProcessModifyCertificateResponseContent( } /// - /// Modify certificate
/// Modify a certificate. Note that only the name can be modified. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs index 476c921f..d4cf7f8b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs @@ -22,7 +22,6 @@ partial void ProcessUploadCertificateResponseContent( ref string content); /// - /// Upload certificate
/// Upload a certificate to the organization. This does **not** automatically activate the certificate.
/// Organizations can upload up to 50 certificates. ///
@@ -30,6 +29,7 @@ partial void ProcessUploadCertificateResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UploadCertificateAsync( + global::tryAGI.OpenAI.UploadCertificateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,16 +168,15 @@ partial void ProcessUploadCertificateResponseContent( } /// - /// Upload certificate
/// Upload a certificate to the organization. This does **not** automatically activate the certificate.
/// Organizations can upload up to 50 certificates. ///
- /// - /// The certificate content in PEM format - /// /// /// An optional name for the certificate /// + /// + /// The certificate content in PEM format + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UploadCertificateAsync( @@ -187,8 +186,8 @@ partial void ProcessUploadCertificateResponseContent( { var __request = new global::tryAGI.OpenAI.UploadCertificateRequest { - Content = content, Name = name, + Content = content, }; return await UploadCertificateAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs index 78d461d3..3d2881ee 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs @@ -22,24 +22,26 @@ partial void ProcessCreateChatCompletionResponseContent( ref string content); /// - /// Create chat completion
- /// **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses)
+ /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
/// to take advantage of the latest OpenAI platform features. Compare
- /// [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
/// ---
/// Creates a model response for the given chat conversation. Learn more in the
- /// [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),
- /// and [audio](https://platform.openai.com/docs/guides/audio) guides.
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
/// Parameter support can differ depending on the model used to generate the
/// response, particularly for newer reasoning models. Parameters that are only
- /// supported for reasoning models are noted below. For the current state of
- /// unsupported parameters in reasoning models,
- /// [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateChatCompletionAsync( + global::tryAGI.OpenAI.CreateChatCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -176,19 +178,20 @@ partial void ProcessCreateChatCompletionResponseContent( } /// - /// Create chat completion
- /// **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses)
+ /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
/// to take advantage of the latest OpenAI platform features. Compare
- /// [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
/// ---
/// Creates a model response for the given chat conversation. Learn more in the
- /// [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),
- /// and [audio](https://platform.openai.com/docs/guides/audio) guides.
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
/// Parameter support can differ depending on the model used to generate the
/// response, particularly for newer reasoning models. Parameters that are only
- /// supported for reasoning models are noted below. For the current state of
- /// unsupported parameters in reasoning models,
- /// [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. ///
/// The token to cancel the operation with /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs new file mode 100644 index 00000000..0893f33e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs @@ -0,0 +1,178 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ChatClient + { + partial void PrepareCreateChatCompletionAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateChatCompletionRequest request); + partial void PrepareCreateChatCompletionAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateChatCompletionRequest request); + partial void ProcessCreateChatCompletionAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
+ /// to take advantage of the latest OpenAI platform features. Compare
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// ---
+ /// Creates a model response for the given chat conversation. Learn more in the
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
+ /// Parameter support can differ depending on the model used to generate the
+ /// response, particularly for newer reasoning models. Parameters that are only
+ /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateChatCompletionAsStreamAsync( + + global::tryAGI.OpenAI.CreateChatCompletionRequest request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCreateChatCompletionAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/chat/completions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateChatCompletionAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateChatCompletionAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.CreateChatCompletionStreamResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
+ /// to take advantage of the latest OpenAI platform features. Compare
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// ---
+ /// Creates a model response for the given chat conversation. Learn more in the
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
+ /// Parameter support can differ depending on the model used to generate the
+ /// response, particularly for newer reasoning models. Parameters that are only
+ /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. + ///
+ /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateChatCompletionAsStreamAsync( + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateChatCompletionRequest + { + }; + + var __enumerable = CreateChatCompletionAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs index 5c1088e0..b65ea974 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteChatCompletionResponseContent( ref string content); /// - /// Delete chat completion
/// Delete a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be deleted. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs index 7d6bd8c1..99eb1a40 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs @@ -22,7 +22,6 @@ partial void ProcessGetChatCompletionResponseContent( ref string content); /// - /// Get chat completion
/// Get a stored chat completion. Only Chat Completions that have been created
/// with the `store` parameter set to `true` will be returned. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletionMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletionMessages.g.cs index e0e1998d..12f2c74a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletionMessages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletionMessages.g.cs @@ -28,7 +28,6 @@ partial void ProcessGetChatCompletionMessagesResponseContent( ref string content); /// - /// Get chat messages
/// Get the messages in a stored chat completion. Only Chat Completions that
/// have been created with the `store` parameter set to `true` will be
/// returned. @@ -62,9 +61,9 @@ partial void ProcessGetChatCompletionMessagesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/chat/completions/{completionId}/messages", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs index 33ea9d83..9bd41f81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs @@ -30,18 +30,11 @@ partial void ProcessListChatCompletionsResponseContent( ref string content); /// - /// List Chat Completions
/// List stored Chat Completions. Only Chat Completions that have been stored
/// with the `store` parameter set to `true` will be returned. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// /// /// Default Value: 20 @@ -72,11 +65,11 @@ partial void ProcessListChatCompletionsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/chat/completions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .AddOptionalParameter("metadata", metadata?.ToString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("model", model) + .AddOptionalParameter("metadata", metadata?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs index 10aeb487..dbf0dede 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs @@ -24,7 +24,6 @@ partial void ProcessUpdateChatCompletionResponseContent( ref string content); /// - /// Update chat completion
/// Modify a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be modified. Currently,
/// the only supported modification is to update the `metadata` field. @@ -35,6 +34,7 @@ partial void ProcessUpdateChatCompletionResponseContent( /// public async global::System.Threading.Tasks.Task UpdateChatCompletionAsync( string completionId, + global::tryAGI.OpenAI.UpdateChatCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -175,19 +175,12 @@ partial void ProcessUpdateChatCompletionResponseContent( } /// - /// Update chat completion
/// Modify a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be modified. Currently,
/// the only supported modification is to update the `metadata` field. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateChatCompletionAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs index c335bb85..8b8d0399 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs @@ -22,13 +22,14 @@ partial void ProcessCreateCompletionResponseContent( ref string content); /// - /// Create completion
- /// Creates a completion for the provided prompt and parameters. + /// Creates a completion for the provided prompt and parameters.
+ /// Returns a completion object, or a sequence of completion objects if the request is streamed. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateCompletionAsync( + global::tryAGI.OpenAI.CreateCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,9 +168,17 @@ partial void ProcessCreateCompletionResponseContent( } /// - /// Create completion
- /// Creates a completion for the provided prompt and parameters. + /// Creates a completion for the provided prompt and parameters.
+ /// Returns a completion object, or a sequence of completion objects if the request is streamed. ///
+ /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. + /// + /// + /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
+ /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
+ /// Default Value: <|endoftext|> + /// /// /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
/// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
@@ -182,17 +191,19 @@ partial void ProcessCreateCompletionResponseContent( /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// /// /// Modify the likelihood of specified tokens appearing in the completion.
/// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
- /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.
- /// The maximum value for `logprobs` is 5. + /// The maximum value for `logprobs` is 5.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The maximum number of [tokens](/tokenizer) that can be generated in the completion.
@@ -200,9 +211,6 @@ partial void ProcessCreateCompletionResponseContent( /// Default Value: 16
/// Example: 16 /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// /// /// How many completions to generate for each prompt.
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
@@ -211,13 +219,9 @@ partial void ProcessCreateCompletionResponseContent( /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// - /// - /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
- /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - /// /// /// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. @@ -225,18 +229,18 @@ partial void ProcessCreateCompletionResponseContent( /// /// Not supported with latest reasoning models `o3` and `o4-mini`.
/// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
/// Default Value: false /// - /// - /// Options for streaming response. Only set this when you set `stream: true`. - /// + /// /// /// The suffix that comes after a completion of inserted text.
/// This parameter is only supported for `gpt-3.5-turbo-instruct`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// Example: test. /// /// @@ -252,14 +256,14 @@ partial void ProcessCreateCompletionResponseContent( /// Example: 1 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateCompletionAsync( global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, int? bestOf = default, bool? echo = default, double? frequencyPenalty = default, @@ -271,7 +275,7 @@ partial void ProcessCreateCompletionResponseContent( long? seed = default, global::tryAGI.OpenAI.StopConfiguration? stop = default, bool? stream = default, - global::tryAGI.OpenAI.ChatCompletionStreamOptions? streamOptions = default, + global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? streamOptions = default, string? suffix = default, double? temperature = default, double? topP = default, @@ -280,16 +284,16 @@ partial void ProcessCreateCompletionResponseContent( { var __request = new global::tryAGI.OpenAI.CreateCompletionRequest { + Model = model, + Prompt = prompt, BestOf = bestOf, Echo = echo, FrequencyPenalty = frequencyPenalty, LogitBias = logitBias, Logprobs = logprobs, MaxTokens = maxTokens, - Model = model, N = n, PresencePenalty = presencePenalty, - Prompt = prompt, Seed = seed, Stop = stop, Stream = stream, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs index badd2c07..86f34065 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateConversationResponseContent( ref string content); /// - /// Create a conversation
/// Create a conversation. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateConversationAsync( + global::tryAGI.OpenAI.CreateConversationBody request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,24 +167,21 @@ partial void ProcessCreateConversationResponseContent( } /// - /// Create a conversation
/// Create a conversation. ///
- /// - /// Initial items to include in the conversation context. You may add up to 20 items at a time. - /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateConversationAsync( + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Collections.Generic.IList? items = default, - object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateConversationBody { - Items = items, Metadata = metadata, + Items = items, }; return await CreateConversationAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversationItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversationItems.g.cs index 10484bc3..7855d46a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversationItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversationItems.g.cs @@ -8,13 +8,13 @@ public partial class ConversationsClient partial void PrepareCreateConversationItemsArguments( global::System.Net.Http.HttpClient httpClient, ref string conversationId, - global::System.Collections.Generic.IList? include, + global::System.Collections.Generic.IList? include, global::tryAGI.OpenAI.CreateConversationItemsRequest request); partial void PrepareCreateConversationItemsRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string conversationId, - global::System.Collections.Generic.IList? include, + global::System.Collections.Generic.IList? include, global::tryAGI.OpenAI.CreateConversationItemsRequest request); partial void ProcessCreateConversationItemsResponse( global::System.Net.Http.HttpClient httpClient, @@ -26,7 +26,6 @@ partial void ProcessCreateConversationItemsResponseContent( ref string content); /// - /// Create items
/// Create items in a conversation with the given ID. ///
/// @@ -38,8 +37,9 @@ partial void ProcessCreateConversationItemsResponseContent( /// public async global::System.Threading.Tasks.Task CreateConversationItemsAsync( string conversationId, + global::tryAGI.OpenAI.CreateConversationItemsRequest request, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); @@ -55,7 +55,7 @@ partial void ProcessCreateConversationItemsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/conversations/{conversationId}/items", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); @@ -184,7 +184,6 @@ partial void ProcessCreateConversationItemsResponseContent( } /// - /// Create items
/// Create items in a conversation with the given ID. ///
/// @@ -199,7 +198,7 @@ partial void ProcessCreateConversationItemsResponseContent( public async global::System.Threading.Tasks.Task CreateConversationItemsAsync( string conversationId, global::System.Collections.Generic.IList items, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateConversationItemsRequest diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs index 93d5838f..117cbd17 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteConversationResponseContent( ref string content); /// - /// Delete a conversation
/// Delete a conversation. Items in the conversation will not be deleted. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversationItem.g.cs index 238fdae6..2f9651b1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversationItem.g.cs @@ -24,7 +24,6 @@ partial void ProcessDeleteConversationItemResponseContent( ref string content); /// - /// Delete an item
/// Delete an item from a conversation with the given IDs. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs index 123d2ef1..4921ed46 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.cs @@ -22,7 +22,6 @@ partial void ProcessGetConversationResponseContent( ref string content); /// - /// Retrieve a conversation
/// Get a conversation ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversationItem.g.cs index 3d87b0a8..2cda1d0c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversationItem.g.cs @@ -9,13 +9,13 @@ partial void PrepareGetConversationItemArguments( global::System.Net.Http.HttpClient httpClient, ref string conversationId, ref string itemId, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void PrepareGetConversationItemRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string conversationId, string itemId, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void ProcessGetConversationItemResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -26,7 +26,6 @@ partial void ProcessGetConversationItemResponseContent( ref string content); /// - /// Retrieve an item
/// Get a single item from a conversation with the given IDs. ///
/// @@ -41,7 +40,7 @@ partial void ProcessGetConversationItemResponseContent( public async global::System.Threading.Tasks.Task GetConversationItemAsync( string conversationId, string itemId, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -55,7 +54,7 @@ partial void ProcessGetConversationItemResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/conversations/{conversationId}/items/{itemId}", baseUri: HttpClient.BaseAddress); - __pathBuilder + __pathBuilder .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListConversationItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListConversationItems.g.cs index 35b65e2c..dd26ed41 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListConversationItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListConversationItems.g.cs @@ -11,7 +11,7 @@ partial void PrepareListConversationItemsArguments( ref int? limit, ref global::tryAGI.OpenAI.ListConversationItemsOrder? order, ref string? after, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void PrepareListConversationItemsRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, @@ -19,7 +19,7 @@ partial void PrepareListConversationItemsRequest( int? limit, global::tryAGI.OpenAI.ListConversationItemsOrder? order, string? after, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void ProcessListConversationItemsResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -30,7 +30,6 @@ partial void ProcessListConversationItemsResponseContent( ref string content); /// - /// List items
/// List all items for a conversation with the given ID. ///
/// @@ -49,7 +48,7 @@ partial void ProcessListConversationItemsResponseContent( int? limit = default, global::tryAGI.OpenAI.ListConversationItemsOrder? order = default, string? after = default, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -65,10 +64,10 @@ partial void ProcessListConversationItemsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/conversations/{conversationId}/items", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs index f4316574..ab65c9b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs @@ -24,7 +24,6 @@ partial void ProcessUpdateConversationResponseContent( ref string content); /// - /// Update a conversation
/// Update a conversation ///
/// @@ -35,6 +34,7 @@ partial void ProcessUpdateConversationResponseContent( /// public async global::System.Threading.Tasks.Task UpdateConversationAsync( string conversationId, + global::tryAGI.OpenAI.UpdateConversationBody request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -175,18 +175,14 @@ partial void ProcessUpdateConversationResponseContent( } /// - /// Update a conversation
/// Update a conversation ///
/// /// Example: conv_123 /// /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// 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, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// /// The token to cancel the operation with /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbedding.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbedding.g.cs index bce0bc36..a9032bfa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbedding.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbedding.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateEmbeddingResponseContent( ref string content); /// - /// Create embeddings
/// Creates an embedding vector representing the input text. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateEmbeddingAsync( + global::tryAGI.OpenAI.CreateEmbeddingRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,45 +167,44 @@ partial void ProcessCreateEmbeddingResponseContent( } /// - /// Create embeddings
/// Creates an embedding vector representing the input text. ///
- /// - /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. - /// - /// - /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
- /// Default Value: float
- /// Example: float - /// /// /// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
/// Example: The quick brown fox jumped over the lazy dog /// /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: text-embedding-3-small /// + /// + /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
+ /// Default Value: float
+ /// Example: float + /// + /// + /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. + /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateEmbeddingAsync( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf model, - int? dimensions = default, global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? encodingFormat = default, + int? dimensions = default, string? user = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateEmbeddingRequest { - Dimensions = dimensions, - EncodingFormat = encodingFormat, Input = input, Model = model, + EncodingFormat = encodingFormat, + Dimensions = dimensions, User = user, }; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs index b73ade3a..5d908a8d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs @@ -24,7 +24,6 @@ partial void ProcessCancelEvalRunResponseContent( ref string content); /// - /// Cancel eval run
/// Cancel an ongoing evaluation run. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs index 61b8e130..0b5369ec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs @@ -22,15 +22,15 @@ partial void ProcessCreateEvalResponseContent( ref string content); /// - /// Create eval
/// Create the structure of an evaluation that can be used to test a model's performance.
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.
- /// For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + /// For more information, see the [Evals guide](/docs/guides/evals). ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateEvalAsync( + global::tryAGI.OpenAI.CreateEvalRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -169,24 +169,17 @@ partial void ProcessCreateEvalResponseContent( } /// - /// Create eval
/// Create the structure of an evaluation that can be used to test a model's performance.
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.
- /// For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + /// For more information, see the [Evals guide](/docs/guides/evals). ///
- /// - /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the evaluation. /// + /// + /// + /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. + /// /// /// A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`). /// @@ -194,18 +187,18 @@ partial void ProcessCreateEvalResponseContent( /// public async global::System.Threading.Tasks.Task CreateEvalAsync( #pragma warning disable CS0618 // Type or member is obsolete - global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig dataSourceConfig, + global::tryAGI.OpenAI.OneOf dataSourceConfig, #pragma warning disable CS0618 // Type or member is obsolete - global::System.Collections.Generic.IList testingCriteria, - global::System.Collections.Generic.Dictionary? metadata = default, + global::System.Collections.Generic.IList> testingCriteria, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateEvalRequest { - DataSourceConfig = dataSourceConfig, - Metadata = metadata, Name = name, + Metadata = metadata, + DataSourceConfig = dataSourceConfig, TestingCriteria = testingCriteria, }; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs index 2f5f5beb..911ec6b6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs @@ -24,7 +24,6 @@ partial void ProcessCreateEvalRunResponseContent( ref string content); /// - /// Create eval run
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation. ///
/// @@ -33,6 +32,7 @@ partial void ProcessCreateEvalRunResponseContent( /// public async global::System.Threading.Tasks.Task CreateEvalRunAsync( string evalId, + global::tryAGI.OpenAI.CreateEvalRunRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -210,37 +210,30 @@ partial void ProcessCreateEvalRunResponseContent( } /// - /// Create eval run
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation. ///
/// - /// - /// Details about the run's data source. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the run. /// + /// + /// + /// Details about the run's data source. + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateEvalRunAsync( string evalId, - global::tryAGI.OpenAI.AnyOf dataSource, - global::System.Collections.Generic.Dictionary? metadata = default, + global::tryAGI.OpenAI.OneOf dataSource, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateEvalRunRequest { - DataSource = dataSource, - Metadata = metadata, Name = name, + Metadata = metadata, + DataSource = dataSource, }; return await CreateEvalRunAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEval.g.cs index 03d46834..27fdea42 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEval.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteEvalResponseContent( ref string content); /// - /// Delete an eval
/// Delete an evaluation. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs index 83640a7e..ab305a67 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs @@ -24,7 +24,6 @@ partial void ProcessDeleteEvalRunResponseContent( ref string content); /// - /// Delete eval run
/// Delete an eval run. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEval.g.cs index 8489187d..9b4314da 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEval.g.cs @@ -22,7 +22,6 @@ partial void ProcessGetEvalResponseContent( ref string content); /// - /// Get an eval
/// Get an evaluation by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRun.g.cs index 8ea09b79..01e09eab 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRun.g.cs @@ -24,7 +24,6 @@ partial void ProcessGetEvalRunResponseContent( ref string content); /// - /// Get an eval run
/// Get an evaluation run by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItem.g.cs index 4df63a36..2b2cc746 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItem.g.cs @@ -26,7 +26,6 @@ partial void ProcessGetEvalRunOutputItemResponseContent( ref string content); /// - /// Get an output item of an eval run
/// Get an evaluation run output item by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs index 2955ca0d..7f3a1777 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs @@ -32,7 +32,6 @@ partial void ProcessGetEvalRunOutputItemsResponseContent( ref string content); /// - /// Get eval run output items
/// Get a list of output items for an evaluation run. ///
/// @@ -70,10 +69,10 @@ partial void ProcessGetEvalRunOutputItemsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/evals/{evalId}/runs/{runId}/output_items", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("status", status?.ToValueString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("status", status?.ToValueString()) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs index 9fe1b16c..f1183747 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs @@ -30,7 +30,6 @@ partial void ProcessGetEvalRunsResponseContent( ref string content); /// - /// Get eval runs
/// Get a list of runs for an evaluation. ///
/// @@ -65,10 +64,10 @@ partial void ProcessGetEvalRunsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/evals/{evalId}/runs", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) .AddOptionalParameter("status", status?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs index 59e9a5c2..495d4d9e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs @@ -28,7 +28,6 @@ partial void ProcessListEvalsResponseContent( ref string content); /// - /// List evals
/// List evaluations for a project. ///
/// @@ -62,10 +61,10 @@ partial void ProcessListEvalsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/evals", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) .AddOptionalParameter("order_by", orderBy?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateEval.g.cs index f1d79569..1e6c32ee 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateEval.g.cs @@ -24,7 +24,6 @@ partial void ProcessUpdateEvalResponseContent( ref string content); /// - /// Update an eval
/// Update certain properties of an evaluation. ///
/// @@ -33,6 +32,7 @@ partial void ProcessUpdateEvalResponseContent( /// public async global::System.Threading.Tasks.Task UpdateEvalAsync( string evalId, + global::tryAGI.OpenAI.UpdateEvalRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -173,32 +173,25 @@ partial void ProcessUpdateEvalResponseContent( } /// - /// Update an eval
/// Update certain properties of an evaluation. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// Rename the evaluation. /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateEvalAsync( string evalId, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.UpdateEvalRequest { - Metadata = metadata, Name = name, + Metadata = metadata, }; return await UpdateEvalAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.CreateFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.CreateFile.g.cs index c13f89cb..775a3e93 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.CreateFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.CreateFile.g.cs @@ -22,17 +22,27 @@ partial void ProcessCreateFileResponseContent( ref string content); /// - /// Upload file
- /// Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.
- /// The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.
- /// The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.
- /// The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).
- /// Please [contact us](https://help.openai.com/) if you need to increase these storage limits. + /// Upload a file that can be used across various endpoints. Individual files
+ /// can be up to 512 MB, and each project can store up to 2.5 TB of files in
+ /// total. There is no organization-wide storage limit.
+ /// - The Assistants API supports files up to 2 million tokens and of specific
+ /// file types. See the [Assistants Tools guide](/docs/assistants/tools) for
+ /// details.
+ /// - The Fine-tuning API only supports `.jsonl` files. The input also has
+ /// certain required formats for fine-tuning
+ /// [chat](/docs/api-reference/fine-tuning/chat-input) or
+ /// [completions](/docs/api-reference/fine-tuning/completions-input) models.
+ /// - The Batch API only supports `.jsonl` files up to 200 MB in size. The input
+ /// also has a specific required
+ /// [format](/docs/api-reference/batch/request-input).
+ /// Please [contact us](https://help.openai.com/) if you need to increase these
+ /// storage limits. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateFileAsync( + global::tryAGI.OpenAI.CreateFileRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,19 +82,25 @@ partial void ProcessCreateFileResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Purpose.ToValueString()}"), + name: "\"purpose\""); if (request.ExpiresAfter != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ExpiresAfter}"), - name: "expires_after"); - } - __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), - name: "file", - fileName: request.Filename ?? string.Empty); - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Purpose.ToValueString()}"), - name: "purpose"); + name: "\"expires_after\""); + } __httpRequest.Content = __httpRequestContent; PrepareRequest( @@ -180,16 +196,22 @@ partial void ProcessCreateFileResponseContent( } /// - /// Upload file
- /// Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.
- /// The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.
- /// The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.
- /// The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).
- /// Please [contact us](https://help.openai.com/) if you need to increase these storage limits. + /// Upload a file that can be used across various endpoints. Individual files
+ /// can be up to 512 MB, and each project can store up to 2.5 TB of files in
+ /// total. There is no organization-wide storage limit.
+ /// - The Assistants API supports files up to 2 million tokens and of specific
+ /// file types. See the [Assistants Tools guide](/docs/assistants/tools) for
+ /// details.
+ /// - The Fine-tuning API only supports `.jsonl` files. The input also has
+ /// certain required formats for fine-tuning
+ /// [chat](/docs/api-reference/fine-tuning/chat-input) or
+ /// [completions](/docs/api-reference/fine-tuning/completions-input) models.
+ /// - The Batch API only supports `.jsonl` files up to 200 MB in size. The input
+ /// also has a specific required
+ /// [format](/docs/api-reference/batch/request-input).
+ /// Please [contact us](https://help.openai.com/) if you need to increase these
+ /// storage limits. ///
- /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The File object (not file name) to be uploaded. /// @@ -197,23 +219,32 @@ partial void ProcessCreateFileResponseContent( /// The File object (not file name) to be uploaded. /// /// - /// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets + /// The intended purpose of the uploaded file. One of:
+ /// - `assistants`: Used in the Assistants API
+ /// - `batch`: Used in the Batch API
+ /// - `fine-tune`: Used for fine-tuning
+ /// - `vision`: Images used for vision fine-tuning
+ /// - `user_data`: Flexible file type for any purpose
+ /// - `evals`: Used for eval data sets + /// + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateFileAsync( byte[] file, string filename, - global::tryAGI.OpenAI.FilePurpose purpose, + global::tryAGI.OpenAI.CreateFileRequestPurpose purpose, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateFileRequest { - ExpiresAfter = expiresAfter, File = file, Filename = filename, Purpose = purpose, + ExpiresAfter = expiresAfter, }; return await CreateFileAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs index 7c05ddaf..43d0a330 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs @@ -22,8 +22,7 @@ partial void ProcessDeleteFileResponseContent( ref string content); /// - /// Delete file
- /// Delete a file. + /// Delete a file and remove it from all vector stores. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DownloadFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DownloadFile.g.cs index 9c785542..016ef533 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DownloadFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DownloadFile.g.cs @@ -22,7 +22,6 @@ partial void ProcessDownloadFileResponseContent( ref byte[] content); /// - /// Retrieve file content
/// Returns the contents of the specified file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs index fe63e145..4d36e630 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs @@ -28,7 +28,6 @@ partial void ProcessListFilesResponseContent( ref string content); /// - /// List files
/// Returns a list of files. ///
/// @@ -60,10 +59,10 @@ partial void ProcessListFilesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/files", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("purpose", purpose) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) + __pathBuilder + .AddOptionalParameter("purpose", purpose) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs index 3f2eb5fa..23091bd4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveFileResponseContent( ref string content); /// - /// Retrieve file
/// Returns information about a specific file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuningJob.g.cs index cac09749..c0b973a2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuningJob.g.cs @@ -22,7 +22,6 @@ partial void ProcessCancelFineTuningJobResponseContent( ref string content); /// - /// Cancel fine-tuning
/// Immediately cancel a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningCheckpointPermission.g.cs index 6a52266c..7a4eda93 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningCheckpointPermission.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningCheckpointPermission.g.cs @@ -24,7 +24,6 @@ partial void ProcessCreateFineTuningCheckpointPermissionResponseContent( ref string content); /// - /// Create checkpoint permissions
/// **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
/// This enables organization owners to share fine-tuned models with other projects in their organization. ///
@@ -36,6 +35,7 @@ partial void ProcessCreateFineTuningCheckpointPermissionResponseContent( /// public async global::System.Threading.Tasks.Task CreateFineTuningCheckpointPermissionAsync( string fineTunedModelCheckpoint, + global::tryAGI.OpenAI.CreateFineTuningCheckpointPermissionRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -176,7 +176,6 @@ partial void ProcessCreateFineTuningCheckpointPermissionResponseContent( } /// - /// Create checkpoint permissions
/// **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
/// This enables organization owners to share fine-tuned models with other projects in their organization. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs index 31609610..4335a668 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs @@ -22,15 +22,15 @@ partial void ProcessCreateFineTuningJobResponseContent( ref string content); /// - /// Create fine-tuning job
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateFineTuningJobAsync( + global::tryAGI.OpenAI.CreateFineTuningJobRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -169,46 +169,28 @@ partial void ProcessCreateFineTuningJobResponseContent( } /// - /// Create fine-tuning job
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
- /// - /// A list of integrations to enable for your fine-tuning job. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The method used for fine-tuning. - /// /// /// The name of the model to fine-tune. You can select one of the
- /// [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
+ /// [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
/// Example: gpt-4o-mini /// - /// - /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
- /// If a seed is not specified, one will be generated for you.
- /// Example: 42 - /// - /// - /// A string of up to 64 characters that will be added to your fine-tuned model name.
- /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. - /// /// /// The ID of an uploaded file that contains training data.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
+ /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.
- /// The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A string of up to 64 characters that will be added to your fine-tuned model name.
+ /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// The ID of an uploaded file that contains validation data.
/// If you provide this file, the data is used to generate validation
@@ -216,32 +198,44 @@ partial void ProcessCreateFineTuningJobResponseContent( /// the fine-tuning results file.
/// The same data should not be present in both train and validation files.
/// Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A list of integrations to enable for your fine-tuning job. + /// + /// + /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
+ /// If a seed is not specified, one will be generated for you.
+ /// Example: 42 + /// + /// + /// The method used for fine-tuning. + /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateFineTuningJobAsync( global::tryAGI.OpenAI.AnyOf model, string trainingFile, - global::System.Collections.Generic.IList? integrations = default, - global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.FineTuneMethod? method = default, - int? seed = default, string? suffix = default, string? validationFile = default, + global::System.Collections.Generic.IList? integrations = default, + int? seed = default, + global::tryAGI.OpenAI.FineTuneMethod? method = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateFineTuningJobRequest { - Integrations = integrations, - Metadata = metadata, - Method = method, Model = model, - Seed = seed, - Suffix = suffix, TrainingFile = trainingFile, + Suffix = suffix, ValidationFile = validationFile, + Integrations = integrations, + Seed = seed, + Method = method, + Metadata = metadata, }; return await CreateFineTuningJobAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteFineTuningCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteFineTuningCheckpointPermission.g.cs index 663e852b..0bc6467f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteFineTuningCheckpointPermission.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteFineTuningCheckpointPermission.g.cs @@ -24,7 +24,6 @@ partial void ProcessDeleteFineTuningCheckpointPermissionResponseContent( ref string content); /// - /// Delete checkpoint permission
/// **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
/// Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpointPermissions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpointPermissions.g.cs index 01464f10..96624f61 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpointPermissions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpointPermissions.g.cs @@ -30,7 +30,6 @@ partial void ProcessListFineTuningCheckpointPermissionsResponseContent( ref string content); /// - /// List checkpoint permissions
/// **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
/// Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. ///
@@ -68,10 +67,10 @@ partial void ProcessListFineTuningCheckpointPermissionsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/fine_tuning/checkpoints/{fineTunedModelCheckpoint}/permissions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("project_id", projectId) - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("project_id", projectId) + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs index 17ce7770..a52961e1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs @@ -26,7 +26,6 @@ partial void ProcessListFineTuningEventsResponseContent( ref string content); /// - /// List fine-tuning events
/// Get status updates for a fine-tuning job. ///
/// @@ -55,8 +54,8 @@ partial void ProcessListFineTuningEventsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/fine_tuning/jobs/{fineTuningJobId}/events", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("after", after) .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs index 4e80141c..8ae93b32 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs @@ -26,7 +26,6 @@ partial void ProcessListFineTuningJobCheckpointsResponseContent( ref string content); /// - /// List fine-tuning checkpoints
/// List checkpoints for a fine-tuning job. ///
/// @@ -55,8 +54,8 @@ partial void ProcessListFineTuningJobCheckpointsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/fine_tuning/jobs/{fineTuningJobId}/checkpoints", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("after", after) .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs index 60cb54f7..be30c47b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs @@ -26,7 +26,6 @@ partial void ProcessListPaginatedFineTuningJobsResponseContent( ref string content); /// - /// List fine-tuning jobs
/// List your organization's fine-tuning jobs ///
/// @@ -53,9 +52,9 @@ partial void ProcessListPaginatedFineTuningJobsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/fine_tuning/jobs", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("metadata", metadata?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuningJob.g.cs index 2841879e..e88479c4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuningJob.g.cs @@ -22,7 +22,6 @@ partial void ProcessPauseFineTuningJobResponseContent( ref string content); /// - /// Pause fine-tuning
/// Pause a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuningJob.g.cs index e292fb0c..00e809e3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuningJob.g.cs @@ -22,7 +22,6 @@ partial void ProcessResumeFineTuningJobResponseContent( ref string content); /// - /// Resume fine-tuning
/// Resume a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs index f2e5a8fb..c7d9e388 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs @@ -22,9 +22,8 @@ partial void ProcessRetrieveFineTuningJobResponseContent( ref string content); /// - /// Retrieve fine-tuning job
/// Get info about a fine-tuning job.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
/// /// Example: ft-AF1WoRqd3aJAHsqc9NY7iL8F diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs index be0e7474..8d2de409 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs @@ -22,16 +22,13 @@ partial void ProcessRunGraderResponseContent( ref string content); /// - /// Run grader
/// Run a grader. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task RunGraderAsync( + global::tryAGI.OpenAI.RunGraderRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -170,7 +167,6 @@ partial void ProcessRunGraderResponseContent( } /// - /// Run grader
/// Run a grader. ///
/// @@ -178,22 +174,19 @@ partial void ProcessRunGraderResponseContent( /// /// /// The dataset item provided to the grader. This will be used to populate
- /// the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. + /// the `item` namespace. See [the guide](/docs/guides/graders) for more details. /// /// /// The model sample to be evaluated. This value will be used to populate
- /// the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.
+ /// the `sample` namespace. See [the guide](/docs/guides/graders) for more details.
/// The `output_json` variable will be populated if the model sample is a
/// valid JSON string.
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task RunGraderAsync( - global::tryAGI.OpenAI.RunGraderRequestGrader grader, + global::tryAGI.OpenAI.OneOf grader, string modelSample, object? item = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs index 0440ddae..97fac55a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs @@ -22,16 +22,13 @@ partial void ProcessValidateGraderResponseContent( ref string content); /// - /// Validate grader
/// Validate a grader. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ValidateGraderAsync( + global::tryAGI.OpenAI.ValidateGraderRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -170,7 +167,6 @@ partial void ProcessValidateGraderResponseContent( } /// - /// Validate grader
/// Validate a grader. ///
/// @@ -178,11 +174,8 @@ partial void ProcessValidateGraderResponseContent( /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif public async global::System.Threading.Tasks.Task ValidateGraderAsync( - global::tryAGI.OpenAI.AnyOf grader, + global::tryAGI.OpenAI.OneOf grader, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.ValidateGraderRequest diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs new file mode 100644 index 00000000..72f41d0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs @@ -0,0 +1,200 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupOrganizationRoleAssignmentsClient + { + partial void PrepareAssignGroupRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void PrepareAssignGroupRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void ProcessAssignGroupRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAssignGroupRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Assigns an organization role to a group within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignGroupRoleAsync( + string groupId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAssignGroupRoleArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAssignGroupRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAssignGroupRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAssignGroupRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupRoleAssignment.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Assigns an organization role to a group within the organization. + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignGroupRoleAsync( + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody + { + RoleId = roleId, + }; + + return await AssignGroupRoleAsync( + groupId: groupId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs new file mode 100644 index 00000000..80a26870 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs @@ -0,0 +1,183 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupOrganizationRoleAssignmentsClient + { + partial void PrepareListGroupRoleAssignmentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? order); + partial void PrepareListGroupRoleAssignmentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? order); + partial void ProcessListGroupRoleAssignmentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListGroupRoleAssignmentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the organization roles assigned to a group within the organization. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListGroupRoleAssignmentsAsync( + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListGroupRoleAssignmentsArguments( + httpClient: HttpClient, + groupId: ref groupId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListGroupRoleAssignmentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListGroupRoleAssignmentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListGroupRoleAssignmentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs new file mode 100644 index 00000000..b85e67be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupOrganizationRoleAssignmentsClient + { + partial void PrepareUnassignGroupRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + ref string roleId); + partial void PrepareUnassignGroupRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + string roleId); + partial void ProcessUnassignGroupRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUnassignGroupRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Unassigns an organization role from a group within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnassignGroupRoleAsync( + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUnassignGroupRoleArguments( + httpClient: HttpClient, + groupId: ref groupId, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUnassignGroupRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUnassignGroupRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUnassignGroupRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..e8a4c196 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GroupOrganizationRoleAssignmentsClient : global::tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the GroupOrganizationRoleAssignmentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GroupOrganizationRoleAssignmentsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs new file mode 100644 index 00000000..ffb9e175 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs @@ -0,0 +1,200 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupUsersClient + { + partial void PrepareAddGroupUserArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::tryAGI.OpenAI.CreateGroupUserBody request); + partial void PrepareAddGroupUserRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::tryAGI.OpenAI.CreateGroupUserBody request); + partial void ProcessAddGroupUserResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAddGroupUserResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Adds a user to a group. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddGroupUserAsync( + string groupId, + + global::tryAGI.OpenAI.CreateGroupUserBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAddGroupUserArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/users", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAddGroupUserRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAddGroupUserResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAddGroupUserResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupUserAssignment.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupUserAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Adds a user to a group. + /// + /// + /// + /// Identifier of the user to add to the group. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddGroupUserAsync( + string groupId, + string userId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateGroupUserBody + { + UserId = userId, + }; + + return await AddGroupUserAsync( + groupId: groupId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs new file mode 100644 index 00000000..85b4648d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupUsersClient + { + partial void PrepareListGroupUsersArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListGroupUsersOrder? order); + partial void PrepareListGroupUsersRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListGroupUsersOrder? order); + partial void ProcessListGroupUsersResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListGroupUsersResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the users assigned to a group. + /// + /// + /// + /// Default Value: 100 + /// + /// + /// + /// Default Value: desc + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListGroupUsersAsync( + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupUsersOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListGroupUsersArguments( + httpClient: HttpClient, + groupId: ref groupId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/users", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListGroupUsersRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListGroupUsersResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListGroupUsersResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.UserListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.UserListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs new file mode 100644 index 00000000..ca34b354 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupUsersClient + { + partial void PrepareRemoveGroupUserArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + ref string userId); + partial void PrepareRemoveGroupUserRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + string userId); + partial void ProcessRemoveGroupUserResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRemoveGroupUserResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Removes a user from a group. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveGroupUserAsync( + string groupId, + string userId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareRemoveGroupUserArguments( + httpClient: HttpClient, + groupId: ref groupId, + userId: ref userId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}/users/{userId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareRemoveGroupUserRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + userId: userId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessRemoveGroupUserResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessRemoveGroupUserResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupUserDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupUserDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs new file mode 100644 index 00000000..c636edde --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GroupUsersClient : global::tryAGI.OpenAI.IGroupUsersClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the GroupUsersClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GroupUsersClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs new file mode 100644 index 00000000..6e2c36e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs @@ -0,0 +1,191 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupsClient + { + partial void PrepareCreateGroupArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateGroupBody request); + partial void PrepareCreateGroupRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateGroupBody request); + partial void ProcessCreateGroupResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateGroupResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a new group in the organization. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateGroupAsync( + + global::tryAGI.OpenAI.CreateGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateGroupArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/organization/groups", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateGroupRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateGroupResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateGroupResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Creates a new group in the organization. + /// + /// + /// Human readable name for the group. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateGroupAsync( + string name, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateGroupBody + { + Name = name, + }; + + return await CreateGroupAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs new file mode 100644 index 00000000..646dd629 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs @@ -0,0 +1,160 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupsClient + { + partial void PrepareDeleteGroupArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId); + partial void PrepareDeleteGroupRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId); + partial void ProcessDeleteGroupResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteGroupResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a group from the organization. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteGroupAsync( + string groupId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteGroupArguments( + httpClient: HttpClient, + groupId: ref groupId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteGroupRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteGroupResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteGroupResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs new file mode 100644 index 00000000..c2b4368e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs @@ -0,0 +1,181 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupsClient + { + partial void PrepareListGroupsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListGroupsOrder? order); + partial void PrepareListGroupsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + string? after, + global::tryAGI.OpenAI.ListGroupsOrder? order); + partial void ProcessListGroupsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListGroupsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists all groups in the organization. + /// + /// + /// Default Value: 100 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListGroupsAsync( + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListGroupsArguments( + httpClient: HttpClient, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/organization/groups", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListGroupsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListGroupsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListGroupsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs new file mode 100644 index 00000000..22bc35b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs @@ -0,0 +1,200 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class GroupsClient + { + partial void PrepareUpdateGroupArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::tryAGI.OpenAI.UpdateGroupBody request); + partial void PrepareUpdateGroupRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::tryAGI.OpenAI.UpdateGroupBody request); + partial void ProcessUpdateGroupResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateGroupResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a group's information. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateGroupAsync( + string groupId, + + global::tryAGI.OpenAI.UpdateGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateGroupArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/groups/{groupId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateGroupRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateGroupResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateGroupResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Updates a group's information. + /// + /// + /// + /// New display name for the group. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateGroupAsync( + string groupId, + string name, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.UpdateGroupBody + { + Name = name, + }; + + return await UpdateGroupAsync( + groupId: groupId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs new file mode 100644 index 00000000..be6e34e7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GroupsClient : global::tryAGI.OpenAI.IGroupsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the GroupsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public GroupsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CancelRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CancelRun.g.cs index f986f0a1..abe2e4f9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CancelRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CancelRun.g.cs @@ -5,16 +5,12 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Cancel a run
/// Cancels a run that is `in_progress`. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CancelRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateAssistant.g.cs deleted file mode 100644 index 13a23954..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateAssistant.g.cs +++ /dev/null @@ -1,90 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAssistantsClient - { - /// - /// Create assistant
- /// Create an assistant with a model and instructions. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task CreateAssistantAsync( - global::tryAGI.OpenAI.CreateAssistantRequest request, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Create assistant
- /// Create an assistant with a model and instructions. - ///
- /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
- /// Example: gpt-4o - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. - /// - /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task CreateAssistantAsync( - global::tryAGI.OpenAI.AnyOf model, - string? description = default, - string? instructions = default, - global::System.Collections.Generic.Dictionary? metadata = default, - string? name = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - object? responseFormat = default, - double? temperature = default, - global::tryAGI.OpenAI.CreateAssistantRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, - double? topP = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateMessage.g.cs index 7cc62cfa..a0ebbbc9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateMessage.g.cs @@ -5,52 +5,37 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Create message
/// Create a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, + global::tryAGI.OpenAI.CreateMessageRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create message
/// Create a message. ///
/// - /// - /// A list of files attached to the message, and the tools they should be added to. - /// - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The role of the entity that is creating the message. Allowed values include:
/// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
/// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. /// + /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateMessageAsync( string threadId, - global::tryAGI.OpenAI.AnyOf> content, global::tryAGI.OpenAI.CreateMessageRequestRole role, - global::System.Collections.Generic.IList? attachments = default, + global::tryAGI.OpenAI.OneOf>> content, + global::System.Collections.Generic.IList? attachments = default, global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateRun.g.cs index 084f30b3..166a25ad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Create run
/// Create a run. ///
/// @@ -13,118 +12,92 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateRunAsync( string threadId, + global::tryAGI.OpenAI.CreateRunRequest request, global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create run
/// Create a run. ///
/// /// - /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - /// - /// - /// Adds additional messages to the thread before creating the run. - /// /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Adds additional messages to the thread before creating the run. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateRunAsync( string threadId, string assistantId, global::System.Collections.Generic.IList? include = default, + global::tryAGI.OpenAI.AnyOf? model = default, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort = default, + string? instructions = default, string? additionalInstructions = default, global::System.Collections.Generic.IList? additionalMessages = default, - string? instructions = default, - int? maxCompletionTokens = default, - int? maxPromptTokens = default, + global::System.Collections.Generic.IList>? tools = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - bool? parallelToolCalls = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, - bool? stream = default, double? temperature = default, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice = default, - global::System.Collections.Generic.IList? tools = default, double? topP = default, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy = default, + bool? stream = default, + int? maxPromptTokens = default, + int? maxCompletionTokens = default, + global::tryAGI.OpenAI.AllOf? truncationStrategy = default, + global::tryAGI.OpenAI.AllOf? toolChoice = default, + bool? parallelToolCalls = default, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThread.g.cs index 8ac58bdd..4db241d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThread.g.cs @@ -5,45 +5,30 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Create thread
/// Create a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateThreadAsync( + global::tryAGI.OpenAI.CreateThreadRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create thread
/// Create a thread. ///
/// - /// A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// A list of [messages](/docs/api-reference/messages) to start the thread with. /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateThreadAsync( global::System.Collections.Generic.IList? messages = default, + global::tryAGI.OpenAI.CreateThreadRequestToolResources2? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.CreateThreadRequestToolResources? toolResources = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs index bca81f1f..d3ad143c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.CreateThreadAndRun.g.cs @@ -5,110 +5,90 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Create thread and run
/// Create a thread and run it in one request. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateThreadAndRunAsync( + global::tryAGI.OpenAI.CreateThreadAndRunRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create thread and run
/// Create a thread and run it in one request. ///
/// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// - /// - /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// Options to create a new thread. If no thread is provided when running a
+ /// request, an empty thread will be created. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// 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. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// 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. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task CreateThreadAndRunAsync( string assistantId, + global::tryAGI.OpenAI.CreateThreadRequest? thread = default, + global::tryAGI.OpenAI.AnyOf? model = default, string? instructions = default, - int? maxCompletionTokens = default, - int? maxPromptTokens = default, + global::System.Collections.Generic.IList>? tools = default, + global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - bool? parallelToolCalls = default, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, - bool? stream = default, double? temperature = default, - global::tryAGI.OpenAI.CreateThreadRequest? thread = default, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice = default, - global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, double? topP = default, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy = default, + bool? stream = default, + int? maxPromptTokens = default, + int? maxCompletionTokens = default, + global::tryAGI.OpenAI.AllOf? truncationStrategy = default, + global::tryAGI.OpenAI.AllOf? toolChoice = default, + bool? parallelToolCalls = default, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteAssistant.g.cs deleted file mode 100644 index 90bd9943..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteAssistant.g.cs +++ /dev/null @@ -1,21 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAssistantsClient - { - /// - /// Delete assistant
- /// Delete an assistant. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task DeleteAssistantAsync( - string assistantId, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteMessage.g.cs index 7182f165..fa90d0dd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteMessage.g.cs @@ -5,16 +5,12 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Delete message
/// Deletes a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task DeleteMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteThread.g.cs index cc9d1c3d..806ef263 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.DeleteThread.g.cs @@ -5,15 +5,11 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Delete thread
/// Delete a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task DeleteThreadAsync( string threadId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetAssistant.g.cs deleted file mode 100644 index 1d9fde49..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetAssistant.g.cs +++ /dev/null @@ -1,21 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAssistantsClient - { - /// - /// Retrieve assistant
- /// Retrieves an assistant. - ///
- /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task GetAssistantAsync( - string assistantId, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetMessage.g.cs index e46c6bb7..d2922afa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetMessage.g.cs @@ -5,16 +5,12 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Retrieve message
/// Retrieve a message. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task GetMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRun.g.cs index 0c909d67..dcffe2e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRun.g.cs @@ -5,16 +5,12 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Retrieve run
/// Retrieves a run. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task GetRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRunStep.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRunStep.g.cs index 71b35b5e..600ca11c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRunStep.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetRunStep.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Retrieve run step
/// Retrieves a run step. ///
/// @@ -14,9 +13,6 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task GetRunStepAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetThread.g.cs index f7dcec6f..4cefb4ff 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.GetThread.g.cs @@ -5,15 +5,11 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Retrieve thread
/// Retrieves a thread. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task GetThreadAsync( string threadId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListAssistants.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListAssistants.g.cs deleted file mode 100644 index fae2efce..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListAssistants.g.cs +++ /dev/null @@ -1,31 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAssistantsClient - { - /// - /// List assistants
- /// Returns a list of assistants. - ///
- /// - /// Default Value: 20 - /// - /// - /// Default Value: desc - /// - /// - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task ListAssistantsAsync( - int? limit = default, - global::tryAGI.OpenAI.ListAssistantsOrder? order = default, - string? after = default, - string? before = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListMessages.g.cs index 4369d915..df1f6d22 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListMessages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListMessages.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// List messages
/// Returns a list of messages for a given thread. ///
/// @@ -20,9 +19,6 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ListMessagesAsync( string threadId, int? limit = default, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRunSteps.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRunSteps.g.cs index d26a7f19..1f1002fd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRunSteps.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRunSteps.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// List run steps
/// Returns a list of run steps belonging to a run. ///
/// @@ -21,9 +20,6 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ListRunStepsAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRuns.g.cs index dcbbd2d4..9e329127 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRuns.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ListRuns.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// List runs
/// Returns a list of runs belonging to a thread. ///
/// @@ -19,9 +18,6 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ListRunsAsync( string threadId, int? limit = default, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyAssistant.g.cs deleted file mode 100644 index 305ae78b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyAssistant.g.cs +++ /dev/null @@ -1,93 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAssistantsClient - { - /// - /// Modify assistant
- /// Modifies an assistant. - ///
- /// - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task ModifyAssistantAsync( - string assistantId, - global::tryAGI.OpenAI.ModifyAssistantRequest request, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Modify assistant
- /// Modifies an assistant. - ///
- /// - /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. - /// - /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// The token to cancel the operation with - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif - global::System.Threading.Tasks.Task ModifyAssistantAsync( - string assistantId, - string? description = default, - string? instructions = default, - global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.AnyOf? model = default, - string? name = default, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort = default, - object? responseFormat = default, - double? temperature = default, - global::tryAGI.OpenAI.ModifyAssistantRequestToolResources? toolResources = default, - global::System.Collections.Generic.IList? tools = default, - double? topP = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyMessage.g.cs index ebfea930..9eb7f029 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyMessage.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Modify message
/// Modifies a message. ///
/// @@ -13,33 +12,21 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyMessageAsync( string threadId, string messageId, + global::tryAGI.OpenAI.ModifyMessageRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify message
/// Modifies a message. ///
/// /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyMessageAsync( string threadId, string messageId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyRun.g.cs index a10a53d8..dcbccf6d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Modify run
/// Modifies a run. ///
/// @@ -13,33 +12,21 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyRunAsync( string threadId, string runId, + global::tryAGI.OpenAI.ModifyRunRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify run
/// Modifies a run. ///
/// /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyThread.g.cs index a7493849..8055d8a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyThread.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.ModifyThread.g.cs @@ -5,45 +5,30 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Modify thread
/// Modifies a thread. ///
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyThreadAsync( string threadId, + global::tryAGI.OpenAI.ModifyThreadRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify thread
/// Modifies a thread. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. - /// + /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ModifyThreadAsync( string threadId, + global::tryAGI.OpenAI.ModifyThreadRequestToolResources2? toolResources = default, global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.ModifyThreadRequestToolResources? toolResources = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.SubmitToolOuputsToRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.SubmitToolOuputsToRun.g.cs index 95a26a11..a6e2b228 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.SubmitToolOuputsToRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.SubmitToolOuputsToRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAssistantsClient { /// - /// Submit tool outputs to run
/// When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. ///
/// @@ -13,32 +12,24 @@ public partial interface IAssistantsClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task SubmitToolOuputsToRunAsync( string threadId, string runId, + global::tryAGI.OpenAI.SubmitToolOutputsRunRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Submit tool outputs to run
/// When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. ///
/// /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// /// /// A list of tools for which the outputs are being submitted. /// + /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task SubmitToolOuputsToRunAsync( string threadId, string runId, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeech.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeech.g.cs deleted file mode 100644 index 98000f42..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeech.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public partial interface IAudioClient - { - /// - /// Create speech
- /// Generates audio from the input text. - ///
- /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateSpeechAsync( - global::tryAGI.OpenAI.CreateSpeechRequest request, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Create speech
- /// Generates audio from the input text. - ///
- /// - /// The text to generate audio for. The maximum length is 4096 characters. - /// - /// - /// Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. - /// - /// - /// One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. - /// - /// - /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
- /// Default Value: mp3 - /// - /// - /// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.
- /// Default Value: 1 - /// - /// - /// The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.
- /// Default Value: audio - /// - /// - /// Example: ash - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateSpeechAsync( - string input, - global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.VoiceIdsShared voice, - string? instructions = default, - global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? responseFormat = default, - double? speed = default, - global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? streamFormat = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeechAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeechAsStream.g.cs new file mode 100644 index 00000000..a3bd956d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeechAsStream.g.cs @@ -0,0 +1,59 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Generates audio from the input text.
+ /// Returns the audio file content, or a stream of audio events. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateSpeechAsStreamAsync( + + global::tryAGI.OpenAI.CreateSpeechRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Generates audio from the input text.
+ /// Returns the audio file content, or a stream of audio events. + ///
+ /// + /// One of the available [TTS models](/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + /// + /// + /// The text to generate audio for. The maximum length is 4096 characters. + /// + /// + /// Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. + /// + /// + /// The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech#voice-options). + /// + /// + /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
+ /// Default Value: mp3 + /// + /// + /// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.
+ /// Default Value: 1 + /// + /// + /// The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.
+ /// Default Value: audio + /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateSpeechAsStreamAsync( + global::tryAGI.OpenAI.AnyOf model, + string input, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice, + string? instructions = default, + global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? responseFormat = default, + double? speed = default, + global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? streamFormat = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscription.g.cs index a1d4f502..2e0903a5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscription.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscription.g.cs @@ -5,78 +5,83 @@ namespace tryAGI.OpenAI public partial interface IAudioClient { /// - /// Create transcription
- /// Transcribes audio into the input language. + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. ///
/// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + global::tryAGI.OpenAI.CreateTranscriptionRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create transcription
- /// Transcribes audio into the input language. + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. ///
- /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// - /// - /// Additional information to include in the transcription response.
- /// `logprobs` will return the log probabilities of the tokens in the
- /// response to understand the model's confidence in the transcription.
- /// `logprobs` only works with response_format set to `json` and only with
- /// the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. + /// + /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
+ /// Example: gpt-4o-transcribe /// /// /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. /// - /// - /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).
- /// Example: gpt-4o-transcribe - /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. /// /// - /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
+ /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// Default Value: json /// - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
- /// for more information.
- /// Note: Streaming is not supported for the `whisper-1` model and will be ignored.
- /// Default Value: false - /// /// /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
/// Default Value: 0 /// + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// /// /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
/// Default Value: [segment] /// + /// + /// + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> CreateTranscriptionAsync( + global::System.Threading.Tasks.Task> CreateTranscriptionAsync( byte[] file, string filename, global::tryAGI.OpenAI.AnyOf model, - object? chunkingStrategy = default, - global::System.Collections.Generic.IList? include = default, string? language = default, string? prompt = default, global::tryAGI.OpenAI.AudioResponseFormat? responseFormat = default, - bool? stream = default, double? temperature = default, + global::System.Collections.Generic.IList? include = default, global::System.Collections.Generic.IList? timestampGranularities = default, + bool? stream = default, + global::tryAGI.OpenAI.AnyOf? chunkingStrategy = default, + global::System.Collections.Generic.IList? knownSpeakerNames = default, + global::System.Collections.Generic.IList? knownSpeakerReferences = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscriptionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscriptionAsStream.g.cs new file mode 100644 index 00000000..83d3d855 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscriptionAsStream.g.cs @@ -0,0 +1,87 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateTranscriptionAsStreamAsync( + + global::tryAGI.OpenAI.CreateTranscriptionRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Transcribes audio into the input language.
+ /// Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
+ /// format, or a stream of transcript events. + ///
+ /// + /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. + /// + /// + /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. + /// + /// + /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
+ /// Example: gpt-4o-transcribe + /// + /// + /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. + /// + /// + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// + /// + /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
+ /// Default Value: json + /// + /// + /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
+ /// Default Value: 0 + /// + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// + /// + /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
+ /// Default Value: [segment] + /// + /// + /// + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateTranscriptionAsStreamAsync( + byte[] file, + string filename, + global::tryAGI.OpenAI.AnyOf model, + string? language = default, + string? prompt = default, + global::tryAGI.OpenAI.AudioResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? timestampGranularities = default, + bool? stream = default, + global::tryAGI.OpenAI.AnyOf? chunkingStrategy = default, + global::System.Collections.Generic.IList? knownSpeakerNames = default, + global::System.Collections.Generic.IList? knownSpeakerReferences = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranslation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranslation.g.cs index 5f70aab2..8496ee77 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranslation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranslation.g.cs @@ -5,18 +5,17 @@ namespace tryAGI.OpenAI public partial interface IAudioClient { /// - /// Create translation
/// Translates audio into English. ///
/// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> CreateTranslationAsync( + global::System.Threading.Tasks.Task> CreateTranslationAsync( + global::tryAGI.OpenAI.CreateTranslationRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create translation
/// Translates audio into English. ///
/// @@ -30,7 +29,7 @@ public partial interface IAudioClient /// Example: whisper-1 /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should be in English. /// /// /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
@@ -42,7 +41,7 @@ public partial interface IAudioClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> CreateTranslationAsync( + global::System.Threading.Tasks.Task> CreateTranslationAsync( byte[] file, string filename, global::tryAGI.OpenAI.AnyOf model, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoice.g.cs new file mode 100644 index 00000000..4bcd6c78 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoice.g.cs @@ -0,0 +1,50 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Creates a custom voice.
+ /// Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVoiceAsync( + + global::tryAGI.OpenAI.CreateVoiceRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates a custom voice.
+ /// Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The name of the new voice. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent recording ID (for example, `cons_1234`). + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVoiceAsync( + string name, + byte[] audioSample, + string audioSamplename, + string consent, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoiceConsent.g.cs new file mode 100644 index 00000000..f8918ae2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateVoiceConsent.g.cs @@ -0,0 +1,50 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Upload a voice consent recording.
+ /// Upload a consent recording that authorizes creation of a custom voice.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVoiceConsentAsync( + + global::tryAGI.OpenAI.CreateVoiceConsentRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload a voice consent recording.
+ /// Upload a consent recording that authorizes creation of a custom voice.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers. + ///
+ /// + /// The label to use for this consent recording. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVoiceConsentAsync( + string name, + byte[] recording, + string recordingname, + string language, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.DeleteVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.DeleteVoiceConsent.g.cs new file mode 100644 index 00000000..888e0c99 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.DeleteVoiceConsent.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Deletes a voice consent recording.
+ /// Delete a consent recording that was uploaded for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteVoiceConsentAsync( + string consentId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.GetVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.GetVoiceConsent.g.cs new file mode 100644 index 00000000..f0216311 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.GetVoiceConsent.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Retrieves a voice consent recording.
+ /// Retrieve consent recording metadata used for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetVoiceConsentAsync( + string consentId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.ListVoiceConsents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.ListVoiceConsents.g.cs new file mode 100644 index 00000000..fb9e8895 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.ListVoiceConsents.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Returns a list of voice consent recordings.
+ /// List consent recordings available to your organization for creating custom voices.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// Default Value: 20 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListVoiceConsentsAsync( + string? after = default, + int? limit = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.UpdateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.UpdateVoiceConsent.g.cs new file mode 100644 index 00000000..c50df84c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.UpdateVoiceConsent.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IAudioClient + { + /// + /// Updates a voice consent recording (metadata only).
+ /// Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateVoiceConsentAsync( + string consentId, + + global::tryAGI.OpenAI.UpdateVoiceConsentRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Updates a voice consent recording (metadata only).
+ /// Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.
+ /// See the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers. + ///
+ /// + /// + /// The updated label for this consent recording. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateVoiceConsentAsync( + string consentId, + string name, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.ListAuditLogs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.ListAuditLogs.g.cs index 12e2f5dc..313ead56 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.ListAuditLogs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.ListAuditLogs.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IAuditLogsClient { /// - /// List audit logs
/// List user actions and configuration changes within this organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CancelBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CancelBatch.g.cs index 95cd0f52..8380df4b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CancelBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CancelBatch.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IBatchClient { /// - /// Cancel batch
/// Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CreateBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CreateBatch.g.cs index 2e37474b..824f5768 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CreateBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.CreateBatch.g.cs @@ -5,46 +5,39 @@ namespace tryAGI.OpenAI public partial interface IBatchClient { /// - /// Create batch
/// Creates and executes a batch from an uploaded file of requests ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateBatchAsync( + global::tryAGI.OpenAI.CreateBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create batch
/// Creates and executes a batch from an uploaded file of requests ///
- /// - /// The time frame within which the batch should be processed. Currently only `24h` is supported. - /// - /// - /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. - /// /// /// The ID of an uploaded file that contains requests for the new batch.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
- /// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
+ /// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. + /// + /// + /// The time frame within which the batch should be processed. Currently only `24h` is supported. /// + /// /// /// The expiration policy for the output and/or error file that are generated for a batch. /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateBatchAsync( - global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, string inputFileId, + global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow completionWindow = default, global::System.Collections.Generic.Dictionary? metadata = default, global::tryAGI.OpenAI.BatchFileExpirationAfter? outputExpiresAfter = default, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.ListBatches.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.ListBatches.g.cs index 95a2acd8..c03d20fb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.ListBatches.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.ListBatches.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IBatchClient { /// - /// List batch
/// List your organization's batches. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.RetrieveBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.RetrieveBatch.g.cs index 7497d322..29d43e58 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.RetrieveBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.RetrieveBatch.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IBatchClient { /// - /// Retrieve batch
/// Retrieves a batch. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateOrganizationCertificates.g.cs index 02e50bc4..ac76aaba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateOrganizationCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Activate certificates for organization
/// Activate certificates at the organization level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
@@ -13,11 +12,11 @@ public partial interface ICertificatesClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task ActivateOrganizationCertificatesAsync( + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Activate certificates for organization
/// Activate certificates at the organization level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateProjectCertificates.g.cs index 67d296d6..871a38d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ActivateProjectCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Activate certificates for project
/// Activate certificates at the project level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
@@ -15,11 +14,11 @@ public partial interface ICertificatesClient /// global::System.Threading.Tasks.Task ActivateProjectCertificatesAsync( string projectId, + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Activate certificates for project
/// Activate certificates at the project level.
/// You can atomically and idempotently activate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateOrganizationCertificates.g.cs index f9b868a3..cbe1498f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateOrganizationCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Deactivate certificates for organization
/// Deactivate certificates at the organization level.
/// You can atomically and idempotently deactivate up to 10 certificates at a time. ///
@@ -13,11 +12,11 @@ public partial interface ICertificatesClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task DeactivateOrganizationCertificatesAsync( + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Deactivate certificates for organization
/// Deactivate certificates at the organization level.
/// You can atomically and idempotently deactivate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateProjectCertificates.g.cs index 0cc8ab63..c55098fe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeactivateProjectCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Deactivate certificates for project
/// Deactivate certificates at the project level. You can atomically and
/// idempotently deactivate up to 10 certificates at a time. ///
@@ -15,11 +14,11 @@ public partial interface ICertificatesClient /// global::System.Threading.Tasks.Task DeactivateProjectCertificatesAsync( string projectId, + global::tryAGI.OpenAI.ToggleCertificatesRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Deactivate certificates for project
/// Deactivate certificates at the project level. You can atomically and
/// idempotently deactivate up to 10 certificates at a time. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeleteCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeleteCertificate.g.cs index c87061c3..a986fbf9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeleteCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.DeleteCertificate.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Delete certificate
/// Delete a certificate from the organization.
/// The certificate must be inactive for the organization and all projects. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.GetCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.GetCertificate.g.cs index 663d984b..69792656 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.GetCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.GetCertificate.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Get certificate
/// Get a certificate that has been uploaded to the organization.
/// You can get a certificate regardless of whether it is active or not. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListOrganizationCertificates.g.cs index a3c1110b..16fe8fc9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListOrganizationCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListOrganizationCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// List organization certificates
/// List uploaded certificates for this organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListProjectCertificates.g.cs index 1672e37d..8c8b9d31 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListProjectCertificates.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ListProjectCertificates.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// List project certificates
/// List certificates for this project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ModifyCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ModifyCertificate.g.cs index c5ef4dde..48a16142 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ModifyCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.ModifyCertificate.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Modify certificate
/// Modify a certificate. Note that only the name can be modified. ///
/// @@ -14,11 +13,11 @@ public partial interface ICertificatesClient /// global::System.Threading.Tasks.Task ModifyCertificateAsync( string certificateId, + global::tryAGI.OpenAI.ModifyCertificateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify certificate
/// Modify a certificate. Note that only the name can be modified. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.UploadCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.UploadCertificate.g.cs index c6b308f1..c8f27dcc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.UploadCertificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.UploadCertificate.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface ICertificatesClient { /// - /// Upload certificate
/// Upload a certificate to the organization. This does **not** automatically activate the certificate.
/// Organizations can upload up to 50 certificates. ///
@@ -13,20 +12,20 @@ public partial interface ICertificatesClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UploadCertificateAsync( + global::tryAGI.OpenAI.UploadCertificateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Upload certificate
/// Upload a certificate to the organization. This does **not** automatically activate the certificate.
/// Organizations can upload up to 50 certificates. ///
- /// - /// The certificate content in PEM format - /// /// /// An optional name for the certificate /// + /// + /// The certificate content in PEM format + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UploadCertificateAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletion.g.cs index 646eff2a..b0a22042 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletion.g.cs @@ -5,41 +5,44 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// Create chat completion
- /// **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses)
+ /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
/// to take advantage of the latest OpenAI platform features. Compare
- /// [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
/// ---
/// Creates a model response for the given chat conversation. Learn more in the
- /// [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),
- /// and [audio](https://platform.openai.com/docs/guides/audio) guides.
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
/// Parameter support can differ depending on the model used to generate the
/// response, particularly for newer reasoning models. Parameters that are only
- /// supported for reasoning models are noted below. For the current state of
- /// unsupported parameters in reasoning models,
- /// [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateChatCompletionAsync( + global::tryAGI.OpenAI.CreateChatCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create chat completion
- /// **Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses)
+ /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
/// to take advantage of the latest OpenAI platform features. Compare
- /// [Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
/// ---
/// Creates a model response for the given chat conversation. Learn more in the
- /// [text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),
- /// and [audio](https://platform.openai.com/docs/guides/audio) guides.
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
/// Parameter support can differ depending on the model used to generate the
/// response, particularly for newer reasoning models. Parameters that are only
- /// supported for reasoning models are noted below. For the current state of
- /// unsupported parameters in reasoning models,
- /// [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). + /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. ///
/// The token to cancel the operation with /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletionAsStream.g.cs new file mode 100644 index 00000000..79e4ab74 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.CreateChatCompletionAsStream.g.cs @@ -0,0 +1,52 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IChatClient + { + /// + /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
+ /// to take advantage of the latest OpenAI platform features. Compare
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// ---
+ /// Creates a model response for the given chat conversation. Learn more in the
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
+ /// Parameter support can differ depending on the model used to generate the
+ /// response, particularly for newer reasoning models. Parameters that are only
+ /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateChatCompletionAsStreamAsync( + + global::tryAGI.OpenAI.CreateChatCompletionRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)
+ /// to take advantage of the latest OpenAI platform features. Compare
+ /// [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).
+ /// ---
+ /// Creates a model response for the given chat conversation. Learn more in the
+ /// [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),
+ /// and [audio](/docs/guides/audio) guides.
+ /// Parameter support can differ depending on the model used to generate the
+ /// response, particularly for newer reasoning models. Parameters that are only
+ /// supported for reasoning models are noted below. For the current state of
+ /// unsupported parameters in reasoning models,
+ /// [refer to the reasoning guide](/docs/guides/reasoning).
+ /// Returns a chat completion object, or a streamed sequence of chat completion
+ /// chunk objects if the request is streamed. + ///
+ /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateChatCompletionAsStreamAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.DeleteChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.DeleteChatCompletion.g.cs index 9acbd687..083f5cf7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.DeleteChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.DeleteChatCompletion.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// Delete chat completion
/// Delete a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be deleted. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletion.g.cs index a35115d7..03fc90db 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletion.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// Get chat completion
/// Get a stored chat completion. Only Chat Completions that have been created
/// with the `store` parameter set to `true` will be returned. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletionMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletionMessages.g.cs index b3abef2f..bd8bc6b4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletionMessages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.GetChatCompletionMessages.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// Get chat messages
/// Get the messages in a stored chat completion. Only Chat Completions that
/// have been created with the `store` parameter set to `true` will be
/// returned. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.ListChatCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.ListChatCompletions.g.cs index b7516125..03cef78a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.ListChatCompletions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.ListChatCompletions.g.cs @@ -5,18 +5,11 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// List Chat Completions
/// List stored Chat Completions. Only Chat Completions that have been stored
/// with the `store` parameter set to `true` will be returned. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// /// /// Default Value: 20 diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.UpdateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.UpdateChatCompletion.g.cs index f0d2fbd9..1acd412c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.UpdateChatCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.UpdateChatCompletion.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IChatClient { /// - /// Update chat completion
/// Modify a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be modified. Currently,
/// the only supported modification is to update the `metadata` field. @@ -16,23 +15,17 @@ public partial interface IChatClient /// global::System.Threading.Tasks.Task UpdateChatCompletionAsync( string completionId, + global::tryAGI.OpenAI.UpdateChatCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Update chat completion
/// Modify a stored chat completion. Only Chat Completions that have been
/// created with the `store` parameter set to `true` can be modified. Currently,
/// the only supported modification is to update the `metadata` field. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateChatCompletionAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.CreateCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.CreateCompletion.g.cs index 459a3c3d..b1c27214 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.CreateCompletion.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.CreateCompletion.g.cs @@ -5,20 +5,29 @@ namespace tryAGI.OpenAI public partial interface ICompletionsClient { /// - /// Create completion
- /// Creates a completion for the provided prompt and parameters. + /// Creates a completion for the provided prompt and parameters.
+ /// Returns a completion object, or a sequence of completion objects if the request is streamed. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateCompletionAsync( + global::tryAGI.OpenAI.CreateCompletionRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create completion
- /// Creates a completion for the provided prompt and parameters. + /// Creates a completion for the provided prompt and parameters.
+ /// Returns a completion object, or a sequence of completion objects if the request is streamed. ///
+ /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. + /// + /// + /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
+ /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
+ /// Default Value: <|endoftext|> + /// /// /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
/// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
@@ -31,17 +40,19 @@ public partial interface ICompletionsClient /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// /// /// Modify the likelihood of specified tokens appearing in the completion.
/// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
- /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.
- /// The maximum value for `logprobs` is 5. + /// The maximum value for `logprobs` is 5.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The maximum number of [tokens](/tokenizer) that can be generated in the completion.
@@ -49,9 +60,6 @@ public partial interface ICompletionsClient /// Default Value: 16
/// Example: 16 /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// /// /// How many completions to generate for each prompt.
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
@@ -60,13 +68,9 @@ public partial interface ICompletionsClient /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// - /// - /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
- /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - /// /// /// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. @@ -74,18 +78,18 @@ public partial interface ICompletionsClient /// /// Not supported with latest reasoning models `o3` and `o4-mini`.
/// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
/// Default Value: false /// - /// - /// Options for streaming response. Only set this when you set `stream: true`. - /// + /// /// /// The suffix that comes after a completion of inserted text.
/// This parameter is only supported for `gpt-3.5-turbo-instruct`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// Example: test. /// /// @@ -101,14 +105,14 @@ public partial interface ICompletionsClient /// Example: 1 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateCompletionAsync( global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, int? bestOf = default, bool? echo = default, double? frequencyPenalty = default, @@ -120,7 +124,7 @@ public partial interface ICompletionsClient long? seed = default, global::tryAGI.OpenAI.StopConfiguration? stop = default, bool? stream = default, - global::tryAGI.OpenAI.ChatCompletionStreamOptions? streamOptions = default, + global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? streamOptions = default, string? suffix = default, double? temperature = default, double? topP = default, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs index 53195660..bbb78821 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.cs @@ -5,29 +5,26 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Create a conversation
/// Create a conversation. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateConversationAsync( + global::tryAGI.OpenAI.CreateConversationBody request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create a conversation
/// Create a conversation. ///
- /// - /// Initial items to include in the conversation context. You may add up to 20 items at a time. - /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateConversationAsync( + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Collections.Generic.IList? items = default, - object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversationItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversationItems.g.cs index 47d4aaed..45a0f693 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversationItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversationItems.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Create items
/// Create items in a conversation with the given ID. ///
/// @@ -17,12 +16,12 @@ public partial interface IConversationsClient /// global::System.Threading.Tasks.Task CreateConversationItemsAsync( string conversationId, + global::tryAGI.OpenAI.CreateConversationItemsRequest request, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create items
/// Create items in a conversation with the given ID. ///
/// @@ -37,7 +36,7 @@ public partial interface IConversationsClient global::System.Threading.Tasks.Task CreateConversationItemsAsync( string conversationId, global::System.Collections.Generic.IList items, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs index cb77087f..e016e082 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Delete a conversation
/// Delete a conversation. Items in the conversation will not be deleted. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversationItem.g.cs index f19591ab..d7b80f06 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversationItem.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Delete an item
/// Delete an item from a conversation with the given IDs. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs index 921049c8..701b9c66 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Retrieve a conversation
/// Get a conversation ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversationItem.g.cs index 3275af1e..fd244d73 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversationItem.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Retrieve an item
/// Get a single item from a conversation with the given IDs. ///
/// @@ -20,7 +19,7 @@ public partial interface IConversationsClient global::System.Threading.Tasks.Task GetConversationItemAsync( string conversationId, string itemId, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.ListConversationItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.ListConversationItems.g.cs index 2bfdf79b..7d69a4bc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.ListConversationItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.ListConversationItems.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// List items
/// List all items for a conversation with the given ID. ///
/// @@ -24,7 +23,7 @@ public partial interface IConversationsClient int? limit = default, global::tryAGI.OpenAI.ListConversationItemsOrder? order = default, string? after = default, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs index aff9a55e..b8a07f76 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IConversationsClient { /// - /// Update a conversation
/// Update a conversation ///
/// @@ -16,22 +15,19 @@ public partial interface IConversationsClient /// global::System.Threading.Tasks.Task UpdateConversationAsync( string conversationId, + global::tryAGI.OpenAI.UpdateConversationBody request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Update a conversation
/// Update a conversation ///
/// /// Example: conv_123 /// /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// 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, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// /// The token to cancel the operation with /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.CreateEmbedding.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.CreateEmbedding.g.cs index 1511ce2d..f62facd2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.CreateEmbedding.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.CreateEmbedding.g.cs @@ -5,47 +5,46 @@ namespace tryAGI.OpenAI public partial interface IEmbeddingsClient { /// - /// Create embeddings
/// Creates an embedding vector representing the input text. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateEmbeddingAsync( + global::tryAGI.OpenAI.CreateEmbeddingRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create embeddings
/// Creates an embedding vector representing the input text. ///
- /// - /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. - /// - /// - /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
- /// Default Value: float
- /// Example: float - /// /// /// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
/// Example: The quick brown fox jumped over the lazy dog /// /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: text-embedding-3-small /// + /// + /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
+ /// Default Value: float
+ /// Example: float + /// + /// + /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. + /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateEmbeddingAsync( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf model, - int? dimensions = default, global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? encodingFormat = default, + int? dimensions = default, string? user = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CancelEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CancelEvalRun.g.cs index 126b744f..817ce785 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CancelEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CancelEvalRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Cancel eval run
/// Cancel an ongoing evaluation run. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEval.g.cs index d1cf3c68..78c9b201 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEval.g.cs @@ -5,37 +5,30 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Create eval
/// Create the structure of an evaluation that can be used to test a model's performance.
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.
- /// For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + /// For more information, see the [Evals guide](/docs/guides/evals). ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateEvalAsync( + global::tryAGI.OpenAI.CreateEvalRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create eval
/// Create the structure of an evaluation that can be used to test a model's performance.
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.
- /// For more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals). + /// For more information, see the [Evals guide](/docs/guides/evals). ///
- /// - /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the evaluation. /// + /// + /// + /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. + /// /// /// A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`). /// @@ -43,11 +36,11 @@ public partial interface IEvalsClient /// global::System.Threading.Tasks.Task CreateEvalAsync( #pragma warning disable CS0618 // Type or member is obsolete - global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig dataSourceConfig, + global::tryAGI.OpenAI.OneOf dataSourceConfig, #pragma warning disable CS0618 // Type or member is obsolete - global::System.Collections.Generic.IList testingCriteria, - global::System.Collections.Generic.Dictionary? metadata = default, + global::System.Collections.Generic.IList> testingCriteria, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEvalRun.g.cs index f74b06cb..63dcdd2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.CreateEvalRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Create eval run
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation. ///
/// @@ -14,34 +13,28 @@ public partial interface IEvalsClient /// global::System.Threading.Tasks.Task CreateEvalRunAsync( string evalId, + global::tryAGI.OpenAI.CreateEvalRunRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create eval run
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation. ///
/// - /// - /// Details about the run's data source. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the run. /// + /// + /// + /// Details about the run's data source. + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateEvalRunAsync( string evalId, - global::tryAGI.OpenAI.AnyOf dataSource, - global::System.Collections.Generic.Dictionary? metadata = default, + global::tryAGI.OpenAI.OneOf dataSource, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEval.g.cs index e1f93d74..2c64c560 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEval.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Delete an eval
/// Delete an evaluation. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEvalRun.g.cs index d5fbd2ef..3a8df687 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.DeleteEvalRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Delete eval run
/// Delete an eval run. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEval.g.cs index 20a86370..e0c22887 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEval.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Get an eval
/// Get an evaluation by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRun.g.cs index 7977de99..f19da03d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRun.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Get an eval run
/// Get an evaluation run by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItem.g.cs index 9e4d434f..bc7b35dc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItem.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Get an output item of an eval run
/// Get an evaluation run output item by ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItems.g.cs index 8ae35369..f3c7d6f2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRunOutputItems.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Get eval run output items
/// Get a list of output items for an evaluation run. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRuns.g.cs index fdb0c66b..5604666f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRuns.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.GetEvalRuns.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Get eval runs
/// Get a list of runs for an evaluation. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.ListEvals.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.ListEvals.g.cs index 588763bf..eaad65ee 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.ListEvals.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.ListEvals.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// List evals
/// List evaluations for a project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.UpdateEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.UpdateEval.g.cs index 137b3876..547593f9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.UpdateEval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.UpdateEval.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IEvalsClient { /// - /// Update an eval
/// Update certain properties of an evaluation. ///
/// @@ -14,30 +13,24 @@ public partial interface IEvalsClient /// global::System.Threading.Tasks.Task UpdateEvalAsync( string evalId, + global::tryAGI.OpenAI.UpdateEvalRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Update an eval
/// Update certain properties of an evaluation. ///
/// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// Rename the evaluation. /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateEvalAsync( string evalId, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.CreateFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.CreateFile.g.cs index c62fc731..8b15f0a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.CreateFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.CreateFile.g.cs @@ -5,31 +5,47 @@ namespace tryAGI.OpenAI public partial interface IFilesClient { /// - /// Upload file
- /// Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.
- /// The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.
- /// The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.
- /// The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).
- /// Please [contact us](https://help.openai.com/) if you need to increase these storage limits. + /// Upload a file that can be used across various endpoints. Individual files
+ /// can be up to 512 MB, and each project can store up to 2.5 TB of files in
+ /// total. There is no organization-wide storage limit.
+ /// - The Assistants API supports files up to 2 million tokens and of specific
+ /// file types. See the [Assistants Tools guide](/docs/assistants/tools) for
+ /// details.
+ /// - The Fine-tuning API only supports `.jsonl` files. The input also has
+ /// certain required formats for fine-tuning
+ /// [chat](/docs/api-reference/fine-tuning/chat-input) or
+ /// [completions](/docs/api-reference/fine-tuning/completions-input) models.
+ /// - The Batch API only supports `.jsonl` files up to 200 MB in size. The input
+ /// also has a specific required
+ /// [format](/docs/api-reference/batch/request-input).
+ /// Please [contact us](https://help.openai.com/) if you need to increase these
+ /// storage limits. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateFileAsync( + global::tryAGI.OpenAI.CreateFileRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Upload file
- /// Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.
- /// The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.
- /// The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.
- /// The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).
- /// Please [contact us](https://help.openai.com/) if you need to increase these storage limits. + /// Upload a file that can be used across various endpoints. Individual files
+ /// can be up to 512 MB, and each project can store up to 2.5 TB of files in
+ /// total. There is no organization-wide storage limit.
+ /// - The Assistants API supports files up to 2 million tokens and of specific
+ /// file types. See the [Assistants Tools guide](/docs/assistants/tools) for
+ /// details.
+ /// - The Fine-tuning API only supports `.jsonl` files. The input also has
+ /// certain required formats for fine-tuning
+ /// [chat](/docs/api-reference/fine-tuning/chat-input) or
+ /// [completions](/docs/api-reference/fine-tuning/completions-input) models.
+ /// - The Batch API only supports `.jsonl` files up to 200 MB in size. The input
+ /// also has a specific required
+ /// [format](/docs/api-reference/batch/request-input).
+ /// Please [contact us](https://help.openai.com/) if you need to increase these
+ /// storage limits. ///
- /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The File object (not file name) to be uploaded. /// @@ -37,14 +53,23 @@ public partial interface IFilesClient /// The File object (not file name) to be uploaded. /// /// - /// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets + /// The intended purpose of the uploaded file. One of:
+ /// - `assistants`: Used in the Assistants API
+ /// - `batch`: Used in the Batch API
+ /// - `fine-tune`: Used for fine-tuning
+ /// - `vision`: Images used for vision fine-tuning
+ /// - `user_data`: Flexible file type for any purpose
+ /// - `evals`: Used for eval data sets + /// + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateFileAsync( byte[] file, string filename, - global::tryAGI.OpenAI.FilePurpose purpose, + global::tryAGI.OpenAI.CreateFileRequestPurpose purpose, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DeleteFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DeleteFile.g.cs index 387ac5bc..7b334643 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DeleteFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DeleteFile.g.cs @@ -5,8 +5,7 @@ namespace tryAGI.OpenAI public partial interface IFilesClient { /// - /// Delete file
- /// Delete a file. + /// Delete a file and remove it from all vector stores. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DownloadFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DownloadFile.g.cs index b0f9710c..a94c4550 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DownloadFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.DownloadFile.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFilesClient { /// - /// Retrieve file content
/// Returns the contents of the specified file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.ListFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.ListFiles.g.cs index c076248d..054b0179 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.ListFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.ListFiles.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFilesClient { /// - /// List files
/// Returns a list of files. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.RetrieveFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.RetrieveFile.g.cs index b1f6bdd5..d8588017 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.RetrieveFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.RetrieveFile.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFilesClient { /// - /// Retrieve file
/// Returns information about a specific file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CancelFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CancelFineTuningJob.g.cs index bfe996a7..8a8f6861 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CancelFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CancelFineTuningJob.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Cancel fine-tuning
/// Immediately cancel a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningCheckpointPermission.g.cs index fb695764..aeb34133 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningCheckpointPermission.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningCheckpointPermission.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Create checkpoint permissions
/// **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
/// This enables organization owners to share fine-tuned models with other projects in their organization. ///
@@ -17,11 +16,11 @@ public partial interface IFineTuningClient /// global::System.Threading.Tasks.Task CreateFineTuningCheckpointPermissionAsync( string fineTunedModelCheckpoint, + global::tryAGI.OpenAI.CreateFineTuningCheckpointPermissionRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create checkpoint permissions
/// **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
/// This enables organization owners to share fine-tuned models with other projects in their organization. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningJob.g.cs index 2caad96d..84c04e0d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.CreateFineTuningJob.g.cs @@ -5,59 +5,41 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Create fine-tuning job
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateFineTuningJobAsync( + global::tryAGI.OpenAI.CreateFineTuningJobRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create fine-tuning job
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
- /// - /// A list of integrations to enable for your fine-tuning job. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The method used for fine-tuning. - /// /// /// The name of the model to fine-tune. You can select one of the
- /// [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
+ /// [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
/// Example: gpt-4o-mini /// - /// - /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
- /// If a seed is not specified, one will be generated for you.
- /// Example: 42 - /// - /// - /// A string of up to 64 characters that will be added to your fine-tuned model name.
- /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. - /// /// /// The ID of an uploaded file that contains training data.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
+ /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.
- /// The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A string of up to 64 characters that will be added to your fine-tuned model name.
+ /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// The ID of an uploaded file that contains validation data.
/// If you provide this file, the data is used to generate validation
@@ -65,20 +47,32 @@ public partial interface IFineTuningClient /// the fine-tuning results file.
/// The same data should not be present in both train and validation files.
/// Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A list of integrations to enable for your fine-tuning job. + /// + /// + /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
+ /// If a seed is not specified, one will be generated for you.
+ /// Example: 42 + /// + /// + /// The method used for fine-tuning. + /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateFineTuningJobAsync( global::tryAGI.OpenAI.AnyOf model, string trainingFile, - global::System.Collections.Generic.IList? integrations = default, - global::System.Collections.Generic.Dictionary? metadata = default, - global::tryAGI.OpenAI.FineTuneMethod? method = default, - int? seed = default, string? suffix = default, string? validationFile = default, + global::System.Collections.Generic.IList? integrations = default, + int? seed = default, + global::tryAGI.OpenAI.FineTuneMethod? method = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.DeleteFineTuningCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.DeleteFineTuningCheckpointPermission.g.cs index 11b980cf..a47ebbf1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.DeleteFineTuningCheckpointPermission.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.DeleteFineTuningCheckpointPermission.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Delete checkpoint permission
/// **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
/// Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningCheckpointPermissions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningCheckpointPermissions.g.cs index c76f2aa7..f163925e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningCheckpointPermissions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningCheckpointPermissions.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// List checkpoint permissions
/// **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
/// Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningEvents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningEvents.g.cs index bae0872b..1663cbec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningEvents.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningEvents.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// List fine-tuning events
/// Get status updates for a fine-tuning job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningJobCheckpoints.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningJobCheckpoints.g.cs index 615403e0..049df2b9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningJobCheckpoints.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListFineTuningJobCheckpoints.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// List fine-tuning checkpoints
/// List checkpoints for a fine-tuning job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListPaginatedFineTuningJobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListPaginatedFineTuningJobs.g.cs index d7383d71..fbbc2318 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListPaginatedFineTuningJobs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ListPaginatedFineTuningJobs.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// List fine-tuning jobs
/// List your organization's fine-tuning jobs ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.PauseFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.PauseFineTuningJob.g.cs index 36eefe54..732654a0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.PauseFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.PauseFineTuningJob.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Pause fine-tuning
/// Pause a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ResumeFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ResumeFineTuningJob.g.cs index 797e2edf..239fe642 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ResumeFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ResumeFineTuningJob.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Resume fine-tuning
/// Resume a fine-tune job. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RetrieveFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RetrieveFineTuningJob.g.cs index 9dcb0464..9295fde5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RetrieveFineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RetrieveFineTuningJob.g.cs @@ -5,9 +5,8 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Retrieve fine-tuning job
/// Get info about a fine-tuning job.
- /// [Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization) + /// [Learn more about fine-tuning](/docs/guides/model-optimization) ///
/// /// Example: ft-AF1WoRqd3aJAHsqc9NY7iL8F diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RunGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RunGrader.g.cs index 546fce8b..1f9010af 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RunGrader.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.RunGrader.g.cs @@ -5,21 +5,17 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Run grader
/// Run a grader. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task RunGraderAsync( + global::tryAGI.OpenAI.RunGraderRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Run grader
/// Run a grader. ///
/// @@ -27,22 +23,19 @@ public partial interface IFineTuningClient /// /// /// The dataset item provided to the grader. This will be used to populate
- /// the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. + /// the `item` namespace. See [the guide](/docs/guides/graders) for more details. /// /// /// The model sample to be evaluated. This value will be used to populate
- /// the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.
+ /// the `sample` namespace. See [the guide](/docs/guides/graders) for more details.
/// The `output_json` variable will be populated if the model sample is a
/// valid JSON string.
/// /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task RunGraderAsync( - global::tryAGI.OpenAI.RunGraderRequestGrader grader, + global::tryAGI.OpenAI.OneOf grader, string modelSample, object? item = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ValidateGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ValidateGrader.g.cs index 2c43a037..c709fec9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ValidateGrader.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.ValidateGrader.g.cs @@ -5,21 +5,17 @@ namespace tryAGI.OpenAI public partial interface IFineTuningClient { /// - /// Validate grader
/// Validate a grader. ///
/// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ValidateGraderAsync( + global::tryAGI.OpenAI.ValidateGraderRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Validate grader
/// Validate a grader. ///
/// @@ -27,11 +23,8 @@ public partial interface IFineTuningClient /// /// The token to cancel the operation with /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "TRYAGI_OPENAI_BETA_001")] -#endif global::System.Threading.Tasks.Task ValidateGraderAsync( - global::tryAGI.OpenAI.AnyOf grader, + global::tryAGI.OpenAI.OneOf grader, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs new file mode 100644 index 00000000..a9fb10db --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.AssignGroupRole.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupOrganizationRoleAssignmentsClient + { + /// + /// Assigns an organization role to a group within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignGroupRoleAsync( + string groupId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Assigns an organization role to a group within the organization. + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignGroupRoleAsync( + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs new file mode 100644 index 00000000..e1acfe35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.ListGroupRoleAssignments.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupOrganizationRoleAssignmentsClient + { + /// + /// Lists the organization roles assigned to a group within the organization. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListGroupRoleAssignmentsAsync( + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs new file mode 100644 index 00000000..9a78bbc5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.UnassignGroupRole.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupOrganizationRoleAssignmentsClient + { + /// + /// Unassigns an organization role from a group within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnassignGroupRoleAsync( + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..339c50a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGroupOrganizationRoleAssignmentsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.AddGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.AddGroupUser.g.cs new file mode 100644 index 00000000..191e2ada --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.AddGroupUser.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupUsersClient + { + /// + /// Adds a user to a group. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddGroupUserAsync( + string groupId, + + global::tryAGI.OpenAI.CreateGroupUserBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Adds a user to a group. + /// + /// + /// + /// Identifier of the user to add to the group. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddGroupUserAsync( + string groupId, + string userId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.ListGroupUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.ListGroupUsers.g.cs new file mode 100644 index 00000000..20dd983b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.ListGroupUsers.g.cs @@ -0,0 +1,27 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupUsersClient + { + /// + /// Lists the users assigned to a group. + /// + /// + /// + /// Default Value: 100 + /// + /// + /// + /// Default Value: desc + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListGroupUsersAsync( + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupUsersOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.RemoveGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.RemoveGroupUser.g.cs new file mode 100644 index 00000000..d948e723 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.RemoveGroupUser.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupUsersClient + { + /// + /// Removes a user from a group. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveGroupUserAsync( + string groupId, + string userId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs new file mode 100644 index 00000000..5a541204 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGroupUsersClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.CreateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.CreateGroup.g.cs new file mode 100644 index 00000000..8c1f068b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.CreateGroup.g.cs @@ -0,0 +1,30 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupsClient + { + /// + /// Creates a new group in the organization. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateGroupAsync( + + global::tryAGI.OpenAI.CreateGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates a new group in the organization. + /// + /// + /// Human readable name for the group. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateGroupAsync( + string name, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.DeleteGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.DeleteGroup.g.cs new file mode 100644 index 00000000..3f537546 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.DeleteGroup.g.cs @@ -0,0 +1,17 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupsClient + { + /// + /// Deletes a group from the organization. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteGroupAsync( + string groupId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.ListGroups.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.ListGroups.g.cs new file mode 100644 index 00000000..3d922f98 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.ListGroups.g.cs @@ -0,0 +1,25 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupsClient + { + /// + /// Lists all groups in the organization. + /// + /// + /// Default Value: 100 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListGroupsAsync( + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListGroupsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.UpdateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.UpdateGroup.g.cs new file mode 100644 index 00000000..99f9df2b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.UpdateGroup.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IGroupsClient + { + /// + /// Updates a group's information. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateGroupAsync( + string groupId, + + global::tryAGI.OpenAI.UpdateGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Updates a group's information. + /// + /// + /// + /// New display name for the group. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateGroupAsync( + string groupId, + string name, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs new file mode 100644 index 00000000..0b11d591 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IGroupsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImage.g.cs index 729a0cb5..587c757d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImage.g.cs @@ -5,116 +5,109 @@ namespace tryAGI.OpenAI public partial interface IImagesClient { /// - /// Create image
- /// Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + /// Creates an image given a prompt. [Learn more](/docs/guides/images). ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateImageAsync( + global::tryAGI.OpenAI.CreateImageRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create image
- /// Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + /// Creates an image given a prompt. [Learn more](/docs/guides/images). ///
- /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter /// /// - /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. - /// - /// - /// Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).
- /// Default Value: auto
- /// Example: low + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 - /// - /// - /// The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
- /// Default Value: png
- /// Example: png - /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
- /// Example: A cute baby sea otter - /// /// - /// The quality of the image that will be generated.
+ /// The quality of the image that will be generated.
/// - `auto` (default value) will automatically select the best quality for the given model.
- /// - `high`, `medium` and `low` are supported for `gpt-image-1`.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
/// - `hd` and `standard` are supported for `dall-e-3`.
/// - `standard` is the only option for `dall-e-2`.
/// Default Value: auto
/// Example: medium /// /// - /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
+ /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
/// Default Value: url
/// Example: url /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
- /// Default Value: auto
- /// Example: 1024x1024 + /// + /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// /// - /// Generate the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
- /// This parameter is only supported for `gpt-image-1`.
+ /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
/// Default Value: false
/// Example: false /// + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
/// Default Value: vivid
/// Example: vivid /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateImageAsync( string prompt, - global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, global::tryAGI.OpenAI.AnyOf? model = default, - global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, int? n = default, - int? outputCompression = default, - global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, - int? partialImages = default, global::tryAGI.OpenAI.CreateImageRequestQuality? quality = default, global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default, - global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, + int? outputCompression = default, bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, + global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, global::tryAGI.OpenAI.CreateImageRequestStyle? style = default, string? user = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageAsStream.g.cs new file mode 100644 index 00000000..51b0e27c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageAsStream.g.cs @@ -0,0 +1,115 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IImagesClient + { + /// + /// Creates an image given a prompt. [Learn more](/docs/guides/images). + /// + /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateImageAsStreamAsync( + + global::tryAGI.OpenAI.CreateImageRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates an image given a prompt. [Learn more](/docs/guides/images). + /// + /// + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter + /// + /// + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 + /// + /// + /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// The quality of the image that will be generated.
+ /// - `auto` (default value) will automatically select the best quality for the given model.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
+ /// - `hd` and `standard` are supported for `dall-e-3`.
+ /// - `standard` is the only option for `dall-e-2`.
+ /// Default Value: auto
+ /// Example: medium + /// + /// + /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
+ /// Default Value: url
+ /// Example: url + /// + /// + /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 + /// + /// + /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
+ /// Default Value: false
+ /// Example: false + /// + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// + /// + /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
+ /// Default Value: vivid
+ /// Example: vivid + /// + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 + /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateImageAsStreamAsync( + string prompt, + global::tryAGI.OpenAI.AnyOf? model = default, + int? n = default, + global::tryAGI.OpenAI.CreateImageRequestQuality? quality = default, + global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default, + global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, + global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, + global::tryAGI.OpenAI.CreateImageRequestStyle? style = default, + string? user = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEdit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEdit.g.cs index c2cb866a..924dcb9f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEdit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEdit.g.cs @@ -5,42 +5,38 @@ namespace tryAGI.OpenAI public partial interface IImagesClient { /// - /// Create image edit
- /// Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateImageEditAsync( + global::tryAGI.OpenAI.CreateImageEditRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create image edit
- /// Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. ///
- /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent - /// /// /// The image(s) to edit. Must be a supported image file or an array of images.
- /// For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less
- /// than 50MB. You can provide up to 16 images.
- /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
/// `png` file less than 4MB. /// - /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret /// /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. @@ -48,85 +44,85 @@ public partial interface IImagesClient /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// - /// The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter
- /// is only supported for `gpt-image-1` with the `webp` or `jpeg` output
- /// formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 + /// + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url /// /// /// The format in which the generated images are returned. This parameter is
- /// only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// The default value is `png`.
/// Default Value: png
/// Example: png /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
- /// Example: A cute baby sea otter wearing a beret - /// - /// - /// The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.
- /// Default Value: auto
- /// Example: high - /// - /// - /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.
- /// Default Value: url
- /// Example: url + /// + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
- /// Default Value: 1024x1024
- /// Example: 1024x1024 + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 /// + /// /// - /// Edit the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
+ /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
/// Default Value: false
/// Example: false /// - /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
- /// Example: user-1234 + /// + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateImageEditAsync( global::tryAGI.OpenAI.AnyOf> image, string prompt, - global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, - global::tryAGI.OpenAI.ImageInputFidelity? inputFidelity = default, byte[]? mask = default, string? maskname = default, + global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, global::tryAGI.OpenAI.AnyOf? model = default, int? n = default, - int? outputCompression = default, + global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + string? user = default, + global::tryAGI.OpenAI.InputFidelity? inputFidelity = default, + bool? stream = default, int? partialImages = default, global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default, - global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, - global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, - bool? stream = default, - string? user = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEditAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEditAsStream.g.cs new file mode 100644 index 00000000..4bdc3a93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEditAsStream.g.cs @@ -0,0 +1,128 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IImagesClient + { + /// + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateImageEditAsStreamAsync( + + global::tryAGI.OpenAI.CreateImageEditRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. + ///
+ /// + /// The image(s) to edit. Must be a supported image file or an array of images.
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// `png` file less than 4MB. + /// + /// + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret + /// + /// + /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. + /// + /// + /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// + /// + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 + /// + /// + /// The number of images to generate. Must be between 1 and 10.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 + /// + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url + /// + /// + /// The format in which the generated images are returned. This parameter is
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// The default value is `png`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 + /// + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 + /// + /// + /// + /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// Default Value: false
+ /// Example: false + /// + /// + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high + /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateImageEditAsStreamAsync( + global::tryAGI.OpenAI.AnyOf> image, + string prompt, + byte[]? mask = default, + string? maskname = default, + global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, + global::tryAGI.OpenAI.AnyOf? model = default, + int? n = default, + global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, + global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + string? user = default, + global::tryAGI.OpenAI.InputFidelity? inputFidelity = default, + bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageVariation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageVariation.g.cs index 75857a98..3fe19fe0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageVariation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageVariation.g.cs @@ -5,18 +5,17 @@ namespace tryAGI.OpenAI public partial interface IImagesClient { /// - /// Create image variation
/// Creates a variation of a given image. This endpoint only supports `dall-e-2`. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateImageVariationAsync( + global::tryAGI.OpenAI.CreateImageVariationRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create image variation
/// Creates a variation of a given image. This endpoint only supports `dall-e-2`. ///
/// @@ -26,7 +25,9 @@ public partial interface IImagesClient /// The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. /// /// - /// The model to use for image generation. Only `dall-e-2` is supported at this time. + /// The model to use for image generation. Only `dall-e-2` is supported at this time.
+ /// Default Value: dall-e-2
+ /// Example: dall-e-2 /// /// /// The number of images to generate. Must be between 1 and 10.
@@ -44,7 +45,7 @@ public partial interface IImagesClient /// Example: 1024x1024 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.DeleteInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.DeleteInvite.g.cs index d3ff72e6..dabf9627 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.DeleteInvite.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.DeleteInvite.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IInvitesClient { /// - /// Delete invite
/// Delete an invite. If the invite has already been accepted, it cannot be deleted. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.InviteUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.InviteUser.g.cs index 045b3a1a..c9b84f4e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.InviteUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.InviteUser.g.cs @@ -5,29 +5,28 @@ namespace tryAGI.OpenAI public partial interface IInvitesClient { /// - /// Create invite
/// Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task InviteUserAsync( + global::tryAGI.OpenAI.InviteRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create invite
/// Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. ///
/// /// Send an email to this address /// - /// - /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. - /// /// /// `owner` or `reader` /// + /// + /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task InviteUserAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.ListInvites.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.ListInvites.g.cs index 852a1a54..e38e8006 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.ListInvites.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.ListInvites.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IInvitesClient { /// - /// List invites
/// Returns a list of invites in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.RetrieveInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.RetrieveInvite.g.cs index 43d3daaf..16feba69 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.RetrieveInvite.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.RetrieveInvite.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IInvitesClient { /// - /// Retrieve invite
/// Retrieves an invite. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.DeleteModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.DeleteModel.g.cs index d3df81ea..ec78e20a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.DeleteModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.DeleteModel.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IModelsClient { /// - /// Delete a fine-tuned model
/// Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.ListModels.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.ListModels.g.cs index 45aee440..67a9e8b8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.ListModels.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.ListModels.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IModelsClient { /// - /// List models
/// Lists the currently available models, and provides basic information about each one such as the owner and availability. ///
/// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.RetrieveModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.RetrieveModel.g.cs index 48c9a722..04d3c40b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.RetrieveModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.RetrieveModel.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IModelsClient { /// - /// Retrieve model
/// Retrieves a model instance, providing basic information about the model such as the owner and permissioning. ///
/// @@ -13,7 +12,7 @@ public partial interface IModelsClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task RetrieveModelAsync( + global::System.Threading.Tasks.Task RetrieveModelAsync( string model, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.CreateModeration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.CreateModeration.g.cs index 81fabca7..c48daea0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.CreateModeration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.CreateModeration.g.cs @@ -5,21 +5,20 @@ namespace tryAGI.OpenAI public partial interface IModerationsClient { /// - /// Create moderation
/// Classifies if text and/or image inputs are potentially harmful. Learn
- /// more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + /// more in the [moderation guide](/docs/guides/moderation). ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateModerationAsync( + global::tryAGI.OpenAI.CreateModerationRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create moderation
/// Classifies if text and/or image inputs are potentially harmful. Learn
- /// more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + /// more in the [moderation guide](/docs/guides/moderation). ///
/// /// Input (or inputs) to classify. Can be a single string, an array of strings, or
@@ -27,13 +26,15 @@ public partial interface IModerationsClient /// /// /// The content moderation model you would like to use. Learn more in
- /// [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about
- /// available models [here](https://platform.openai.com/docs/models#moderation). + /// [the moderation guide](/docs/guides/moderation), and learn about
+ /// available models [here](/docs/models#moderation).
+ /// Default Value: omni-moderation-latest
+ /// Example: omni-moderation-2024-09-26 /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateModerationAsync( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf? model = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysCreate.g.cs index 0542d8cb..f76b175a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysCreate.g.cs @@ -5,19 +5,20 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Create admin API key
- /// Create an organization admin API key + /// Create an organization admin API key
+ /// Create a new admin-level API key for the organization. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task AdminApiKeysCreateAsync( + global::tryAGI.OpenAI.AdminApiKeysCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create admin API key
- /// Create an organization admin API key + /// Create an organization admin API key
+ /// Create a new admin-level API key for the organization. ///
/// /// Example: New Admin Key diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysDelete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysDelete.g.cs index b58d9453..9db51c6a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysDelete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysDelete.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Delete admin API key
- /// Delete an organization admin API key + /// Delete an organization admin API key
+ /// Delete the specified admin API key. ///
/// /// The ID of the API key to be deleted. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysGet.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysGet.g.cs index 7d13a931..44af2be3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysGet.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysGet.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Retrieve admin API key
- /// Retrieve a single organization API key + /// Retrieve a single organization API key
+ /// Get details for a specific organization API key by its ID. ///
/// /// The ID of the API key. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysList.g.cs index c719ec40..0ce59dec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.AdminApiKeysList.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// List all organization and project API keys.
- /// List organization API keys + /// List organization API keys
+ /// Retrieve a paginated list of organization admin API keys. ///
/// /// Return keys with IDs that come after this ID in the pagination order. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CancelChatSessionMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CancelChatSessionMethod.g.cs new file mode 100644 index 00000000..0df36116 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CancelChatSessionMethod.g.cs @@ -0,0 +1,20 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Cancel an active ChatKit session and return its most recent metadata.
+ /// Cancelling prevents new requests from using the issued client secret. + ///
+ /// + /// Example: cksess_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CancelChatSessionMethodAsync( + string sessionId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Compactconversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Compactconversation.g.cs new file mode 100644 index 00000000..5ce49ccc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Compactconversation.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Compact a conversation. Returns a compacted response object.
+ /// Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced). + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CompactconversationAsync( + + global::tryAGI.OpenAI.CompactResponseMethodPublicBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Compact a conversation. Returns a compacted response object.
+ /// Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced). + ///
+ /// + /// Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CompactconversationAsync( + global::tryAGI.OpenAI.ModelIdsCompaction model, + global::tryAGI.OpenAI.OneOf>? input = default, + string? previousResponseId = default, + string? instructions = default, + string? promptCacheKey = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateChatSessionMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateChatSessionMethod.g.cs new file mode 100644 index 00000000..715490cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateChatSessionMethod.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Create a ChatKit session. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateChatSessionMethodAsync( + + global::tryAGI.OpenAI.CreateChatSessionBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a ChatKit session. + /// + /// + /// Workflow that powers the session. + /// + /// + /// A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope. + /// + /// + /// Optional override for session expiration timing in seconds from creation. Defaults to 10 minutes. + /// + /// + /// Optional override for per-minute request limits. When omitted, defaults to 10. + /// + /// + /// Optional overrides for ChatKit runtime configuration features + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateChatSessionMethodAsync( + global::tryAGI.OpenAI.WorkflowParam workflow, + string user, + global::tryAGI.OpenAI.ExpiresAfterParam? expiresAfter = default, + global::tryAGI.OpenAI.RateLimitsParam? rateLimits = default, + global::tryAGI.OpenAI.ChatkitConfigurationParam? chatkitConfiguration = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainer.g.cs index da8db095..eb0ebca9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainer.g.cs @@ -5,35 +5,48 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Create container
- /// Create Container + /// Create Container
+ /// Creates a container. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateContainerAsync( + global::tryAGI.OpenAI.CreateContainerBody request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create container
- /// Create Container + /// Create Container
+ /// Creates a container. ///
- /// - /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// Name of the container to create. /// /// /// IDs of files to copy to the container. /// - /// - /// Name of the container to create. + /// + /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// + /// An optional list of skills referenced by id or inline data. + /// + /// + /// Optional memory limit for the container. Defaults to "1g". + /// + /// + /// Network access policy for the container. /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateContainerAsync( string name, - global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? expiresAfter = default, global::System.Collections.Generic.IList? fileIds = default, + global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? expiresAfter = default, + global::System.Collections.Generic.IList? skills = default, + global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? memoryLimit = default, + global::tryAGI.OpenAI.NetworkPolicy? networkPolicy = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainerFile.g.cs index 5ca34fb4..e357da7f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.CreateContainerFile.g.cs @@ -5,9 +5,9 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Create container file
/// Create a Container File
- /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID. + /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
+ /// Creates a container file. ///
/// /// @@ -15,31 +15,32 @@ public partial interface IOpenAiClient /// global::System.Threading.Tasks.Task CreateContainerFileAsync( string containerId, + global::tryAGI.OpenAI.CreateContainerFileBody request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create container file
/// Create a Container File
- /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID. + /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
+ /// Creates a container file. ///
/// + /// + /// Name of the file to create. + /// /// /// The File object (not file name) to be uploaded. /// /// /// The File object (not file name) to be uploaded. /// - /// - /// Name of the file to create. - /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateContainerFileAsync( string containerId, + string? fileId = default, byte[]? file = default, string? filename = default, - string? fileId = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainer.g.cs index 7c098d43..2d246dc4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainer.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Delete a container
- /// Delete Container + /// Delete Container
+ /// Delete a container. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainerFile.g.cs index 58b5a91a..3f0759b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteContainerFile.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Delete a container file
- /// Delete Container File + /// Delete Container File
+ /// Delete a container file. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteThreadMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteThreadMethod.g.cs new file mode 100644 index 00000000..5d86be8c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.DeleteThreadMethod.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Delete a ChatKit thread along with its items and stored attachments. + /// + /// + /// Example: cthr_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteThreadMethodAsync( + string threadId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.GetThreadMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.GetThreadMethod.g.cs new file mode 100644 index 00000000..ffbfffe8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.GetThreadMethod.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Retrieve a ChatKit thread by its identifier. + /// + /// + /// Example: cthr_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetThreadMethodAsync( + string threadId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Getinputtokencounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Getinputtokencounts.g.cs new file mode 100644 index 00000000..cf876f3b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.Getinputtokencounts.g.cs @@ -0,0 +1,52 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// Returns input token counts of the request.
+ /// Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetinputtokencountsAsync( + + global::tryAGI.OpenAI.TokenCountsBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Returns input token counts of the request.
+ /// Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetinputtokencountsAsync( + string? model = default, + global::tryAGI.OpenAI.OneOf>? input = default, + string? previousResponseId = default, + global::System.Collections.Generic.IList? tools = default, + global::tryAGI.OpenAI.ResponseTextParam? text = default, + global::tryAGI.OpenAI.Reasoning? reasoning = default, + global::tryAGI.OpenAI.TruncationEnum? truncation = default, + string? instructions = default, + global::tryAGI.OpenAI.ConversationParam? conversation = default, + global::tryAGI.OpenAI.ToolChoiceParam? toolChoice = default, + bool? parallelToolCalls = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainerFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainerFiles.g.cs index 6b236fa2..7706581f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainerFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainerFiles.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// List container files
- /// List Container files + /// List Container files
+ /// Lists container files. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainers.g.cs index 7b89727c..ea7c904e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListContainers.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// List containers
- /// List Containers + /// List Containers
+ /// Lists containers. ///
/// /// Default Value: 20 @@ -15,12 +15,14 @@ public partial interface IOpenAiClient /// Default Value: desc /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task ListContainersAsync( int? limit = default, global::tryAGI.OpenAI.ListContainersOrder? order = default, string? after = default, + string? name = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadItemsMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadItemsMethod.g.cs new file mode 100644 index 00000000..30a37a5f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadItemsMethod.g.cs @@ -0,0 +1,31 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// List items that belong to a ChatKit thread. + /// + /// + /// Example: cthr_123 + /// + /// + /// + /// + /// List items created after this thread item ID. Defaults to null for the first page. + /// + /// + /// List items created before this thread item ID. Defaults to null for the newest results. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListThreadItemsMethodAsync( + string threadId, + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + string? before = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadsMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadsMethod.g.cs new file mode 100644 index 00000000..789afc2c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.ListThreadsMethod.g.cs @@ -0,0 +1,31 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IOpenAiClient + { + /// + /// List ChatKit threads with optional pagination and user filters. + /// + /// + /// + /// + /// List items created after this thread item ID. Defaults to null for the first page. + /// + /// + /// List items created before this thread item ID. Defaults to null for the newest results. + /// + /// + /// Filter threads that belong to this user identifier. Defaults to null to return all users. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListThreadsMethodAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + string? before = default, + string? user = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainer.g.cs index ffe48288..ff766ea0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainer.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Retrieve container
- /// Retrieve Container + /// Retrieve Container
+ /// Retrieves a container. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFile.g.cs index 9a4b68b0..20c11058 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFile.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Retrieve container file
- /// Retrieve Container File + /// Retrieve Container File
+ /// Retrieves a container file. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFileContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFileContent.g.cs index c25cb16d..e72dc2d3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFileContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.RetrieveContainerFileContent.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IOpenAiClient { /// - /// Retrieve container file content
- /// Retrieve Container File Content + /// Retrieve Container File Content
+ /// Retrieves a container file content. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs index 917f5d83..34adef54 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs @@ -127,6 +127,21 @@ public partial interface IOpenAiClient : global::System.IDisposable ///
public UsageClient Usage { get; } + /// + /// + /// + public GroupsClient Groups { get; } + + /// + /// + /// + public GroupOrganizationRoleAssignmentsClient GroupOrganizationRoleAssignments { get; } + + /// + /// + /// + public GroupUsersClient GroupUsers { get; } + /// /// /// @@ -137,11 +152,36 @@ public partial interface IOpenAiClient : global::System.IDisposable ///
public ProjectsClient Projects { get; } + /// + /// + /// + public ProjectGroupsClient ProjectGroups { get; } + + /// + /// + /// + public RolesClient Roles { get; } + /// /// /// public UsersClient Users { get; } + /// + /// + /// + public UserOrganizationRoleAssignmentsClient UserOrganizationRoleAssignments { get; } + + /// + /// + /// + public ProjectGroupRoleAssignmentsClient ProjectGroupRoleAssignments { get; } + + /// + /// + /// + public ProjectUserRoleAssignmentsClient ProjectUserRoleAssignments { get; } + /// /// /// @@ -157,5 +197,15 @@ public partial interface IOpenAiClient : global::System.IDisposable ///
public VectorStoresClient VectorStores { get; } + /// + /// + /// + public VideosClient Videos { get; } + + /// + /// + /// + public SkillsClient Skills { get; } + } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs new file mode 100644 index 00000000..947d7cec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupRoleAssignmentsClient + { + /// + /// Assigns a project role to a group within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignProjectGroupRoleAsync( + string projectId, + string groupId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Assigns a project role to a group within a project. + /// + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignProjectGroupRoleAsync( + string projectId, + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs new file mode 100644 index 00000000..cee286ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs @@ -0,0 +1,25 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupRoleAssignmentsClient + { + /// + /// Lists the project roles assigned to a group within a project. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListProjectGroupRoleAssignmentsAsync( + string projectId, + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs new file mode 100644 index 00000000..aed731ec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs @@ -0,0 +1,21 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupRoleAssignmentsClient + { + /// + /// Unassigns a project role from a group within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnassignProjectGroupRoleAsync( + string projectId, + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..14771ad1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IProjectGroupRoleAssignmentsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.AddProjectGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.AddProjectGroup.g.cs new file mode 100644 index 00000000..ea2e86df --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.AddProjectGroup.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupsClient + { + /// + /// Grants a group access to a project. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddProjectGroupAsync( + string projectId, + + global::tryAGI.OpenAI.InviteProjectGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Grants a group access to a project. + /// + /// + /// + /// Identifier of the group to add to the project. + /// + /// + /// Identifier of the project role to grant to the group. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddProjectGroupAsync( + string projectId, + string groupId, + string role, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.ListProjectGroups.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.ListProjectGroups.g.cs new file mode 100644 index 00000000..6733ec25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.ListProjectGroups.g.cs @@ -0,0 +1,27 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupsClient + { + /// + /// Lists the groups that have access to a project. + /// + /// + /// + /// Default Value: 20 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListProjectGroupsAsync( + string projectId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectGroupsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.RemoveProjectGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.RemoveProjectGroup.g.cs new file mode 100644 index 00000000..ef955de3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.RemoveProjectGroup.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectGroupsClient + { + /// + /// Revokes a group's access to a project. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveProjectGroupAsync( + string projectId, + string groupId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs new file mode 100644 index 00000000..8306472f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IProjectGroupsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs new file mode 100644 index 00000000..56f46423 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectUserRoleAssignmentsClient + { + /// + /// Assigns a project role to a user within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignProjectUserRoleAsync( + string projectId, + string userId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Assigns a project role to a user within a project. + /// + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignProjectUserRoleAsync( + string projectId, + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs new file mode 100644 index 00000000..9c4187b6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs @@ -0,0 +1,25 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectUserRoleAssignmentsClient + { + /// + /// Lists the project roles assigned to a user within a project. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListProjectUserRoleAssignmentsAsync( + string projectId, + string userId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs new file mode 100644 index 00000000..0b9cc070 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs @@ -0,0 +1,21 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IProjectUserRoleAssignmentsClient + { + /// + /// Unassigns a project role from a user within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnassignProjectUserRoleAsync( + string projectId, + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..178b1f9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IProjectUserRoleAssignmentsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ArchiveProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ArchiveProject.g.cs index cb479e15..e0e70688 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ArchiveProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ArchiveProject.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Archive project
/// Archives a project in the organization. Archived projects cannot be used or updated. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProject.g.cs index 2fe01899..0b172a09 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProject.g.cs @@ -5,27 +5,30 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Create project
/// Create a new project in the organization. Projects can be created and archived, but cannot be deleted. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateProjectAsync( + global::tryAGI.OpenAI.ProjectCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create project
/// Create a new project in the organization. Projects can be created and archived, but cannot be deleted. ///
/// /// The friendly name of the project, this name appears in reports. /// + /// + /// Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateProjectAsync( string name, + global::tryAGI.OpenAI.ProjectCreateRequestGeography? geography = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectServiceAccount.g.cs index bb5c9e49..d09d04ce 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectServiceAccount.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Create project service account
/// Creates a new service account in the project. This also returns an unredacted API key for the service account. ///
/// @@ -14,11 +13,11 @@ public partial interface IProjectsClient /// global::System.Threading.Tasks.Task CreateProjectServiceAccountAsync( string projectId, + global::tryAGI.OpenAI.ProjectServiceAccountCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create project service account
/// Creates a new service account in the project. This also returns an unredacted API key for the service account. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectUser.g.cs index 1483e13b..50ceacda 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.CreateProjectUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Create project user
/// Adds a user to the project. Users must already be members of the organization to be added to a project. ///
/// @@ -14,26 +13,26 @@ public partial interface IProjectsClient /// global::System.Threading.Tasks.Task CreateProjectUserAsync( string projectId, + global::tryAGI.OpenAI.ProjectUserCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create project user
/// Adds a user to the project. Users must already be members of the organization to be added to a project. ///
/// - /// - /// `owner` or `member` - /// /// /// The ID of the user. /// + /// + /// `owner` or `member` + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateProjectUserAsync( string projectId, - global::tryAGI.OpenAI.ProjectUserCreateRequestRole role, string userId, + global::tryAGI.OpenAI.ProjectUserCreateRequestRole role, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectApiKey.g.cs index aafa564d..ba60ea0c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectApiKey.g.cs @@ -5,8 +5,9 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Delete project API key
- /// Deletes an API key from the project. + /// Deletes an API key from the project.
+ /// Returns confirmation of the key deletion, or an error if the key belonged to
+ /// a service account. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectServiceAccount.g.cs index 7b7cebca..7e534e3f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectServiceAccount.g.cs @@ -5,8 +5,9 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Delete project service account
- /// Deletes a service account from the project. + /// Deletes a service account from the project.
+ /// Returns confirmation of service account deletion, or an error if the project
+ /// is archived (archived projects have no service accounts). ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectUser.g.cs index d706633b..7f7c2cc5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.DeleteProjectUser.g.cs @@ -5,8 +5,9 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Delete project user
- /// Deletes a user from the project. + /// Deletes a user from the project.
+ /// Returns confirmation of project user deletion, or an error if the project is
+ /// archived (archived projects have no users). ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectApiKeys.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectApiKeys.g.cs index 1725ca68..b8bb1afd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectApiKeys.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectApiKeys.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// List project API keys
/// Returns a list of API keys in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectRateLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectRateLimits.g.cs index 369abd06..0c3338fe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectRateLimits.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectRateLimits.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// List project rate limits
/// Returns the rate limits per model for a project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectServiceAccounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectServiceAccounts.g.cs index e75d9faf..c9db3298 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectServiceAccounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectServiceAccounts.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// List project service accounts
/// Returns a list of service accounts in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectUsers.g.cs index 1731e551..62bc857b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectUsers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjectUsers.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// List project users
/// Returns a list of users in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjects.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjects.g.cs index 1d820662..05a8bbd2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjects.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ListProjects.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// List projects
/// Returns a list of projects. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProject.g.cs index d18cf477..3766de25 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProject.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Modify project
/// Modifies a project in the organization. ///
/// @@ -14,11 +13,11 @@ public partial interface IProjectsClient /// global::System.Threading.Tasks.Task ModifyProjectAsync( string projectId, + global::tryAGI.OpenAI.ProjectUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify project
/// Modifies a project in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProjectUser.g.cs index 704d4940..0c961183 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.ModifyProjectUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Modify project user
/// Modifies a user's role in the project. ///
/// @@ -16,11 +15,11 @@ public partial interface IProjectsClient global::System.Threading.Tasks.Task ModifyProjectUserAsync( string projectId, string userId, + global::tryAGI.OpenAI.ProjectUserUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify project user
/// Modifies a user's role in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProject.g.cs index 4b5f9a3a..f55c6421 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProject.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Retrieve project
/// Retrieves a project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectApiKey.g.cs index d6dad380..341dfc20 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectApiKey.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Retrieve project API key
/// Retrieves an API key in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectServiceAccount.g.cs index 3ff99875..a33a55e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectServiceAccount.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Retrieve project service account
/// Retrieves a service account in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectUser.g.cs index 7be7426a..d6ffaa22 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.RetrieveProjectUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Retrieve project user
/// Retrieves a user in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.UpdateProjectRateLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.UpdateProjectRateLimits.g.cs index e19a293c..2c8046fe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.UpdateProjectRateLimits.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.UpdateProjectRateLimits.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IProjectsClient { /// - /// Modify project rate limit
/// Updates a project rate limit. ///
/// @@ -16,44 +15,44 @@ public partial interface IProjectsClient global::System.Threading.Tasks.Task UpdateProjectRateLimitsAsync( string projectId, string rateLimitId, + global::tryAGI.OpenAI.ProjectRateLimitUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify project rate limit
/// Updates a project rate limit. ///
/// /// - /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// + /// The maximum requests per minute. /// - /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// + /// The maximum tokens per minute. /// /// /// The maximum images per minute. Only relevant for certain models. /// + /// + /// The maximum audio megabytes per minute. Only relevant for certain models. + /// /// /// The maximum requests per day. Only relevant for certain models. /// - /// - /// The maximum requests per minute. - /// - /// - /// The maximum tokens per minute. + /// + /// The maximum batch input tokens per day. Only relevant for certain models. /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateProjectRateLimitsAsync( string projectId, string rateLimitId, - int? batch1DayMaxInputTokens = default, - int? maxAudioMegabytesPer1Minute = default, - int? maxImagesPer1Minute = default, - int? maxRequestsPer1Day = default, int? maxRequestsPer1Minute = default, int? maxTokensPer1Minute = default, + int? maxImagesPer1Minute = default, + int? maxAudioMegabytesPer1Minute = default, + int? maxRequestsPer1Day = default, + int? batch1DayMaxInputTokens = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.AcceptRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.AcceptRealtimeCall.g.cs new file mode 100644 index 00000000..b3eccdb0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.AcceptRealtimeCall.g.cs @@ -0,0 +1,95 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRealtimeClient + { + /// + /// Accept an incoming SIP call and configure the realtime session that will
+ /// handle it. + ///
+ /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AcceptRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Accept an incoming SIP call and configure the realtime session that will
+ /// handle it. + ///
+ /// + /// + /// The type of session to create. Always `realtime` for the Realtime API. + /// + /// + /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
+ /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
+ /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
+ /// Default Value: [audio] + /// + /// + /// The Realtime model used for this session. + /// + /// + /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
+ /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. + /// + /// + /// Configuration for input and output audio. + /// + /// + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// + /// + /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Tools available to the model. + /// + /// + /// How the model chooses tools. Provide one of the string modes or force a specific
+ /// function/MCP tool.
+ /// Default Value: auto + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// + /// + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AcceptRealtimeCallAsync( + string callId, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType type = default, + global::System.Collections.Generic.IList? outputModalities = default, + global::tryAGI.OpenAI.AnyOf? model = default, + string? instructions = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? audio = default, + global::System.Collections.Generic.IList? include = default, + global::tryAGI.OpenAI.OneOf? tracing = default, + global::System.Collections.Generic.IList>? tools = default, + global::tryAGI.OpenAI.OneOf? toolChoice = default, + global::tryAGI.OpenAI.OneOf? maxOutputTokens = default, + global::tryAGI.OpenAI.RealtimeTruncation? truncation = default, + global::tryAGI.OpenAI.PromptVariant1? prompt = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeCall.g.cs new file mode 100644 index 00000000..da144b33 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeCall.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRealtimeClient + { + /// + /// Create a new Realtime API call over WebRTC and receive the SDP answer needed
+ /// to complete the peer connection. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateRealtimeCallAsync( + + global::tryAGI.OpenAI.RealtimeCallCreateRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a new Realtime API call over WebRTC and receive the SDP answer needed
+ /// to complete the peer connection. + ///
+ /// + /// WebRTC Session Description Protocol (SDP) offer generated by the caller. + /// + /// + /// Optional session configuration to apply before the realtime session is
+ /// created. Use the same parameters you would send in a [`create client secret`](/docs/api-reference/realtime-sessions/create-realtime-client-secret)
+ /// request. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateRealtimeCallAsync( + string sdp, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? session = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeClientSecret.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeClientSecret.g.cs index 71b941f4..2c834188 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeClientSecret.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeClientSecret.g.cs @@ -5,19 +5,34 @@ namespace tryAGI.OpenAI public partial interface IRealtimeClient { /// - /// Create client secret
- /// Create a Realtime client secret with an associated session configuration. + /// Create a Realtime client secret with an associated session configuration.
+ /// Client secrets are short-lived tokens that can be passed to a client app,
+ /// such as a web frontend or mobile client, which grants access to the Realtime API without
+ /// leaking your main API key. You can configure a custom TTL for each client secret.
+ /// You can also attach session configuration options to the client secret, which will be
+ /// applied to any sessions created using that client secret, but these can also be overridden
+ /// by the client connection.
+ /// [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
+ /// Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateRealtimeClientSecretAsync( + global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create client secret
- /// Create a Realtime client secret with an associated session configuration. + /// Create a Realtime client secret with an associated session configuration.
+ /// Client secrets are short-lived tokens that can be passed to a client app,
+ /// such as a web frontend or mobile client, which grants access to the Realtime API without
+ /// leaking your main API key. You can configure a custom TTL for each client secret.
+ /// You can also attach session configuration options to the client secret, which will be
+ /// applied to any sessions created using that client secret, but these can also be overridden
+ /// by the client connection.
+ /// [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
+ /// Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. ///
/// /// Configuration for the client secret expiration. Expiration refers to the time after which
@@ -33,7 +48,7 @@ public partial interface IRealtimeClient /// global::System.Threading.Tasks.Task CreateRealtimeClientSecretAsync( global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? expiresAfter = default, - global::tryAGI.OpenAI.Session? session = default, + global::tryAGI.OpenAI.OneOf? session = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeSession.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeSession.g.cs index 75055cae..86acc591 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeSession.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeSession.g.cs @@ -5,63 +5,61 @@ namespace tryAGI.OpenAI public partial interface IRealtimeClient { /// - /// Create session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API. Can be configured with the same session parameters as the
/// `session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime session object, plus an ephemeral key. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateRealtimeSessionAsync( + global::tryAGI.OpenAI.RealtimeSessionCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API. Can be configured with the same session parameters as the
/// `session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime session object, plus an ephemeral key. ///
/// /// Ephemeral key returned by the API. /// - /// - /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - /// - /// Configuration for input audio transcription, defaults to off and can be
- /// set to `null` to turn off once on. Input audio transcription is not native
- /// to the model, since the model consumes audio directly. Transcription runs
- /// asynchronously and should be treated as rough guidance
- /// rather than the representation understood by the model. + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. /// /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
/// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. /// - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// + /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// + /// Configuration for input audio transcription, defaults to off and can be
+ /// set to `null` to turn off once on. Input audio transcription is not native
+ /// to the model, since the model consumes audio directly. Transcription runs
+ /// asynchronously and should be treated as rough guidance
+ /// rather than the representation understood by the model. /// /// /// The speed of the model's spoken response. 1.0 is the default speed. 0.25 is
@@ -69,53 +67,59 @@ public partial interface IRealtimeClient /// in between model turns, not while a response is in progress.
/// Default Value: 1 /// - /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. - /// - /// - /// How the model chooses tools. Options are `auto`, `none`, `required`, or
- /// specify a function. - /// - /// - /// Tools (functions) available to the model. - /// /// /// Configuration options for tracing. Set to null to disable tracing. Once
/// tracing is enabled for a session, the configuration cannot be modified.
/// `auto` will create a trace for the session with default values for the
/// workflow name, group id, and metadata. /// - /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. - /// /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
/// audio volume and respond at the end of user speech. /// - /// - /// Example: ash + /// + /// Tools (functions) available to the model. + /// + /// + /// How the model chooses tools. Options are `auto`, `none`, `required`, or
+ /// specify a function. + /// + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. /// + /// + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. + /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateRealtimeSessionAsync( global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret clientSecret, - string? inputAudioFormat = default, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default, - string? instructions = default, - global::tryAGI.OpenAI.AnyOf? maxResponseOutputTokens = default, global::System.Collections.Generic.IList? modalities = default, + string? instructions = default, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice = default, + string? inputAudioFormat = default, string? outputAudioFormat = default, - global::tryAGI.OpenAI.Prompt2? prompt = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default, double? speed = default, - double? temperature = default, - string? toolChoice = default, + global::tryAGI.OpenAI.OneOf? tracing = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection = default, global::System.Collections.Generic.IList? tools = default, - global::tryAGI.OpenAI.AnyOf? tracing = default, + string? toolChoice = default, + double? temperature = default, + global::tryAGI.OpenAI.OneOf? maxResponseOutputTokens = default, global::tryAGI.OpenAI.RealtimeTruncation? truncation = default, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection = default, - global::tryAGI.OpenAI.VoiceIdsShared? voice = default, + global::tryAGI.OpenAI.PromptVariant1? prompt = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeTranscriptionSession.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeTranscriptionSession.g.cs index 2448b361..fd0f8697 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeTranscriptionSession.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeTranscriptionSession.g.cs @@ -5,33 +5,39 @@ namespace tryAGI.OpenAI public partial interface IRealtimeClient { /// - /// Create transcription session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API specifically for realtime transcriptions.
/// Can be configured with the same session parameters as the `transcription_session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime transcription session object, plus an ephemeral key. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateRealtimeTranscriptionSessionAsync( + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create transcription session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API specifically for realtime transcriptions.
/// Can be configured with the same session parameters as the `transcription_session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime transcription session object, plus an ephemeral key. ///
- /// - /// The set of items to include in the transcription. Current available items are:
- /// `item.input_audio_transcription.logprobs` + /// + /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// + /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
+ /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
+ /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
@@ -39,23 +45,21 @@ public partial interface IRealtimeClient /// single channel (mono), and little-endian byte order.
/// Default Value: pcm16 /// - /// - /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
- /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// + /// Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. /// - /// - /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// The set of items to include in the transcription. Current available items are:
+ /// `item.input_audio_transcription.logprobs` /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateRealtimeTranscriptionSessionAsync( - global::System.Collections.Generic.IList? include = default, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat = default, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection = default, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? inputAudioNoiseReduction = default, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat = default, global::tryAGI.OpenAI.AudioTranscription? inputAudioTranscription = default, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.HangupRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.HangupRealtimeCall.g.cs new file mode 100644 index 00000000..a10d563e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.HangupRealtimeCall.g.cs @@ -0,0 +1,18 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRealtimeClient + { + /// + /// End an active Realtime API call, whether it was initiated over SIP or
+ /// WebRTC. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task HangupRealtimeCallAsync( + string callId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.ReferRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.ReferRealtimeCall.g.cs new file mode 100644 index 00000000..f3237753 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.ReferRealtimeCall.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRealtimeClient + { + /// + /// Transfer an active SIP call to a new destination using the SIP REFER verb. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ReferRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeCallReferRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Transfer an active SIP call to a new destination using the SIP REFER verb. + /// + /// + /// + /// URI that should appear in the SIP Refer-To header. Supports values like
+ /// `tel:+14155550123` or `sip:agent@example.com`.
+ /// Example: tel:+14155550123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ReferRealtimeCallAsync( + string callId, + string targetUri, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.RejectRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.RejectRealtimeCall.g.cs new file mode 100644 index 00000000..29588f0a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.RejectRealtimeCall.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRealtimeClient + { + /// + /// Decline an incoming SIP call by returning a SIP status code to the caller. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RejectRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeCallRejectRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Decline an incoming SIP call by returning a SIP status code to the caller. + /// + /// + /// + /// SIP response code to send back to the caller. Defaults to `603` (Decline)
+ /// when omitted.
+ /// Example: 486 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RejectRealtimeCallAsync( + string callId, + int? statusCode = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CancelResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CancelResponse.g.cs index 2104b023..c0a3b2e3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CancelResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CancelResponse.g.cs @@ -5,10 +5,9 @@ namespace tryAGI.OpenAI public partial interface IResponsesClient { /// - /// Cancel a response
/// Cancels a model response with the given ID. Only responses created with
/// the `background` parameter set to `true` can be cancelled.
- /// [Learn more](https://platform.openai.com/docs/guides/background). + /// [Learn more](/docs/guides/background). ///
/// /// Example: resp_677efb5139a88190b512bc3fef8e535d diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponse.g.cs index 21e530dc..ac21dc1d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponse.g.cs @@ -5,30 +5,29 @@ namespace tryAGI.OpenAI public partial interface IResponsesClient { /// - /// Create a model response
- /// Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or
- /// [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)
- /// or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call
- /// your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in
- /// [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data
+ /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
/// as input for the model's response. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateResponseAsync( + global::tryAGI.OpenAI.CreateResponse request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create a model response
- /// Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or
- /// [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)
- /// or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call
- /// your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in
- /// [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data
+ /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
/// as input for the model's response. ///
/// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponseAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponseAsStream.g.cs new file mode 100644 index 00000000..399f909a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.CreateResponseAsStream.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IResponsesClient + { + /// + /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
+ /// as input for the model's response. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateResponseAsStreamAsync( + + global::tryAGI.OpenAI.CreateResponse request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
+ /// as input for the model's response. + ///
+ /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable CreateResponseAsStreamAsync( + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.DeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.DeleteResponse.g.cs index 01bf8af7..aabf21c9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.DeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.DeleteResponse.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IResponsesClient { /// - /// Delete a model response
/// Deletes a model response with the given ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.GetResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.GetResponse.g.cs index 3246fd1c..88e488b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.GetResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.GetResponse.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IResponsesClient { /// - /// Get a model response
/// Retrieves a model response with the given ID. ///
/// @@ -19,7 +18,7 @@ public partial interface IResponsesClient /// global::System.Threading.Tasks.Task GetResponseAsync( string responseId, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, bool? stream = default, int? startingAfter = default, bool? includeObfuscation = default, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.ListInputItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.ListInputItems.g.cs index ab0a1a05..579658b8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.ListInputItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.ListInputItems.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IResponsesClient { /// - /// List input items
/// Returns a list of input items for a given response. ///
/// @@ -22,7 +21,7 @@ public partial interface IResponsesClient int? limit = default, global::tryAGI.OpenAI.ListInputItemsOrder? order = default, string? after = default, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateProjectRole.g.cs new file mode 100644 index 00000000..22c816cc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateProjectRole.g.cs @@ -0,0 +1,42 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Creates a custom role for a project. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateProjectRoleAsync( + string projectId, + + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates a custom role for a project. + /// + /// + /// + /// Unique name for the role. + /// + /// + /// Permissions to grant to the role. + /// + /// + /// Optional description of the role. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateProjectRoleAsync( + string projectId, + string roleName, + global::System.Collections.Generic.IList permissions, + string? description = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateRole.g.cs new file mode 100644 index 00000000..0dfe001e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.CreateRole.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Creates a custom role for the organization. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateRoleAsync( + + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Creates a custom role for the organization. + /// + /// + /// Unique name for the role. + /// + /// + /// Permissions to grant to the role. + /// + /// + /// Optional description of the role. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateRoleAsync( + string roleName, + global::System.Collections.Generic.IList permissions, + string? description = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteProjectRole.g.cs new file mode 100644 index 00000000..87c0e160 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteProjectRole.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Deletes a custom role from a project. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteProjectRoleAsync( + string projectId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteRole.g.cs new file mode 100644 index 00000000..23e6ba1b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.DeleteRole.g.cs @@ -0,0 +1,17 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Deletes a custom role from the organization. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteRoleAsync( + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListProjectRoles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListProjectRoles.g.cs new file mode 100644 index 00000000..3c7a6ad0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListProjectRoles.g.cs @@ -0,0 +1,27 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Lists the roles configured for a project. + /// + /// + /// + /// Default Value: 1000 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListProjectRolesAsync( + string projectId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectRolesOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListRoles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListRoles.g.cs new file mode 100644 index 00000000..1e1ba279 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.ListRoles.g.cs @@ -0,0 +1,25 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Lists the roles configured for the organization. + /// + /// + /// Default Value: 1000 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListRolesAsync( + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListRolesOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateProjectRole.g.cs new file mode 100644 index 00000000..2f1052ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateProjectRole.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Updates an existing project role. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateProjectRoleAsync( + string projectId, + string roleId, + + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Updates an existing project role. + /// + /// + /// + /// + /// Updated set of permissions for the role. + /// + /// + /// New description for the role. + /// + /// + /// New name for the role. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateProjectRoleAsync( + string projectId, + string roleId, + global::System.Collections.Generic.IList? permissions = default, + string? description = default, + string? roleName = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateRole.g.cs new file mode 100644 index 00000000..3154fc1f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.UpdateRole.g.cs @@ -0,0 +1,42 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IRolesClient + { + /// + /// Updates an existing organization role. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateRoleAsync( + string roleId, + + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Updates an existing organization role. + /// + /// + /// + /// Updated set of permissions for the role. + /// + /// + /// New description for the role. + /// + /// + /// New name for the role. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateRoleAsync( + string roleId, + global::System.Collections.Generic.IList? permissions = default, + string? description = default, + string? roleName = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs new file mode 100644 index 00000000..e89eb1c6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IRolesClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkill.g.cs new file mode 100644 index 00000000..5535b3b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkill.g.cs @@ -0,0 +1,28 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Create a new skill. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateSkillAsync( + + global::tryAGI.OpenAI.CreateSkillBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a new skill. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateSkillAsync( + global::tryAGI.OpenAI.OneOf, byte[]> files, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkillVersion.g.cs new file mode 100644 index 00000000..8af46009 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.CreateSkillVersion.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Create a new immutable skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateSkillVersionAsync( + string skillId, + + global::tryAGI.OpenAI.CreateSkillVersionBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a new immutable skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// + /// Whether to set this version as the default. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateSkillVersionAsync( + string skillId, + global::tryAGI.OpenAI.OneOf, byte[]> files, + bool? @default = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkill.g.cs new file mode 100644 index 00000000..489da7fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkill.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Delete a skill by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteSkillAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkillVersion.g.cs new file mode 100644 index 00000000..96d8f065 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.DeleteSkillVersion.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Delete a skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteSkillVersionAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkill.g.cs new file mode 100644 index 00000000..733e93ac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkill.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Get a skill by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSkillAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillContent.g.cs new file mode 100644 index 00000000..3324f15e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillContent.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Download a skill zip bundle by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSkillContentAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersion.g.cs new file mode 100644 index 00000000..bbe85bca --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersion.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Get a specific skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The version number to retrieve. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSkillVersionAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersionContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersionContent.g.cs new file mode 100644 index 00000000..00262bf6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.GetSkillVersionContent.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Download a skill version zip bundle. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetSkillVersionContentAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkillVersions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkillVersions.g.cs new file mode 100644 index 00000000..71d6174e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkillVersions.g.cs @@ -0,0 +1,27 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// List skill versions for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// + /// + /// Example: skillver_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListSkillVersionsAsync( + string skillId, + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkills.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkills.g.cs new file mode 100644 index 00000000..84d01c3f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.ListSkills.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// List all skills for the current project. + /// + /// + /// + /// + /// Identifier for the last item from the previous pagination request + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListSkillsAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.UpdateSkillDefaultVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.UpdateSkillDefaultVersion.g.cs new file mode 100644 index 00000000..46eaf7a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.UpdateSkillDefaultVersion.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface ISkillsClient + { + /// + /// Update the default version pointer for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateSkillDefaultVersionAsync( + string skillId, + + global::tryAGI.OpenAI.SetDefaultSkillVersionBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Update the default version pointer for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number to set as default. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UpdateSkillDefaultVersionAsync( + string skillId, + string defaultVersion, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs new file mode 100644 index 00000000..a4f33615 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface ISkillsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.AddUploadPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.AddUploadPart.g.cs index 8bd401da..89b7ea83 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.AddUploadPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.AddUploadPart.g.cs @@ -5,10 +5,9 @@ namespace tryAGI.OpenAI public partial interface IUploadsClient { /// - /// Add upload part
- /// Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
+ /// Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
/// Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
- /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete). ///
/// /// Example: upload_abc123 @@ -18,14 +17,14 @@ public partial interface IUploadsClient /// global::System.Threading.Tasks.Task AddUploadPartAsync( string uploadId, + global::tryAGI.OpenAI.AddUploadPartRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Add upload part
- /// Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
+ /// Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
/// Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
- /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete). ///
/// /// Example: upload_abc123 diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CancelUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CancelUpload.g.cs index cbbb9e44..c8f9eb90 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CancelUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CancelUpload.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IUploadsClient { /// - /// Cancel upload
- /// Cancels the Upload. No Parts may be added after an Upload is cancelled. + /// Cancels the Upload. No Parts may be added after an Upload is cancelled.
+ /// Returns the Upload object with status `cancelled`. ///
/// /// Example: upload_abc123 diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CompleteUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CompleteUpload.g.cs index d8a203ce..5ced5f66 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CompleteUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CompleteUpload.g.cs @@ -5,11 +5,11 @@ namespace tryAGI.OpenAI public partial interface IUploadsClient { /// - /// Complete upload
- /// Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
- /// Within the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
+ /// Completes the [Upload](/docs/api-reference/uploads/object).
+ /// Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
/// You can specify the order of the Parts by passing in an ordered list of the Part IDs.
- /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
+ /// Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. ///
/// /// Example: upload_abc123 @@ -19,25 +19,26 @@ public partial interface IUploadsClient /// global::System.Threading.Tasks.Task CompleteUploadAsync( string uploadId, + global::tryAGI.OpenAI.CompleteUploadRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Complete upload
- /// Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
- /// Within the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
+ /// Completes the [Upload](/docs/api-reference/uploads/object).
+ /// Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
/// You can specify the order of the Parts by passing in an ordered list of the Part IDs.
- /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
+ /// Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. ///
/// /// Example: upload_abc123 /// - /// - /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. - /// /// /// The ordered list of Part IDs. /// + /// + /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CompleteUploadAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CreateUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CreateUpload.g.cs index 4c26f0c5..d10d5a31 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CreateUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.CreateUpload.g.cs @@ -5,70 +5,73 @@ namespace tryAGI.OpenAI public partial interface IUploadsClient { /// - /// Create upload
- /// Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
- /// that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
+ /// Creates an intermediate [Upload](/docs/api-reference/uploads/object) object
+ /// that you can add [Parts](/docs/api-reference/uploads/part-object) to.
/// Currently, an Upload can accept at most 8 GB in total and expires after an
/// hour after you create it.
/// Once you complete the Upload, we will create a
- /// [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts
+ /// [File](/docs/api-reference/files/object) object that contains all the parts
/// you uploaded. This File is usable in the rest of our platform as a regular
/// File object.
/// For certain `purpose` values, the correct `mime_type` must be specified.
/// Please refer to documentation for the
- /// [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
+ /// [supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files).
/// For guidance on the proper filename extensions for each purpose, please
/// follow the documentation on [creating a
- /// File](https://platform.openai.com/docs/api-reference/files/create). + /// File](/docs/api-reference/files/create).
+ /// Returns the Upload object with status `pending`. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateUploadAsync( + global::tryAGI.OpenAI.CreateUploadRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create upload
- /// Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
- /// that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
+ /// Creates an intermediate [Upload](/docs/api-reference/uploads/object) object
+ /// that you can add [Parts](/docs/api-reference/uploads/part-object) to.
/// Currently, an Upload can accept at most 8 GB in total and expires after an
/// hour after you create it.
/// Once you complete the Upload, we will create a
- /// [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts
+ /// [File](/docs/api-reference/files/object) object that contains all the parts
/// you uploaded. This File is usable in the rest of our platform as a regular
/// File object.
/// For certain `purpose` values, the correct `mime_type` must be specified.
/// Please refer to documentation for the
- /// [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
+ /// [supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files).
/// For guidance on the proper filename extensions for each purpose, please
/// follow the documentation on [creating a
- /// File](https://platform.openai.com/docs/api-reference/files/create). + /// File](/docs/api-reference/files/create).
+ /// Returns the Upload object with status `pending`. ///
- /// - /// The number of bytes in the file you are uploading. - /// - /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The name of the file to upload. /// + /// + /// The intended purpose of the uploaded file.
+ /// See the [documentation on File
+ /// purposes](/docs/api-reference/files/create#files-create-purpose). + /// + /// + /// The number of bytes in the file you are uploading. + /// /// /// The MIME type of the file.
- /// This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. + /// This must fall within the supported MIME types for your file purpose. See
+ /// the supported MIME types for assistants and vision. /// - /// - /// The intended purpose of the uploaded file.
- /// See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateUploadAsync( - int bytes, string filename, - string mimeType, global::tryAGI.OpenAI.CreateUploadRequestPurpose purpose, + int bytes, + string mimeType, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioSpeeches.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioSpeeches.g.cs index 0dc8325f..816ccfc4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioSpeeches.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioSpeeches.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Audio speeches
/// Get audio speeches usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs index 574310b5..a635bf5c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Audio transcriptions
/// Get audio transcriptions usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs index aac78be1..fa6f4256 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Code interpreter sessions
/// Get code interpreter sessions usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCompletions.g.cs index 21f19872..1279cce7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCompletions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCompletions.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Completions
/// Get completions usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCosts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCosts.g.cs index 7d47debd..5f5661cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCosts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageCosts.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Costs
/// Get costs details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageEmbeddings.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageEmbeddings.g.cs index 33cc3cd9..f5c146b9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageEmbeddings.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageEmbeddings.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Embeddings
/// Get embeddings usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageImages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageImages.g.cs index 83ad6824..300a0e77 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageImages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageImages.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Images
/// Get images usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageModerations.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageModerations.g.cs index b85aeed9..26cc4de8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageModerations.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageModerations.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Moderations
/// Get moderations usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageVectorStores.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageVectorStores.g.cs index 81411a4e..93a5b678 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageVectorStores.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.UsageVectorStores.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsageClient { /// - /// Vector stores
/// Get vector stores usage details for the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs new file mode 100644 index 00000000..1728b0df --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs @@ -0,0 +1,34 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IUserOrganizationRoleAssignmentsClient + { + /// + /// Assigns an organization role to a user within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignUserRoleAsync( + string userId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Assigns an organization role to a user within the organization. + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AssignUserRoleAsync( + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs new file mode 100644 index 00000000..2b00d836 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IUserOrganizationRoleAssignmentsClient + { + /// + /// Lists the organization roles assigned to a user within the organization. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListUserRoleAssignmentsAsync( + string userId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs new file mode 100644 index 00000000..3afd07eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IUserOrganizationRoleAssignmentsClient + { + /// + /// Unassigns an organization role from a user within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnassignUserRoleAsync( + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..f8a88ee8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IUserOrganizationRoleAssignmentsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.DeleteUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.DeleteUser.g.cs index 4f11ab48..06fc8b83 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.DeleteUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.DeleteUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsersClient { /// - /// Delete user
/// Deletes a user from the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ListUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ListUsers.g.cs index a3132c4b..f328f776 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ListUsers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ListUsers.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsersClient { /// - /// List users
/// Lists all of the users in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ModifyUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ModifyUser.g.cs index 92fa6a26..6a55ea20 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ModifyUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.ModifyUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsersClient { /// - /// Modify user
/// Modifies a user's role in the organization. ///
/// @@ -14,11 +13,11 @@ public partial interface IUsersClient /// global::System.Threading.Tasks.Task ModifyUserAsync( string userId, + global::tryAGI.OpenAI.UserRoleUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify user
/// Modifies a user's role in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.RetrieveUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.RetrieveUser.g.cs index 35bf69ce..0bc3d34e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.RetrieveUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.RetrieveUser.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IUsersClient { /// - /// Retrieve user
/// Retrieves a user by their identifier. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CancelVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CancelVectorStoreFileBatch.g.cs index 3a68404f..64331cd5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CancelVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CancelVectorStoreFileBatch.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Cancel vector store file batch
/// Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStore.g.cs index 3f6f540e..f3e9f719 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStore.g.cs @@ -5,47 +5,44 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Create vector store
/// Create a vector store. ///
/// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateVectorStoreAsync( + global::tryAGI.OpenAI.CreateVectorStoreRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create vector store
/// Create a vector store. ///
- /// - /// 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. - /// - /// - /// The expiration policy for a vector store. - /// /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. /// /// /// The name of the vector store. /// + /// + /// A description for the vector store. Can be used to describe the vector store's purpose. + /// + /// + /// The expiration policy for a vector store. + /// + /// + /// 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. + /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateVectorStoreAsync( - global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, global::System.Collections.Generic.IList? fileIds = default, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + string? description = default, + global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, + global::tryAGI.OpenAI.OneOf? chunkingStrategy = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFile.g.cs index 599af409..607cc7e8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFile.g.cs @@ -5,8 +5,7 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Create vector store file
- /// Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + /// Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). ///
/// /// Example: vs_abc123 @@ -16,36 +15,30 @@ public partial interface IVectorStoresClient /// global::System.Threading.Tasks.Task CreateVectorStoreFileAsync( string vectorStoreId, + global::tryAGI.OpenAI.CreateVectorStoreFileRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create vector store file
- /// Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + /// Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). ///
/// /// Example: vs_abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. /// /// - /// 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. - /// - /// - /// A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateVectorStoreFileAsync( string vectorStoreId, string fileId, - object? attributes = default, global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, + object? attributes = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFileBatch.g.cs index f4727377..24beb58e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.CreateVectorStoreFileBatch.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Create vector store file batch
- /// Create a vector store file batch. + /// Create a vector store file batch.
+ /// The maximum number of files in a single batch request is 2000. ///
/// /// Example: vs_abc123 @@ -16,36 +16,35 @@ public partial interface IVectorStoresClient /// global::System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync( string vectorStoreId, + global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create vector store file batch
- /// Create a vector store file batch. + /// Create a vector store file batch.
+ /// The maximum number of files in a single batch request is 2000. ///
/// /// Example: vs_abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. /// - /// - /// 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. + /// + /// A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. /// - /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync( string vectorStoreId, - global::System.Collections.Generic.IList fileIds, - object? attributes = default, + global::System.Collections.Generic.IList? fileIds = default, + global::System.Collections.Generic.IList? files = default, global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, + object? attributes = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStore.g.cs index 05f5f7c9..66b38668 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStore.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Delete vector store
/// Delete a vector store. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStoreFile.g.cs index eb28486f..a737f217 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.DeleteVectorStoreFile.g.cs @@ -5,8 +5,7 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Delete vector store file
- /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://platform.openai.com/docs/api-reference/files/delete) endpoint. + /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStore.g.cs index a935c130..3c2117b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStore.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Retrieve vector store
/// Retrieves a vector store. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFile.g.cs index b581acc8..50a38e2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFile.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Retrieve vector store file
/// Retrieves a vector store file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFileBatch.g.cs index a685b2a2..bb1332d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.GetVectorStoreFileBatch.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Retrieve vector store file batch
/// Retrieves a vector store file batch. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListFilesInVectorStoreBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListFilesInVectorStoreBatch.g.cs index d5ee08e1..f1cfb367 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListFilesInVectorStoreBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListFilesInVectorStoreBatch.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// List vector store files in a batch
/// Returns a list of vector store files in a batch. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStoreFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStoreFiles.g.cs index aa5992c9..12768d58 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStoreFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStoreFiles.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// List vector store files
/// Returns a list of vector store files. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStores.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStores.g.cs index 030ebd81..dc133cbb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStores.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ListVectorStores.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// List vector stores
/// Returns a list of vector stores. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ModifyVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ModifyVectorStore.g.cs index 98e42c90..58fe03d6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ModifyVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.ModifyVectorStore.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Modify vector store
/// Modifies a vector store. ///
/// @@ -14,34 +13,26 @@ public partial interface IVectorStoresClient /// global::System.Threading.Tasks.Task ModifyVectorStoreAsync( string vectorStoreId, + global::tryAGI.OpenAI.UpdateVectorStoreRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Modify vector store
/// Modifies a vector store. ///
/// - /// - /// The expiration policy for a vector store. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the vector store. /// + /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task ModifyVectorStoreAsync( string vectorStoreId, - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + global::tryAGI.OpenAI.AllOf? expiresAfter = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.RetrieveVectorStoreFileContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.RetrieveVectorStoreFileContent.g.cs index 19f0ad30..add6436a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.RetrieveVectorStoreFileContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.RetrieveVectorStoreFileContent.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Retrieve vector store file content
/// Retrieve the parsed contents of a vector store file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.SearchVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.SearchVectorStore.g.cs index f300d16b..052d36b5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.SearchVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.SearchVectorStore.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Search vector store
/// Search a vector store for relevant chunks based on a query and file attributes filter. ///
/// @@ -16,42 +15,42 @@ public partial interface IVectorStoresClient /// global::System.Threading.Tasks.Task SearchVectorStoreAsync( string vectorStoreId, + global::tryAGI.OpenAI.VectorStoreSearchRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Search vector store
/// Search a vector store for relevant chunks based on a query and file attributes filter. ///
/// /// Example: vs_abc123 /// - /// - /// A filter to apply based on file attributes. + /// + /// A query string for a search + /// + /// + /// Whether to rewrite the natural language query for vector search.
+ /// Default Value: false /// /// /// The maximum number of results to return. This number should be between 1 and 50 inclusive.
/// Default Value: 10 /// - /// - /// A query string for a search + /// + /// A filter to apply based on file attributes. /// /// /// Ranking options for search. /// - /// - /// Whether to rewrite the natural language query for vector search.
- /// Default Value: false - /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task SearchVectorStoreAsync( string vectorStoreId, - global::tryAGI.OpenAI.AnyOf> query, - global::tryAGI.OpenAI.AnyOf? filters = default, + global::tryAGI.OpenAI.OneOf> query, + bool? rewriteQuery = default, int? maxNumResults = default, + global::tryAGI.OpenAI.OneOf? filters = default, global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? rankingOptions = default, - bool? rewriteQuery = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.UpdateVectorStoreFileAttributes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.UpdateVectorStoreFileAttributes.g.cs index aa9f633e..3bd1dbfd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.UpdateVectorStoreFileAttributes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.UpdateVectorStoreFileAttributes.g.cs @@ -5,7 +5,6 @@ namespace tryAGI.OpenAI public partial interface IVectorStoresClient { /// - /// Update vector store file attributes
/// Update attributes on a vector store file. ///
/// @@ -20,11 +19,11 @@ public partial interface IVectorStoresClient global::System.Threading.Tasks.Task UpdateVectorStoreFileAttributesAsync( string vectorStoreId, string fileId, + global::tryAGI.OpenAI.UpdateVectorStoreFileAttributesRequest request, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Update vector store file attributes
/// Update attributes on a vector store file. ///
/// @@ -33,13 +32,7 @@ public partial interface IVectorStoresClient /// /// Example: file-abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateVectorStoreFileAttributesAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideo.g.cs new file mode 100644 index 00000000..df000285 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideo.g.cs @@ -0,0 +1,54 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// Create a new video generation job from a prompt and optional reference assets. + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVideoAsync( + + global::tryAGI.OpenAI.CreateVideoBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a new video generation job from a prompt and optional reference assets. + /// + /// + /// The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`. + /// + /// + /// Text prompt that describes the video to generate. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional JSON-safe image reference that guides generation. Provide exactly one of `image_url` or `file_id`. + /// + /// + /// Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + /// + /// + /// Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVideoAsync( + string prompt, + global::tryAGI.OpenAI.VideoModel? model = default, + byte[]? inputReference = default, + string? inputReferencename = default, + global::tryAGI.OpenAI.ImageRefParam2? imageReference = default, + global::tryAGI.OpenAI.VideoSeconds? seconds = default, + global::tryAGI.OpenAI.VideoSize? size = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideoRemix.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideoRemix.g.cs new file mode 100644 index 00000000..8c708e7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.CreateVideoRemix.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// Create a remix of a completed video using a refreshed prompt. + /// + /// + /// Example: video_123 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVideoRemixAsync( + string videoId, + + global::tryAGI.OpenAI.CreateVideoRemixBody request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create a remix of a completed video using a refreshed prompt. + /// + /// + /// Example: video_123 + /// + /// + /// Updated text prompt that directs the remix generation. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateVideoRemixAsync( + string videoId, + string prompt, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.DeleteVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.DeleteVideo.g.cs new file mode 100644 index 00000000..baad0456 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.DeleteVideo.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// Permanently delete a completed or failed video and its stored assets. + /// + /// + /// Example: video_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteVideoAsync( + string videoId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.GetVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.GetVideo.g.cs new file mode 100644 index 00000000..3711c41b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.GetVideo.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// Fetch the latest metadata for a generated video. + /// + /// + /// Example: video_123 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetVideoAsync( + string videoId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.ListVideos.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.ListVideos.g.cs new file mode 100644 index 00000000..4428d36e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.ListVideos.g.cs @@ -0,0 +1,23 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// List recently generated videos for the current project. + /// + /// + /// + /// + /// Identifier for the last item from the previous pagination request + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListVideosAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.RetrieveVideoContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.RetrieveVideoContent.g.cs new file mode 100644 index 00000000..db31e177 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.RetrieveVideoContent.g.cs @@ -0,0 +1,22 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial interface IVideosClient + { + /// + /// Download the generated video bytes or a derived preview asset.
+ /// Streams the rendered video content for the specified video job. + ///
+ /// + /// Example: video_123 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RetrieveVideoContentAsync( + string videoId, + global::tryAGI.OpenAI.VideoContentVariant? variant = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs new file mode 100644 index 00000000..a04b5ed7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IVideosClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs index 3c9e636f..6d73eb20 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateImageResponseContent( ref string content); /// - /// Create image
- /// Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + /// Creates an image given a prompt. [Learn more](/docs/guides/images). ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateImageAsync( + global::tryAGI.OpenAI.CreateImageRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,123 +167,116 @@ partial void ProcessCreateImageResponseContent( } /// - /// Create image
- /// Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images). + /// Creates an image given a prompt. [Learn more](/docs/guides/images). ///
- /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter /// /// - /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. - /// - /// - /// Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).
- /// Default Value: auto
- /// Example: low + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 - /// - /// - /// The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
- /// Default Value: png
- /// Example: png - /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
- /// Example: A cute baby sea otter - /// /// - /// The quality of the image that will be generated.
+ /// The quality of the image that will be generated.
/// - `auto` (default value) will automatically select the best quality for the given model.
- /// - `high`, `medium` and `low` are supported for `gpt-image-1`.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
/// - `hd` and `standard` are supported for `dall-e-3`.
/// - `standard` is the only option for `dall-e-2`.
/// Default Value: auto
/// Example: medium /// /// - /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
+ /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
/// Default Value: url
/// Example: url /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
- /// Default Value: auto
- /// Example: 1024x1024 + /// + /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// /// - /// Generate the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
- /// This parameter is only supported for `gpt-image-1`.
+ /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
/// Default Value: false
/// Example: false /// + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
/// Default Value: vivid
/// Example: vivid /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateImageAsync( string prompt, - global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, global::tryAGI.OpenAI.AnyOf? model = default, - global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, int? n = default, - int? outputCompression = default, - global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, - int? partialImages = default, global::tryAGI.OpenAI.CreateImageRequestQuality? quality = default, global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default, - global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, + int? outputCompression = default, bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, + global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, global::tryAGI.OpenAI.CreateImageRequestStyle? style = default, string? user = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateImageRequest { - Background = background, + Prompt = prompt, Model = model, - Moderation = moderation, N = n, - OutputCompression = outputCompression, - OutputFormat = outputFormat, - PartialImages = partialImages, - Prompt = prompt, Quality = quality, ResponseFormat = responseFormat, - Size = size, + OutputFormat = outputFormat, + OutputCompression = outputCompression, Stream = stream, + PartialImages = partialImages, + Size = size, + Moderation = moderation, + Background = background, Style = style, User = user, }; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs new file mode 100644 index 00000000..96d8881e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs @@ -0,0 +1,257 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ImagesClient + { + partial void PrepareCreateImageAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateImageRequest request); + partial void PrepareCreateImageAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateImageRequest request); + partial void ProcessCreateImageAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Creates an image given a prompt. [Learn more](/docs/guides/images). + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateImageAsStreamAsync( + + global::tryAGI.OpenAI.CreateImageRequest request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateImageAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/images/generations", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateImageAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateImageAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.ImageGenStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// Creates an image given a prompt. [Learn more](/docs/guides/images). + /// + /// + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter + /// + /// + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 + /// + /// + /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// The quality of the image that will be generated.
+ /// - `auto` (default value) will automatically select the best quality for the given model.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
+ /// - `hd` and `standard` are supported for `dall-e-3`.
+ /// - `standard` is the only option for `dall-e-2`.
+ /// Default Value: auto
+ /// Example: medium + /// + /// + /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
+ /// Default Value: url
+ /// Example: url + /// + /// + /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 + /// + /// + /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
+ /// Default Value: false
+ /// Example: false + /// + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// + /// + /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
+ /// Default Value: vivid
+ /// Example: vivid + /// + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 + /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateImageAsStreamAsync( + string prompt, + global::tryAGI.OpenAI.AnyOf? model = default, + int? n = default, + global::tryAGI.OpenAI.CreateImageRequestQuality? quality = default, + global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default, + global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default, + global::tryAGI.OpenAI.CreateImageRequestBackground? background = default, + global::tryAGI.OpenAI.CreateImageRequestStyle? style = default, + string? user = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateImageRequest + { + Prompt = prompt, + Model = model, + N = n, + Quality = quality, + ResponseFormat = responseFormat, + OutputFormat = outputFormat, + OutputCompression = outputCompression, + Stream = stream, + PartialImages = partialImages, + Size = size, + Moderation = moderation, + Background = background, + Style = style, + User = user, + }; + + var __enumerable = CreateImageAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs index 2b97cf73..b756b3df 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs @@ -22,13 +22,17 @@ partial void ProcessCreateImageEditResponseContent( ref string content); /// - /// Create image edit
- /// Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateImageEditAsync( + global::tryAGI.OpenAI.CreateImageEditRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -68,90 +72,108 @@ partial void ProcessCreateImageEditResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); - if (request.Background != default) - { - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Background?.ToValueString()}"), - name: "background"); - } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Image.ToString() ?? string.Empty), - name: "image"); - if (request.InputFidelity != default) + name: "\"image\""); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.Mask != default) { + + var __contentMask = new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.InputFidelity?.ToValueString()}"), - name: "input_fidelity"); + content: __contentMask, + name: "\"mask\"", + fileName: request.Maskname != null ? $"\"{request.Maskname}\"" : string.Empty); + if (__contentMask.Headers.ContentDisposition != null) + { + __contentMask.Headers.ContentDisposition.FileNameStar = null; + } } - if (request.Mask != default) + if (request.Background != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()), - name: "mask", - fileName: request.Maskname ?? string.Empty); + content: new global::System.Net.Http.StringContent($"{request.Background?.ToValueString()}"), + name: "\"background\""); } if (request.Model != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Model?.ToString() ?? string.Empty), - name: "model"); + name: "\"model\""); } if (request.N != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.N}"), - name: "n"); + name: "\"n\""); } - if (request.OutputCompression != default) + if (request.Size != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.OutputCompression}"), - name: "output_compression"); + content: new global::System.Net.Http.StringContent($"{request.Size?.ToValueString()}"), + name: "\"size\""); } - if (request.OutputFormat != default) + if (request.ResponseFormat != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.OutputFormat?.ToValueString()}"), - name: "output_format"); + content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), + name: "\"response_format\""); } - if (request.PartialImages != default) + if (request.OutputFormat != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.PartialImages}"), - name: "partial_images"); + content: new global::System.Net.Http.StringContent($"{request.OutputFormat?.ToValueString()}"), + name: "\"output_format\""); } - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Prompt}"), - name: "prompt"); - if (request.Quality != default) + if (request.OutputCompression != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Quality?.ToValueString()}"), - name: "quality"); + content: new global::System.Net.Http.StringContent($"{request.OutputCompression}"), + name: "\"output_compression\""); } - if (request.ResponseFormat != default) + if (request.User != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), - name: "response_format"); + content: new global::System.Net.Http.StringContent($"{request.User}"), + name: "\"user\""); } - if (request.Size != default) + if (request.InputFidelity != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.Size?.ToValueString()}"), - name: "size"); + content: new global::System.Net.Http.StringContent($"{request.InputFidelity}"), + name: "\"input_fidelity\""); } if (request.Stream != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Stream}"), - name: "stream"); + name: "\"stream\""); } - if (request.User != default) + if (request.PartialImages != default) { + __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.User}"), - name: "user"); + content: new global::System.Net.Http.StringContent($"{request.PartialImages}"), + name: "\"partial_images\""); + } + if (request.Quality != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Quality?.ToValueString()}"), + name: "\"quality\""); } __httpRequest.Content = __httpRequestContent; @@ -248,31 +270,23 @@ partial void ProcessCreateImageEditResponseContent( } /// - /// Create image edit
- /// Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. ///
- /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent - /// /// /// The image(s) to edit. Must be a supported image file or an array of images.
- /// For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less
- /// than 50MB. You can provide up to 16 images.
- /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
/// `png` file less than 4MB. /// - /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret /// /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. @@ -280,105 +294,105 @@ partial void ProcessCreateImageEditResponseContent( /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// - /// The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter
- /// is only supported for `gpt-image-1` with the `webp` or `jpeg` output
- /// formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 + /// + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url /// /// /// The format in which the generated images are returned. This parameter is
- /// only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// The default value is `png`.
/// Default Value: png
/// Example: png /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
- /// Example: A cute baby sea otter wearing a beret - /// - /// - /// The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.
- /// Default Value: auto
- /// Example: high - /// - /// - /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.
- /// Default Value: url
- /// Example: url + /// + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
- /// Default Value: 1024x1024
- /// Example: 1024x1024 + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 /// + /// /// - /// Edit the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
+ /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
/// Default Value: false
/// Example: false /// - /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
- /// Example: user-1234 + /// + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateImageEditAsync( global::tryAGI.OpenAI.AnyOf> image, string prompt, - global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, - global::tryAGI.OpenAI.ImageInputFidelity? inputFidelity = default, byte[]? mask = default, string? maskname = default, + global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, global::tryAGI.OpenAI.AnyOf? model = default, int? n = default, - int? outputCompression = default, + global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + string? user = default, + global::tryAGI.OpenAI.InputFidelity? inputFidelity = default, + bool? stream = default, int? partialImages = default, global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default, - global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, - global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, - bool? stream = default, - string? user = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateImageEditRequest { - Background = background, Image = image, - InputFidelity = inputFidelity, + Prompt = prompt, Mask = mask, Maskname = maskname, + Background = background, Model = model, N = n, - OutputCompression = outputCompression, + Size = size, + ResponseFormat = responseFormat, OutputFormat = outputFormat, + OutputCompression = outputCompression, + User = user, + InputFidelity = inputFidelity, + Stream = stream, PartialImages = partialImages, - Prompt = prompt, Quality = quality, - ResponseFormat = responseFormat, - Size = size, - Stream = stream, - User = user, }; return await CreateImageEditAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs new file mode 100644 index 00000000..9ddbb3ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs @@ -0,0 +1,371 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ImagesClient + { + partial void PrepareCreateImageEditAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateImageEditRequest request); + partial void PrepareCreateImageEditAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateImageEditRequest request); + partial void ProcessCreateImageEditAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateImageEditAsStreamAsync( + + global::tryAGI.OpenAI.CreateImageEditRequest request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateImageEditAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/images/edits", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Image.ToString() ?? string.Empty), + name: "\"image\""); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.Mask != default) + { + + var __contentMask = new global::System.Net.Http.ByteArrayContent(request.Mask ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentMask, + name: "\"mask\"", + fileName: request.Maskname != null ? $"\"{request.Maskname}\"" : string.Empty); + if (__contentMask.Headers.ContentDisposition != null) + { + __contentMask.Headers.ContentDisposition.FileNameStar = null; + } + } + if (request.Background != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Background?.ToValueString()}"), + name: "\"background\""); + } + if (request.Model != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model?.ToString() ?? string.Empty), + name: "\"model\""); + } + if (request.N != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.N}"), + name: "\"n\""); + } + if (request.Size != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Size?.ToValueString()}"), + name: "\"size\""); + } + if (request.ResponseFormat != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), + name: "\"response_format\""); + } + if (request.OutputFormat != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.OutputFormat?.ToValueString()}"), + name: "\"output_format\""); + } + if (request.OutputCompression != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.OutputCompression}"), + name: "\"output_compression\""); + } + if (request.User != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.User}"), + name: "\"user\""); + } + if (request.InputFidelity != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.InputFidelity}"), + name: "\"input_fidelity\""); + } + if (request.Stream != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Stream}"), + name: "\"stream\""); + } + if (request.PartialImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.PartialImages}"), + name: "\"partial_images\""); + } + if (request.Quality != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Quality?.ToValueString()}"), + name: "\"quality\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateImageEditAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateImageEditAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.ImageEditStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.
+ /// You can call this endpoint with either:
+ /// - `multipart/form-data`: use binary uploads via `image` (and optional `mask`).
+ /// - `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.
+ /// Note that JSON requests use `images` (array) instead of the multipart `image` field. + ///
+ /// + /// The image(s) to edit. Must be a supported image file or an array of images.
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// `png` file less than 4MB. + /// + /// + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret + /// + /// + /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. + /// + /// + /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// + /// + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 + /// + /// + /// The number of images to generate. Must be between 1 and 10.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 + /// + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url + /// + /// + /// The format in which the generated images are returned. This parameter is
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// The default value is `png`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 + /// + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 + /// + /// + /// + /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// Default Value: false
+ /// Example: false + /// + /// + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high + /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateImageEditAsStreamAsync( + global::tryAGI.OpenAI.AnyOf> image, + string prompt, + byte[]? mask = default, + string? maskname = default, + global::tryAGI.OpenAI.CreateImageEditRequestBackground? background = default, + global::tryAGI.OpenAI.AnyOf? model = default, + int? n = default, + global::tryAGI.OpenAI.CreateImageEditRequestSize? size = default, + global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat = default, + global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat = default, + int? outputCompression = default, + string? user = default, + global::tryAGI.OpenAI.InputFidelity? inputFidelity = default, + bool? stream = default, + int? partialImages = default, + global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateImageEditRequest + { + Image = image, + Prompt = prompt, + Mask = mask, + Maskname = maskname, + Background = background, + Model = model, + N = n, + Size = size, + ResponseFormat = responseFormat, + OutputFormat = outputFormat, + OutputCompression = outputCompression, + User = user, + InputFidelity = inputFidelity, + Stream = stream, + PartialImages = partialImages, + Quality = quality, + }; + + var __enumerable = CreateImageEditAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs index d9a6970a..4d338dc5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateImageVariationResponseContent( ref string content); /// - /// Create image variation
/// Creates a variation of a given image. This endpoint only supports `dall-e-2`. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateImageVariationAsync( + global::tryAGI.OpenAI.CreateImageVariationRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -68,39 +68,49 @@ partial void ProcessCreateImageVariationResponseContent( } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()), - name: "image", - fileName: request.Imagename ?? string.Empty); + content: __contentImage, + name: "\"image\"", + fileName: request.Imagename != null ? $"\"{request.Imagename}\"" : string.Empty); + if (__contentImage.Headers.ContentDisposition != null) + { + __contentImage.Headers.ContentDisposition.FileNameStar = null; + } if (request.Model != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Model?.ToString() ?? string.Empty), - name: "model"); + name: "\"model\""); } if (request.N != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.N}"), - name: "n"); + name: "\"n\""); } if (request.ResponseFormat != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), - name: "response_format"); + name: "\"response_format\""); } if (request.Size != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Size?.ToValueString()}"), - name: "size"); + name: "\"size\""); } if (request.User != default) { + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.User}"), - name: "user"); + name: "\"user\""); } __httpRequest.Content = __httpRequestContent; @@ -197,7 +207,6 @@ partial void ProcessCreateImageVariationResponseContent( } /// - /// Create image variation
/// Creates a variation of a given image. This endpoint only supports `dall-e-2`. ///
/// @@ -207,7 +216,9 @@ partial void ProcessCreateImageVariationResponseContent( /// The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. /// /// - /// The model to use for image generation. Only `dall-e-2` is supported at this time. + /// The model to use for image generation. Only `dall-e-2` is supported at this time.
+ /// Default Value: dall-e-2
+ /// Example: dall-e-2 /// /// /// The number of images to generate. Must be between 1 and 10.
@@ -225,7 +236,7 @@ partial void ProcessCreateImageVariationResponseContent( /// Example: 1024x1024 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs index 83f811ec..3f6396da 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteInviteResponseContent( ref string content); /// - /// Delete invite
/// Delete an invite. If the invite has already been accepted, it cannot be deleted. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.InviteUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.InviteUser.g.cs index c95929fc..9f3bd27a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.InviteUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.InviteUser.g.cs @@ -22,13 +22,13 @@ partial void ProcessInviteUserResponseContent( ref string content); /// - /// Create invite
/// Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task InviteUserAsync( + global::tryAGI.OpenAI.InviteRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,18 +167,17 @@ partial void ProcessInviteUserResponseContent( } /// - /// Create invite
/// Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. ///
/// /// Send an email to this address /// - /// - /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. - /// /// /// `owner` or `reader` /// + /// + /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task InviteUserAsync( @@ -190,8 +189,8 @@ partial void ProcessInviteUserResponseContent( var __request = new global::tryAGI.OpenAI.InviteRequest { Email = email, - Projects = projects, Role = role, + Projects = projects, }; return await InviteUserAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs index 3caca863..eef3dc5e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs @@ -24,7 +24,6 @@ partial void ProcessListInvitesResponseContent( ref string content); /// - /// List invites
/// Returns a list of invites in the organization. ///
/// @@ -48,8 +47,8 @@ partial void ProcessListInvitesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/invites", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs index 48028385..2c94e62f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveInviteResponseContent( ref string content); /// - /// Retrieve invite
/// Retrieves an invite. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusType.g.cs new file mode 100644 index 00000000..2f6c10b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ActiveStatusTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ActiveStatusType 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::tryAGI.OpenAI.ActiveStatusTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ActiveStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ActiveStatusType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ActiveStatusType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ActiveStatusTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusTypeNullable.g.cs new file mode 100644 index 00000000..c694172f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ActiveStatusTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ActiveStatusTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ActiveStatusType? 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::tryAGI.OpenAI.ActiveStatusTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ActiveStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ActiveStatusType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ActiveStatusType? 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::tryAGI.OpenAI.ActiveStatusTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs index 19efd50e..b445edfd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs @@ -17,36 +17,36 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js var readerCopy = reader; - global::tryAGI.OpenAI.FileCitationBody? fileCitationBody = default; + global::tryAGI.OpenAI.FileCitationBody? fileCitation = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}"); - fileCitationBody = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.UrlCitationBody? urlCitationBody = default; + global::tryAGI.OpenAI.UrlCitationBody? urlCitation = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}"); - urlCitationBody = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ContainerFileCitationBody? containerFileCitationBody = default; + global::tryAGI.OpenAI.ContainerFileCitationBody? containerFileCitation = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}"); - containerFileCitationBody = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -65,25 +65,25 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js } var result = new global::tryAGI.OpenAI.Annotation( - fileCitationBody, - urlCitationBody, - containerFileCitationBody, + fileCitation, + urlCitation, + containerFileCitation, filePath ); - if (fileCitationBody != null) + if (fileCitation != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (urlCitationBody != null) + else if (urlCitation != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (containerFileCitationBody != null) + else if (containerFileCitation != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}"); @@ -108,23 +108,23 @@ 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.IsFileCitationBody) + if (value.IsFileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitationBody, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo); } - else if (value.IsUrlCitationBody) + else if (value.IsUrlCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitationBody, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitation, typeInfo); } - else if (value.IsContainerFileCitationBody) + else if (value.IsContainerFileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerFileCitationBody, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerFileCitation, typeInfo); } else if (value.IsFilePath) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs new file mode 100644 index 00000000..fe6548b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AnnotationsItem3 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::tryAGI.OpenAI.FileAnnotation? file = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}"); + file = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.UrlAnnotation? url = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}"); + url = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.AnnotationsItem3( + file, + url + ); + + if (file != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (url != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AnnotationsItem3 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.IsFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.File, typeInfo); + } + else if (value.IsUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf1.g.cs deleted file mode 100644 index f6093261..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf1.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::tryAGI.OpenAI.AnyOf 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; - T1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.AnyOf( - value1 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.AnyOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf4.g.cs deleted file mode 100644 index e8d17c00..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf4.g.cs +++ /dev/null @@ -1,136 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::tryAGI.OpenAI.AnyOf 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; - T1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.AnyOf( - value1, - value2, - value3, - value4 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.AnyOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf5.g.cs deleted file mode 100644 index 8baff18a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf5.g.cs +++ /dev/null @@ -1,161 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::tryAGI.OpenAI.AnyOf 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; - T1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T5? value5 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.AnyOf( - value1, - value2, - value3, - value4, - value5 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value5 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.AnyOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - else if (value.IsValue5) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf6.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf6.g.cs deleted file mode 100644 index f2aee014..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf6.g.cs +++ /dev/null @@ -1,186 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::tryAGI.OpenAI.AnyOf 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; - T1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T5? value5 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T6? value6 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); - value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.AnyOf( - value1, - value2, - value3, - value4, - value5, - value6 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value5 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value6 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.AnyOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - else if (value.IsValue5) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); - } - else if (value.IsValue6) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatus.g.cs new file mode 100644 index 00000000..bdf17115 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallOutputStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallOutputStatus 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallOutputStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallOutputStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCallOutputStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusNullable.g.cs new file mode 100644 index 00000000..7daff9ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallOutputStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallOutputStatus? 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallOutputStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallOutputStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatus? 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParam.g.cs new file mode 100644 index 00000000..383624b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParam.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallOutputStatusParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusParamExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParamExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamNullable.g.cs new file mode 100644 index 00000000..9d3e8dcb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallOutputStatusParamNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam? 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusParamExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam? 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::tryAGI.OpenAI.ApplyPatchCallOutputStatusParamExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatus.g.cs new file mode 100644 index 00000000..a5bbb0f3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallStatus 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::tryAGI.OpenAI.ApplyPatchCallStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCallStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusNullable.g.cs new file mode 100644 index 00000000..62e07261 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallStatus? 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::tryAGI.OpenAI.ApplyPatchCallStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallStatus? 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::tryAGI.OpenAI.ApplyPatchCallStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParam.g.cs new file mode 100644 index 00000000..61d2a71c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParam.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallStatusParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallStatusParam 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::tryAGI.OpenAI.ApplyPatchCallStatusParamExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallStatusParam)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallStatusParam); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallStatusParam value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCallStatusParamExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamNullable.g.cs new file mode 100644 index 00000000..a176a009 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCallStatusParamNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCallStatusParam? 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::tryAGI.OpenAI.ApplyPatchCallStatusParamExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCallStatusParam)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCallStatusParam?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCallStatusParam? 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::tryAGI.OpenAI.ApplyPatchCallStatusParamExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamType.g.cs new file mode 100644 index 00000000..f69997d5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCreateFileOperationParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeNullable.g.cs new file mode 100644 index 00000000..fa4045c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCreateFileOperationParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationType.g.cs new file mode 100644 index 00000000..a9028aec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCreateFileOperationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeNullable.g.cs new file mode 100644 index 00000000..9425f3e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchCreateFileOperationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType? 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType? 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamType.g.cs new file mode 100644 index 00000000..98005cbc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchDeleteFileOperationParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeNullable.g.cs new file mode 100644 index 00000000..c60ffdde --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchDeleteFileOperationParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationType.g.cs new file mode 100644 index 00000000..ae0080e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchDeleteFileOperationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeNullable.g.cs new file mode 100644 index 00000000..790eaee0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchDeleteFileOperationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType? 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType? 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs new file mode 100644 index 00000000..2f8f8ae1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchOperationParam 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? createFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}"); + createFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? deleteFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}"); + deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? updateFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}"); + updateFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ApplyPatchOperationParam( + createFile, + deleteFile, + updateFile + ); + + if (createFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (deleteFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (updateFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchOperationParam 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.IsCreateFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile, typeInfo); + } + else if (value.IsDeleteFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile, typeInfo); + } + else if (value.IsUpdateFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamType.g.cs new file mode 100644 index 00000000..29bc9ef1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType 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::tryAGI.OpenAI.ApplyPatchToolCallItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchToolCallItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeNullable.g.cs new file mode 100644 index 00000000..6d1746dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType? 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::tryAGI.OpenAI.ApplyPatchToolCallItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType? 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::tryAGI.OpenAI.ApplyPatchToolCallItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamType.g.cs new file mode 100644 index 00000000..3a3cf077 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallOutputItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeNullable.g.cs new file mode 100644 index 00000000..190fb209 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallOutputItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType? 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType? 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputType.g.cs new file mode 100644 index 00000000..cb0fa674 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallOutputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallOutputType 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::tryAGI.OpenAI.ApplyPatchToolCallOutputTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallOutputType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchToolCallOutputTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeNullable.g.cs new file mode 100644 index 00000000..a7e16c4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallOutputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallOutputType? 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::tryAGI.OpenAI.ApplyPatchToolCallOutputTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallOutputType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputType? 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::tryAGI.OpenAI.ApplyPatchToolCallOutputTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallType.g.cs new file mode 100644 index 00000000..a70183cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallType 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::tryAGI.OpenAI.ApplyPatchToolCallTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchToolCallTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeNullable.g.cs new file mode 100644 index 00000000..f8af08b0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolCallTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolCallType? 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::tryAGI.OpenAI.ApplyPatchToolCallTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolCallType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolCallType? 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::tryAGI.OpenAI.ApplyPatchToolCallTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamType.g.cs new file mode 100644 index 00000000..6b72ff20 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolParamType 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::tryAGI.OpenAI.ApplyPatchToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeNullable.g.cs new file mode 100644 index 00000000..f569c270 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchToolParamType? 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::tryAGI.OpenAI.ApplyPatchToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchToolParamType? 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::tryAGI.OpenAI.ApplyPatchToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamType.g.cs new file mode 100644 index 00000000..2eb2cf76 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchUpdateFileOperationParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeNullable.g.cs new file mode 100644 index 00000000..29590e2d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchUpdateFileOperationParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType? 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationType.g.cs new file mode 100644 index 00000000..c528cf46 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchUpdateFileOperationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeNullable.g.cs new file mode 100644 index 00000000..3fd10718 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ApplyPatchUpdateFileOperationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType? 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType? 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObject.g.cs new file mode 100644 index 00000000..ff30bbb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AssistantMessageItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AssistantMessageItemObject 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::tryAGI.OpenAI.AssistantMessageItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AssistantMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AssistantMessageItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AssistantMessageItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.AssistantMessageItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectNullable.g.cs new file mode 100644 index 00000000..e1128f8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AssistantMessageItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AssistantMessageItemObject? 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::tryAGI.OpenAI.AssistantMessageItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AssistantMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AssistantMessageItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AssistantMessageItemObject? 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::tryAGI.OpenAI.AssistantMessageItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemType.g.cs new file mode 100644 index 00000000..838880f0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AssistantMessageItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AssistantMessageItemType 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::tryAGI.OpenAI.AssistantMessageItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AssistantMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AssistantMessageItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AssistantMessageItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.AssistantMessageItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeNullable.g.cs new file mode 100644 index 00000000..27521b5e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AssistantMessageItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AssistantMessageItemType? 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::tryAGI.OpenAI.AssistantMessageItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AssistantMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AssistantMessageItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AssistantMessageItemType? 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::tryAGI.OpenAI.AssistantMessageItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs index 14f7f9b9..f885bed7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs @@ -76,12 +76,25 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial { } + readerCopy = reader; + global::tryAGI.OpenAI.DoneEvent? done = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}"); + done = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + var result = new global::tryAGI.OpenAI.AssistantStreamEvent( thread, run, runStep, message, - error + error, + done ); if (thread != null) @@ -114,6 +127,12 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ErrorEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + else if (done != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } return result; } @@ -157,6 +176,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ErrorEvent).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); } + else if (value.IsDone) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantTool.g.cs deleted file mode 100644 index 307aaea8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantTool.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class AssistantToolJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.AssistantTool 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::tryAGI.OpenAI.AssistantToolsCode? toolsCode = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - toolsCode = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.AssistantToolsFileSearch? toolsFileSearch = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch).Name}"); - toolsFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.AssistantToolsFunction? toolsFunction = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFunction).Name}"); - toolsFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.AssistantTool( - toolsCode, - toolsFileSearch, - toolsFunction - ); - - if (toolsCode != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (toolsFileSearch != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (toolsFunction != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFunction).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.AssistantTool 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.IsToolsCode) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolsCode, typeInfo); - } - else if (value.IsToolsFileSearch) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolsFileSearch, typeInfo); - } - else if (value.IsToolsFunction) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolsFunction, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs index d2e45576..9edba3f1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs @@ -29,36 +29,36 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFormatText? value2 = default; + global::tryAGI.OpenAI.ResponseFormatText? text = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFormatJsonObject? value3 = default; + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFormatJsonSchema? value4 = default; + global::tryAGI.OpenAI.ResponseFormatJsonSchema? jsonSchema = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -66,9 +66,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex var result = new global::tryAGI.OpenAI.AssistantsApiResponseFormatOption( value1, - value2, - value3, - value4 + text, + jsonObject, + jsonSchema ); if (value1 != null) @@ -77,19 +77,19 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (text != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (jsonObject != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value4 != null) + else if (jsonSchema != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); @@ -114,23 +114,23 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); } - else if (value.IsValue2) + else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsValue3) + else if (value.IsJsonObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeInfo); } - else if (value.IsValue4) + else if (value.IsJsonSchema) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentType.g.cs new file mode 100644 index 00000000..f3cb7d0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AttachmentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AttachmentType 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::tryAGI.OpenAI.AttachmentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AttachmentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AttachmentType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AttachmentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.AttachmentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentTypeNullable.g.cs new file mode 100644 index 00000000..cde56263 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AttachmentTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AttachmentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AttachmentType? 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::tryAGI.OpenAI.AttachmentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AttachmentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AttachmentType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AttachmentType? 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::tryAGI.OpenAI.AttachmentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamType.g.cs new file mode 100644 index 00000000..6a8773b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AutoCodeInterpreterToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeNullable.g.cs new file mode 100644 index 00000000..f5a0f2e1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class AutoCodeInterpreterToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType? 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType? 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethod.g.cs deleted file mode 100644 index 3a050c63..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethod.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class BatchRequestInputMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.BatchRequestInputMethod 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::tryAGI.OpenAI.BatchRequestInputMethodExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.BatchRequestInputMethod)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.BatchRequestInputMethod); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.BatchRequestInputMethod value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.BatchRequestInputMethodExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodNullable.g.cs deleted file mode 100644 index 08f6616a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class BatchRequestInputMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.BatchRequestInputMethod? 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::tryAGI.OpenAI.BatchRequestInputMethodExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.BatchRequestInputMethod)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.BatchRequestInputMethod?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.BatchRequestInputMethod? 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::tryAGI.OpenAI.BatchRequestInputMethodExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs index 00310fde..2f01b5e7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs @@ -17,41 +17,41 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te var readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionMessageToolCall? call = default; + global::tryAGI.OpenAI.ChatCompletionMessageToolCall? function = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}"); - call = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? customCall = default; + global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? custom = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}"); - customCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + custom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ChatCompletionMessageToolCallsItem( - call, - customCall + function, + custom ); - if (call != null) + if (function != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (customCall != null) + else if (custom != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}"); @@ -70,17 +70,17 @@ 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.IsCall) + if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Call, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } - else if (value.IsCustomCall) + else if (value.IsCustom) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitie.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitie.g.cs deleted file mode 100644 index ba50a805..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitie.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ChatCompletionModalitieJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ChatCompletionModalitie 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::tryAGI.OpenAI.ChatCompletionModalitieExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ChatCompletionModalitie)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ChatCompletionModalitie); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ChatCompletionModalitie value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ChatCompletionModalitieExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitieNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitieNullable.g.cs deleted file mode 100644 index b48d37a8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitieNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ChatCompletionModalitieNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ChatCompletionModalitie? 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::tryAGI.OpenAI.ChatCompletionModalitieExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ChatCompletionModalitie)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ChatCompletionModalitie?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ChatCompletionModalitie? 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::tryAGI.OpenAI.ChatCompletionModalitieExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1Item.g.cs new file mode 100644 index 00000000..532e74cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1Item.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionModalitiesVariant1ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item 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::tryAGI.OpenAI.ChatCompletionModalitiesVariant1ItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1ItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1ItemNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1ItemNullable.g.cs new file mode 100644 index 00000000..d5a7150c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionModalitiesVariant1ItemNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatCompletionModalitiesVariant1ItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item? 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::tryAGI.OpenAI.ChatCompletionModalitiesVariant1ItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item? 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::tryAGI.OpenAI.ChatCompletionModalitiesVariant1ItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs index 863c506c..33abcf03 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs @@ -17,22 +17,22 @@ public class ChatCompletionRequestSystemMessageContentPartJsonConverter : global var readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? text = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? textContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageContentPart( - text + textContentPart ); - if (text != null) + if (textContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); @@ -51,11 +51,11 @@ 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.IsText) + if (value.IsTextContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextContentPart, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs index a91799e5..a19b2d3b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs @@ -17,22 +17,22 @@ public class ChatCompletionRequestToolMessageContentPartJsonConverter : global:: var readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? text = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? textContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ChatCompletionRequestToolMessageContentPart( - text + textContentPart ); - if (text != null) + if (textContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); @@ -51,11 +51,11 @@ 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.IsText) + if (value.IsTextContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextContentPart, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs index 52e98706..c5c520eb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs @@ -17,79 +17,79 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global:: var readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? text = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? textContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? image = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? imageContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage).Name}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? audio = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? audioContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}"); - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + audioContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? file = default; + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? fileContentPart = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile).Name}"); - file = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileContentPart = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPart( - text, - image, - audio, - file + textContentPart, + imageContentPart, + audioContentPart, + fileContentPart ); - if (text != null) + if (textContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (image != null) + else if (imageContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audio != null) + else if (audioContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (file != null) + else if (fileContentPart != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile).Name}"); @@ -108,29 +108,29 @@ 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.IsText) + if (value.IsTextContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextContentPart, typeInfo); } - else if (value.IsImage) + else if (value.IsImageContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageContentPart, typeInfo); } - else if (value.IsAudio) + else if (value.IsAudioContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioContentPart, typeInfo); } - else if (value.IsFile) + else if (value.IsFileContentPart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.File, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileContentPart, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOption.g.cs index 16b8661b..ca6931dd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOption.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionToolChoiceOption.g.cs @@ -17,79 +17,79 @@ public class ChatCompletionToolChoiceOptionJsonConverter : global::System.Text.J var readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? value1 = default; + global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? toolChoiceMode = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + toolChoiceMode = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? value2 = default; + global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? allowedTools = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + allowedTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? value3 = default; + global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? functionToolChoice = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionToolChoice = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? value4 = default; + global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? customToolChoice = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + customToolChoice = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ChatCompletionToolChoiceOption( - value1, - value2, - value3, - value4 + toolChoiceMode, + allowedTools, + functionToolChoice, + customToolChoice ); - if (value1 != null) + if (toolChoiceMode != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (allowedTools != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (functionToolChoice != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value4 != null) + else if (customToolChoice != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom).Name}"); @@ -108,29 +108,29 @@ 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.IsValue1) + if (value.IsToolChoiceMode) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolChoiceMode, typeInfo); } - else if (value.IsValue2) + else if (value.IsAllowedTools) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AllowedTools, typeInfo); } - else if (value.IsValue3) + else if (value.IsFunctionToolChoice) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolChoice, typeInfo); } - else if (value.IsValue4) + else if (value.IsCustomToolChoice) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolChoice, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModel.g.cs deleted file mode 100644 index 0cc95364..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModel.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ChatModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ChatModel 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::tryAGI.OpenAI.ChatModelExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ChatModel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ChatModel); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ChatModel value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ChatModelExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModelNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModelNullable.g.cs deleted file mode 100644 index 61bde480..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatModelNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ChatModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ChatModel? 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::tryAGI.OpenAI.ChatModelExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ChatModel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ChatModel?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ChatModel? 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::tryAGI.OpenAI.ChatModelExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObject.g.cs new file mode 100644 index 00000000..4b6560f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatSessionResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatSessionResourceObject 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::tryAGI.OpenAI.ChatSessionResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatSessionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatSessionResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatSessionResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ChatSessionResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectNullable.g.cs new file mode 100644 index 00000000..69f39d59 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatSessionResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatSessionResourceObject? 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::tryAGI.OpenAI.ChatSessionResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatSessionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatSessionResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatSessionResourceObject? 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::tryAGI.OpenAI.ChatSessionResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatus.g.cs new file mode 100644 index 00000000..7ac72293 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatSessionStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatSessionStatus 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::tryAGI.OpenAI.ChatSessionStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatSessionStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatSessionStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatSessionStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ChatSessionStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatusNullable.g.cs new file mode 100644 index 00000000..8ebf93ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatSessionStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ChatSessionStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ChatSessionStatus? 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::tryAGI.OpenAI.ChatSessionStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ChatSessionStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ChatSessionStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ChatSessionStatus? 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::tryAGI.OpenAI.ChatSessionStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChunkingStrategyResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChunkingStrategyResponse.g.cs deleted file mode 100644 index 32ed65db..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChunkingStrategyResponse.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ChunkingStrategyResponseJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ChunkingStrategyResponse 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::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? staticParam = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam).Name}"); - staticParam = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? otherParam = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam).Name}"); - otherParam = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ChunkingStrategyResponse( - staticParam, - otherParam - ); - - if (staticParam != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (otherParam != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ChunkingStrategyResponse 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.IsStaticParam) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StaticParam, typeInfo); - } - else if (value.IsOtherParam) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtherParam, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButton.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButton.g.cs deleted file mode 100644 index 6bf52c96..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButton.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ClickButtonJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ClickButton 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::tryAGI.OpenAI.ClickButtonExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ClickButton)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ClickButton); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ClickButton value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ClickButtonExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonNullable.g.cs deleted file mode 100644 index b5053ed5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ClickButtonNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ClickButton? 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::tryAGI.OpenAI.ClickButtonExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ClickButton)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ClickButton?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ClickButton? 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::tryAGI.OpenAI.ClickButtonExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonType.g.cs new file mode 100644 index 00000000..6ba990d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClickButtonTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClickButtonType 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::tryAGI.OpenAI.ClickButtonTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClickButtonType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClickButtonType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClickButtonType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClickButtonTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonTypeNullable.g.cs new file mode 100644 index 00000000..50369146 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickButtonTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClickButtonTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClickButtonType? 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::tryAGI.OpenAI.ClickButtonTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClickButtonType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClickButtonType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClickButtonType? 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::tryAGI.OpenAI.ClickButtonTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamType.g.cs new file mode 100644 index 00000000..dd391569 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClickParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClickParamType 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::tryAGI.OpenAI.ClickParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClickParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClickParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClickParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClickParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamTypeNullable.g.cs new file mode 100644 index 00000000..7360e864 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClickParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClickParamType? 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::tryAGI.OpenAI.ClickParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClickParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClickParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClickParamType? 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::tryAGI.OpenAI.ClickParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickType.g.cs deleted file mode 100644 index ef9885e9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ClickTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ClickType 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::tryAGI.OpenAI.ClickTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ClickType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ClickType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ClickType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ClickTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickTypeNullable.g.cs deleted file mode 100644 index 52b31d73..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClickTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ClickTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ClickType? 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::tryAGI.OpenAI.ClickTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ClickType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ClickType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ClickType? 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::tryAGI.OpenAI.ClickTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObject.g.cs new file mode 100644 index 00000000..8bad34c4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallItemObject 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::tryAGI.OpenAI.ClientToolCallItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClientToolCallItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectNullable.g.cs new file mode 100644 index 00000000..793db6a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallItemObject? 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::tryAGI.OpenAI.ClientToolCallItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallItemObject? 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::tryAGI.OpenAI.ClientToolCallItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemType.g.cs new file mode 100644 index 00000000..91af9ce9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallItemType 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::tryAGI.OpenAI.ClientToolCallItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClientToolCallItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeNullable.g.cs new file mode 100644 index 00000000..760b0545 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallItemType? 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::tryAGI.OpenAI.ClientToolCallItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallItemType? 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::tryAGI.OpenAI.ClientToolCallItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatus.g.cs new file mode 100644 index 00000000..bf1e9f93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallStatus 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::tryAGI.OpenAI.ClientToolCallStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClientToolCallStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatusNullable.g.cs new file mode 100644 index 00000000..cb8ef702 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClientToolCallStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClientToolCallStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClientToolCallStatus? 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::tryAGI.OpenAI.ClientToolCallStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClientToolCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClientToolCallStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClientToolCallStatus? 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::tryAGI.OpenAI.ClientToolCallStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusType.g.cs new file mode 100644 index 00000000..1903bd8b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClosedStatusTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClosedStatusType 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::tryAGI.OpenAI.ClosedStatusTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClosedStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClosedStatusType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClosedStatusType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ClosedStatusTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusTypeNullable.g.cs new file mode 100644 index 00000000..5439d06a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ClosedStatusTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ClosedStatusTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ClosedStatusType? 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::tryAGI.OpenAI.ClosedStatusTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ClosedStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ClosedStatusType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ClosedStatusType? 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::tryAGI.OpenAI.ClosedStatusTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoType.g.cs deleted file mode 100644 index 261e07e5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CodeInterpreterToolAutoTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CodeInterpreterToolAutoType 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::tryAGI.OpenAI.CodeInterpreterToolAutoTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CodeInterpreterToolAutoType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CodeInterpreterToolAutoType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CodeInterpreterToolAutoType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CodeInterpreterToolAutoTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeNullable.g.cs deleted file mode 100644 index 198d3aa4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CodeInterpreterToolAutoTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CodeInterpreterToolAutoType? 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::tryAGI.OpenAI.CodeInterpreterToolAutoTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CodeInterpreterToolAutoType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CodeInterpreterToolAutoType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CodeInterpreterToolAutoType? 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::tryAGI.OpenAI.CodeInterpreterToolAutoTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObject.g.cs new file mode 100644 index 00000000..7edbcc29 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactResourceObject 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::tryAGI.OpenAI.CompactResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CompactResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObjectNullable.g.cs new file mode 100644 index 00000000..0946c53a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactResourceObject? 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::tryAGI.OpenAI.CompactResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactResourceObject? 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::tryAGI.OpenAI.CompactResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyType.g.cs new file mode 100644 index 00000000..20e25b9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactionBodyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactionBodyType 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::tryAGI.OpenAI.CompactionBodyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactionBodyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactionBodyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactionBodyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CompactionBodyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyTypeNullable.g.cs new file mode 100644 index 00000000..6152aeee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionBodyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactionBodyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactionBodyType? 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::tryAGI.OpenAI.CompactionBodyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactionBodyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactionBodyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactionBodyType? 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::tryAGI.OpenAI.CompactionBodyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamType.g.cs new file mode 100644 index 00000000..43fc67d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactionSummaryItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactionSummaryItemParamType 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::tryAGI.OpenAI.CompactionSummaryItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactionSummaryItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactionSummaryItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactionSummaryItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CompactionSummaryItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeNullable.g.cs new file mode 100644 index 00000000..76e02e92 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CompactionSummaryItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CompactionSummaryItemParamType? 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::tryAGI.OpenAI.CompactionSummaryItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CompactionSummaryItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CompactionSummaryItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CompactionSummaryItemParamType? 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::tryAGI.OpenAI.CompactionSummaryItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerAction.g.cs index 6de1a224..74f04362 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerAction.g.cs @@ -17,11 +17,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio var readerCopy = reader; - global::tryAGI.OpenAI.Click? click = default; + global::tryAGI.OpenAI.ClickParam? click = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Click), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Click).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClickParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClickParam).Name}"); click = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -29,11 +29,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.DoubleClick? doubleClick = default; + global::tryAGI.OpenAI.DoubleClickAction? doubleClick = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClick), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClick).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClickAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClickAction).Name}"); doubleClick = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -41,11 +41,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.Drag? drag = default; + global::tryAGI.OpenAI.DragParam? drag = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Drag), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Drag).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DragParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DragParam).Name}"); drag = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -53,23 +53,23 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.KeyPress? keyPress = default; + global::tryAGI.OpenAI.KeyPressAction? keypress = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPress), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPress).Name}"); - keyPress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPressAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPressAction).Name}"); + keypress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.Move? move = default; + global::tryAGI.OpenAI.MoveParam? move = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Move), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Move).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MoveParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MoveParam).Name}"); move = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -77,11 +77,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.Screenshot? screenshot = default; + global::tryAGI.OpenAI.ScreenshotParam? screenshot = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Screenshot), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Screenshot).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScreenshotParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScreenshotParam).Name}"); screenshot = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -89,11 +89,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.Scroll? scroll = default; + global::tryAGI.OpenAI.ScrollParam? scroll = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Scroll), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Scroll).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScrollParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScrollParam).Name}"); scroll = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -101,11 +101,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.Type? type = default; + global::tryAGI.OpenAI.TypeParam? type = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Type), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Type).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TypeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TypeParam).Name}"); type = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -113,11 +113,11 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.Wait? wait = default; + global::tryAGI.OpenAI.WaitParam? wait = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Wait), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Wait).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WaitParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WaitParam).Name}"); wait = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -128,7 +128,7 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio click, doubleClick, drag, - keyPress, + keypress, move, screenshot, scroll, @@ -138,56 +138,56 @@ public class ComputerActionJsonConverter : global::System.Text.Json.Serializatio if (click != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Click), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Click).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClickParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClickParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (doubleClick != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClick), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClick).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClickAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClickAction).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (drag != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Drag), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Drag).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DragParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DragParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (keyPress != null) + else if (keypress != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPress), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPress).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPressAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPressAction).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (move != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Move), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Move).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MoveParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MoveParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (screenshot != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Screenshot), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Screenshot).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScreenshotParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScreenshotParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (scroll != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Scroll), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Scroll).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScrollParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScrollParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (type != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Type), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Type).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TypeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TypeParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (wait != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Wait), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Wait).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WaitParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WaitParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -205,56 +205,56 @@ public override void Write( if (value.IsClick) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Click), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Click).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClickParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClickParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Click, typeInfo); } else if (value.IsDoubleClick) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClick), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClick).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoubleClickAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoubleClickAction).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.DoubleClick, typeInfo); } else if (value.IsDrag) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Drag), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Drag).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DragParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DragParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Drag, typeInfo); } - else if (value.IsKeyPress) + else if (value.IsKeypress) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPress), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPress).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.KeyPress, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.KeyPressAction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.KeyPressAction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Keypress, typeInfo); } else if (value.IsMove) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Move), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Move).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MoveParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MoveParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Move, typeInfo); } else if (value.IsScreenshot) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Screenshot), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Screenshot).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScreenshotParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScreenshotParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Screenshot, typeInfo); } else if (value.IsScroll) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Scroll), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Scroll).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ScrollParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ScrollParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Scroll, typeInfo); } else if (value.IsType) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Type), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Type).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TypeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TypeParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Type, typeInfo); } else if (value.IsWait) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Wait), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Wait).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WaitParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WaitParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Wait, typeInfo); } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputResource.g.cs index b8d299d8..ef5ac723 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputResource.g.cs @@ -17,12 +17,12 @@ public class ComputerToolCallOutputResourceJsonConverter : global::System.Text.J var readerCopy = reader; - global::tryAGI.OpenAI.ComputerToolCallOutput? value1 = default; + global::tryAGI.OpenAI.ComputerToolCallOutput? computerToolCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutput).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class ComputerToolCallOutputResourceJsonConverter : global::System.Text.J } var result = new global::tryAGI.OpenAI.ComputerToolCallOutputResource( - value1, + computerToolCallOutput, value2 ); - if (value1 != null) + if (computerToolCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutput).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsComputerToolCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCallOutput, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolType.g.cs new file mode 100644 index 00000000..b267135b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ComputerToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ComputerToolType 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::tryAGI.OpenAI.ComputerToolTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ComputerToolType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ComputerToolType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ComputerToolType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ComputerToolTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolTypeNullable.g.cs new file mode 100644 index 00000000..3f0e4b5c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerToolTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ComputerToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ComputerToolType? 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::tryAGI.OpenAI.ComputerToolTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ComputerToolType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ComputerToolType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ComputerToolType? 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::tryAGI.OpenAI.ComputerToolTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamType.g.cs new file mode 100644 index 00000000..489d5922 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerAutoParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerAutoParamType 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::tryAGI.OpenAI.ContainerAutoParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerAutoParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerAutoParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerAutoParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerAutoParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeNullable.g.cs new file mode 100644 index 00000000..a35f6ae6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerAutoParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerAutoParamType? 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::tryAGI.OpenAI.ContainerAutoParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerAutoParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerAutoParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerAutoParamType? 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::tryAGI.OpenAI.ContainerAutoParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObject.g.cs deleted file mode 100644 index 804a6bfe..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObject.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ContainerFileResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ContainerFileResourceObject 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::tryAGI.OpenAI.ContainerFileResourceObjectExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ContainerFileResourceObject)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ContainerFileResourceObject); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ContainerFileResourceObject value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ContainerFileResourceObjectExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectNullable.g.cs deleted file mode 100644 index 0ed114dc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ContainerFileResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ContainerFileResourceObject? 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::tryAGI.OpenAI.ContainerFileResourceObjectExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ContainerFileResourceObject)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ContainerFileResourceObject?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ContainerFileResourceObject? 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::tryAGI.OpenAI.ContainerFileResourceObjectExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimit.g.cs new file mode 100644 index 00000000..46d3335a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimit.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerMemoryLimitJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerMemoryLimit 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::tryAGI.OpenAI.ContainerMemoryLimitExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerMemoryLimit); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerMemoryLimit value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerMemoryLimitExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimitNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimitNullable.g.cs new file mode 100644 index 00000000..3e952e3d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerMemoryLimitNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerMemoryLimitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerMemoryLimit? 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::tryAGI.OpenAI.ContainerMemoryLimitExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerMemoryLimit?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerMemoryLimit? 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::tryAGI.OpenAI.ContainerMemoryLimitExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamType.g.cs new file mode 100644 index 00000000..e4a88253 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerNetworkPolicyAllowlistParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType 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::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeNullable.g.cs new file mode 100644 index 00000000..d39bde59 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerNetworkPolicyAllowlistParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType? 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::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType? 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::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamType.g.cs new file mode 100644 index 00000000..79ee4672 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerNetworkPolicyDisabledParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeNullable.g.cs new file mode 100644 index 00000000..a1dea248 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerNetworkPolicyDisabledParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType? 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType? 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamType.g.cs new file mode 100644 index 00000000..31e42370 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerReferenceParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerReferenceParamType 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::tryAGI.OpenAI.ContainerReferenceParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerReferenceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerReferenceParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerReferenceParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerReferenceParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeNullable.g.cs new file mode 100644 index 00000000..1eff892a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerReferenceParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerReferenceParamType? 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::tryAGI.OpenAI.ContainerReferenceParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerReferenceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerReferenceParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerReferenceParamType? 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::tryAGI.OpenAI.ContainerReferenceParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceType.g.cs new file mode 100644 index 00000000..1e8a80f7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerReferenceResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerReferenceResourceType 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::tryAGI.OpenAI.ContainerReferenceResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerReferenceResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerReferenceResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerReferenceResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerReferenceResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeNullable.g.cs new file mode 100644 index 00000000..559e60fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerReferenceResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerReferenceResourceType? 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::tryAGI.OpenAI.ContainerReferenceResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerReferenceResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerReferenceResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerReferenceResourceType? 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::tryAGI.OpenAI.ContainerReferenceResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimit.g.cs new file mode 100644 index 00000000..fabf1ac2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimit.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerResourceMemoryLimitJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerResourceMemoryLimit 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::tryAGI.OpenAI.ContainerResourceMemoryLimitExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerResourceMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerResourceMemoryLimit); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerResourceMemoryLimit value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerResourceMemoryLimitExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitNullable.g.cs new file mode 100644 index 00000000..45572172 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerResourceMemoryLimitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerResourceMemoryLimit? 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::tryAGI.OpenAI.ContainerResourceMemoryLimitExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerResourceMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerResourceMemoryLimit?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerResourceMemoryLimit? 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::tryAGI.OpenAI.ContainerResourceMemoryLimitExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyType.g.cs new file mode 100644 index 00000000..8d2c7f0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerResourceNetworkPolicyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType 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::tryAGI.OpenAI.ContainerResourceNetworkPolicyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ContainerResourceNetworkPolicyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeNullable.g.cs new file mode 100644 index 00000000..d05e9f0e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ContainerResourceNetworkPolicyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType? 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::tryAGI.OpenAI.ContainerResourceNetworkPolicyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType? 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::tryAGI.OpenAI.ContainerResourceNetworkPolicyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Content5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Content5.g.cs index 8f61be76..08deef9e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Content5.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Content5.g.cs @@ -17,41 +17,41 @@ public class Content5JsonConverter : global::System.Text.Json.Serialization.Json var readerCopy = reader; - global::tryAGI.OpenAI.InputContent? inputContent = default; + global::tryAGI.OpenAI.InputContent? inputContentTypes = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputContent).Name}"); - inputContent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + inputContentTypes = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.OutputContent? outputContent = default; + global::tryAGI.OpenAI.OutputContent? outputContentTypes = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputContent).Name}"); - outputContent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + outputContentTypes = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.Content5( - inputContent, - outputContent + inputContentTypes, + outputContentTypes ); - if (inputContent != null) + if (inputContentTypes != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputContent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputContent != null) + else if (outputContentTypes != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputContent).Name}"); @@ -70,17 +70,17 @@ 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.IsInputContent) + if (value.IsInputContentTypes) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputContent, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputContentTypes, typeInfo); } - else if (value.IsOutputContent) + else if (value.IsOutputContentTypes) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputContent, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputContentTypes, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem.g.cs deleted file mode 100644 index 866426dc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem.g.cs +++ /dev/null @@ -1,262 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ContentItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.InputTextContent? inputText = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); - inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.OutputTextContent? outputText = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - outputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.TextContent? text = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.SummaryTextContent? summaryText = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); - summaryText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ReasoningTextContent? reasoningText = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); - reasoningText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RefusalContent? refusal = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); - refusal = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.InputImageContent? inputImage = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); - inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ComputerScreenshotContent? computerScreenshot = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); - computerScreenshot = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.InputFileContent? inputFile = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); - inputFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ContentItem( - inputText, - outputText, - text, - summaryText, - reasoningText, - refusal, - inputImage, - computerScreenshot, - inputFile - ); - - if (inputText != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (outputText != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (text != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (summaryText != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (reasoningText != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (refusal != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputImage != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (computerScreenshot != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (inputFile != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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.IsInputText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); - } - else if (value.IsOutputText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputText, typeInfo); - } - else if (value.IsText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); - } - else if (value.IsSummaryText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SummaryText, typeInfo); - } - else if (value.IsReasoningText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningText, typeInfo); - } - else if (value.IsRefusal) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeInfo); - } - else if (value.IsInputImage) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); - } - else if (value.IsComputerScreenshot) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerScreenshot, typeInfo); - } - else if (value.IsInputFile) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem3.g.cs new file mode 100644 index 00000000..42e79f8c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem3.g.cs @@ -0,0 +1,262 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ContentItem3JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContentItem3 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::tryAGI.OpenAI.InputTextContent? inputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.OutputTextContent? outputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); + outputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.TextContent? text = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.SummaryTextContent? summaryText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); + summaryText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ReasoningTextContent? reasoningText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); + reasoningText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.RefusalContent? refusal = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); + refusal = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputImageContent? inputImage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ComputerScreenshotContent? computerScreenshot = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); + computerScreenshot = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputFileContent? inputFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + inputFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ContentItem3( + inputText, + outputText, + text, + summaryText, + reasoningText, + refusal, + inputImage, + computerScreenshot, + inputFile + ); + + if (inputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (outputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (text != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (summaryText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (reasoningText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (refusal != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputImage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (computerScreenshot != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContentItem3 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.IsInputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); + } + else if (value.IsOutputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputText, typeInfo); + } + else if (value.IsText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + } + else if (value.IsSummaryText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SummaryTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SummaryTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SummaryText, typeInfo); + } + else if (value.IsReasoningText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningText, typeInfo); + } + else if (value.IsRefusal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RefusalContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeInfo); + } + else if (value.IsInputImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); + } + else if (value.IsComputerScreenshot) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerScreenshotContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerScreenshot, typeInfo); + } + else if (value.IsInputFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem4.g.cs new file mode 100644 index 00000000..5acda956 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem4.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ContentItem4JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ContentItem4 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::tryAGI.OpenAI.UserMessageInputText? inputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageInputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageInputText).Name}"); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.UserMessageQuotedText? quotedText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageQuotedText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageQuotedText).Name}"); + quotedText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ContentItem4( + inputText, + quotedText + ); + + if (inputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageInputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageInputText).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (quotedText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageQuotedText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageQuotedText).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ContentItem4 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.IsInputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageInputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageInputText).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); + } + else if (value.IsQuotedText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageQuotedText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageQuotedText).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.QuotedText, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentVariant2Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentVariant2Item.g.cs deleted file mode 100644 index bad42db2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentVariant2Item.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ContentVariant2ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.MessageContentImageFileObject? messageImageFileObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - messageImageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageContentImageUrlObject? messageImageUrlObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - messageImageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageRequestContentTextObject? messageRequestTextObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject).Name}"); - messageRequestTextObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ContentVariant2Item( - messageImageFileObject, - messageImageUrlObject, - messageRequestTextObject - ); - - if (messageImageFileObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (messageImageUrlObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (messageRequestTextObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageFileObject, typeInfo); - } - else if (value.IsMessageImageUrlObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageUrlObject, typeInfo); - } - else if (value.IsMessageRequestTextObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageRequestContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageRequestTextObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Conversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Conversation.g.cs deleted file mode 100644 index 165b7473..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Conversation.g.cs +++ /dev/null @@ -1,62 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ConversationJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Conversation 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::tryAGI.OpenAI.ConversationResource? resource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationResource).Name}"); - resource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Conversation( - resource - ); - - if (resource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationResource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Conversation 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.IsResource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationResource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Resource, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationItem.g.cs index 4cb6fb1e..aa0322ce 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationItem.g.cs @@ -53,48 +53,48 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat } readerCopy = reader; - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall = default; + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - fileSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall = default; + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - webSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + webSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall = default; + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - imageGenToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall = default; + global::tryAGI.OpenAI.ComputerToolCall? computerCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - computerToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -112,6 +112,30 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat { } + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + toolSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + toolSearchOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + readerCopy = reader; global::tryAGI.OpenAI.ReasoningItem? reasoning = default; try @@ -125,84 +149,132 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat } readerCopy = reader; - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall = default; + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - codeInterpreterToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + codeInterpreterCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall = default; + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - localShellToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput = default; + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - localShellToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCall? shellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + shellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + shellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + applyPatchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + applyPatchCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPListTools? mCPListTools = default; + global::tryAGI.OpenAI.MCPListTools? mcpListTools = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - mCPListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest = default; + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - mCPApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalResponseResource? mCPApprovalResponseResource = default; + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); - mCPApprovalResponseResource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall = default; + global::tryAGI.OpenAI.MCPToolCall? mcpCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - mCPToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -236,19 +308,25 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat message, functionToolCallResource, functionToolCallOutputResource, - fileSearchToolCall, - webSearchToolCall, - imageGenToolCall, - computerToolCall, + fileSearchCall, + webSearchCall, + imageGenerationCall, + computerCall, computerToolCallOutputResource, + toolSearchCall, + toolSearchOutput, reasoning, - codeInterpreterToolCall, - localShellToolCall, - localShellToolCallOutput, - mCPListTools, - mCPApprovalRequest, - mCPApprovalResponseResource, - mCPToolCall, + codeInterpreterCall, + localShellCall, + localShellCallOutput, + shellCall, + shellCallOutput, + applyPatchCall, + applyPatchCallOutput, + mcpListTools, + mcpApprovalRequest, + mcpApprovalResponse, + mcpCall, customToolCall, customToolCallOutput ); @@ -271,25 +349,25 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchToolCall != null) + else if (fileSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchToolCall != null) + else if (webSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenToolCall != null) + else if (imageGenerationCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (computerToolCall != null) + else if (computerCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); @@ -301,49 +379,85 @@ public class ConversationItemJsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + else if (toolSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } else if (reasoning != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterToolCall != null) + else if (codeInterpreterCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCall != null) + else if (localShellCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCallOutput != null) + else if (localShellCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListTools != null) + else if (shellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpListTools != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalRequest != null) + else if (mcpApprovalRequest != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalResponseResource != null) + else if (mcpApprovalResponse != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPToolCall != null) + else if (mcpCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); @@ -392,29 +506,29 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCallOutputResource, typeInfo); } - else if (value.IsFileSearchToolCall) + else if (value.IsFileSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall, typeInfo); } - else if (value.IsWebSearchToolCall) + else if (value.IsWebSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall, typeInfo); } - else if (value.IsImageGenToolCall) + else if (value.IsImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall, typeInfo); } - else if (value.IsComputerToolCall) + else if (value.IsComputerCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall, typeInfo); } else if (value.IsComputerToolCallOutputResource) { @@ -422,53 +536,89 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCallOutputResource, typeInfo); } + else if (value.IsToolSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchCall, typeInfo); + } + else if (value.IsToolSearchOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchOutput, typeInfo); + } else if (value.IsReasoning) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Reasoning, typeInfo); } - else if (value.IsCodeInterpreterToolCall) + else if (value.IsCodeInterpreterCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall, typeInfo); } - else if (value.IsLocalShellToolCall) + else if (value.IsLocalShellCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCall, typeInfo); } - else if (value.IsLocalShellToolCallOutput) + else if (value.IsLocalShellCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCallOutput, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallOutput, typeInfo); + } + else if (value.IsShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall, typeInfo); + } + else if (value.IsShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput, typeInfo); + } + else if (value.IsApplyPatchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall, typeInfo); + } + else if (value.IsApplyPatchCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutput, typeInfo); } - else if (value.IsMCPListTools) + else if (value.IsMcpListTools) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListTools, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListTools, typeInfo); } - else if (value.IsMCPApprovalRequest) + else if (value.IsMcpApprovalRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalRequest, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequest, typeInfo); } - else if (value.IsMCPApprovalResponseResource) + else if (value.IsMcpApprovalResponse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalResponseResource, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalResponse, typeInfo); } - else if (value.IsMCPToolCall) + else if (value.IsMcpCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCall, typeInfo); } else if (value.IsCustomToolCall) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationParam.g.cs new file mode 100644 index 00000000..f4b7ce49 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ConversationParam.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ConversationParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ConversationParam 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; + string? conversationId = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + conversationId = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ConversationParam2? conversationObject = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationParam2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationParam2).Name}"); + conversationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ConversationParam( + conversationId, + conversationObject + ); + + if (conversationId != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (conversationObject != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationParam2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationParam2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ConversationParam 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.IsConversationId) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ConversationId, typeInfo); + } + else if (value.IsConversationObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ConversationParam2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ConversationParam2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ConversationObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs deleted file mode 100644 index 5190b9d9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( - value1, - value2 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs new file mode 100644 index 00000000..3a8e7ce5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs new file mode 100644 index 00000000..116d2367 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs new file mode 100644 index 00000000..7188e3b4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs new file mode 100644 index 00000000..29455553 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs deleted file mode 100644 index 1b22ca4a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs deleted file mode 100644 index 38e8275c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs deleted file mode 100644 index adc68bc3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs deleted file mode 100644 index c7e2ef0b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimit.g.cs new file mode 100644 index 00000000..f50c8c49 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimit.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateContainerBodyMemoryLimitJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit 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::tryAGI.OpenAI.CreateContainerBodyMemoryLimitExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateContainerBodyMemoryLimitExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitNullable.g.cs new file mode 100644 index 00000000..598b242f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateContainerBodyMemoryLimitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? 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::tryAGI.OpenAI.CreateContainerBodyMemoryLimitExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? 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::tryAGI.OpenAI.CreateContainerBodyMemoryLimitExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs new file mode 100644 index 00000000..e593e66e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeNullable.g.cs new file mode 100644 index 00000000..a50d7951 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs new file mode 100644 index 00000000..4d5d16e4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeNullable.g.cs new file mode 100644 index 00000000..e6d18bd1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs deleted file mode 100644 index fa8cea31..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeNullable.g.cs deleted file mode 100644 index 00e384e0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs deleted file mode 100644 index 6ba371ff..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeNullable.g.cs deleted file mode 100644 index 34996e4c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type? 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalItem.g.cs index 2c36c0f7..1ed62ea1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalItem.g.cs @@ -17,41 +17,41 @@ public class CreateEvalItemJsonConverter : global::System.Text.Json.Serializatio var readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalItemVariant1? value1 = default; + global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? simpleInputMessage = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage).Name}"); + simpleInputMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.EvalItem? value2 = default; + global::tryAGI.OpenAI.EvalItem? evalMessageObject = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItem).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + evalMessageObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.CreateEvalItem( - value1, - value2 + simpleInputMessage, + evalMessageObject ); - if (value1 != null) + if (simpleInputMessage != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (evalMessageObject != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItem).Name}"); @@ -70,17 +70,17 @@ 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.IsValue1) + if (value.IsSimpleInputMessage) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SimpleInputMessage, typeInfo); } - else if (value.IsValue2) + else if (value.IsEvalMessageObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalMessageObject, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalRequestDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalRequestDataSourceConfig.g.cs deleted file mode 100644 index 022f5552..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalRequestDataSourceConfig.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class CreateEvalRequestDataSourceConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig 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::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? custom = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig).Name}"); - custom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? logs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig).Name}"); - logs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? storedCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig).Name}"); - storedCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig( - custom, - logs, - storedCompletions - ); - - if (custom != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (logs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (storedCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig 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.IsCustom) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeInfo); - } - else if (value.IsLogs) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); - } - else if (value.IsStoredCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StoredCompletions, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs new file mode 100644 index 00000000..7ebb25d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeNullable.g.cs new file mode 100644 index 00000000..23945b7f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs new file mode 100644 index 00000000..6677616a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeNullable.g.cs new file mode 100644 index 00000000..522eb55e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs deleted file mode 100644 index d0c961c3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeNullable.g.cs deleted file mode 100644 index 9182c45b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs deleted file mode 100644 index 0e788d0c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeNullable.g.cs deleted file mode 100644 index 9bfcf3d6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type? 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurpose.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurpose.g.cs new file mode 100644 index 00000000..eb7051f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurpose.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateFileRequestPurposeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateFileRequestPurpose 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::tryAGI.OpenAI.CreateFileRequestPurposeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateFileRequestPurpose)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateFileRequestPurpose); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateFileRequestPurpose value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateFileRequestPurposeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeNullable.g.cs new file mode 100644 index 00000000..66969efe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateFileRequestPurposeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateFileRequestPurpose? 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::tryAGI.OpenAI.CreateFileRequestPurposeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateFileRequestPurpose)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateFileRequestPurpose?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateFileRequestPurpose? 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::tryAGI.OpenAI.CreateFileRequestPurposeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs new file mode 100644 index 00000000..2dee4df0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullable.g.cs new file mode 100644 index 00000000..be5145bf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs new file mode 100644 index 00000000..a6a32f74 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullable.g.cs new file mode 100644 index 00000000..b1d8a40d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateModerationRequestInputVariant3ItemVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateSpeechResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateSpeechResponseStreamEvent.g.cs index 0fc8691c..24685c86 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateSpeechResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateSpeechResponseStreamEvent.g.cs @@ -17,41 +17,41 @@ public class CreateSpeechResponseStreamEventJsonConverter : global::System.Text. var readerCopy = reader; - global::tryAGI.OpenAI.SpeechAudioDeltaEvent? audioDelta = default; + global::tryAGI.OpenAI.SpeechAudioDeltaEvent? speechAudioDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent).Name}"); - audioDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + speechAudioDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.SpeechAudioDoneEvent? audioDone = default; + global::tryAGI.OpenAI.SpeechAudioDoneEvent? speechAudioDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent).Name}"); - audioDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + speechAudioDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent( - audioDelta, - audioDone + speechAudioDelta, + speechAudioDone ); - if (audioDelta != null) + if (speechAudioDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audioDone != null) + else if (speechAudioDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent).Name}"); @@ -70,17 +70,17 @@ 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.IsAudioDelta) + if (value.IsSpeechAudioDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SpeechAudioDelta, typeInfo); } - else if (value.IsAudioDone) + else if (value.IsSpeechAudioDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SpeechAudioDone, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModel.g.cs deleted file mode 100644 index 854b92d2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModel.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadAndRunRequestWithoutStreamModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModelExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModelExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModelNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModelNullable.g.cs deleted file mode 100644 index 2d92e14d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadAndRunRequestWithoutStreamModelNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadAndRunRequestWithoutStreamModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel? 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModelExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel? 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModelExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs deleted file mode 100644 index 3e4eb0b6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( - value1, - value2 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs new file mode 100644 index 00000000..8014bbbe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs new file mode 100644 index 00000000..c9639410 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs new file mode 100644 index 00000000..307c370d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs new file mode 100644 index 00000000..f61754a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs deleted file mode 100644 index fbb360a1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs deleted file mode 100644 index 776f5216..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs deleted file mode 100644 index d0053a53..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs deleted file mode 100644 index 9064e5a6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs new file mode 100644 index 00000000..82d1e068 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateTranscriptionRequestChunkingStrategyVariant1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1 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::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1Nullable.g.cs new file mode 100644 index 00000000..85cc25e6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionRequestChunkingStrategyVariant1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateTranscriptionRequestChunkingStrategyVariant1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1? 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::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1? 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::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTask.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTask.g.cs new file mode 100644 index 00000000..ef8a7c7a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTask.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateTranscriptionResponseDiarizedJsonTaskJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTaskExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTaskExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskNullable.g.cs new file mode 100644 index 00000000..edce03e8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CreateTranscriptionResponseDiarizedJsonTaskNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask? 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTaskExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask? 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTaskExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonUsage.g.cs new file mode 100644 index 00000000..8b30c71a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonUsage.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class CreateTranscriptionResponseDiarizedJsonUsageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage 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::tryAGI.OpenAI.TranscriptTextUsageTokens? tokens = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); + tokens = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.TranscriptTextUsageDuration? duration = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); + duration = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage( + tokens, + duration + ); + + if (tokens != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (duration != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage 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.IsTokens) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tokens, typeInfo); + } + else if (value.IsDuration) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Duration, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseJsonUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseJsonUsage.g.cs deleted file mode 100644 index 66f01ca5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseJsonUsage.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class CreateTranscriptionResponseJsonUsageJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage 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::tryAGI.OpenAI.TranscriptTextUsageTokens? transcriptTextTokens = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); - transcriptTextTokens = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.TranscriptTextUsageDuration? transcriptTextDuration = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); - transcriptTextDuration = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage( - transcriptTextTokens, - transcriptTextDuration - ); - - if (transcriptTextTokens != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (transcriptTextDuration != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage 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.IsTranscriptTextTokens) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TranscriptTextTokens, typeInfo); - } - else if (value.IsTranscriptTextDuration) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TranscriptTextDuration, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseStreamEvent.g.cs index 1f56ec67..013df4f6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseStreamEvent.g.cs @@ -16,6 +16,18 @@ public class CreateTranscriptionResponseStreamEventJsonConverter : global::Syste var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); var + readerCopy = reader; + global::tryAGI.OpenAI.TranscriptTextSegmentEvent? transcriptTextSegment = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent).Name}"); + transcriptTextSegment = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + readerCopy = reader; global::tryAGI.OpenAI.TranscriptTextDeltaEvent? transcriptTextDelta = default; try @@ -41,11 +53,18 @@ public class CreateTranscriptionResponseStreamEventJsonConverter : global::Syste } var result = new global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent( + transcriptTextSegment, transcriptTextDelta, transcriptTextDone ); - if (transcriptTextDelta != null) + if (transcriptTextSegment != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (transcriptTextDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextDeltaEvent).Name}"); @@ -70,7 +89,13 @@ 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.IsTranscriptTextDelta) + if (value.IsTranscriptTextSegment) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TranscriptTextSegment, typeInfo); + } + else if (value.IsTranscriptTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptTextDeltaEvent).Name}"); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamType.g.cs new file mode 100644 index 00000000..4af7b665 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomGrammarFormatParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomGrammarFormatParamType 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::tryAGI.OpenAI.CustomGrammarFormatParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomGrammarFormatParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomGrammarFormatParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomGrammarFormatParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomGrammarFormatParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeNullable.g.cs new file mode 100644 index 00000000..38ddd360 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomGrammarFormatParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomGrammarFormatParamType? 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::tryAGI.OpenAI.CustomGrammarFormatParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomGrammarFormatParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomGrammarFormatParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomGrammarFormatParamType? 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::tryAGI.OpenAI.CustomGrammarFormatParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamType.g.cs new file mode 100644 index 00000000..3bf30bd5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomTextFormatParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomTextFormatParamType 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::tryAGI.OpenAI.CustomTextFormatParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomTextFormatParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomTextFormatParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomTextFormatParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomTextFormatParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeNullable.g.cs new file mode 100644 index 00000000..26f66c84 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomTextFormatParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomTextFormatParamType? 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::tryAGI.OpenAI.CustomTextFormatParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomTextFormatParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomTextFormatParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomTextFormatParamType? 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::tryAGI.OpenAI.CustomTextFormatParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs new file mode 100644 index 00000000..44879fe4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxNullable.g.cs new file mode 100644 index 00000000..e03a6e77 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs new file mode 100644 index 00000000..b2f8a7ba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatGrammarFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeNullable.g.cs new file mode 100644 index 00000000..433ec100 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatGrammarFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs new file mode 100644 index 00000000..59db256c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatTextFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeNullable.g.cs new file mode 100644 index 00000000..42634dc0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolChatCompletionsCustomFormatTextFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs deleted file mode 100644 index c1c79392..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeNullable.g.cs deleted file mode 100644 index a3bfad59..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs deleted file mode 100644 index 6e5ff178..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxNullable.g.cs deleted file mode 100644 index bc65de60..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs deleted file mode 100644 index f5f7b3e0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeNullable.g.cs deleted file mode 100644 index 825ba0dd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolChatCompletionsCustomFormatVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type? 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1Type.g.cs deleted file mode 100644 index 50edcbba..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant1Type 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::tryAGI.OpenAI.CustomToolFormatVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolFormatVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeNullable.g.cs deleted file mode 100644 index b2a242fd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant1Type? 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::tryAGI.OpenAI.CustomToolFormatVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant1Type? 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::tryAGI.OpenAI.CustomToolFormatVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Syntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Syntax.g.cs deleted file mode 100644 index 419bff86..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Syntax.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant2SyntaxJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax 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::tryAGI.OpenAI.CustomToolFormatVariant2SyntaxExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolFormatVariant2SyntaxExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxNullable.g.cs deleted file mode 100644 index dc412e7b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant2SyntaxNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax? 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::tryAGI.OpenAI.CustomToolFormatVariant2SyntaxExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax? 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::tryAGI.OpenAI.CustomToolFormatVariant2SyntaxExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Type.g.cs deleted file mode 100644 index f225cbb4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant2Type 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::tryAGI.OpenAI.CustomToolFormatVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolFormatVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeNullable.g.cs deleted file mode 100644 index 043ddbfc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolFormatVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolFormatVariant2Type? 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::tryAGI.OpenAI.CustomToolFormatVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolFormatVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolFormatVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolFormatVariant2Type? 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::tryAGI.OpenAI.CustomToolFormatVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamType.g.cs new file mode 100644 index 00000000..6a72b1fa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolParamType 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::tryAGI.OpenAI.CustomToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamTypeNullable.g.cs new file mode 100644 index 00000000..07d0e6fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class CustomToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.CustomToolParamType? 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::tryAGI.OpenAI.CustomToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.CustomToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.CustomToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.CustomToolParamType? 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::tryAGI.OpenAI.CustomToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolType.g.cs deleted file mode 100644 index efb8b0b5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolType 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::tryAGI.OpenAI.CustomToolTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.CustomToolTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolTypeNullable.g.cs deleted file mode 100644 index bef2eee2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.CustomToolTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class CustomToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.CustomToolType? 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::tryAGI.OpenAI.CustomToolTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.CustomToolType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.CustomToolType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.CustomToolType? 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::tryAGI.OpenAI.CustomToolTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObject.g.cs new file mode 100644 index 00000000..49933687 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedSkillResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedSkillResourceObject 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::tryAGI.OpenAI.DeletedSkillResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedSkillResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedSkillResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedSkillResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DeletedSkillResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectNullable.g.cs new file mode 100644 index 00000000..cad721f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedSkillResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedSkillResourceObject? 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::tryAGI.OpenAI.DeletedSkillResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedSkillResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedSkillResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedSkillResourceObject? 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::tryAGI.OpenAI.DeletedSkillResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObject.g.cs new file mode 100644 index 00000000..24075ff5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedSkillVersionResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedSkillVersionResourceObject 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::tryAGI.OpenAI.DeletedSkillVersionResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedSkillVersionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedSkillVersionResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedSkillVersionResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DeletedSkillVersionResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectNullable.g.cs new file mode 100644 index 00000000..71ec45e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedSkillVersionResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedSkillVersionResourceObject? 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::tryAGI.OpenAI.DeletedSkillVersionResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedSkillVersionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedSkillVersionResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedSkillVersionResourceObject? 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::tryAGI.OpenAI.DeletedSkillVersionResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObject.g.cs new file mode 100644 index 00000000..a2309238 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedThreadResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedThreadResourceObject 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::tryAGI.OpenAI.DeletedThreadResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedThreadResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedThreadResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedThreadResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DeletedThreadResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectNullable.g.cs new file mode 100644 index 00000000..2c74f2c9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedThreadResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedThreadResourceObject? 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::tryAGI.OpenAI.DeletedThreadResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedThreadResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedThreadResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedThreadResourceObject? 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::tryAGI.OpenAI.DeletedThreadResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObject.g.cs new file mode 100644 index 00000000..65197219 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedVideoResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedVideoResourceObject 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::tryAGI.OpenAI.DeletedVideoResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedVideoResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedVideoResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedVideoResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DeletedVideoResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectNullable.g.cs new file mode 100644 index 00000000..f2209f19 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DeletedVideoResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DeletedVideoResourceObject? 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::tryAGI.OpenAI.DeletedVideoResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DeletedVideoResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DeletedVideoResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DeletedVideoResourceObject? 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::tryAGI.OpenAI.DeletedVideoResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionType.g.cs new file mode 100644 index 00000000..e5622c2a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DoubleClickActionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DoubleClickActionType 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::tryAGI.OpenAI.DoubleClickActionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DoubleClickActionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DoubleClickActionType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DoubleClickActionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DoubleClickActionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeNullable.g.cs new file mode 100644 index 00000000..fa8e12d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DoubleClickActionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DoubleClickActionType? 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::tryAGI.OpenAI.DoubleClickActionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DoubleClickActionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DoubleClickActionType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DoubleClickActionType? 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::tryAGI.OpenAI.DoubleClickActionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickType.g.cs deleted file mode 100644 index e58cbc42..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class DoubleClickTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.DoubleClickType 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::tryAGI.OpenAI.DoubleClickTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.DoubleClickType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.DoubleClickType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.DoubleClickType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.DoubleClickTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickTypeNullable.g.cs deleted file mode 100644 index fee71163..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DoubleClickTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class DoubleClickTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.DoubleClickType? 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::tryAGI.OpenAI.DoubleClickTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.DoubleClickType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.DoubleClickType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.DoubleClickType? 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::tryAGI.OpenAI.DoubleClickTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamType.g.cs new file mode 100644 index 00000000..1f211901 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DragParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DragParamType 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::tryAGI.OpenAI.DragParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DragParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DragParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DragParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.DragParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamTypeNullable.g.cs new file mode 100644 index 00000000..c4f1d20e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class DragParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.DragParamType? 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::tryAGI.OpenAI.DragParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.DragParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.DragParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.DragParamType? 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::tryAGI.OpenAI.DragParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragType.g.cs deleted file mode 100644 index 687d1b1e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class DragTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.DragType 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::tryAGI.OpenAI.DragTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.DragType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.DragType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.DragType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.DragTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragTypeNullable.g.cs deleted file mode 100644 index 7df6d979..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DragTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class DragTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.DragType? 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::tryAGI.OpenAI.DragTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.DragType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.DragType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.DragType? 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::tryAGI.OpenAI.DragTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2.g.cs new file mode 100644 index 00000000..5d90b98c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamBackground2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2 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::tryAGI.OpenAI.EditImageBodyJsonParamBackground2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2Nullable.g.cs new file mode 100644 index 00000000..e094bd00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamBackground2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamBackground2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2? 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::tryAGI.OpenAI.EditImageBodyJsonParamBackground2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2? 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::tryAGI.OpenAI.EditImageBodyJsonParamBackground2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2.g.cs new file mode 100644 index 00000000..e10a04aa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamInputFidelity2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2 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::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2Nullable.g.cs new file mode 100644 index 00000000..f5d44b89 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamInputFidelity2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamInputFidelity2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2? 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::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2? 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::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModel.g.cs new file mode 100644 index 00000000..c2f637b6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModel.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamModel 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::tryAGI.OpenAI.EditImageBodyJsonParamModelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamModel); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamModel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamModelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModelNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModelNullable.g.cs new file mode 100644 index 00000000..3b0d355b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModelNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamModel? 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::tryAGI.OpenAI.EditImageBodyJsonParamModelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamModel?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamModel? 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::tryAGI.OpenAI.EditImageBodyJsonParamModelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2.g.cs new file mode 100644 index 00000000..77bbb3cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamModeration2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2 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::tryAGI.OpenAI.EditImageBodyJsonParamModeration2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2Nullable.g.cs new file mode 100644 index 00000000..539737a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamModeration2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamModeration2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2? 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::tryAGI.OpenAI.EditImageBodyJsonParamModeration2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2? 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::tryAGI.OpenAI.EditImageBodyJsonParamModeration2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2.g.cs new file mode 100644 index 00000000..8f84f58d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamOutputFormat2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2Nullable.g.cs new file mode 100644 index 00000000..77087c46 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamOutputFormat2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamOutputFormat2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2? 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2? 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2.g.cs new file mode 100644 index 00000000..3967dc4e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamQuality2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2 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::tryAGI.OpenAI.EditImageBodyJsonParamQuality2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2Nullable.g.cs new file mode 100644 index 00000000..242a4941 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamQuality2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamQuality2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2? 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::tryAGI.OpenAI.EditImageBodyJsonParamQuality2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2? 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::tryAGI.OpenAI.EditImageBodyJsonParamQuality2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2.g.cs new file mode 100644 index 00000000..e544a930 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamSize2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamSize2 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::tryAGI.OpenAI.EditImageBodyJsonParamSize2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamSize2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamSize2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamSize2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EditImageBodyJsonParamSize2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2Nullable.g.cs new file mode 100644 index 00000000..93dc6ee0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EditImageBodyJsonParamSize2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EditImageBodyJsonParamSize2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EditImageBodyJsonParamSize2? 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::tryAGI.OpenAI.EditImageBodyJsonParamSize2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EditImageBodyJsonParamSize2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EditImageBodyJsonParamSize2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EditImageBodyJsonParamSize2? 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::tryAGI.OpenAI.EditImageBodyJsonParamSize2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant1.g.cs new file mode 100644 index 00000000..2455aca1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant1.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class EnvironmentVariant1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EnvironmentVariant1 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::tryAGI.OpenAI.ContainerAutoParam? containerAuto = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerAutoParam).Name}"); + containerAuto = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.LocalEnvironmentParam? local = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + local = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerReferenceParam? containerReference = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + containerReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.EnvironmentVariant1( + containerAuto, + local, + containerReference + ); + + if (containerAuto != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerAutoParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (local != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (containerReference != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EnvironmentVariant1 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.IsContainerAuto) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerAutoParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerAuto, typeInfo); + } + else if (value.IsLocal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Local, typeInfo); + } + else if (value.IsContainerReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerReference, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant12.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant12.g.cs new file mode 100644 index 00000000..48f1d90e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant12.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class EnvironmentVariant12JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EnvironmentVariant12 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::tryAGI.OpenAI.LocalEnvironmentResource? local = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentResource).Name}"); + local = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerReferenceResource? containerReference = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceResource).Name}"); + containerReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.EnvironmentVariant12( + local, + containerReference + ); + + if (local != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentResource).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (containerReference != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceResource).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EnvironmentVariant12 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.IsLocal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Local, typeInfo); + } + else if (value.IsContainerReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerReference, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant13.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant13.g.cs new file mode 100644 index 00000000..b9e4b1c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EnvironmentVariant13.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class EnvironmentVariant13JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EnvironmentVariant13 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::tryAGI.OpenAI.LocalEnvironmentParam? local = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + local = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerReferenceParam? containerReference = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + containerReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.EnvironmentVariant13( + local, + containerReference + ); + + if (local != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (containerReference != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EnvironmentVariant13 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.IsLocal) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalEnvironmentParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Local, typeInfo); + } + else if (value.IsContainerReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerReferenceParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerReference, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalDataSourceConfig.g.cs deleted file mode 100644 index c1174c7c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalDataSourceConfig.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class EvalDataSourceConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalDataSourceConfig 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::tryAGI.OpenAI.EvalCustomDataSourceConfig? custom = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig).Name}"); - custom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalLogsDataSourceConfig? logs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig).Name}"); - logs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? storedCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig).Name}"); - storedCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.EvalDataSourceConfig( - custom, - logs, - storedCompletions - ); - - if (custom != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (logs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (storedCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalDataSourceConfig 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.IsCustom) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeInfo); - } - else if (value.IsLogs) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); - } - else if (value.IsStoredCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StoredCompletions, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderLabelModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderLabelModel.g.cs index 84d757fe..62ae79c9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderLabelModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderLabelModel.g.cs @@ -17,22 +17,22 @@ public class EvalGraderLabelModelJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.GraderLabelModel? value1 = default; + global::tryAGI.OpenAI.GraderLabelModel? labelModelGrader = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderLabelModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderLabelModel).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + labelModelGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.EvalGraderLabelModel( - value1 + labelModelGrader ); - if (value1 != null) + if (labelModelGrader != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderLabelModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderLabelModel).Name}"); @@ -51,11 +51,11 @@ 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.IsValue1) + if (value.IsLabelModelGrader) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderLabelModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderLabelModel).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LabelModelGrader, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderPython.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderPython.g.cs index 4bee2546..72228420 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderPython.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderPython.g.cs @@ -17,12 +17,12 @@ public class EvalGraderPythonJsonConverter : global::System.Text.Json.Serializat var readerCopy = reader; - global::tryAGI.OpenAI.GraderPython? value1 = default; + global::tryAGI.OpenAI.GraderPython? pythonGrader = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + pythonGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class EvalGraderPythonJsonConverter : global::System.Text.Json.Serializat } var result = new global::tryAGI.OpenAI.EvalGraderPython( - value1, + pythonGrader, value2 ); - if (value1 != null) + if (pythonGrader != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsPythonGrader) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PythonGrader, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderScoreModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderScoreModel.g.cs index 6fbbefa4..aa624241 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderScoreModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderScoreModel.g.cs @@ -17,12 +17,12 @@ public class EvalGraderScoreModelJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.GraderScoreModel? value1 = default; + global::tryAGI.OpenAI.GraderScoreModel? scoreModelGrader = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + scoreModelGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class EvalGraderScoreModelJsonConverter : global::System.Text.Json.Serial } var result = new global::tryAGI.OpenAI.EvalGraderScoreModel( - value1, + scoreModelGrader, value2 ); - if (value1 != null) + if (scoreModelGrader != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsScoreModelGrader) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScoreModelGrader, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderStringCheck.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderStringCheck.g.cs index 557eb216..6f3918b5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderStringCheck.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderStringCheck.g.cs @@ -17,22 +17,22 @@ public class EvalGraderStringCheckJsonConverter : global::System.Text.Json.Seria var readerCopy = reader; - global::tryAGI.OpenAI.GraderStringCheck? value1 = default; + global::tryAGI.OpenAI.GraderStringCheck? stringCheckGrader = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + stringCheckGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.EvalGraderStringCheck( - value1 + stringCheckGrader ); - if (value1 != null) + if (stringCheckGrader != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); @@ -51,11 +51,11 @@ 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.IsValue1) + if (value.IsStringCheckGrader) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StringCheckGrader, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderTextSimilarity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderTextSimilarity.g.cs index 861ddb37..56f21dba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderTextSimilarity.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalGraderTextSimilarity.g.cs @@ -17,12 +17,12 @@ public class EvalGraderTextSimilarityJsonConverter : global::System.Text.Json.Se var readerCopy = reader; - global::tryAGI.OpenAI.GraderTextSimilarity? value1 = default; + global::tryAGI.OpenAI.GraderTextSimilarity? textSimilarityGrader = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + textSimilarityGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class EvalGraderTextSimilarityJsonConverter : global::System.Text.Json.Se } var result = new global::tryAGI.OpenAI.EvalGraderTextSimilarity( - value1, + textSimilarityGrader, value2 ); - if (value1 != null) + if (textSimilarityGrader != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsTextSimilarityGrader) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextSimilarityGrader, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContent.g.cs new file mode 100644 index 00000000..30c3a7b7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContent.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class EvalItemContentJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemContent 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::tryAGI.OpenAI.EvalItemContentItem? evalContentItem = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentItem).Name}"); + evalContentItem = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::System.Collections.Generic.IList? anArrayOfInputText,OutputText,InputImage,AndInputAudio = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + anArrayOfInputText,OutputText,InputImage,AndInputAudio = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.EvalItemContent( + evalContentItem, + anArrayOfInputText,OutputText,InputImage,AndInputAudio + ); + + if (evalContentItem != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (anArrayOfInputText,OutputText,InputImage,AndInputAudio != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemContent 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.IsEvalContentItem) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalContentItem, typeInfo); + } + else if (value.IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnArrayOfInputText,OutputText,InputImage,AndInputAudio, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentItem.g.cs new file mode 100644 index 00000000..926ed683 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentItem.g.cs @@ -0,0 +1,162 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class EvalItemContentItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemContentItem 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; + string? textInput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + textInput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputTextContent? inputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.EvalItemContentOutputText? outputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentOutputText).Name}"); + outputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.EvalItemInputImage? inputImage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemInputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemInputImage).Name}"); + inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputAudio? inputAudio = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); + inputAudio = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.EvalItemContentItem( + textInput, + inputText, + outputText, + inputImage, + inputAudio + ); + + if (textInput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (outputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentOutputText).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputImage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemInputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemInputImage).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputAudio != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemContentItem 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.IsTextInput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextInput, typeInfo); + } + else if (value.IsInputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); + } + else if (value.IsOutputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemContentOutputText).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputText, typeInfo); + } + else if (value.IsInputImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalItemInputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalItemInputImage).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); + } + else if (value.IsInputAudio) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextType.g.cs new file mode 100644 index 00000000..b1adcda0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EvalItemContentOutputTextTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemContentOutputTextType 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::tryAGI.OpenAI.EvalItemContentOutputTextTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EvalItemContentOutputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EvalItemContentOutputTextType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemContentOutputTextType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EvalItemContentOutputTextTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeNullable.g.cs new file mode 100644 index 00000000..0bd30175 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EvalItemContentOutputTextTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemContentOutputTextType? 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::tryAGI.OpenAI.EvalItemContentOutputTextTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EvalItemContentOutputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EvalItemContentOutputTextType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemContentOutputTextType? 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::tryAGI.OpenAI.EvalItemContentOutputTextTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3Type.g.cs deleted file mode 100644 index 83f86890..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class EvalItemContentVariant3TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalItemContentVariant3Type 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::tryAGI.OpenAI.EvalItemContentVariant3TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.EvalItemContentVariant3Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.EvalItemContentVariant3Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalItemContentVariant3Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.EvalItemContentVariant3TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeNullable.g.cs deleted file mode 100644 index 3b20c3bb..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class EvalItemContentVariant3TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalItemContentVariant3Type? 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::tryAGI.OpenAI.EvalItemContentVariant3TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.EvalItemContentVariant3Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.EvalItemContentVariant3Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalItemContentVariant3Type? 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::tryAGI.OpenAI.EvalItemContentVariant3TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4Type.g.cs deleted file mode 100644 index 042f5263..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class EvalItemContentVariant4TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalItemContentVariant4Type 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::tryAGI.OpenAI.EvalItemContentVariant4TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.EvalItemContentVariant4Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.EvalItemContentVariant4Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalItemContentVariant4Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.EvalItemContentVariant4TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeNullable.g.cs deleted file mode 100644 index 0912178e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class EvalItemContentVariant4TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalItemContentVariant4Type? 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::tryAGI.OpenAI.EvalItemContentVariant4TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.EvalItemContentVariant4Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.EvalItemContentVariant4Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalItemContentVariant4Type? 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::tryAGI.OpenAI.EvalItemContentVariant4TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageType.g.cs new file mode 100644 index 00000000..6308eb62 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EvalItemInputImageTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemInputImageType 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::tryAGI.OpenAI.EvalItemInputImageTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EvalItemInputImageType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EvalItemInputImageType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemInputImageType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.EvalItemInputImageTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeNullable.g.cs new file mode 100644 index 00000000..28174ad1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class EvalItemInputImageTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.EvalItemInputImageType? 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::tryAGI.OpenAI.EvalItemInputImageTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.EvalItemInputImageType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.EvalItemInputImageType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.EvalItemInputImageType? 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::tryAGI.OpenAI.EvalItemInputImageTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalRunDataSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalRunDataSource.g.cs deleted file mode 100644 index e9484fbe..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.EvalRunDataSource.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class EvalRunDataSourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.EvalRunDataSource 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::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? createJsonl = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource).Name}"); - createJsonl = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? createCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource).Name}"); - createCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? createResponses = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource).Name}"); - createResponses = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.EvalRunDataSource( - createJsonl, - createCompletions, - createResponses - ); - - if (createJsonl != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (createCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (createResponses != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.EvalRunDataSource 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.IsCreateJsonl) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateJsonl, typeInfo); - } - else if (value.IsCreateCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateCompletions, typeInfo); - } - else if (value.IsCreateResponses) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateResponses, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchor.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchor.g.cs new file mode 100644 index 00000000..5c8bba3f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchor.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ExpiresAfterParamAnchorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ExpiresAfterParamAnchor 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::tryAGI.OpenAI.ExpiresAfterParamAnchorExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ExpiresAfterParamAnchor)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ExpiresAfterParamAnchor); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ExpiresAfterParamAnchor value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ExpiresAfterParamAnchorExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorNullable.g.cs new file mode 100644 index 00000000..24467abd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ExpiresAfterParamAnchorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ExpiresAfterParamAnchor? 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::tryAGI.OpenAI.ExpiresAfterParamAnchorExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ExpiresAfterParamAnchor)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ExpiresAfterParamAnchor?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ExpiresAfterParamAnchor? 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::tryAGI.OpenAI.ExpiresAfterParamAnchorExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceType.g.cs new file mode 100644 index 00000000..d2de6c09 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileAnnotationSourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileAnnotationSourceType 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::tryAGI.OpenAI.FileAnnotationSourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileAnnotationSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileAnnotationSourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileAnnotationSourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FileAnnotationSourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeNullable.g.cs new file mode 100644 index 00000000..0928e55e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileAnnotationSourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileAnnotationSourceType? 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::tryAGI.OpenAI.FileAnnotationSourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileAnnotationSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileAnnotationSourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileAnnotationSourceType? 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::tryAGI.OpenAI.FileAnnotationSourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationType.g.cs new file mode 100644 index 00000000..4ca2531d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileAnnotationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileAnnotationType 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::tryAGI.OpenAI.FileAnnotationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileAnnotationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileAnnotationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileAnnotationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FileAnnotationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationTypeNullable.g.cs new file mode 100644 index 00000000..10290c2b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileAnnotationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileAnnotationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileAnnotationType? 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::tryAGI.OpenAI.FileAnnotationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileAnnotationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileAnnotationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileAnnotationType? 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::tryAGI.OpenAI.FileAnnotationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnum.g.cs new file mode 100644 index 00000000..c7699059 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileDetailEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileDetailEnum 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::tryAGI.OpenAI.FileDetailEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileDetailEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileDetailEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileDetailEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FileDetailEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnumNullable.g.cs new file mode 100644 index 00000000..6706f985 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileDetailEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileDetailEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileDetailEnum? 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::tryAGI.OpenAI.FileDetailEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileDetailEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileDetailEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileDetailEnum? 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::tryAGI.OpenAI.FileDetailEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetail.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetail.g.cs new file mode 100644 index 00000000..f71e817b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetail.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileInputDetailJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileInputDetail 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::tryAGI.OpenAI.FileInputDetailExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileInputDetail)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileInputDetail); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileInputDetail value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FileInputDetailExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetailNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetailNullable.g.cs new file mode 100644 index 00000000..70fdcf31 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileInputDetailNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FileInputDetailNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FileInputDetail? 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::tryAGI.OpenAI.FileInputDetailExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FileInputDetail)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FileInputDetail?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FileInputDetail? 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::tryAGI.OpenAI.FileInputDetailExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurpose.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurpose.g.cs deleted file mode 100644 index 464ade68..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurpose.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class FilePurposeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.FilePurpose 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::tryAGI.OpenAI.FilePurposeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.FilePurpose)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.FilePurpose); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.FilePurpose value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.FilePurposeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurposeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurposeNullable.g.cs deleted file mode 100644 index e009d996..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FilePurposeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class FilePurposeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.FilePurpose? 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::tryAGI.OpenAI.FilePurposeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.FilePurpose)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.FilePurpose?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.FilePurpose? 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::tryAGI.OpenAI.FilePurposeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters.g.cs deleted file mode 100644 index c7b82801..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class FiltersJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Filters 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::tryAGI.OpenAI.ComparisonFilter? comparisonFilter = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); - comparisonFilter = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CompoundFilter? compoundFilter = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); - compoundFilter = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Filters( - comparisonFilter, - compoundFilter - ); - - if (comparisonFilter != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (compoundFilter != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Filters 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.IsComparisonFilter) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComparisonFilter, typeInfo); - } - else if (value.IsCompoundFilter) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CompoundFilter, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters2.g.cs new file mode 100644 index 00000000..27e9b03d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Filters2.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class Filters2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.Filters2 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::tryAGI.OpenAI.ComparisonFilter? comparisonFilter = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + comparisonFilter = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CompoundFilter? compoundFilter = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); + compoundFilter = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.Filters2( + comparisonFilter, + compoundFilter + ); + + if (comparisonFilter != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (compoundFilter != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.Filters2 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.IsComparisonFilter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComparisonFilter, typeInfo); + } + else if (value.IsCompoundFilter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompoundFilter).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CompoundFilter, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FiltersItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FiltersItem.g.cs new file mode 100644 index 00000000..e265f18a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FiltersItem.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class FiltersItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FiltersItem 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::tryAGI.OpenAI.ComparisonFilter? comparisonFilter = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + comparisonFilter = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + object? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.FiltersItem( + comparisonFilter, + value2 + ); + + if (comparisonFilter != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FiltersItem 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.IsComparisonFilter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComparisonFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComparisonFilter).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComparisonFilter, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessage.g.cs index 6b9d6de4..8b31c962 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessage.g.cs @@ -17,41 +17,41 @@ public class FineTuneChatCompletionRequestAssistantMessageJsonConverter : global var readerCopy = reader; - global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? value1 = default; + global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? assistantMessage1 = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage).Name}"); + assistantMessage1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? value2 = default; + global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? assistantMessage2 = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + assistantMessage2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessage( - value1, - value2 + assistantMessage1, + assistantMessage2 ); - if (value1 != null) + if (assistantMessage1 != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (assistantMessage2 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage).Name}"); @@ -70,17 +70,17 @@ 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.IsValue1) + if (value.IsAssistantMessage1) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage1, typeInfo); } - else if (value.IsValue2) + else if (value.IsAssistantMessage2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage2, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1.g.cs new file mode 100644 index 00000000..7193763f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FineTuningJobHyperparametersBatchSizeVariant1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1 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::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1Nullable.g.cs new file mode 100644 index 00000000..484fca14 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FineTuningJobHyperparametersBatchSizeVariant1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FineTuningJobHyperparametersBatchSizeVariant1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1? 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::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1? 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::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format.g.cs deleted file mode 100644 index 01643ad6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class FormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Format 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::tryAGI.OpenAI.CustomToolFormatVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CustomToolFormatVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Format( - value1, - value2 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Format 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::tryAGI.OpenAI.CustomToolFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format2.g.cs index 0bdf02a3..ec781505 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Format2.g.cs @@ -17,44 +17,44 @@ public class Format2JsonConverter : global::System.Text.Json.Serialization.JsonC var readerCopy = reader; - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? value1 = default; + global::tryAGI.OpenAI.CustomTextFormatParam? text = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTextFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTextFormatParam).Name}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? value2 = default; + global::tryAGI.OpenAI.CustomGrammarFormatParam? grammar = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam).Name}"); + grammar = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.Format2( - value1, - value2 + text, + grammar ); - if (value1 != null) + if (text != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTextFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTextFormatParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (grammar != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -70,17 +70,17 @@ 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.IsValue1) + if (value.IsText) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTextFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTextFormatParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsValue2) + else if (value.IsGrammar) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grammar, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionAndCustomToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionAndCustomToolCallOutput.g.cs new file mode 100644 index 00000000..1638c34f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionAndCustomToolCallOutput.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class FunctionAndCustomToolCallOutputJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput 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::tryAGI.OpenAI.InputTextContent? inputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputImageContent? inputImage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputFileContent? inputFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + inputFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput( + inputText, + inputImage, + inputFile + ); + + if (inputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputImage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput 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.IsInputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); + } + else if (value.IsInputImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); + } + else if (value.IsInputFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnum.g.cs new file mode 100644 index 00000000..61917905 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionCallOutputStatusEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionCallOutputStatusEnum 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::tryAGI.OpenAI.FunctionCallOutputStatusEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionCallOutputStatusEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionCallOutputStatusEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionCallOutputStatusEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionCallOutputStatusEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumNullable.g.cs new file mode 100644 index 00000000..22a2f27f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionCallOutputStatusEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionCallOutputStatusEnum? 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::tryAGI.OpenAI.FunctionCallOutputStatusEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionCallOutputStatusEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionCallOutputStatusEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionCallOutputStatusEnum? 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::tryAGI.OpenAI.FunctionCallOutputStatusEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatus.g.cs new file mode 100644 index 00000000..beb6a8c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionCallStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionCallStatus 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::tryAGI.OpenAI.FunctionCallStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionCallStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionCallStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionCallStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatusNullable.g.cs new file mode 100644 index 00000000..13371a13 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionCallStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionCallStatus? 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::tryAGI.OpenAI.FunctionCallStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionCallStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionCallStatus? 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::tryAGI.OpenAI.FunctionCallStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamType.g.cs new file mode 100644 index 00000000..18b5ea49 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallItemParamType 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::tryAGI.OpenAI.FunctionShellCallItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeNullable.g.cs new file mode 100644 index 00000000..53852b22 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallItemParamType? 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::tryAGI.OpenAI.FunctionShellCallItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallItemParamType? 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::tryAGI.OpenAI.FunctionShellCallItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatus.g.cs new file mode 100644 index 00000000..14a93637 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallItemStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallItemStatus 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::tryAGI.OpenAI.FunctionShellCallItemStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallItemStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallItemStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallItemStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallItemStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatusNullable.g.cs new file mode 100644 index 00000000..719d3def --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallItemStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallItemStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallItemStatus? 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::tryAGI.OpenAI.FunctionShellCallItemStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallItemStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallItemStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallItemStatus? 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::tryAGI.OpenAI.FunctionShellCallItemStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamType.g.cs new file mode 100644 index 00000000..6d324417 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputExitOutcomeParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeNullable.g.cs new file mode 100644 index 00000000..332fc544 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputExitOutcomeParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeType.g.cs new file mode 100644 index 00000000..f45d0435 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputExitOutcomeTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeNullable.g.cs new file mode 100644 index 00000000..5254e838 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputExitOutcomeTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType? 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType? 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamType.g.cs new file mode 100644 index 00000000..525e6401 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeNullable.g.cs new file mode 100644 index 00000000..d3573b6d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputOutcomeParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputOutcomeParam.g.cs new file mode 100644 index 00000000..14c53f80 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputOutcomeParam.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class FunctionShellCallOutputOutcomeParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? timeout = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam).Name}"); + timeout = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? exit = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam).Name}"); + exit = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam( + timeout, + exit + ); + + if (timeout != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (exit != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam 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.IsTimeout) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Timeout, typeInfo); + } + else if (value.IsExit) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Exit, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs new file mode 100644 index 00000000..e9570120 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTimeoutOutcomeParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeNullable.g.cs new file mode 100644 index 00000000..03536c4f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTimeoutOutcomeParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType? 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeType.g.cs new file mode 100644 index 00000000..5f5f0e79 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTimeoutOutcomeTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeNullable.g.cs new file mode 100644 index 00000000..f513d35d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTimeoutOutcomeTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType? 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType? 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputType.g.cs new file mode 100644 index 00000000..94f01d73 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputType 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::tryAGI.OpenAI.FunctionShellCallOutputTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallOutputTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeNullable.g.cs new file mode 100644 index 00000000..410c4e80 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallOutputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallOutputType? 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::tryAGI.OpenAI.FunctionShellCallOutputTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallOutputType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallOutputType? 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::tryAGI.OpenAI.FunctionShellCallOutputTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallType.g.cs new file mode 100644 index 00000000..852ba1a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallType 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::tryAGI.OpenAI.FunctionShellCallTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellCallTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeNullable.g.cs new file mode 100644 index 00000000..10793170 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellCallTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellCallType? 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::tryAGI.OpenAI.FunctionShellCallTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellCallType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellCallType? 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::tryAGI.OpenAI.FunctionShellCallTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamType.g.cs new file mode 100644 index 00000000..43307057 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellToolParamType 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::tryAGI.OpenAI.FunctionShellToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionShellToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeNullable.g.cs new file mode 100644 index 00000000..749d9edd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionShellToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionShellToolParamType? 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::tryAGI.OpenAI.FunctionShellToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionShellToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionShellToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionShellToolParamType? 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::tryAGI.OpenAI.FunctionShellToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputResource.g.cs index bc926f86..d99c76ae 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputResource.g.cs @@ -17,12 +17,12 @@ public class FunctionToolCallOutputResourceJsonConverter : global::System.Text.J var readerCopy = reader; - global::tryAGI.OpenAI.FunctionToolCallOutput? value1 = default; + global::tryAGI.OpenAI.FunctionToolCallOutput? functionToolCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class FunctionToolCallOutputResourceJsonConverter : global::System.Text.J } var result = new global::tryAGI.OpenAI.FunctionToolCallOutputResource( - value1, + functionToolCallOutput, value2 ); - if (value1 != null) + if (functionToolCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsFunctionToolCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCallOutput, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallResource.g.cs index c220ed23..c619c939 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolCallResource.g.cs @@ -17,12 +17,12 @@ public class FunctionToolCallResourceJsonConverter : global::System.Text.Json.Se var readerCopy = reader; - global::tryAGI.OpenAI.FunctionToolCall? value1 = default; + global::tryAGI.OpenAI.FunctionToolCall? functionToolCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class FunctionToolCallResourceJsonConverter : global::System.Text.Json.Se } var result = new global::tryAGI.OpenAI.FunctionToolCallResource( - value1, + functionToolCall, value2 ); - if (value1 != null) + if (functionToolCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsFunctionToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCall, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamType.g.cs new file mode 100644 index 00000000..6095e7db --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionToolParamType 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::tryAGI.OpenAI.FunctionToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.FunctionToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeNullable.g.cs new file mode 100644 index 00000000..c684c393 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class FunctionToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.FunctionToolParamType? 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::tryAGI.OpenAI.FunctionToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.FunctionToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.FunctionToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.FunctionToolParamType? 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::tryAGI.OpenAI.FunctionToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1.g.cs new file mode 100644 index 00000000..06fe55c8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GrammarSyntax1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GrammarSyntax1 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::tryAGI.OpenAI.GrammarSyntax1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GrammarSyntax1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GrammarSyntax1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GrammarSyntax1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GrammarSyntax1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1Nullable.g.cs new file mode 100644 index 00000000..7a89e707 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GrammarSyntax1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GrammarSyntax1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GrammarSyntax1? 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::tryAGI.OpenAI.GrammarSyntax1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GrammarSyntax1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GrammarSyntax1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GrammarSyntax1? 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::tryAGI.OpenAI.GrammarSyntax1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObject.g.cs new file mode 100644 index 00000000..242e765e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupDeletedResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupDeletedResourceObject 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::tryAGI.OpenAI.GroupDeletedResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupDeletedResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupDeletedResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupDeletedResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectNullable.g.cs new file mode 100644 index 00000000..a2e56b69 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupDeletedResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupDeletedResourceObject? 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::tryAGI.OpenAI.GroupDeletedResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupDeletedResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupDeletedResourceObject? 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::tryAGI.OpenAI.GroupDeletedResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObject.g.cs new file mode 100644 index 00000000..6386cc10 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupListResourceObject 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::tryAGI.OpenAI.GroupListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObjectNullable.g.cs new file mode 100644 index 00000000..f23f6f90 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupListResourceObject? 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::tryAGI.OpenAI.GroupListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupListResourceObject? 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::tryAGI.OpenAI.GroupListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObject.g.cs new file mode 100644 index 00000000..66dbd5cb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupObject 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::tryAGI.OpenAI.GroupObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObjectNullable.g.cs new file mode 100644 index 00000000..e97e5535 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupObject? 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::tryAGI.OpenAI.GroupObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupObject? 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::tryAGI.OpenAI.GroupObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObject.g.cs new file mode 100644 index 00000000..abaae00e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupRoleAssignmentObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupRoleAssignmentObject 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::tryAGI.OpenAI.GroupRoleAssignmentObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupRoleAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupRoleAssignmentObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupRoleAssignmentObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupRoleAssignmentObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectNullable.g.cs new file mode 100644 index 00000000..a7797124 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupRoleAssignmentObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupRoleAssignmentObject? 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::tryAGI.OpenAI.GroupRoleAssignmentObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupRoleAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupRoleAssignmentObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupRoleAssignmentObject? 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::tryAGI.OpenAI.GroupRoleAssignmentObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObject.g.cs new file mode 100644 index 00000000..811a12fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupUserAssignmentObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupUserAssignmentObject 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::tryAGI.OpenAI.GroupUserAssignmentObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupUserAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupUserAssignmentObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupUserAssignmentObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupUserAssignmentObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectNullable.g.cs new file mode 100644 index 00000000..48af0107 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupUserAssignmentObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupUserAssignmentObject? 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::tryAGI.OpenAI.GroupUserAssignmentObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupUserAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupUserAssignmentObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupUserAssignmentObject? 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::tryAGI.OpenAI.GroupUserAssignmentObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObject.g.cs new file mode 100644 index 00000000..bd4499e6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupUserDeletedResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupUserDeletedResourceObject 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::tryAGI.OpenAI.GroupUserDeletedResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupUserDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupUserDeletedResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupUserDeletedResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.GroupUserDeletedResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectNullable.g.cs new file mode 100644 index 00000000..ad19a543 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class GroupUserDeletedResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.GroupUserDeletedResourceObject? 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::tryAGI.OpenAI.GroupUserDeletedResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.GroupUserDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.GroupUserDeletedResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.GroupUserDeletedResourceObject? 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::tryAGI.OpenAI.GroupUserDeletedResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageEditStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageEditStreamEvent.g.cs index a24fc365..18d5342e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageEditStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageEditStreamEvent.g.cs @@ -17,41 +17,41 @@ public class ImageEditStreamEventJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.ImageEditPartialImageEvent? partial = default; + global::tryAGI.OpenAI.ImageEditPartialImageEvent? imageEditPartialImage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent).Name}"); - partial = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageEditPartialImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ImageEditCompletedEvent? completed = default; + global::tryAGI.OpenAI.ImageEditCompletedEvent? imageEditCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent).Name}"); - completed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageEditCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ImageEditStreamEvent( - partial, - completed + imageEditPartialImage, + imageEditCompleted ); - if (partial != null) + if (imageEditPartialImage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (completed != null) + else if (imageEditCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent).Name}"); @@ -70,17 +70,17 @@ 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.IsPartial) + if (value.IsImageEditPartialImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Partial, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageEditPartialImage, typeInfo); } - else if (value.IsCompleted) + else if (value.IsImageEditCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Completed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageEditCompleted, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnum.g.cs new file mode 100644 index 00000000..e6829116 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ImageGenActionEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ImageGenActionEnum 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::tryAGI.OpenAI.ImageGenActionEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ImageGenActionEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ImageGenActionEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ImageGenActionEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ImageGenActionEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnumNullable.g.cs new file mode 100644 index 00000000..d56557a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenActionEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ImageGenActionEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ImageGenActionEnum? 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::tryAGI.OpenAI.ImageGenActionEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ImageGenActionEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ImageGenActionEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ImageGenActionEnum? 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::tryAGI.OpenAI.ImageGenActionEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenStreamEvent.g.cs index 8fd92a70..a4eb0b97 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageGenStreamEvent.g.cs @@ -17,41 +17,41 @@ public class ImageGenStreamEventJsonConverter : global::System.Text.Json.Seriali var readerCopy = reader; - global::tryAGI.OpenAI.ImageGenPartialImageEvent? partial = default; + global::tryAGI.OpenAI.ImageGenPartialImageEvent? imageGenerationPartialImage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent).Name}"); - partial = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationPartialImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenCompletedEvent? completed = default; + global::tryAGI.OpenAI.ImageGenCompletedEvent? imageGenerationCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent).Name}"); - completed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ImageGenStreamEvent( - partial, - completed + imageGenerationPartialImage, + imageGenerationCompleted ); - if (partial != null) + if (imageGenerationPartialImage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (completed != null) + else if (imageGenerationCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent).Name}"); @@ -70,17 +70,17 @@ 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.IsPartial) + if (value.IsImageGenerationPartialImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Partial, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationPartialImage, typeInfo); } - else if (value.IsCompleted) + else if (value.IsImageGenerationCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Completed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCompleted, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelity.g.cs deleted file mode 100644 index 9faf0fe3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelity.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ImageInputFidelityJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ImageInputFidelity 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::tryAGI.OpenAI.ImageInputFidelityExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ImageInputFidelity)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ImageInputFidelity); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ImageInputFidelity value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ImageInputFidelityExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelityNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelityNullable.g.cs deleted file mode 100644 index 48dc750c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageInputFidelityNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ImageInputFidelityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ImageInputFidelity? 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::tryAGI.OpenAI.ImageInputFidelityExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ImageInputFidelity)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ImageInputFidelity?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ImageInputFidelity? 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::tryAGI.OpenAI.ImageInputFidelityExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Includable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Includable.g.cs deleted file mode 100644 index 402c4310..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Includable.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class IncludableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Includable 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::tryAGI.OpenAI.IncludableExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.Includable)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.Includable); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Includable value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.IncludableExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludableNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludableNullable.g.cs deleted file mode 100644 index 9eb31c84..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludableNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class IncludableNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Includable? 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::tryAGI.OpenAI.IncludableExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.Includable)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.Includable?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Includable? 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::tryAGI.OpenAI.IncludableExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnum.g.cs new file mode 100644 index 00000000..0bc1e295 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class IncludeEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.IncludeEnum 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::tryAGI.OpenAI.IncludeEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.IncludeEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.IncludeEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.IncludeEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.IncludeEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnumNullable.g.cs new file mode 100644 index 00000000..9175d9d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IncludeEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class IncludeEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.IncludeEnum? 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::tryAGI.OpenAI.IncludeEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.IncludeEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.IncludeEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.IncludeEnum? 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::tryAGI.OpenAI.IncludeEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamType.g.cs new file mode 100644 index 00000000..845e671e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillParamType 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::tryAGI.OpenAI.InlineSkillParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InlineSkillParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeNullable.g.cs new file mode 100644 index 00000000..2fd9ace1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillParamType? 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::tryAGI.OpenAI.InlineSkillParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillParamType? 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::tryAGI.OpenAI.InlineSkillParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaType.g.cs new file mode 100644 index 00000000..4c547a92 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillSourceParamMediaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillSourceParamMediaType 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::tryAGI.OpenAI.InlineSkillSourceParamMediaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillSourceParamMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillSourceParamMediaType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillSourceParamMediaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InlineSkillSourceParamMediaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeNullable.g.cs new file mode 100644 index 00000000..94fb32ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillSourceParamMediaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillSourceParamMediaType? 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::tryAGI.OpenAI.InlineSkillSourceParamMediaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillSourceParamMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillSourceParamMediaType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillSourceParamMediaType? 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::tryAGI.OpenAI.InlineSkillSourceParamMediaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamType.g.cs new file mode 100644 index 00000000..6bfadfb5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillSourceParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillSourceParamType 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::tryAGI.OpenAI.InlineSkillSourceParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillSourceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillSourceParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillSourceParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InlineSkillSourceParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeNullable.g.cs new file mode 100644 index 00000000..afd5adf2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InlineSkillSourceParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InlineSkillSourceParamType? 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::tryAGI.OpenAI.InlineSkillSourceParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InlineSkillSourceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InlineSkillSourceParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InlineSkillSourceParamType? 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::tryAGI.OpenAI.InlineSkillSourceParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputContent.g.cs index 9d644802..47a7a815 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputContent.g.cs @@ -17,84 +17,65 @@ public class InputContentJsonConverter : global::System.Text.Json.Serialization. var readerCopy = reader; - global::tryAGI.OpenAI.InputTextContent? text = default; + global::tryAGI.OpenAI.InputTextContent? inputText = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.InputImageContent? image = default; + global::tryAGI.OpenAI.InputImageContent? inputImage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.InputFileContent? file = default; + global::tryAGI.OpenAI.InputFileContent? inputFile = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); - file = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.InputAudio? audio = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); - audio = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + inputFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.InputContent( - text, - image, - file, - audio + inputText, + inputImage, + inputFile ); - if (text != null) + if (inputText != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (image != null) + else if (inputImage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (file != null) + else if (inputFile != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audio != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } return result; } @@ -108,29 +89,23 @@ 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.IsText) + if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); } - else if (value.IsImage) + else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); } - else if (value.IsFile) + else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.File, typeInfo); - } - else if (value.IsAudio) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputAudio).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Audio, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelity.g.cs new file mode 100644 index 00000000..1fa51f28 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelity.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputFidelityJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputFidelity 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::tryAGI.OpenAI.InputFidelityExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputFidelity)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputFidelity); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputFidelity value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InputFidelityExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelityNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelityNullable.g.cs new file mode 100644 index 00000000..b74e06c6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFidelityNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputFidelityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputFidelity? 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::tryAGI.OpenAI.InputFidelityExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputFidelity)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputFidelity?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputFidelity? 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::tryAGI.OpenAI.InputFidelityExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamType.g.cs new file mode 100644 index 00000000..66473691 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputFileContentParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputFileContentParamType 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::tryAGI.OpenAI.InputFileContentParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputFileContentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputFileContentParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputFileContentParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InputFileContentParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeNullable.g.cs new file mode 100644 index 00000000..97b60195 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputFileContentParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputFileContentParamType? 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::tryAGI.OpenAI.InputFileContentParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputFileContentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputFileContentParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputFileContentParamType? 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::tryAGI.OpenAI.InputFileContentParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamType.g.cs new file mode 100644 index 00000000..8fb8bcf6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputImageContentParamAutoParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputImageContentParamAutoParamType 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::tryAGI.OpenAI.InputImageContentParamAutoParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputImageContentParamAutoParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputImageContentParamAutoParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputImageContentParamAutoParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InputImageContentParamAutoParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeNullable.g.cs new file mode 100644 index 00000000..48e4cad9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputImageContentParamAutoParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputImageContentParamAutoParamType? 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::tryAGI.OpenAI.InputImageContentParamAutoParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputImageContentParamAutoParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputImageContentParamAutoParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputImageContentParamAutoParamType? 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::tryAGI.OpenAI.InputImageContentParamAutoParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputItem.g.cs index 490ebd58..4636eca9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputItem.g.cs @@ -17,60 +17,60 @@ public class InputItemJsonConverter : global::System.Text.Json.Serialization.Jso var readerCopy = reader; - global::tryAGI.OpenAI.EasyInputMessage? value1 = default; + global::tryAGI.OpenAI.EasyInputMessage? message = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EasyInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EasyInputMessage).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + message = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.Item? value2 = default; + global::tryAGI.OpenAI.Item? item = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Item), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Item).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + item = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ItemReferenceParam? value3 = default; + global::tryAGI.OpenAI.ItemReferenceParam? itemReference = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ItemReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ItemReferenceParam).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + itemReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.InputItem( - value1, - value2, - value3 + message, + item, + itemReference ); - if (value1 != null) + if (message != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EasyInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EasyInputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (item != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Item), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Item).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (itemReference != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ItemReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ItemReferenceParam).Name}"); @@ -89,23 +89,23 @@ 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.IsValue1) + if (value.IsMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EasyInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EasyInputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeInfo); } - else if (value.IsValue2) + else if (value.IsItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Item), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Item).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Item, typeInfo); } - else if (value.IsValue3) + else if (value.IsItemReference) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ItemReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ItemReferenceParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ItemReference, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessageResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessageResource.g.cs index f183e9e3..796ca73a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessageResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessageResource.g.cs @@ -17,12 +17,12 @@ public class InputMessageResourceJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.InputMessage? value1 = default; + global::tryAGI.OpenAI.InputMessage? inputMessage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + inputMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class InputMessageResourceJsonConverter : global::System.Text.Json.Serial } var result = new global::tryAGI.OpenAI.InputMessageResource( - value1, + inputMessage, value2 ); - if (value1 != null) + if (inputMessage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); @@ -70,11 +70,11 @@ 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.IsValue1) + if (value.IsInputMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessage, typeInfo); } else if (value.IsValue2) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages.g.cs deleted file mode 100644 index 7efa864b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class InputMessagesJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.InputMessages 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.InputMessages( - value1, - value2 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.InputMessages 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages2.g.cs deleted file mode 100644 index 86344a7a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputMessages2.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class InputMessages2JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.InputMessages2 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.InputMessages2( - value1, - value2 - ); - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.InputMessages2 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputParam.g.cs new file mode 100644 index 00000000..b4d91cb4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputParam.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class InputParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputParam 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; + string? textInput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + textInput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::System.Collections.Generic.IList? inputItemList = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + inputItemList = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.InputParam( + textInput, + inputItemList + ); + + if (textInput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputItemList != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputParam 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.IsTextInput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextInput, typeInfo); + } + else if (value.IsInputItemList) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputItemList, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamType.g.cs new file mode 100644 index 00000000..0497d9ba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputTextContentParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputTextContentParamType 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::tryAGI.OpenAI.InputTextContentParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputTextContentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputTextContentParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputTextContentParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.InputTextContentParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeNullable.g.cs new file mode 100644 index 00000000..8119441f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class InputTextContentParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.InputTextContentParamType? 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::tryAGI.OpenAI.InputTextContentParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.InputTextContentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.InputTextContentParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.InputTextContentParamType? 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::tryAGI.OpenAI.InputTextContentParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputVariant3Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputVariant3Item.g.cs deleted file mode 100644 index d6579f10..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputVariant3Item.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class InputVariant3ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.ModerationImageURLInput? moderationImageURL = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationImageURLInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationImageURLInput).Name}"); - moderationImageURL = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ModerationTextInput? moderationText = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationTextInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationTextInput).Name}"); - moderationText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.InputVariant3Item( - moderationImageURL, - moderationText - ); - - if (moderationImageURL != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationImageURLInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationImageURLInput).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (moderationText != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationTextInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationTextInput).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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.IsModerationImageURL) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationImageURLInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationImageURLInput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ModerationImageURL, typeInfo); - } - else if (value.IsModerationText) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModerationTextInput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModerationTextInput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ModerationText, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IntegrationsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IntegrationsItem.g.cs deleted file mode 100644 index c2d73882..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.IntegrationsItem.g.cs +++ /dev/null @@ -1,62 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class IntegrationsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.IntegrationsItem 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::tryAGI.OpenAI.FineTuningIntegration? fineTuningIntegration = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuningIntegration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuningIntegration).Name}"); - fineTuningIntegration = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.IntegrationsItem( - fineTuningIntegration - ); - - if (fineTuningIntegration != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuningIntegration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuningIntegration).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.IntegrationsItem 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.IsFineTuningIntegration) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FineTuningIntegration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FineTuningIntegration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FineTuningIntegration, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Item.g.cs index 278665ea..7ca16830 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Item.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Item.g.cs @@ -17,96 +17,120 @@ public class ItemJsonConverter : global::System.Text.Json.Serialization.JsonConv var readerCopy = reader; - global::tryAGI.OpenAI.InputMessage? inputMessage = default; + global::tryAGI.OpenAI.InputMessage? message1 = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); - inputMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + message1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.OutputMessage? outputMessage = default; + global::tryAGI.OpenAI.OutputMessage? message2 = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); - outputMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + message2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall = default; + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - fileSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall = default; + global::tryAGI.OpenAI.ComputerToolCall? computerCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - computerToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ComputerCallOutputItemParam? computerCallOutputParam = default; + global::tryAGI.OpenAI.ComputerCallOutputItemParam? computerCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam).Name}"); - computerCallOutputParam = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall = default; + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - webSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + webSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.FunctionToolCall? functionToolCall = default; + global::tryAGI.OpenAI.FunctionToolCall? functionCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - functionToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.FunctionCallOutputItemParam? functionCallOutputParam = default; + global::tryAGI.OpenAI.FunctionCallOutputItemParam? functionCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam).Name}"); - functionCallOutputParam = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchCallItemParam? toolSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam).Name}"); + toolSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchOutputItemParam? toolSearchOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam).Name}"); + toolSearchOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -125,96 +149,156 @@ public class ItemJsonConverter : global::System.Text.Json.Serialization.JsonConv } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall = default; + global::tryAGI.OpenAI.CompactionSummaryItemParam? compaction = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam).Name}"); + compaction = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - imageGenToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall = default; + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - codeInterpreterToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + codeInterpreterCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall = default; + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - localShellToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput = default; + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - localShellToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallItemParam? shellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam).Name}"); + shellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPListTools? mCPListTools = default; + global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? shellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam).Name}"); + shellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? applyPatchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam).Name}"); + applyPatchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? applyPatchCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam).Name}"); + applyPatchCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPListTools? mcpListTools = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - mCPListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest = default; + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - mCPApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalResponse? mCPApprovalResponse = default; + global::tryAGI.OpenAI.MCPApprovalResponse? mcpApprovalResponse = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponse).Name}"); - mCPApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall = default; + global::tryAGI.OpenAI.MCPToolCall? mcpCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - mCPToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -245,124 +329,173 @@ public class ItemJsonConverter : global::System.Text.Json.Serialization.JsonConv } var result = new global::tryAGI.OpenAI.Item( - inputMessage, - outputMessage, - fileSearchToolCall, - computerToolCall, - computerCallOutputParam, - webSearchToolCall, - functionToolCall, - functionCallOutputParam, + message1, + message2, + fileSearchCall, + computerCall, + computerCallOutput, + webSearchCall, + functionCall, + functionCallOutput, + toolSearchCall, + toolSearchOutput, reasoning, - imageGenToolCall, - codeInterpreterToolCall, - localShellToolCall, - localShellToolCallOutput, - mCPListTools, - mCPApprovalRequest, - mCPApprovalResponse, - mCPToolCall, + compaction, + imageGenerationCall, + codeInterpreterCall, + localShellCall, + localShellCallOutput, + shellCall, + shellCallOutput, + applyPatchCall, + applyPatchCallOutput, + mcpListTools, + mcpApprovalRequest, + mcpApprovalResponse, + mcpCall, customToolCallOutput, customToolCall ); - if (inputMessage != null) + if (message1 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputMessage != null) + else if (message2 != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchToolCall != null) + else if (fileSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (computerToolCall != null) + else if (computerCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (computerCallOutputParam != null) + else if (computerCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchToolCall != null) + else if (webSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (functionToolCall != null) + else if (functionCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (functionCallOutputParam != null) + else if (functionCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + else if (toolSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } else if (reasoning != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenToolCall != null) + else if (compaction != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (imageGenerationCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterToolCall != null) + else if (codeInterpreterCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCall != null) + else if (localShellCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCallOutput != null) + else if (localShellCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListTools != null) + else if (shellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpListTools != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalRequest != null) + else if (mcpApprovalRequest != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalResponse != null) + else if (mcpApprovalResponse != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponse).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPToolCall != null) + else if (mcpCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); @@ -393,53 +526,65 @@ 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.IsInputMessage) + if (value.IsMessage1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message1, typeInfo); } - else if (value.IsOutputMessage) + else if (value.IsMessage2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message2, typeInfo); } - else if (value.IsFileSearchToolCall) + else if (value.IsFileSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall, typeInfo); } - else if (value.IsComputerToolCall) + else if (value.IsComputerCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall, typeInfo); } - else if (value.IsComputerCallOutputParam) + else if (value.IsComputerCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCallOutputParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCallOutput, typeInfo); } - else if (value.IsWebSearchToolCall) + else if (value.IsWebSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall, typeInfo); } - else if (value.IsFunctionToolCall) + else if (value.IsFunctionCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCall, typeInfo); } - else if (value.IsFunctionCallOutputParam) + else if (value.IsFunctionCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutputParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutput, typeInfo); + } + else if (value.IsToolSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchCall, typeInfo); + } + else if (value.IsToolSearchOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchOutput, typeInfo); } else if (value.IsReasoning) { @@ -447,53 +592,83 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Reasoning, typeInfo); } - else if (value.IsImageGenToolCall) + else if (value.IsCompaction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Compaction, typeInfo); + } + else if (value.IsImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall, typeInfo); } - else if (value.IsCodeInterpreterToolCall) + else if (value.IsCodeInterpreterCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall, typeInfo); } - else if (value.IsLocalShellToolCall) + else if (value.IsLocalShellCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCall, typeInfo); } - else if (value.IsLocalShellToolCallOutput) + else if (value.IsLocalShellCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCallOutput, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallOutput, typeInfo); + } + else if (value.IsShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall, typeInfo); + } + else if (value.IsShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput, typeInfo); + } + else if (value.IsApplyPatchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall, typeInfo); + } + else if (value.IsApplyPatchCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutput, typeInfo); } - else if (value.IsMCPListTools) + else if (value.IsMcpListTools) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListTools, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListTools, typeInfo); } - else if (value.IsMCPApprovalRequest) + else if (value.IsMcpApprovalRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalRequest, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequest, typeInfo); } - else if (value.IsMCPApprovalResponse) + else if (value.IsMcpApprovalResponse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalResponse, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalResponse, typeInfo); } - else if (value.IsMCPToolCall) + else if (value.IsMcpCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCall, typeInfo); } else if (value.IsCustomToolCallOutput) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemField.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemField.g.cs new file mode 100644 index 00000000..c7923ccd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemField.g.cs @@ -0,0 +1,662 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ItemFieldJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ItemField 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::tryAGI.OpenAI.Message? message = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Message), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Message).Name}"); + message = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionToolCall? functionCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); + functionCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + toolSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + toolSearchOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionToolCallOutput? functionCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); + functionCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); + fileSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); + webSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); + imageGenerationCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ComputerToolCall? computerCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); + computerCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ComputerToolCallOutputResource? computerToolCallOutputResource = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); + computerToolCallOutputResource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ReasoningItem? reasoning = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); + reasoning = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CompactionBody? compaction = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + compaction = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); + codeInterpreterCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); + localShellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); + localShellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCall? shellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + shellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + shellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + applyPatchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + applyPatchCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPListTools? mcpListTools = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); + mcpListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); + mcpApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); + mcpApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPToolCall? mcpCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); + mcpCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CustomToolCall? customToolCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCall).Name}"); + customToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CustomToolCallOutput? customToolCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCallOutput).Name}"); + customToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ItemField( + message, + functionCall, + toolSearchCall, + toolSearchOutput, + functionCallOutput, + fileSearchCall, + webSearchCall, + imageGenerationCall, + computerCall, + computerToolCallOutputResource, + reasoning, + compaction, + codeInterpreterCall, + localShellCall, + localShellCallOutput, + shellCall, + shellCallOutput, + applyPatchCall, + applyPatchCallOutput, + mcpListTools, + mcpApprovalRequest, + mcpApprovalResponse, + mcpCall, + customToolCall, + customToolCallOutput + ); + + if (message != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Message), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Message).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (functionCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (functionCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (fileSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (webSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (imageGenerationCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (computerCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (computerToolCallOutputResource != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (reasoning != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (compaction != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (codeInterpreterCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (localShellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (localShellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpListTools != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpApprovalRequest != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpApprovalResponse != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (customToolCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (customToolCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ItemField 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.IsMessage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.Message), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.Message).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeInfo); + } + else if (value.IsFunctionCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCall, typeInfo); + } + else if (value.IsToolSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchCall, typeInfo); + } + else if (value.IsToolSearchOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchOutput, typeInfo); + } + else if (value.IsFunctionCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutput, typeInfo); + } + else if (value.IsFileSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall, typeInfo); + } + else if (value.IsWebSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall, typeInfo); + } + else if (value.IsImageGenerationCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall, typeInfo); + } + else if (value.IsComputerCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall, typeInfo); + } + else if (value.IsComputerToolCallOutputResource) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCallOutputResource, typeInfo); + } + else if (value.IsReasoning) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Reasoning, typeInfo); + } + else if (value.IsCompaction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Compaction, typeInfo); + } + else if (value.IsCodeInterpreterCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall, typeInfo); + } + else if (value.IsLocalShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCall, typeInfo); + } + else if (value.IsLocalShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallOutput, typeInfo); + } + else if (value.IsShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall, typeInfo); + } + else if (value.IsShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput, typeInfo); + } + else if (value.IsApplyPatchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall, typeInfo); + } + else if (value.IsApplyPatchCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutput, typeInfo); + } + else if (value.IsMcpListTools) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListTools, typeInfo); + } + else if (value.IsMcpApprovalRequest) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequest, typeInfo); + } + else if (value.IsMcpApprovalResponse) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalResponse, typeInfo); + } + else if (value.IsMcpCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCall, typeInfo); + } + else if (value.IsCustomToolCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCall, typeInfo); + } + else if (value.IsCustomToolCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallOutput, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType.g.cs deleted file mode 100644 index 834d283e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ItemReferenceParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ItemReferenceParamType 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::tryAGI.OpenAI.ItemReferenceParamTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ItemReferenceParamType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ItemReferenceParamType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ItemReferenceParamType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ItemReferenceParamTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2.g.cs new file mode 100644 index 00000000..cb93f6d2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ItemReferenceParamType2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ItemReferenceParamType2 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::tryAGI.OpenAI.ItemReferenceParamType2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ItemReferenceParamType2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ItemReferenceParamType2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ItemReferenceParamType2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ItemReferenceParamType2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2Nullable.g.cs new file mode 100644 index 00000000..22808197 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamType2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ItemReferenceParamType2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ItemReferenceParamType2? 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::tryAGI.OpenAI.ItemReferenceParamType2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ItemReferenceParamType2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ItemReferenceParamType2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ItemReferenceParamType2? 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::tryAGI.OpenAI.ItemReferenceParamType2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeNullable.g.cs deleted file mode 100644 index 8e6a2a68..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ItemReferenceParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ItemReferenceParamType? 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::tryAGI.OpenAI.ItemReferenceParamTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ItemReferenceParamType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ItemReferenceParamType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ItemReferenceParamType? 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::tryAGI.OpenAI.ItemReferenceParamTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemResource.g.cs index 53cc8033..5c652078 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ItemResource.g.cs @@ -29,36 +29,36 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. } readerCopy = reader; - global::tryAGI.OpenAI.OutputMessage? outputMessage = default; + global::tryAGI.OpenAI.OutputMessage? message = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); - outputMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + message = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall = default; + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - fileSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall = default; + global::tryAGI.OpenAI.ComputerToolCall? computerCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - computerToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -77,12 +77,12 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall = default; + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - webSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + webSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -113,96 +113,168 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall = default; + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + toolSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + toolSearchOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - imageGenToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall = default; + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - codeInterpreterToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + codeInterpreterCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall = default; + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - localShellToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput = default; + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - localShellToolCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCall? shellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + shellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + shellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + applyPatchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + applyPatchCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPListTools? mCPListTools = default; + global::tryAGI.OpenAI.MCPListTools? mcpListTools = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - mCPListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest = default; + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - mCPApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalResponseResource? mCPApprovalResponse = default; + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); - mCPApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalResponse = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall = default; + global::tryAGI.OpenAI.MCPToolCall? mcpCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - mCPToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -210,21 +282,27 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. var result = new global::tryAGI.OpenAI.ItemResource( inputMessage, - outputMessage, - fileSearchToolCall, - computerToolCall, + message, + fileSearchCall, + computerCall, computerToolCallOutput, - webSearchToolCall, + webSearchCall, functionToolCall, functionToolCallOutput, - imageGenToolCall, - codeInterpreterToolCall, - localShellToolCall, - localShellToolCallOutput, - mCPListTools, - mCPApprovalRequest, - mCPApprovalResponse, - mCPToolCall + toolSearchCall, + toolSearchOutput, + imageGenerationCall, + codeInterpreterCall, + localShellCall, + localShellCallOutput, + shellCall, + shellCallOutput, + applyPatchCall, + applyPatchCallOutput, + mcpListTools, + mcpApprovalRequest, + mcpApprovalResponse, + mcpCall ); if (inputMessage != null) @@ -233,19 +311,19 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessageResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputMessage != null) + else if (message != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchToolCall != null) + else if (fileSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (computerToolCall != null) + else if (computerCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); @@ -257,7 +335,7 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchToolCall != null) + else if (webSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); @@ -275,49 +353,85 @@ public class ItemResourceJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenToolCall != null) + else if (toolSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (imageGenerationCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterToolCall != null) + else if (codeInterpreterCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCall != null) + else if (localShellCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCallOutput != null) + else if (localShellCallOutput != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListTools != null) + else if (shellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpListTools != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalRequest != null) + else if (mcpApprovalRequest != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalResponse != null) + else if (mcpApprovalResponse != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPToolCall != null) + else if (mcpCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); @@ -342,23 +456,23 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputMessageResource).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessage, typeInfo); } - else if (value.IsOutputMessage) + else if (value.IsMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeInfo); } - else if (value.IsFileSearchToolCall) + else if (value.IsFileSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall, typeInfo); } - else if (value.IsComputerToolCall) + else if (value.IsComputerCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall, typeInfo); } else if (value.IsComputerToolCallOutput) { @@ -366,11 +480,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCallOutput, typeInfo); } - else if (value.IsWebSearchToolCall) + else if (value.IsWebSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall, typeInfo); } else if (value.IsFunctionToolCall) { @@ -384,53 +498,89 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCallOutput, typeInfo); } - else if (value.IsImageGenToolCall) + else if (value.IsToolSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchCall, typeInfo); + } + else if (value.IsToolSearchOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchOutput, typeInfo); + } + else if (value.IsImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall, typeInfo); } - else if (value.IsCodeInterpreterToolCall) + else if (value.IsCodeInterpreterCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall, typeInfo); } - else if (value.IsLocalShellToolCall) + else if (value.IsLocalShellCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCall, typeInfo); } - else if (value.IsLocalShellToolCallOutput) + else if (value.IsLocalShellCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCallOutput, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallOutput, typeInfo); + } + else if (value.IsShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall, typeInfo); + } + else if (value.IsShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput, typeInfo); + } + else if (value.IsApplyPatchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall, typeInfo); + } + else if (value.IsApplyPatchCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutput, typeInfo); } - else if (value.IsMCPListTools) + else if (value.IsMcpListTools) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListTools, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListTools, typeInfo); } - else if (value.IsMCPApprovalRequest) + else if (value.IsMcpApprovalRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalRequest, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequest, typeInfo); } - else if (value.IsMCPApprovalResponse) + else if (value.IsMcpApprovalResponse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalResponse, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalResponse, typeInfo); } - else if (value.IsMCPToolCall) + else if (value.IsMcpCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCall, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionType.g.cs new file mode 100644 index 00000000..71635d12 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class KeyPressActionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.KeyPressActionType 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::tryAGI.OpenAI.KeyPressActionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.KeyPressActionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.KeyPressActionType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.KeyPressActionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.KeyPressActionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionTypeNullable.g.cs new file mode 100644 index 00000000..baba3a97 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressActionTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class KeyPressActionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.KeyPressActionType? 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::tryAGI.OpenAI.KeyPressActionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.KeyPressActionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.KeyPressActionType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.KeyPressActionType? 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::tryAGI.OpenAI.KeyPressActionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressType.g.cs deleted file mode 100644 index b1a9615e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class KeyPressTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.KeyPressType 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::tryAGI.OpenAI.KeyPressTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.KeyPressType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.KeyPressType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.KeyPressType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.KeyPressTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressTypeNullable.g.cs deleted file mode 100644 index 1001fa3e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.KeyPressTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class KeyPressTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.KeyPressType? 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::tryAGI.OpenAI.KeyPressTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.KeyPressType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.KeyPressType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.KeyPressType? 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::tryAGI.OpenAI.KeyPressTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..2e3f870e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupRoleAssignmentsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder 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::tryAGI.OpenAI.ListGroupRoleAssignmentsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrderNullable.g.cs new file mode 100644 index 00000000..cc79b2a0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupRoleAssignmentsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupRoleAssignmentsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListGroupRoleAssignmentsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListGroupRoleAssignmentsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrder.g.cs new file mode 100644 index 00000000..bedf332a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupUsersOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupUsersOrder 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::tryAGI.OpenAI.ListGroupUsersOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupUsersOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupUsersOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupUsersOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListGroupUsersOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrderNullable.g.cs new file mode 100644 index 00000000..f875bd6b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupUsersOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupUsersOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupUsersOrder? 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::tryAGI.OpenAI.ListGroupUsersOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupUsersOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupUsersOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupUsersOrder? 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::tryAGI.OpenAI.ListGroupUsersOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrder.g.cs new file mode 100644 index 00000000..7e89a6eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupsOrder 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::tryAGI.OpenAI.ListGroupsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListGroupsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrderNullable.g.cs new file mode 100644 index 00000000..d3ffd938 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListGroupsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListGroupsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListGroupsOrder? 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::tryAGI.OpenAI.ListGroupsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListGroupsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListGroupsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListGroupsOrder? 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::tryAGI.OpenAI.ListGroupsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..2cae8f94 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectGroupRoleAssignmentsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder 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::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrderNullable.g.cs new file mode 100644 index 00000000..a47d7915 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupRoleAssignmentsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectGroupRoleAssignmentsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrder.g.cs new file mode 100644 index 00000000..a7787c7a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectGroupsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectGroupsOrder 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::tryAGI.OpenAI.ListProjectGroupsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectGroupsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectGroupsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectGroupsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListProjectGroupsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrderNullable.g.cs new file mode 100644 index 00000000..d19bbda1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectGroupsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectGroupsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectGroupsOrder? 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::tryAGI.OpenAI.ListProjectGroupsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectGroupsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectGroupsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectGroupsOrder? 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::tryAGI.OpenAI.ListProjectGroupsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrder.g.cs new file mode 100644 index 00000000..e749fae6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectRolesOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectRolesOrder 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::tryAGI.OpenAI.ListProjectRolesOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectRolesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectRolesOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectRolesOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListProjectRolesOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrderNullable.g.cs new file mode 100644 index 00000000..db3e8b0e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectRolesOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectRolesOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectRolesOrder? 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::tryAGI.OpenAI.ListProjectRolesOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectRolesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectRolesOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectRolesOrder? 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::tryAGI.OpenAI.ListProjectRolesOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..59c7d2d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectUserRoleAssignmentsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder 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::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrderNullable.g.cs new file mode 100644 index 00000000..08624529 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListProjectUserRoleAssignmentsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListProjectUserRoleAssignmentsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrder.g.cs new file mode 100644 index 00000000..a9f8de65 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListRolesOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListRolesOrder 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::tryAGI.OpenAI.ListRolesOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListRolesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListRolesOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListRolesOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListRolesOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrderNullable.g.cs new file mode 100644 index 00000000..55c0c338 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListRolesOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListRolesOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListRolesOrder? 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::tryAGI.OpenAI.ListRolesOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListRolesOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListRolesOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListRolesOrder? 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::tryAGI.OpenAI.ListRolesOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..5befd177 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrder.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListUserRoleAssignmentsOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder 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::tryAGI.OpenAI.ListUserRoleAssignmentsOrderExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ListUserRoleAssignmentsOrderExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrderNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrderNullable.g.cs new file mode 100644 index 00000000..e194c188 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ListUserRoleAssignmentsOrderNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ListUserRoleAssignmentsOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListUserRoleAssignmentsOrderExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? 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::tryAGI.OpenAI.ListUserRoleAssignmentsOrderExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamType.g.cs new file mode 100644 index 00000000..bf88a982 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalEnvironmentParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalEnvironmentParamType 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::tryAGI.OpenAI.LocalEnvironmentParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalEnvironmentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalEnvironmentParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalEnvironmentParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalEnvironmentParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeNullable.g.cs new file mode 100644 index 00000000..6b3bc9b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalEnvironmentParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalEnvironmentParamType? 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::tryAGI.OpenAI.LocalEnvironmentParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalEnvironmentParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalEnvironmentParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalEnvironmentParamType? 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::tryAGI.OpenAI.LocalEnvironmentParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceType.g.cs new file mode 100644 index 00000000..63288716 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalEnvironmentResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalEnvironmentResourceType 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::tryAGI.OpenAI.LocalEnvironmentResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalEnvironmentResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalEnvironmentResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalEnvironmentResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalEnvironmentResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeNullable.g.cs new file mode 100644 index 00000000..391243dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalEnvironmentResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalEnvironmentResourceType? 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::tryAGI.OpenAI.LocalEnvironmentResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalEnvironmentResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalEnvironmentResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalEnvironmentResourceType? 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::tryAGI.OpenAI.LocalEnvironmentResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnum.g.cs new file mode 100644 index 00000000..d709158d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellCallOutputStatusEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum 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::tryAGI.OpenAI.LocalShellCallOutputStatusEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellCallOutputStatusEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumNullable.g.cs new file mode 100644 index 00000000..117851de --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellCallOutputStatusEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum? 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::tryAGI.OpenAI.LocalShellCallOutputStatusEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum? 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::tryAGI.OpenAI.LocalShellCallOutputStatusEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatus.g.cs new file mode 100644 index 00000000..4b4f81be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellCallStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellCallStatus 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::tryAGI.OpenAI.LocalShellCallStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellCallStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellCallStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellCallStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatusNullable.g.cs new file mode 100644 index 00000000..f76a781e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellCallStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellCallStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellCallStatus? 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::tryAGI.OpenAI.LocalShellCallStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellCallStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellCallStatus? 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::tryAGI.OpenAI.LocalShellCallStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus.g.cs deleted file mode 100644 index cf531553..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class LocalShellToolCallOutputStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.LocalShellToolCallOutputStatus 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::tryAGI.OpenAI.LocalShellToolCallOutputStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.LocalShellToolCallOutputStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.LocalShellToolCallOutputStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellToolCallOutputStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2.g.cs new file mode 100644 index 00000000..52b5de8e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellToolCallOutputStatus2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2 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::tryAGI.OpenAI.LocalShellToolCallOutputStatus2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2Nullable.g.cs new file mode 100644 index 00000000..aa81e0d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatus2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellToolCallOutputStatus2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2? 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::tryAGI.OpenAI.LocalShellToolCallOutputStatus2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2? 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::tryAGI.OpenAI.LocalShellToolCallOutputStatus2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusNullable.g.cs deleted file mode 100644 index 51193163..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class LocalShellToolCallOutputStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.LocalShellToolCallOutputStatus? 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::tryAGI.OpenAI.LocalShellToolCallOutputStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.LocalShellToolCallOutputStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.LocalShellToolCallOutputStatus? 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::tryAGI.OpenAI.LocalShellToolCallOutputStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamType.g.cs new file mode 100644 index 00000000..8138f684 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellToolParamType 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::tryAGI.OpenAI.LocalShellToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeNullable.g.cs new file mode 100644 index 00000000..a3b72ea2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LocalShellToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LocalShellToolParamType? 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::tryAGI.OpenAI.LocalShellToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LocalShellToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LocalShellToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LocalShellToolParamType? 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::tryAGI.OpenAI.LocalShellToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolType.g.cs deleted file mode 100644 index 43deacaa..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class LocalShellToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.LocalShellToolType 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::tryAGI.OpenAI.LocalShellToolTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.LocalShellToolType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.LocalShellToolType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.LocalShellToolType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.LocalShellToolTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolTypeNullable.g.cs deleted file mode 100644 index 3db8d960..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LocalShellToolTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class LocalShellToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.LocalShellToolType? 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::tryAGI.OpenAI.LocalShellToolTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.LocalShellToolType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.LocalShellToolType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.LocalShellToolType? 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::tryAGI.OpenAI.LocalShellToolTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusType.g.cs new file mode 100644 index 00000000..5d1a31a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LockedStatusTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LockedStatusType 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::tryAGI.OpenAI.LockedStatusTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LockedStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LockedStatusType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LockedStatusType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.LockedStatusTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusTypeNullable.g.cs new file mode 100644 index 00000000..2914b70f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.LockedStatusTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class LockedStatusTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.LockedStatusType? 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::tryAGI.OpenAI.LockedStatusTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.LockedStatusType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.LockedStatusType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.LockedStatusType? 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::tryAGI.OpenAI.LockedStatusTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatus.g.cs new file mode 100644 index 00000000..7d8ca919 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MCPToolCallStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MCPToolCallStatus 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::tryAGI.OpenAI.MCPToolCallStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MCPToolCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MCPToolCallStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MCPToolCallStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.MCPToolCallStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatusNullable.g.cs new file mode 100644 index 00000000..e795f25e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolCallStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MCPToolCallStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MCPToolCallStatus? 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::tryAGI.OpenAI.MCPToolCallStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MCPToolCallStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MCPToolCallStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MCPToolCallStatus? 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::tryAGI.OpenAI.MCPToolCallStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2.g.cs new file mode 100644 index 00000000..9cafc943 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MCPToolRequireApprovalVariant1Enum2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2 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::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2Nullable.g.cs new file mode 100644 index 00000000..5b263e07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MCPToolRequireApprovalVariant1Enum2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MCPToolRequireApprovalVariant1Enum2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2? 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::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2? 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::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContent.g.cs deleted file mode 100644 index 326d581a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContent.g.cs +++ /dev/null @@ -1,137 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class MessageContentJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.MessageContent 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::tryAGI.OpenAI.MessageContentImageFileObject? imageFileObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - imageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageContentImageUrlObject? imageUrlObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - imageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageContentTextObject? textObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextObject).Name}"); - textObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageContentRefusalObject? refusalObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentRefusalObject).Name}"); - refusalObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.MessageContent( - imageFileObject, - imageUrlObject, - textObject, - refusalObject - ); - - if (imageFileObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (imageUrlObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (textObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (refusalObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentRefusalObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.MessageContent 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.IsImageFileObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageFileObject, typeInfo); - } - else if (value.IsImageUrlObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrlObject, typeInfo); - } - else if (value.IsTextObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextObject, typeInfo); - } - else if (value.IsRefusalObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentRefusalObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RefusalObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContentDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContentDelta.g.cs deleted file mode 100644 index db66c31a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessageContentDelta.g.cs +++ /dev/null @@ -1,137 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class MessageContentDeltaJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.MessageContentDelta 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::tryAGI.OpenAI.MessageDeltaContentImageFileObject? imageFileObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject).Name}"); - imageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageDeltaContentTextObject? textObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject).Name}"); - textObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? refusalObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject).Name}"); - refusalObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? imageUrlObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject).Name}"); - imageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.MessageContentDelta( - imageFileObject, - textObject, - refusalObject, - imageUrlObject - ); - - if (imageFileObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (textObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (refusalObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (imageUrlObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.MessageContentDelta 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.IsImageFileObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageFileObject, typeInfo); - } - else if (value.IsTextObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextObject, typeInfo); - } - else if (value.IsRefusalObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RefusalObject, typeInfo); - } - else if (value.IsImageUrlObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrlObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhase.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhase.g.cs new file mode 100644 index 00000000..5b8559c4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhase.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MessagePhaseJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MessagePhase 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::tryAGI.OpenAI.MessagePhaseExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MessagePhase)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MessagePhase); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MessagePhase value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.MessagePhaseExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhaseNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhaseNullable.g.cs new file mode 100644 index 00000000..a6306321 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MessagePhaseNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MessagePhaseNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MessagePhase? 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::tryAGI.OpenAI.MessagePhaseExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MessagePhase)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MessagePhase?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MessagePhase? 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::tryAGI.OpenAI.MessagePhaseExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsCompaction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsCompaction.g.cs new file mode 100644 index 00000000..9b5f4a7a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsCompaction.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ModelIdsCompactionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ModelIdsCompaction 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::tryAGI.OpenAI.ModelIdsResponses? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsResponses), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponses).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + string? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + object? value3 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ModelIdsCompaction( + value1, + value2, + value3 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsResponses), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponses).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value3 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ModelIdsCompaction 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::tryAGI.OpenAI.ModelIdsResponses), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponses).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + else if (value.IsValue3) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsResponses.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsResponses.g.cs index 72ea353d..1d034807 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsResponses.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsResponses.g.cs @@ -29,12 +29,12 @@ public class ModelIdsResponsesJsonConverter : global::System.Text.Json.Serializa } readerCopy = reader; - global::tryAGI.OpenAI.ModelIdsResponsesEnum? value2 = default; + global::tryAGI.OpenAI.ModelIdsResponsesEnum? responsesOnlyModel = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responsesOnlyModel = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -42,7 +42,7 @@ public class ModelIdsResponsesJsonConverter : global::System.Text.Json.Serializa var result = new global::tryAGI.OpenAI.ModelIdsResponses( value1, - value2 + responsesOnlyModel ); if (value1 != null) @@ -51,7 +51,7 @@ public class ModelIdsResponsesJsonConverter : global::System.Text.Json.Serializa throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsShared).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (responsesOnlyModel != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum).Name}"); @@ -76,11 +76,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsShared).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); } - else if (value.IsValue2) + else if (value.IsResponsesOnlyModel) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesOnlyModel, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsShared.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsShared.g.cs index 27e5a218..e58dd4c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsShared.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsShared.g.cs @@ -29,11 +29,11 @@ public class ModelIdsSharedJsonConverter : global::System.Text.Json.Serializatio } readerCopy = reader; - global::tryAGI.OpenAI.ChatModel? value2 = default; + global::tryAGI.OpenAI.ModelIdsSharedEnum? value2 = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatModel).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum).Name}"); value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -53,8 +53,8 @@ public class ModelIdsSharedJsonConverter : global::System.Text.Json.Serializatio } else if (value2 != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatModel).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -78,8 +78,8 @@ public override void Write( } else if (value.IsValue2) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatModel).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnum.g.cs new file mode 100644 index 00000000..2b785f90 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ModelIdsSharedEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ModelIdsSharedEnum 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::tryAGI.OpenAI.ModelIdsSharedEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ModelIdsSharedEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ModelIdsSharedEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ModelIdsSharedEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ModelIdsSharedEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnumNullable.g.cs new file mode 100644 index 00000000..71c6f3d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelIdsSharedEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ModelIdsSharedEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ModelIdsSharedEnum? 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::tryAGI.OpenAI.ModelIdsSharedEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ModelIdsSharedEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ModelIdsSharedEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ModelIdsSharedEnum? 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::tryAGI.OpenAI.ModelIdsSharedEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2.g.cs new file mode 100644 index 00000000..ab27c0d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ModelResponsePropertiesPromptCacheRetention2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2 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::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2Nullable.g.cs new file mode 100644 index 00000000..4fbd2fb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModelResponsePropertiesPromptCacheRetention2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ModelResponsePropertiesPromptCacheRetention2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2? 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::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2? 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::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputType.g.cs deleted file mode 100644 index 7a0557a6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ModerationImageURLInputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ModerationImageURLInputType 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::tryAGI.OpenAI.ModerationImageURLInputTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ModerationImageURLInputType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ModerationImageURLInputType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ModerationImageURLInputType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ModerationImageURLInputTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeNullable.g.cs deleted file mode 100644 index 4e772a6f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ModerationImageURLInputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ModerationImageURLInputType? 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::tryAGI.OpenAI.ModerationImageURLInputTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ModerationImageURLInputType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ModerationImageURLInputType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ModerationImageURLInputType? 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::tryAGI.OpenAI.ModerationImageURLInputTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputType.g.cs deleted file mode 100644 index cfce30d6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ModerationTextInputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ModerationTextInputType 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::tryAGI.OpenAI.ModerationTextInputTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ModerationTextInputType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ModerationTextInputType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ModerationTextInputType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ModerationTextInputTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeNullable.g.cs deleted file mode 100644 index ae29818f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ModerationTextInputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ModerationTextInputType? 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::tryAGI.OpenAI.ModerationTextInputTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ModerationTextInputType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ModerationTextInputType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ModerationTextInputType? 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::tryAGI.OpenAI.ModerationTextInputTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamType.g.cs new file mode 100644 index 00000000..c89ce8c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MoveParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MoveParamType 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::tryAGI.OpenAI.MoveParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MoveParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MoveParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MoveParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.MoveParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamTypeNullable.g.cs new file mode 100644 index 00000000..083d7386 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class MoveParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.MoveParamType? 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::tryAGI.OpenAI.MoveParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.MoveParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.MoveParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.MoveParamType? 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::tryAGI.OpenAI.MoveParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveType.g.cs deleted file mode 100644 index afe9b9ee..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class MoveTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.MoveType 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::tryAGI.OpenAI.MoveTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.MoveType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.MoveType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.MoveType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.MoveTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveTypeNullable.g.cs deleted file mode 100644 index 13f78543..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.MoveTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class MoveTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.MoveType? 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::tryAGI.OpenAI.MoveTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.MoveType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.MoveType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.MoveType? 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::tryAGI.OpenAI.MoveTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamType.g.cs new file mode 100644 index 00000000..287e99c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class NamespaceToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.NamespaceToolParamType 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::tryAGI.OpenAI.NamespaceToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.NamespaceToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.NamespaceToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.NamespaceToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.NamespaceToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeNullable.g.cs new file mode 100644 index 00000000..88de0e8a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class NamespaceToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.NamespaceToolParamType? 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::tryAGI.OpenAI.NamespaceToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.NamespaceToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.NamespaceToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.NamespaceToolParamType? 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::tryAGI.OpenAI.NamespaceToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy.g.cs new file mode 100644 index 00000000..16a6859f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class NetworkPolicyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.NetworkPolicy 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + disabled = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + allowlist = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.NetworkPolicy( + disabled, + allowlist + ); + + if (disabled != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (allowlist != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.NetworkPolicy 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.IsDisabled) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Disabled, typeInfo); + } + else if (value.IsAllowlist) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Allowlist, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy2.g.cs new file mode 100644 index 00000000..aeb2a0fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy2.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class NetworkPolicy2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.NetworkPolicy2 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + disabled = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + allowlist = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.NetworkPolicy2( + disabled, + allowlist + ); + + if (disabled != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (allowlist != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.NetworkPolicy2 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.IsDisabled) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Disabled, typeInfo); + } + else if (value.IsAllowlist) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Allowlist, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy3.g.cs new file mode 100644 index 00000000..2daec3b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.NetworkPolicy3.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class NetworkPolicy3JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.NetworkPolicy3 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + disabled = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + allowlist = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.NetworkPolicy3( + disabled, + allowlist + ); + + if (disabled != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (allowlist != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.NetworkPolicy3 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.IsDisabled) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Disabled, typeInfo); + } + else if (value.IsAllowlist) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Allowlist, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf3.g.cs new file mode 100644 index 00000000..fcd7dd2f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf3.g.cs @@ -0,0 +1,111 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::tryAGI.OpenAI.OneOf 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; + T1? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T3? value3 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OneOf( + value1, + value2, + value3 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value3 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OneOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + else if (value.IsValue3) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf4.g.cs new file mode 100644 index 00000000..b9073925 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf4.g.cs @@ -0,0 +1,136 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::tryAGI.OpenAI.OneOf 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; + T1? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T3? value3 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T4? value4 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OneOf( + value1, + value2, + value3, + value4 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value3 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value4 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OneOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + else if (value.IsValue3) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + } + else if (value.IsValue4) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf5.g.cs new file mode 100644 index 00000000..8bd7d073 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf5.g.cs @@ -0,0 +1,161 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::tryAGI.OpenAI.OneOf 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; + T1? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T3? value3 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T4? value4 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T5? value5 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OneOf( + value1, + value2, + value3, + value4, + value5 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value3 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value4 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value5 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OneOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + else if (value.IsValue3) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + } + else if (value.IsValue4) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + } + else if (value.IsValue5) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf9.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf9.g.cs new file mode 100644 index 00000000..7f9e34a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OneOf9.g.cs @@ -0,0 +1,261 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::tryAGI.OpenAI.OneOf 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; + T1? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T3? value3 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T4? value4 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T5? value5 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T6? value6 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T7? value7 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + value7 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T8? value8 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T8).Name}"); + value8 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T9? value9 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T9).Name}"); + value9 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OneOf( + value1, + value2, + value3, + value4, + value5, + value6, + value7, + value8, + value9 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value3 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value4 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value5 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value6 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value7 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value8 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T8).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value9 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T9).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OneOf 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(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + else if (value.IsValue3) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + } + else if (value.IsValue4) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + } + else if (value.IsValue5) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); + } + else if (value.IsValue6) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); + } + else if (value.IsValue7) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); + } + else if (value.IsValue8) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T8).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8, typeInfo); + } + else if (value.IsValue9) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T9).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Operation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Operation.g.cs new file mode 100644 index 00000000..8b7d0ee6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Operation.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OperationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.Operation 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::tryAGI.OpenAI.ApplyPatchCreateFileOperation? createFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation).Name}"); + createFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? deleteFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation).Name}"); + deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? updateFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation).Name}"); + updateFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.Operation( + createFile, + deleteFile, + updateFile + ); + + if (createFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (deleteFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (updateFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.Operation 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.IsCreateFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile, typeInfo); + } + else if (value.IsDeleteFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile, typeInfo); + } + else if (value.IsUpdateFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnum.g.cs new file mode 100644 index 00000000..7f8588c7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class OrderEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.OrderEnum 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::tryAGI.OpenAI.OrderEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.OrderEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.OrderEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OrderEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.OrderEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnumNullable.g.cs new file mode 100644 index 00000000..8240cb4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OrderEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class OrderEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.OrderEnum? 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::tryAGI.OpenAI.OrderEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.OrderEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.OrderEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OrderEnum? 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::tryAGI.OpenAI.OrderEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Outcome.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Outcome.g.cs new file mode 100644 index 00000000..2540b344 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Outcome.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OutcomeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.Outcome 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? timeout = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome).Name}"); + timeout = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? exit = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome).Name}"); + exit = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.Outcome( + timeout, + exit + ); + + if (timeout != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (exit != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.Outcome 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.IsTimeout) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Timeout, typeInfo); + } + else if (value.IsExit) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Exit, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputContent.g.cs index cc8e1848..615923cc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputContent.g.cs @@ -17,12 +17,12 @@ public class OutputContentJsonConverter : global::System.Text.Json.Serialization var readerCopy = reader; - global::tryAGI.OpenAI.OutputTextContent? text = default; + global::tryAGI.OpenAI.OutputTextContent? outputText = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + outputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -53,12 +53,12 @@ public class OutputContentJsonConverter : global::System.Text.Json.Serialization } var result = new global::tryAGI.OpenAI.OutputContent( - text, + outputText, refusal, reasoningText ); - if (text != null) + if (outputText != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); @@ -89,11 +89,11 @@ 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.IsText) + if (value.IsOutputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputText, typeInfo); } else if (value.IsRefusal) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputItem.g.cs index 785ca277..63e15bed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputItem.g.cs @@ -29,48 +29,48 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js } readerCopy = reader; - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall = default; + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - fileSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + fileSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.FunctionToolCall? functionToolCall = default; + global::tryAGI.OpenAI.FunctionToolCall? functionCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - functionToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + functionCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall = default; + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - webSearchToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + webSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall = default; + global::tryAGI.OpenAI.ComputerToolCall? computerCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - computerToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + computerCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -89,72 +89,156 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall = default; + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + toolSearchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + toolSearchOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CompactionBody? compaction = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + compaction = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - imageGenToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGenerationCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall = default; + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - codeInterpreterToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + codeInterpreterCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall = default; + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - localShellToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + localShellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.FunctionShellCall? shellCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + shellCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall = default; + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + shellCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + applyPatchCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + applyPatchCallOutput = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.MCPToolCall? mcpCall = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - mCPToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPListTools? mCPListTools = default; + global::tryAGI.OpenAI.MCPListTools? mcpListTools = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - mCPListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpListTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest = default; + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - mCPApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcpApprovalRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -174,17 +258,24 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js var result = new global::tryAGI.OpenAI.OutputItem( message, - fileSearchToolCall, - functionToolCall, - webSearchToolCall, - computerToolCall, + fileSearchCall, + functionCall, + webSearchCall, + computerCall, reasoning, - imageGenToolCall, - codeInterpreterToolCall, - localShellToolCall, - mCPToolCall, - mCPListTools, - mCPApprovalRequest, + toolSearchCall, + toolSearchOutput, + compaction, + imageGenerationCall, + codeInterpreterCall, + localShellCall, + shellCall, + shellCallOutput, + applyPatchCall, + applyPatchCallOutput, + mcpCall, + mcpListTools, + mcpApprovalRequest, customToolCall ); @@ -194,25 +285,25 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchToolCall != null) + else if (fileSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (functionToolCall != null) + else if (functionCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchToolCall != null) + else if (webSearchCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (computerToolCall != null) + else if (computerCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); @@ -224,37 +315,79 @@ public class OutputItemJsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenToolCall != null) + else if (toolSearchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearchOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (compaction != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (imageGenerationCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterToolCall != null) + else if (codeInterpreterCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (localShellToolCall != null) + else if (localShellCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPToolCall != null) + else if (shellCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shellCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (applyPatchCallOutput != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpCall != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListTools != null) + else if (mcpListTools != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPApprovalRequest != null) + else if (mcpApprovalRequest != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); @@ -285,29 +418,29 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputMessage).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeInfo); } - else if (value.IsFileSearchToolCall) + else if (value.IsFileSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall, typeInfo); } - else if (value.IsFunctionToolCall) + else if (value.IsFunctionCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCall, typeInfo); } - else if (value.IsWebSearchToolCall) + else if (value.IsWebSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall, typeInfo); } - else if (value.IsComputerToolCall) + else if (value.IsComputerCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall, typeInfo); } else if (value.IsReasoning) { @@ -315,41 +448,83 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ReasoningItem).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Reasoning, typeInfo); } - else if (value.IsImageGenToolCall) + else if (value.IsToolSearchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchCall, typeInfo); + } + else if (value.IsToolSearchOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchOutput, typeInfo); + } + else if (value.IsCompaction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CompactionBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CompactionBody).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Compaction, typeInfo); + } + else if (value.IsImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall, typeInfo); } - else if (value.IsCodeInterpreterToolCall) + else if (value.IsCodeInterpreterCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall, typeInfo); } - else if (value.IsLocalShellToolCall) + else if (value.IsLocalShellCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCall, typeInfo); + } + else if (value.IsShellCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall, typeInfo); + } + else if (value.IsShellCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput, typeInfo); + } + else if (value.IsApplyPatchCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCall).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall, typeInfo); + } + else if (value.IsApplyPatchCallOutput) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutput, typeInfo); } - else if (value.IsMCPToolCall) + else if (value.IsMcpCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolCall, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCall, typeInfo); } - else if (value.IsMCPListTools) + else if (value.IsMcpListTools) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPListTools), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPListTools).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListTools, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListTools, typeInfo); } - else if (value.IsMCPApprovalRequest) + else if (value.IsMcpApprovalRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPApprovalRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPApprovalRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPApprovalRequest, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequest, typeInfo); } else if (value.IsCustomToolCall) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputMessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputMessageContent.g.cs index 30b40db1..cd6f29b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputMessageContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputMessageContent.g.cs @@ -17,12 +17,12 @@ public class OutputMessageContentJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.OutputTextContent? text = default; + global::tryAGI.OpenAI.OutputTextContent? outputText = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + outputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -41,11 +41,11 @@ public class OutputMessageContentJsonConverter : global::System.Text.Json.Serial } var result = new global::tryAGI.OpenAI.OutputMessageContent( - text, + outputText, refusal ); - if (text != null) + if (outputText != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); @@ -70,11 +70,11 @@ 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.IsText) + if (value.IsOutputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.OutputTextContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.OutputTextContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputText, typeInfo); } else if (value.IsRefusal) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputVariant2Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputVariant2Item.g.cs new file mode 100644 index 00000000..63c7ac3f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputVariant2Item.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OutputVariant2ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.OutputVariant2Item 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::tryAGI.OpenAI.InputTextContentParam? inputText = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContentParam).Name}"); + inputText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputImageContentParamAutoParam? inputImage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam).Name}"); + inputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InputFileContentParam? inputFile = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContentParam).Name}"); + inputFile = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OutputVariant2Item( + inputText, + inputImage, + inputFile + ); + + if (inputText != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContentParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputImage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inputFile != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContentParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OutputVariant2Item 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.IsInputText) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputTextContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputTextContentParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText, typeInfo); + } + else if (value.IsInputImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage, typeInfo); + } + else if (value.IsInputFile) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InputFileContentParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InputFileContentParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsItem.g.cs deleted file mode 100644 index 9a3fedff..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsItem.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class OutputsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.OutputsItem 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::tryAGI.OpenAI.CodeInterpreterOutputLogs? codeInterpreterOutputLogs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); - codeInterpreterOutputLogs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CodeInterpreterOutputImage? codeInterpreterOutputImage = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); - codeInterpreterOutputImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.OutputsItem( - codeInterpreterOutputLogs, - codeInterpreterOutputImage - ); - - if (codeInterpreterOutputLogs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (codeInterpreterOutputImage != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.OutputsItem 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.IsCodeInterpreterOutputLogs) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterOutputLogs, typeInfo); - } - else if (value.IsCodeInterpreterOutputImage) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterOutputImage, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsVariant1Item.g.cs new file mode 100644 index 00000000..8dc18481 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputsVariant1Item.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class OutputsVariant1ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.OutputsVariant1Item 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::tryAGI.OpenAI.CodeInterpreterOutputLogs? logs = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); + logs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CodeInterpreterOutputImage? image = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); + image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.OutputsVariant1Item( + logs, + image + ); + + if (logs != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (image != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.OutputsVariant1Item 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::tryAGI.OpenAI.CodeInterpreterOutputLogs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); + } + else if (value.IsImage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeography.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeography.g.cs new file mode 100644 index 00000000..a0ee9500 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeography.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectCreateRequestGeographyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectCreateRequestGeography 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::tryAGI.OpenAI.ProjectCreateRequestGeographyExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectCreateRequestGeography)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectCreateRequestGeography); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectCreateRequestGeography value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ProjectCreateRequestGeographyExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyNullable.g.cs new file mode 100644 index 00000000..c93cb3b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectCreateRequestGeographyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectCreateRequestGeography? 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::tryAGI.OpenAI.ProjectCreateRequestGeographyExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectCreateRequestGeography)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectCreateRequestGeography?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectCreateRequestGeography? 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::tryAGI.OpenAI.ProjectCreateRequestGeographyExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObject.g.cs new file mode 100644 index 00000000..daf57270 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupDeletedResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject 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::tryAGI.OpenAI.ProjectGroupDeletedResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ProjectGroupDeletedResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectNullable.g.cs new file mode 100644 index 00000000..9f8d04d4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupDeletedResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject? 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::tryAGI.OpenAI.ProjectGroupDeletedResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject? 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::tryAGI.OpenAI.ProjectGroupDeletedResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObject.g.cs new file mode 100644 index 00000000..325aa715 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupListResourceObject 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::tryAGI.OpenAI.ProjectGroupListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ProjectGroupListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectNullable.g.cs new file mode 100644 index 00000000..d07b8a5f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupListResourceObject? 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::tryAGI.OpenAI.ProjectGroupListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupListResourceObject? 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::tryAGI.OpenAI.ProjectGroupListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObject.g.cs new file mode 100644 index 00000000..7e4019ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupObject 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::tryAGI.OpenAI.ProjectGroupObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ProjectGroupObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObjectNullable.g.cs new file mode 100644 index 00000000..608a2b64 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ProjectGroupObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ProjectGroupObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ProjectGroupObject? 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::tryAGI.OpenAI.ProjectGroupObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ProjectGroupObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ProjectGroupObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ProjectGroupObject? 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::tryAGI.OpenAI.ProjectGroupObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObject.g.cs new file mode 100644 index 00000000..8c944c1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class PublicRoleListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.PublicRoleListResourceObject 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::tryAGI.OpenAI.PublicRoleListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.PublicRoleListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.PublicRoleListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.PublicRoleListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.PublicRoleListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectNullable.g.cs new file mode 100644 index 00000000..e38da164 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class PublicRoleListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.PublicRoleListResourceObject? 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::tryAGI.OpenAI.PublicRoleListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.PublicRoleListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.PublicRoleListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.PublicRoleListResourceObject? 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::tryAGI.OpenAI.PublicRoleListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormats.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormats.g.cs index 2d96f40f..8e8067c9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormats.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormats.g.cs @@ -17,63 +17,63 @@ public class RealtimeAudioFormatsJsonConverter : global::System.Text.Json.Serial var readerCopy = reader; - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? value1 = default; + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? pcmAudioFormat = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat).Name}"); + pcmAudioFormat = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? value2 = default; + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? pcmuAudioFormat = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat).Name}"); + pcmuAudioFormat = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? value3 = default; + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? pcmaAudioFormat = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat).Name}"); + pcmaAudioFormat = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.RealtimeAudioFormats( - value1, - value2, - value3 + pcmAudioFormat, + pcmuAudioFormat, + pcmaAudioFormat ); - if (value1 != null) + if (pcmAudioFormat != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (pcmuAudioFormat != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (pcmaAudioFormat != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -89,23 +89,23 @@ 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.IsValue1) + if (value.IsPcmAudioFormat) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PcmAudioFormat, typeInfo); } - else if (value.IsValue2) + else if (value.IsPcmuAudioFormat) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PcmuAudioFormat, typeInfo); } - else if (value.IsValue3) + else if (value.IsPcmaAudioFormat) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PcmaAudioFormat, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatType.g.cs new file mode 100644 index 00000000..365795a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmAudioFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeNullable.g.cs new file mode 100644 index 00000000..9172e21a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmAudioFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatType.g.cs new file mode 100644 index 00000000..53321fde --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmaAudioFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeNullable.g.cs new file mode 100644 index 00000000..e3a14de0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmaAudioFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatType.g.cs new file mode 100644 index 00000000..9b9bca21 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmuAudioFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeNullable.g.cs new file mode 100644 index 00000000..30a20523 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeAudioFormatsPcmuAudioFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType? 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1Type.g.cs deleted file mode 100644 index 0e309a7b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant1TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeNullable.g.cs deleted file mode 100644 index c48333fc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant1TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant1TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2Type.g.cs deleted file mode 100644 index 15eae793..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant2TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeNullable.g.cs deleted file mode 100644 index 91d716f5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant2TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant2TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3Type.g.cs deleted file mode 100644 index 8f6af939..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3Type.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant3TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant3TypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3TypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeNullable.g.cs deleted file mode 100644 index 66164052..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeAudioFormatsVariant3TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant3TypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type? 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant3TypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObject.g.cs deleted file mode 100644 index 6eba90df..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObject.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeServerEventConversationCreatedConversationObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject 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::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObjectExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObjectExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectNullable.g.cs deleted file mode 100644 index 7ce96b46..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RealtimeServerEventConversationCreatedConversationObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject? 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::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObjectExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject? 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::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObjectExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs new file mode 100644 index 00000000..5983c28c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeNullable.g.cs new file mode 100644 index 00000000..3665db1c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType? 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType? 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs new file mode 100644 index 00000000..e4f2e7b0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeSessionCreateResponseGATracingTracingConfigurationEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumNullable.g.cs new file mode 100644 index 00000000..7a21fcb1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeSessionCreateResponseGATracingTracingConfigurationEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum? 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum? 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTruncation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTruncation.g.cs index 04cb33b8..12ffd776 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTruncation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTruncation.g.cs @@ -29,12 +29,12 @@ public class RealtimeTruncationJsonConverter : global::System.Text.Json.Serializ } readerCopy = reader; - global::tryAGI.OpenAI.RealtimeTruncationEnum2? value2 = default; + global::tryAGI.OpenAI.RealtimeTruncationEnum2? retentionRatioTruncation = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + retentionRatioTruncation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -42,7 +42,7 @@ public class RealtimeTruncationJsonConverter : global::System.Text.Json.Serializ var result = new global::tryAGI.OpenAI.RealtimeTruncation( value1, - value2 + retentionRatioTruncation ); if (value1 != null) @@ -51,7 +51,7 @@ public class RealtimeTruncationJsonConverter : global::System.Text.Json.Serializ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (retentionRatioTruncation != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2).Name}"); @@ -76,11 +76,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); } - else if (value.IsValue2) + else if (value.IsRetentionRatioTruncation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RetentionRatioTruncation, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs new file mode 100644 index 00000000..91bc68c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class RealtimeTurnDetectionRealtimeTurnDetection1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? serverVad = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad).Name}"); + serverVad = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? semanticVad = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad).Name}"); + semanticVad = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1( + serverVad, + semanticVad + ); + + if (serverVad != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (semanticVad != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1 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.IsServerVad) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ServerVad, typeInfo); + } + else if (value.IsSemanticVad) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SemanticVad, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs new file mode 100644 index 00000000..8dd74a09 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessNullable.g.cs new file mode 100644 index 00000000..d335345a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffort.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffort.g.cs deleted file mode 100644 index 4d346bfb..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffort.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningEffortJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningEffort 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::tryAGI.OpenAI.ReasoningEffortExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningEffort)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningEffort); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningEffort value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningEffortExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnum.g.cs new file mode 100644 index 00000000..bad061d4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningEffortEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningEffortEnum 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::tryAGI.OpenAI.ReasoningEffortEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningEffortEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningEffortEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningEffortEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningEffortEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnumNullable.g.cs new file mode 100644 index 00000000..8b99cacd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningEffortEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningEffortEnum? 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::tryAGI.OpenAI.ReasoningEffortEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningEffortEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningEffortEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningEffortEnum? 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::tryAGI.OpenAI.ReasoningEffortEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortNullable.g.cs deleted file mode 100644 index 272485a2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningEffortNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningEffortNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningEffort? 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::tryAGI.OpenAI.ReasoningEffortExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningEffort)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningEffort?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningEffort? 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::tryAGI.OpenAI.ReasoningEffortExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary.g.cs deleted file mode 100644 index 773e9a5f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningGenerateSummaryJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningGenerateSummary 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::tryAGI.OpenAI.ReasoningGenerateSummaryExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningGenerateSummary)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningGenerateSummary); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningGenerateSummary value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningGenerateSummaryExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2.g.cs new file mode 100644 index 00000000..4091586a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningGenerateSummary2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningGenerateSummary2 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::tryAGI.OpenAI.ReasoningGenerateSummary2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningGenerateSummary2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningGenerateSummary2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningGenerateSummary2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningGenerateSummary2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2Nullable.g.cs new file mode 100644 index 00000000..3bdeb583 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummary2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningGenerateSummary2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningGenerateSummary2? 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::tryAGI.OpenAI.ReasoningGenerateSummary2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningGenerateSummary2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningGenerateSummary2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningGenerateSummary2? 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::tryAGI.OpenAI.ReasoningGenerateSummary2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryNullable.g.cs deleted file mode 100644 index 3637e73a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningGenerateSummaryNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningGenerateSummary? 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::tryAGI.OpenAI.ReasoningGenerateSummaryExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningGenerateSummary)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningGenerateSummary?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningGenerateSummary? 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::tryAGI.OpenAI.ReasoningGenerateSummaryExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary.g.cs deleted file mode 100644 index 8d5552a4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningSummaryJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningSummary 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::tryAGI.OpenAI.ReasoningSummaryExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningSummary)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningSummary); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningSummary value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningSummaryExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2.g.cs new file mode 100644 index 00000000..3748b813 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningSummary2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningSummary2 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::tryAGI.OpenAI.ReasoningSummary2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningSummary2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningSummary2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningSummary2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ReasoningSummary2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2Nullable.g.cs new file mode 100644 index 00000000..37c3789f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummary2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ReasoningSummary2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ReasoningSummary2? 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::tryAGI.OpenAI.ReasoningSummary2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ReasoningSummary2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ReasoningSummary2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ReasoningSummary2? 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::tryAGI.OpenAI.ReasoningSummary2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummaryNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummaryNullable.g.cs deleted file mode 100644 index 3eee7c14..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ReasoningSummaryNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ReasoningSummaryNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ReasoningSummary? 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::tryAGI.OpenAI.ReasoningSummaryExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ReasoningSummary)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ReasoningSummary?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ReasoningSummary? 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::tryAGI.OpenAI.ReasoningSummaryExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseFormat.g.cs new file mode 100644 index 00000000..4be8a563 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseFormat.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ResponseFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.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; + global::tryAGI.OpenAI.ResponseFormatText? text = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ResponseFormatJsonSchema? jsonSchema = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); + jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); + jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ResponseFormat( + text, + jsonSchema, + jsonObject + ); + + if (text != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (jsonSchema != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (jsonObject != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.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::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + } + else if (value.IsJsonSchema) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeInfo); + } + else if (value.IsJsonObject) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitie.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitie.g.cs deleted file mode 100644 index 3b0a94b7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitie.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ResponseModalitieJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ResponseModalitie 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::tryAGI.OpenAI.ResponseModalitieExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ResponseModalitie)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ResponseModalitie); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ResponseModalitie value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ResponseModalitieExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitieNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitieNullable.g.cs deleted file mode 100644 index 4262599a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitieNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ResponseModalitieNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ResponseModalitie? 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::tryAGI.OpenAI.ResponseModalitieExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ResponseModalitie)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ResponseModalitie?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ResponseModalitie? 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::tryAGI.OpenAI.ResponseModalitieExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1Item.g.cs new file mode 100644 index 00000000..951d1f72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1Item.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponseModalitiesVariant1ItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponseModalitiesVariant1Item 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::tryAGI.OpenAI.ResponseModalitiesVariant1ItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponseModalitiesVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponseModalitiesVariant1Item); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponseModalitiesVariant1Item value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ResponseModalitiesVariant1ItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1ItemNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1ItemNullable.g.cs new file mode 100644 index 00000000..8ab37e7f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseModalitiesVariant1ItemNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponseModalitiesVariant1ItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponseModalitiesVariant1Item? 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::tryAGI.OpenAI.ResponseModalitiesVariant1ItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponseModalitiesVariant1Item)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponseModalitiesVariant1Item?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponseModalitiesVariant1Item? 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::tryAGI.OpenAI.ResponseModalitiesVariant1ItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextType.g.cs new file mode 100644 index 00000000..542cdd8e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponseOutputTextTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponseOutputTextType 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::tryAGI.OpenAI.ResponseOutputTextTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponseOutputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponseOutputTextType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponseOutputTextType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ResponseOutputTextTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeNullable.g.cs new file mode 100644 index 00000000..03296d90 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponseOutputTextTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponseOutputTextType? 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::tryAGI.OpenAI.ResponseOutputTextTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponseOutputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponseOutputTextType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponseOutputTextType? 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::tryAGI.OpenAI.ResponseOutputTextTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation.g.cs deleted file mode 100644 index f90ea163..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ResponsePropertiesTruncationJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ResponsePropertiesTruncation 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::tryAGI.OpenAI.ResponsePropertiesTruncationExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ResponsePropertiesTruncation)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ResponsePropertiesTruncation); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ResponsePropertiesTruncation value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ResponsePropertiesTruncationExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2.g.cs new file mode 100644 index 00000000..d33345df --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponsePropertiesTruncation2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsePropertiesTruncation2 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::tryAGI.OpenAI.ResponsePropertiesTruncation2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponsePropertiesTruncation2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponsePropertiesTruncation2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsePropertiesTruncation2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ResponsePropertiesTruncation2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2Nullable.g.cs new file mode 100644 index 00000000..54c8ce58 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncation2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponsePropertiesTruncation2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsePropertiesTruncation2? 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::tryAGI.OpenAI.ResponsePropertiesTruncation2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponsePropertiesTruncation2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponsePropertiesTruncation2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsePropertiesTruncation2? 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::tryAGI.OpenAI.ResponsePropertiesTruncation2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationNullable.g.cs deleted file mode 100644 index 0cec1012..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ResponsePropertiesTruncationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ResponsePropertiesTruncation? 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::tryAGI.OpenAI.ResponsePropertiesTruncationExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ResponsePropertiesTruncation)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ResponsePropertiesTruncation?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ResponsePropertiesTruncation? 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::tryAGI.OpenAI.ResponsePropertiesTruncationExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseStreamEvent.g.cs index c0131d6d..a35eec9c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponseStreamEvent.g.cs @@ -17,156 +17,156 @@ public class ResponseStreamEventJsonConverter : global::System.Text.Json.Seriali var readerCopy = reader; - global::tryAGI.OpenAI.ResponseAudioDeltaEvent? audioDelta = default; + global::tryAGI.OpenAI.ResponseAudioDeltaEvent? responseAudioDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent).Name}"); - audioDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseAudioDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseAudioDoneEvent? audioDone = default; + global::tryAGI.OpenAI.ResponseAudioDoneEvent? responseAudioDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent).Name}"); - audioDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseAudioDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? audioTranscriptDelta = default; + global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? responseAudioTranscriptDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent).Name}"); - audioTranscriptDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseAudioTranscriptDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? audioTranscriptDone = default; + global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? responseAudioTranscriptDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent).Name}"); - audioTranscriptDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseAudioTranscriptDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? codeInterpreterCallDelta = default; + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? responseCodeInterpreterCallCodeDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent).Name}"); - codeInterpreterCallDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCodeInterpreterCallCodeDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? codeInterpreterCallDone = default; + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? responseCodeInterpreterCallCodeDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent).Name}"); - codeInterpreterCallDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCodeInterpreterCallCodeDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? codeInterpreterCallCompleted = default; + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? responseCodeInterpreterCallCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent).Name}"); - codeInterpreterCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCodeInterpreterCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? codeInterpreterCallInProgress = default; + global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? responseCodeInterpreterCallInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent).Name}"); - codeInterpreterCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCodeInterpreterCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? codeInterpreterCallInterpreting = default; + global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? responseCodeInterpreterCallInterpreting = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent).Name}"); - codeInterpreterCallInterpreting = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCodeInterpreterCallInterpreting = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCompletedEvent? completed = default; + global::tryAGI.OpenAI.ResponseCompletedEvent? responseCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCompletedEvent).Name}"); - completed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseContentPartAddedEvent? contentPartAdded = default; + global::tryAGI.OpenAI.ResponseContentPartAddedEvent? responseContentPartAdded = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent).Name}"); - contentPartAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseContentPartAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseContentPartDoneEvent? contentPartDone = default; + global::tryAGI.OpenAI.ResponseContentPartDoneEvent? responseContentPartDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent).Name}"); - contentPartDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseContentPartDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCreatedEvent? created = default; + global::tryAGI.OpenAI.ResponseCreatedEvent? responseCreated = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCreatedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCreatedEvent).Name}"); - created = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -185,602 +185,602 @@ public class ResponseStreamEventJsonConverter : global::System.Text.Json.Seriali } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? fileSearchCallCompleted = default; + global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? responseFileSearchCallCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent).Name}"); - fileSearchCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFileSearchCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? fileSearchCallInProgress = default; + global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? responseFileSearchCallInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent).Name}"); - fileSearchCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFileSearchCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? fileSearchCallSearching = default; + global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? responseFileSearchCallSearching = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent).Name}"); - fileSearchCallSearching = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFileSearchCallSearching = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? functionCallArgumentsDelta = default; + global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? responseFunctionCallArgumentsDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent).Name}"); - functionCallArgumentsDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFunctionCallArgumentsDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? functionCallArgumentsDone = default; + global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? responseFunctionCallArgumentsDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent).Name}"); - functionCallArgumentsDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFunctionCallArgumentsDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseInProgressEvent? inProgress = default; + global::tryAGI.OpenAI.ResponseInProgressEvent? responseInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseInProgressEvent).Name}"); - inProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFailedEvent? failed = default; + global::tryAGI.OpenAI.ResponseFailedEvent? responseFailed = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFailedEvent).Name}"); - failed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseIncompleteEvent? incomplete = default; + global::tryAGI.OpenAI.ResponseIncompleteEvent? responseIncomplete = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent).Name}"); - incomplete = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseIncomplete = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? outputItemAdded = default; + global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? responseOutputItemAdded = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent).Name}"); - outputItemAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseOutputItemAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? outputItemDone = default; + global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? responseOutputItemDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent).Name}"); - outputItemDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseOutputItemDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? reasoningSummaryPartAdded = default; + global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? responseReasoningSummaryPartAdded = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent).Name}"); - reasoningSummaryPartAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningSummaryPartAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? reasoningSummaryPartDone = default; + global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? responseReasoningSummaryPartDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent).Name}"); - reasoningSummaryPartDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningSummaryPartDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? reasoningSummaryTextDelta = default; + global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? responseReasoningSummaryTextDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent).Name}"); - reasoningSummaryTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningSummaryTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? reasoningSummaryTextDone = default; + global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? responseReasoningSummaryTextDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent).Name}"); - reasoningSummaryTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningSummaryTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? reasoningTextDelta = default; + global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? responseReasoningTextDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent).Name}"); - reasoningTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? reasoningTextDone = default; + global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? responseReasoningTextDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent).Name}"); - reasoningTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseReasoningTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? refusalDelta = default; + global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? responseRefusalDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent).Name}"); - refusalDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseRefusalDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseRefusalDoneEvent? refusalDone = default; + global::tryAGI.OpenAI.ResponseRefusalDoneEvent? responseRefusalDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent).Name}"); - refusalDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseRefusalDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseTextDeltaEvent? textDelta = default; + global::tryAGI.OpenAI.ResponseTextDeltaEvent? responseOutputTextDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent).Name}"); - textDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseOutputTextDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseTextDoneEvent? textDone = default; + global::tryAGI.OpenAI.ResponseTextDoneEvent? responseOutputTextDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent).Name}"); - textDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseOutputTextDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? webSearchCallCompleted = default; + global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? responseWebSearchCallCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent).Name}"); - webSearchCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseWebSearchCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? webSearchCallInProgress = default; + global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? responseWebSearchCallInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent).Name}"); - webSearchCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseWebSearchCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? webSearchCallSearching = default; + global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? responseWebSearchCallSearching = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent).Name}"); - webSearchCallSearching = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseWebSearchCallSearching = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? imageGenCallCompleted = default; + global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? responseImageGenerationCallCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent).Name}"); - imageGenCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseImageGenerationCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? imageGenCallGenerating = default; + global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? responseImageGenerationCallGenerating = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent).Name}"); - imageGenCallGenerating = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseImageGenerationCallGenerating = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? imageGenCallInProgress = default; + global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? responseImageGenerationCallInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent).Name}"); - imageGenCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseImageGenerationCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? imageGenCallPartial = default; + global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? responseImageGenerationCallPartialImage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent).Name}"); - imageGenCallPartial = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseImageGenerationCallPartialImage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? mCPCallArgumentsDelta = default; + global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? responseMcpCallArgumentsDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent).Name}"); - mCPCallArgumentsDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpCallArgumentsDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? mCPCallArgumentsDone = default; + global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? responseMcpCallArgumentsDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent).Name}"); - mCPCallArgumentsDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpCallArgumentsDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? mCPCallCompleted = default; + global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? responseMcpCallCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent).Name}"); - mCPCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpCallCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? mCPCallFailed = default; + global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? responseMcpCallFailed = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent).Name}"); - mCPCallFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpCallFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? mCPCallInProgress = default; + global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? responseMcpCallInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent).Name}"); - mCPCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpCallInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? mCPListToolsCompleted = default; + global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? responseMcpListToolsCompleted = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent).Name}"); - mCPListToolsCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpListToolsCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? mCPListToolsFailed = default; + global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? responseMcpListToolsFailed = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent).Name}"); - mCPListToolsFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpListToolsFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? mCPListToolsInProgress = default; + global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? responseMcpListToolsInProgress = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent).Name}"); - mCPListToolsInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseMcpListToolsInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? outputTextAnnotationAdded = default; + global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? responseOutputTextAnnotationAdded = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent).Name}"); - outputTextAnnotationAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseOutputTextAnnotationAdded = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseQueuedEvent? queued = default; + global::tryAGI.OpenAI.ResponseQueuedEvent? responseQueued = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseQueuedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseQueuedEvent).Name}"); - queued = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseQueued = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? customToolCallInputDelta = default; + global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? responseCustomToolCallInputDelta = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent).Name}"); - customToolCallInputDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCustomToolCallInputDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? customToolCallInputDone = default; + global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? responseCustomToolCallInputDone = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent).Name}"); - customToolCallInputDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + responseCustomToolCallInputDone = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.ResponseStreamEvent( - audioDelta, - audioDone, - audioTranscriptDelta, - audioTranscriptDone, - codeInterpreterCallDelta, - codeInterpreterCallDone, - codeInterpreterCallCompleted, - codeInterpreterCallInProgress, - codeInterpreterCallInterpreting, - completed, - contentPartAdded, - contentPartDone, - created, + responseAudioDelta, + responseAudioDone, + responseAudioTranscriptDelta, + responseAudioTranscriptDone, + responseCodeInterpreterCallCodeDelta, + responseCodeInterpreterCallCodeDone, + responseCodeInterpreterCallCompleted, + responseCodeInterpreterCallInProgress, + responseCodeInterpreterCallInterpreting, + responseCompleted, + responseContentPartAdded, + responseContentPartDone, + responseCreated, error, - fileSearchCallCompleted, - fileSearchCallInProgress, - fileSearchCallSearching, - functionCallArgumentsDelta, - functionCallArgumentsDone, - inProgress, - failed, - incomplete, - outputItemAdded, - outputItemDone, - reasoningSummaryPartAdded, - reasoningSummaryPartDone, - reasoningSummaryTextDelta, - reasoningSummaryTextDone, - reasoningTextDelta, - reasoningTextDone, - refusalDelta, - refusalDone, - textDelta, - textDone, - webSearchCallCompleted, - webSearchCallInProgress, - webSearchCallSearching, - imageGenCallCompleted, - imageGenCallGenerating, - imageGenCallInProgress, - imageGenCallPartial, - mCPCallArgumentsDelta, - mCPCallArgumentsDone, - mCPCallCompleted, - mCPCallFailed, - mCPCallInProgress, - mCPListToolsCompleted, - mCPListToolsFailed, - mCPListToolsInProgress, - outputTextAnnotationAdded, - queued, - customToolCallInputDelta, - customToolCallInputDone + responseFileSearchCallCompleted, + responseFileSearchCallInProgress, + responseFileSearchCallSearching, + responseFunctionCallArgumentsDelta, + responseFunctionCallArgumentsDone, + responseInProgress, + responseFailed, + responseIncomplete, + responseOutputItemAdded, + responseOutputItemDone, + responseReasoningSummaryPartAdded, + responseReasoningSummaryPartDone, + responseReasoningSummaryTextDelta, + responseReasoningSummaryTextDone, + responseReasoningTextDelta, + responseReasoningTextDone, + responseRefusalDelta, + responseRefusalDone, + responseOutputTextDelta, + responseOutputTextDone, + responseWebSearchCallCompleted, + responseWebSearchCallInProgress, + responseWebSearchCallSearching, + responseImageGenerationCallCompleted, + responseImageGenerationCallGenerating, + responseImageGenerationCallInProgress, + responseImageGenerationCallPartialImage, + responseMcpCallArgumentsDelta, + responseMcpCallArgumentsDone, + responseMcpCallCompleted, + responseMcpCallFailed, + responseMcpCallInProgress, + responseMcpListToolsCompleted, + responseMcpListToolsFailed, + responseMcpListToolsInProgress, + responseOutputTextAnnotationAdded, + responseQueued, + responseCustomToolCallInputDelta, + responseCustomToolCallInputDone ); - if (audioDelta != null) + if (responseAudioDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audioDone != null) + else if (responseAudioDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audioTranscriptDelta != null) + else if (responseAudioTranscriptDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (audioTranscriptDone != null) + else if (responseAudioTranscriptDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterCallDelta != null) + else if (responseCodeInterpreterCallCodeDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterCallDone != null) + else if (responseCodeInterpreterCallCodeDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterCallCompleted != null) + else if (responseCodeInterpreterCallCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterCallInProgress != null) + else if (responseCodeInterpreterCallInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (codeInterpreterCallInterpreting != null) + else if (responseCodeInterpreterCallInterpreting != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (completed != null) + else if (responseCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (contentPartAdded != null) + else if (responseContentPartAdded != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (contentPartDone != null) + else if (responseContentPartDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (created != null) + else if (responseCreated != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCreatedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCreatedEvent).Name}"); @@ -792,235 +792,235 @@ public class ResponseStreamEventJsonConverter : global::System.Text.Json.Seriali throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseErrorEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchCallCompleted != null) + else if (responseFileSearchCallCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchCallInProgress != null) + else if (responseFileSearchCallInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (fileSearchCallSearching != null) + else if (responseFileSearchCallSearching != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (functionCallArgumentsDelta != null) + else if (responseFunctionCallArgumentsDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (functionCallArgumentsDone != null) + else if (responseFunctionCallArgumentsDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (inProgress != null) + else if (responseInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (failed != null) + else if (responseFailed != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFailedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (incomplete != null) + else if (responseIncomplete != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputItemAdded != null) + else if (responseOutputItemAdded != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputItemDone != null) + else if (responseOutputItemDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningSummaryPartAdded != null) + else if (responseReasoningSummaryPartAdded != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningSummaryPartDone != null) + else if (responseReasoningSummaryPartDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningSummaryTextDelta != null) + else if (responseReasoningSummaryTextDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningSummaryTextDone != null) + else if (responseReasoningSummaryTextDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningTextDelta != null) + else if (responseReasoningTextDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (reasoningTextDone != null) + else if (responseReasoningTextDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (refusalDelta != null) + else if (responseRefusalDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (refusalDone != null) + else if (responseRefusalDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (textDelta != null) + else if (responseOutputTextDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (textDone != null) + else if (responseOutputTextDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchCallCompleted != null) + else if (responseWebSearchCallCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchCallInProgress != null) + else if (responseWebSearchCallInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (webSearchCallSearching != null) + else if (responseWebSearchCallSearching != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenCallCompleted != null) + else if (responseImageGenerationCallCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenCallGenerating != null) + else if (responseImageGenerationCallGenerating != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenCallInProgress != null) + else if (responseImageGenerationCallInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGenCallPartial != null) + else if (responseImageGenerationCallPartialImage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPCallArgumentsDelta != null) + else if (responseMcpCallArgumentsDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPCallArgumentsDone != null) + else if (responseMcpCallArgumentsDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPCallCompleted != null) + else if (responseMcpCallCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPCallFailed != null) + else if (responseMcpCallFailed != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPCallInProgress != null) + else if (responseMcpCallInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListToolsCompleted != null) + else if (responseMcpListToolsCompleted != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListToolsFailed != null) + else if (responseMcpListToolsFailed != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCPListToolsInProgress != null) + else if (responseMcpListToolsInProgress != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (outputTextAnnotationAdded != null) + else if (responseOutputTextAnnotationAdded != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (queued != null) + else if (responseQueued != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseQueuedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseQueuedEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (customToolCallInputDelta != null) + else if (responseCustomToolCallInputDelta != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (customToolCallInputDone != null) + else if (responseCustomToolCallInputDone != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent).Name}"); @@ -1039,83 +1039,83 @@ 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.IsAudioDelta) + if (value.IsResponseAudioDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseAudioDelta, typeInfo); } - else if (value.IsAudioDone) + else if (value.IsResponseAudioDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseAudioDone, typeInfo); } - else if (value.IsAudioTranscriptDelta) + else if (value.IsResponseAudioTranscriptDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioTranscriptDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseAudioTranscriptDelta, typeInfo); } - else if (value.IsAudioTranscriptDone) + else if (value.IsResponseAudioTranscriptDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioTranscriptDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseAudioTranscriptDone, typeInfo); } - else if (value.IsCodeInterpreterCallDelta) + else if (value.IsResponseCodeInterpreterCallCodeDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCallDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCodeInterpreterCallCodeDelta, typeInfo); } - else if (value.IsCodeInterpreterCallDone) + else if (value.IsResponseCodeInterpreterCallCodeDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCallDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCodeInterpreterCallCodeDone, typeInfo); } - else if (value.IsCodeInterpreterCallCompleted) + else if (value.IsResponseCodeInterpreterCallCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCallCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCodeInterpreterCallCompleted, typeInfo); } - else if (value.IsCodeInterpreterCallInProgress) + else if (value.IsResponseCodeInterpreterCallInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCallInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCodeInterpreterCallInProgress, typeInfo); } - else if (value.IsCodeInterpreterCallInterpreting) + else if (value.IsResponseCodeInterpreterCallInterpreting) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCallInterpreting, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCodeInterpreterCallInterpreting, typeInfo); } - else if (value.IsCompleted) + else if (value.IsResponseCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Completed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCompleted, typeInfo); } - else if (value.IsContentPartAdded) + else if (value.IsResponseContentPartAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentPartAdded, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseContentPartAdded, typeInfo); } - else if (value.IsContentPartDone) + else if (value.IsResponseContentPartDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentPartDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseContentPartDone, typeInfo); } - else if (value.IsCreated) + else if (value.IsResponseCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCreatedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCreatedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Created, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCreated, typeInfo); } else if (value.IsError) { @@ -1123,239 +1123,239 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseErrorEvent).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); } - else if (value.IsFileSearchCallCompleted) + else if (value.IsResponseFileSearchCallCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCallCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFileSearchCallCompleted, typeInfo); } - else if (value.IsFileSearchCallInProgress) + else if (value.IsResponseFileSearchCallInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCallInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFileSearchCallInProgress, typeInfo); } - else if (value.IsFileSearchCallSearching) + else if (value.IsResponseFileSearchCallSearching) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCallSearching, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFileSearchCallSearching, typeInfo); } - else if (value.IsFunctionCallArgumentsDelta) + else if (value.IsResponseFunctionCallArgumentsDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallArgumentsDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFunctionCallArgumentsDelta, typeInfo); } - else if (value.IsFunctionCallArgumentsDone) + else if (value.IsResponseFunctionCallArgumentsDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallArgumentsDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFunctionCallArgumentsDone, typeInfo); } - else if (value.IsInProgress) + else if (value.IsResponseInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseInProgress, typeInfo); } - else if (value.IsFailed) + else if (value.IsResponseFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFailedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Failed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseFailed, typeInfo); } - else if (value.IsIncomplete) + else if (value.IsResponseIncomplete) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Incomplete, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseIncomplete, typeInfo); } - else if (value.IsOutputItemAdded) + else if (value.IsResponseOutputItemAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputItemAdded, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputItemAdded, typeInfo); } - else if (value.IsOutputItemDone) + else if (value.IsResponseOutputItemDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputItemDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputItemDone, typeInfo); } - else if (value.IsReasoningSummaryPartAdded) + else if (value.IsResponseReasoningSummaryPartAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningSummaryPartAdded, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningSummaryPartAdded, typeInfo); } - else if (value.IsReasoningSummaryPartDone) + else if (value.IsResponseReasoningSummaryPartDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningSummaryPartDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningSummaryPartDone, typeInfo); } - else if (value.IsReasoningSummaryTextDelta) + else if (value.IsResponseReasoningSummaryTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningSummaryTextDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningSummaryTextDelta, typeInfo); } - else if (value.IsReasoningSummaryTextDone) + else if (value.IsResponseReasoningSummaryTextDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningSummaryTextDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningSummaryTextDone, typeInfo); } - else if (value.IsReasoningTextDelta) + else if (value.IsResponseReasoningTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningTextDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningTextDelta, typeInfo); } - else if (value.IsReasoningTextDone) + else if (value.IsResponseReasoningTextDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningTextDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseReasoningTextDone, typeInfo); } - else if (value.IsRefusalDelta) + else if (value.IsResponseRefusalDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RefusalDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseRefusalDelta, typeInfo); } - else if (value.IsRefusalDone) + else if (value.IsResponseRefusalDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RefusalDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseRefusalDone, typeInfo); } - else if (value.IsTextDelta) + else if (value.IsResponseOutputTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputTextDelta, typeInfo); } - else if (value.IsTextDone) + else if (value.IsResponseOutputTextDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputTextDone, typeInfo); } - else if (value.IsWebSearchCallCompleted) + else if (value.IsResponseWebSearchCallCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCallCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseWebSearchCallCompleted, typeInfo); } - else if (value.IsWebSearchCallInProgress) + else if (value.IsResponseWebSearchCallInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCallInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseWebSearchCallInProgress, typeInfo); } - else if (value.IsWebSearchCallSearching) + else if (value.IsResponseWebSearchCallSearching) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCallSearching, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseWebSearchCallSearching, typeInfo); } - else if (value.IsImageGenCallCompleted) + else if (value.IsResponseImageGenerationCallCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenCallCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseImageGenerationCallCompleted, typeInfo); } - else if (value.IsImageGenCallGenerating) + else if (value.IsResponseImageGenerationCallGenerating) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenCallGenerating, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseImageGenerationCallGenerating, typeInfo); } - else if (value.IsImageGenCallInProgress) + else if (value.IsResponseImageGenerationCallInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenCallInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseImageGenerationCallInProgress, typeInfo); } - else if (value.IsImageGenCallPartial) + else if (value.IsResponseImageGenerationCallPartialImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenCallPartial, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseImageGenerationCallPartialImage, typeInfo); } - else if (value.IsMCPCallArgumentsDelta) + else if (value.IsResponseMcpCallArgumentsDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPCallArgumentsDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpCallArgumentsDelta, typeInfo); } - else if (value.IsMCPCallArgumentsDone) + else if (value.IsResponseMcpCallArgumentsDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPCallArgumentsDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpCallArgumentsDone, typeInfo); } - else if (value.IsMCPCallCompleted) + else if (value.IsResponseMcpCallCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPCallCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpCallCompleted, typeInfo); } - else if (value.IsMCPCallFailed) + else if (value.IsResponseMcpCallFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPCallFailed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpCallFailed, typeInfo); } - else if (value.IsMCPCallInProgress) + else if (value.IsResponseMcpCallInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPCallInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpCallInProgress, typeInfo); } - else if (value.IsMCPListToolsCompleted) + else if (value.IsResponseMcpListToolsCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListToolsCompleted, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpListToolsCompleted, typeInfo); } - else if (value.IsMCPListToolsFailed) + else if (value.IsResponseMcpListToolsFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListToolsFailed, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpListToolsFailed, typeInfo); } - else if (value.IsMCPListToolsInProgress) + else if (value.IsResponseMcpListToolsInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPListToolsInProgress, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseMcpListToolsInProgress, typeInfo); } - else if (value.IsOutputTextAnnotationAdded) + else if (value.IsResponseOutputTextAnnotationAdded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputTextAnnotationAdded, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputTextAnnotationAdded, typeInfo); } - else if (value.IsQueued) + else if (value.IsResponseQueued) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseQueuedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseQueuedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Queued, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseQueued, typeInfo); } - else if (value.IsCustomToolCallInputDelta) + else if (value.IsResponseCustomToolCallInputDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallInputDelta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCustomToolCallInputDelta, typeInfo); } - else if (value.IsCustomToolCallInputDone) + else if (value.IsResponseCustomToolCallInputDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallInputDone, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCustomToolCallInputDone, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEvent.g.cs new file mode 100644 index 00000000..a96c4c77 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEvent.g.cs @@ -0,0 +1,62 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ResponsesClientEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsesClientEvent 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::tryAGI.OpenAI.ResponsesClientEventResponseCreate? responseCreate = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate).Name}"); + responseCreate = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ResponsesClientEvent( + responseCreate + ); + + if (responseCreate != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsesClientEvent 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.IsResponseCreate) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseCreate, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreate.g.cs new file mode 100644 index 00000000..fcca3d1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreate.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ResponsesClientEventResponseCreateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsesClientEventResponseCreate 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CreateResponse? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateResponse).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ResponsesClientEventResponseCreate( + value1, + value2 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateResponse).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsesClientEventResponseCreate 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateResponse).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1Type.g.cs new file mode 100644 index 00000000..76113879 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponsesClientEventResponseCreateVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeNullable.g.cs new file mode 100644 index 00000000..35b66b11 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ResponsesClientEventResponseCreateVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type? 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type? 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesServerEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesServerEvent.g.cs new file mode 100644 index 00000000..e8839a2e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResponsesServerEvent.g.cs @@ -0,0 +1,62 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ResponsesServerEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ResponsesServerEvent 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::tryAGI.OpenAI.ResponseStreamEvent? responseStream = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseStreamEvent).Name}"); + responseStream = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ResponsesServerEvent( + responseStream + ); + + if (responseStream != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseStreamEvent).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ResponsesServerEvent 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.IsResponseStream) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseStreamEvent).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseStream, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultItem.g.cs deleted file mode 100644 index 15a3fcd5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ResultItem.g.cs +++ /dev/null @@ -1,262 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ResultItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ResultItem 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::tryAGI.OpenAI.UsageCompletionsResult? usageCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCompletionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCompletionsResult).Name}"); - usageCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageEmbeddingsResult? usageEmbeddings = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult).Name}"); - usageEmbeddings = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageModerationsResult? usageModerations = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageModerationsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageModerationsResult).Name}"); - usageModerations = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageImagesResult? usageImages = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageImagesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageImagesResult).Name}"); - usageImages = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageAudioSpeechesResult? usageAudioSpeeches = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult).Name}"); - usageAudioSpeeches = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? usageAudioTranscriptions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult).Name}"); - usageAudioTranscriptions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageVectorStoresResult? usageVectorStores = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageVectorStoresResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageVectorStoresResult).Name}"); - usageVectorStores = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? usageCodeInterpreterSessions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult).Name}"); - usageCodeInterpreterSessions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CostsResult? costs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CostsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CostsResult).Name}"); - costs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ResultItem( - usageCompletions, - usageEmbeddings, - usageModerations, - usageImages, - usageAudioSpeeches, - usageAudioTranscriptions, - usageVectorStores, - usageCodeInterpreterSessions, - costs - ); - - if (usageCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCompletionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCompletionsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageEmbeddings != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageModerations != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageModerationsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageModerationsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageImages != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageImagesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageImagesResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageAudioSpeeches != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageAudioTranscriptions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageVectorStores != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageVectorStoresResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageVectorStoresResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (usageCodeInterpreterSessions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (costs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CostsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CostsResult).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ResultItem 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.IsUsageCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCompletionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCompletionsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageCompletions, typeInfo); - } - else if (value.IsUsageEmbeddings) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageEmbeddings, typeInfo); - } - else if (value.IsUsageModerations) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageModerationsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageModerationsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageModerations, typeInfo); - } - else if (value.IsUsageImages) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageImagesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageImagesResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageImages, typeInfo); - } - else if (value.IsUsageAudioSpeeches) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageAudioSpeeches, typeInfo); - } - else if (value.IsUsageAudioTranscriptions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageAudioTranscriptions, typeInfo); - } - else if (value.IsUsageVectorStores) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageVectorStoresResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageVectorStoresResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageVectorStores, typeInfo); - } - else if (value.IsUsageCodeInterpreterSessions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UsageCodeInterpreterSessions, typeInfo); - } - else if (value.IsCosts) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CostsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CostsResult).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Costs, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObject.g.cs new file mode 100644 index 00000000..a7c163ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleDeletedResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleDeletedResourceObject 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::tryAGI.OpenAI.RoleDeletedResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleDeletedResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleDeletedResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RoleDeletedResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectNullable.g.cs new file mode 100644 index 00000000..613f54df --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleDeletedResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleDeletedResourceObject? 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::tryAGI.OpenAI.RoleDeletedResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleDeletedResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleDeletedResourceObject? 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::tryAGI.OpenAI.RoleDeletedResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObject.g.cs new file mode 100644 index 00000000..cd57be00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleListResourceObject 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::tryAGI.OpenAI.RoleListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RoleListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObjectNullable.g.cs new file mode 100644 index 00000000..aceb0052 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleListResourceObject? 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::tryAGI.OpenAI.RoleListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleListResourceObject? 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::tryAGI.OpenAI.RoleListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObject.g.cs new file mode 100644 index 00000000..2f6a8ae0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleObject 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::tryAGI.OpenAI.RoleObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RoleObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObjectNullable.g.cs new file mode 100644 index 00000000..59d29cb2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RoleObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RoleObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RoleObject? 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::tryAGI.OpenAI.RoleObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RoleObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RoleObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RoleObject? 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::tryAGI.OpenAI.RoleObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunGraderRequestGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunGraderRequestGrader.g.cs deleted file mode 100644 index d78b3360..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunGraderRequestGrader.g.cs +++ /dev/null @@ -1,162 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunGraderRequestGraderJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RunGraderRequestGrader 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::tryAGI.OpenAI.GraderStringCheck? stringCheck = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); - stringCheck = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.GraderTextSimilarity? textSimilarity = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); - textSimilarity = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.GraderPython? python = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); - python = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.GraderScoreModel? scoreModel = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); - scoreModel = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.GraderMulti? multi = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderMulti), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderMulti).Name}"); - multi = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunGraderRequestGrader( - stringCheck, - textSimilarity, - python, - scoreModel, - multi - ); - - if (stringCheck != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (textSimilarity != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (python != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (scoreModel != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (multi != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderMulti), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderMulti).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RunGraderRequestGrader 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.IsStringCheck) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderStringCheck).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StringCheck, typeInfo); - } - else if (value.IsTextSimilarity) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderTextSimilarity).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextSimilarity, typeInfo); - } - else if (value.IsPython) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderPython).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Python, typeInfo); - } - else if (value.IsScoreModel) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderScoreModel).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScoreModel, typeInfo); - } - else if (value.IsMulti) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.GraderMulti), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.GraderMulti).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Multi, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatus.g.cs new file mode 100644 index 00000000..f401aa93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RunObjectStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RunObjectStatus 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::tryAGI.OpenAI.RunObjectStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RunObjectStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RunObjectStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RunObjectStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.RunObjectStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatusNullable.g.cs new file mode 100644 index 00000000..42f08734 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunObjectStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class RunObjectStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.RunObjectStatus? 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::tryAGI.OpenAI.RunObjectStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.RunObjectStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.RunObjectStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.RunObjectStatus? 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::tryAGI.OpenAI.RunObjectStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatus.g.cs deleted file mode 100644 index cf9015f2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RunStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RunStatus 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::tryAGI.OpenAI.RunStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RunStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RunStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RunStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.RunStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatusNullable.g.cs deleted file mode 100644 index a2e25b28..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class RunStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RunStatus? 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::tryAGI.OpenAI.RunStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.RunStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.RunStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RunStatus? 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::tryAGI.OpenAI.RunStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs deleted file mode 100644 index b8c23bb1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetails.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepDeltaObjectDeltaStepDetailsJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? messageCreation = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject).Name}"); - messageCreation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? toolCalls = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject).Name}"); - toolCalls = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails( - messageCreation, - toolCalls - ); - - if (messageCreation != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (toolCalls != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageCreation, typeInfo); - } - else if (value.IsToolCalls) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCalls, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCall.g.cs deleted file mode 100644 index a77edcb7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCall.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepDeltaStepDetailsToolCallJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? callsCodeObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject).Name}"); - callsCodeObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? callsFileSearchObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject).Name}"); - callsFileSearchObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? callsFunctionObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject).Name}"); - callsFunctionObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall( - callsCodeObject, - callsFileSearchObject, - callsFunctionObject - ); - - if (callsCodeObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (callsFileSearchObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (callsFunctionObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall 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.IsCallsCodeObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsCodeObject, typeInfo); - } - else if (value.IsCallsFileSearchObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsFileSearchObject, typeInfo); - } - else if (value.IsCallsFunctionObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsFunctionObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs deleted file mode 100644 index fc475bb3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? logs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject).Name}"); - logs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? image = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject).Name}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput( - logs, - image - ); - - if (logs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (image != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); - } - else if (value.IsImage) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCall.g.cs deleted file mode 100644 index 14cd1d0e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCall.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepDetailsToolCallJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.RunStepDetailsToolCall 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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? callsCodeObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject).Name}"); - callsCodeObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? callsFileSearchObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject).Name}"); - callsFileSearchObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? callsFunctionObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject).Name}"); - callsFunctionObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepDetailsToolCall( - callsCodeObject, - callsFileSearchObject, - callsFunctionObject - ); - - if (callsCodeObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (callsFileSearchObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (callsFunctionObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.RunStepDetailsToolCall 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.IsCallsCodeObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsCodeObject, typeInfo); - } - else if (value.IsCallsFileSearchObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsFileSearchObject, typeInfo); - } - else if (value.IsCallsFunctionObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CallsFunctionObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs deleted file mode 100644 index f0da225a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? logs = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject).Name}"); - logs = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? image = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject).Name}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput( - logs, - image - ); - - if (logs != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (image != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Logs, typeInfo); - } - else if (value.IsImage) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepObjectStepDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepObjectStepDetails.g.cs deleted file mode 100644 index 29a7f41e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RunStepObjectStepDetails.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class RunStepObjectStepDetailsJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? messageCreation = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject).Name}"); - messageCreation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? toolCalls = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject).Name}"); - toolCalls = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.RunStepObjectStepDetails( - messageCreation, - toolCalls - ); - - if (messageCreation != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (toolCalls != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsMessageCreationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageCreation, typeInfo); - } - else if (value.IsToolCalls) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCalls, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamType.g.cs new file mode 100644 index 00000000..46b837c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ScreenshotParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ScreenshotParamType 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::tryAGI.OpenAI.ScreenshotParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ScreenshotParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ScreenshotParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ScreenshotParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ScreenshotParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeNullable.g.cs new file mode 100644 index 00000000..c6afd1ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ScreenshotParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ScreenshotParamType? 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::tryAGI.OpenAI.ScreenshotParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ScreenshotParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ScreenshotParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ScreenshotParamType? 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::tryAGI.OpenAI.ScreenshotParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotType.g.cs deleted file mode 100644 index e8fef381..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ScreenshotTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ScreenshotType 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::tryAGI.OpenAI.ScreenshotTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ScreenshotType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ScreenshotType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ScreenshotType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ScreenshotTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotTypeNullable.g.cs deleted file mode 100644 index 301ab203..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScreenshotTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ScreenshotTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ScreenshotType? 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::tryAGI.OpenAI.ScreenshotTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ScreenshotType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ScreenshotType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ScreenshotType? 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::tryAGI.OpenAI.ScreenshotTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamType.g.cs new file mode 100644 index 00000000..d8cf2797 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ScrollParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ScrollParamType 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::tryAGI.OpenAI.ScrollParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ScrollParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ScrollParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ScrollParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ScrollParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamTypeNullable.g.cs new file mode 100644 index 00000000..2fe5d2ab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ScrollParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ScrollParamType? 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::tryAGI.OpenAI.ScrollParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ScrollParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ScrollParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ScrollParamType? 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::tryAGI.OpenAI.ScrollParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollType.g.cs deleted file mode 100644 index 3a0f8868..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ScrollTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ScrollType 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::tryAGI.OpenAI.ScrollTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ScrollType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ScrollType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ScrollType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ScrollTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollTypeNullable.g.cs deleted file mode 100644 index 78394223..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ScrollTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ScrollTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ScrollType? 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::tryAGI.OpenAI.ScrollTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ScrollType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ScrollType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ScrollType? 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::tryAGI.OpenAI.ScrollTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentType.g.cs new file mode 100644 index 00000000..b267f67c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SearchContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SearchContentType 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::tryAGI.OpenAI.SearchContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SearchContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SearchContentType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SearchContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SearchContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentTypeNullable.g.cs new file mode 100644 index 00000000..1de3ebb2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContentTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SearchContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SearchContentType? 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::tryAGI.OpenAI.SearchContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SearchContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SearchContentType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SearchContentType? 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::tryAGI.OpenAI.SearchContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTier.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTier.g.cs deleted file mode 100644 index 9226616a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTier.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ServiceTierJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ServiceTier 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::tryAGI.OpenAI.ServiceTierExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ServiceTier)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ServiceTier); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ServiceTier value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.ServiceTierExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnum.g.cs new file mode 100644 index 00000000..f84a5275 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ServiceTierEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ServiceTierEnum 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::tryAGI.OpenAI.ServiceTierEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ServiceTierEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ServiceTierEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ServiceTierEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ServiceTierEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnumNullable.g.cs new file mode 100644 index 00000000..bc4c3f74 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ServiceTierEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ServiceTierEnum? 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::tryAGI.OpenAI.ServiceTierEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ServiceTierEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ServiceTierEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ServiceTierEnum? 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::tryAGI.OpenAI.ServiceTierEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierNullable.g.cs deleted file mode 100644 index 02b3de14..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ServiceTierNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class ServiceTierNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ServiceTier? 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::tryAGI.OpenAI.ServiceTierExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.ServiceTier)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.ServiceTier?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ServiceTier? 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::tryAGI.OpenAI.ServiceTierExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session.g.cs deleted file mode 100644 index 4707f098..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class SessionJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Session 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::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? realtimeCreateRequestGA = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA).Name}"); - realtimeCreateRequestGA = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? realtimeTranscriptionCreateRequestGA = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA).Name}"); - realtimeTranscriptionCreateRequestGA = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Session( - realtimeCreateRequestGA, - realtimeTranscriptionCreateRequestGA - ); - - if (realtimeCreateRequestGA != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (realtimeTranscriptionCreateRequestGA != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Session 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.IsRealtimeCreateRequestGA) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RealtimeCreateRequestGA, typeInfo); - } - else if (value.IsRealtimeTranscriptionCreateRequestGA) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RealtimeTranscriptionCreateRequestGA, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session2.g.cs index 5fc05852..3439a067 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Session2.g.cs @@ -17,41 +17,41 @@ public class Session2JsonConverter : global::System.Text.Json.Serialization.Json var readerCopy = reader; - global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? realtimeSessionCreateResponseGA = default; + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? realtime = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA).Name}"); - realtimeSessionCreateResponseGA = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + realtime = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? realtimeTranscriptionSessionCreateResponseGA = default; + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? transcription = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA).Name}"); - realtimeTranscriptionSessionCreateResponseGA = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + transcription = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.Session2( - realtimeSessionCreateResponseGA, - realtimeTranscriptionSessionCreateResponseGA + realtime, + transcription ); - if (realtimeSessionCreateResponseGA != null) + if (realtime != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (realtimeTranscriptionSessionCreateResponseGA != null) + else if (transcription != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA).Name}"); @@ -70,17 +70,17 @@ 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.IsRealtimeSessionCreateResponseGA) + if (value.IsRealtime) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RealtimeSessionCreateResponseGA, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Realtime, typeInfo); } - else if (value.IsRealtimeTranscriptionSessionCreateResponseGA) + else if (value.IsTranscription) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RealtimeTranscriptionSessionCreateResponseGA, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Transcription, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObject.g.cs new file mode 100644 index 00000000..c886690c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillListResourceObject 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::tryAGI.OpenAI.SkillListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SkillListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObjectNullable.g.cs new file mode 100644 index 00000000..b3577d7d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillListResourceObject? 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::tryAGI.OpenAI.SkillListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillListResourceObject? 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::tryAGI.OpenAI.SkillListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamType.g.cs new file mode 100644 index 00000000..f1d69289 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillReferenceParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillReferenceParamType 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::tryAGI.OpenAI.SkillReferenceParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillReferenceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillReferenceParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillReferenceParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SkillReferenceParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeNullable.g.cs new file mode 100644 index 00000000..2418e139 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillReferenceParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillReferenceParamType? 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::tryAGI.OpenAI.SkillReferenceParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillReferenceParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillReferenceParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillReferenceParamType? 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::tryAGI.OpenAI.SkillReferenceParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObject.g.cs new file mode 100644 index 00000000..fbc70eaa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillResourceObject 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::tryAGI.OpenAI.SkillResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SkillResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObjectNullable.g.cs new file mode 100644 index 00000000..f25a4148 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillResourceObject? 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::tryAGI.OpenAI.SkillResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillResourceObject? 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::tryAGI.OpenAI.SkillResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObject.g.cs new file mode 100644 index 00000000..616fe80d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillVersionListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillVersionListResourceObject 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::tryAGI.OpenAI.SkillVersionListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillVersionListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillVersionListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillVersionListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SkillVersionListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectNullable.g.cs new file mode 100644 index 00000000..93e47dc3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillVersionListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillVersionListResourceObject? 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::tryAGI.OpenAI.SkillVersionListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillVersionListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillVersionListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillVersionListResourceObject? 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::tryAGI.OpenAI.SkillVersionListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObject.g.cs new file mode 100644 index 00000000..caa7735e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillVersionResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillVersionResourceObject 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::tryAGI.OpenAI.SkillVersionResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillVersionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillVersionResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillVersionResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SkillVersionResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectNullable.g.cs new file mode 100644 index 00000000..c9dea0f7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SkillVersionResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillVersionResourceObject? 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::tryAGI.OpenAI.SkillVersionResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SkillVersionResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SkillVersionResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillVersionResourceObject? 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::tryAGI.OpenAI.SkillVersionResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem.g.cs new file mode 100644 index 00000000..a0c66159 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class SkillsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillsItem 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::tryAGI.OpenAI.SkillReferenceParam? skillReference = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + skillReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InlineSkillParam? inline = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + inline = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.SkillsItem( + skillReference, + inline + ); + + if (skillReference != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inline != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillsItem 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.IsSkillReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SkillReference, typeInfo); + } + else if (value.IsInline) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Inline, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem2.g.cs new file mode 100644 index 00000000..a89ec735 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SkillsItem2.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class SkillsItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SkillsItem2 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::tryAGI.OpenAI.SkillReferenceParam? skillReference = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + skillReference = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.InlineSkillParam? inline = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + inline = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.SkillsItem2( + skillReference, + inline + ); + + if (skillReference != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (inline != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SkillsItem2 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.IsSkillReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SkillReferenceParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SkillReferenceParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SkillReference, typeInfo); + } + else if (value.IsInline) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.InlineSkillParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.InlineSkillParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Inline, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source.g.cs deleted file mode 100644 index cfa2d9a4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class SourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Source 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::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContent = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - evalJsonlFileContent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileId = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - evalJsonlFileId = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalStoredCompletionsSource? evalStoredCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource).Name}"); - evalStoredCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Source( - evalJsonlFileContent, - evalJsonlFileId, - evalStoredCompletions - ); - - if (evalJsonlFileContent != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalJsonlFileId != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalStoredCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Source 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.IsEvalJsonlFileContent) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileContent, typeInfo); - } - else if (value.IsEvalJsonlFileId) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileId, typeInfo); - } - else if (value.IsEvalStoredCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalStoredCompletions, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source2.g.cs deleted file mode 100644 index da7f9455..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source2.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class Source2JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Source2 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::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContentSource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - evalJsonlFileContentSource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileIdSource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - evalJsonlFileIdSource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Source2( - evalJsonlFileContentSource, - evalJsonlFileIdSource - ); - - if (evalJsonlFileContentSource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalJsonlFileIdSource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Source2 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.IsEvalJsonlFileContentSource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileContentSource, typeInfo); - } - else if (value.IsEvalJsonlFileIdSource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileIdSource, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source3.g.cs deleted file mode 100644 index 62903b9c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Source3.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class Source3JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Source3 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::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContentSource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - evalJsonlFileContentSource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileIdSource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - evalJsonlFileIdSource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalResponsesSource? evalResponsesSource = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalResponsesSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalResponsesSource).Name}"); - evalResponsesSource = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.Source3( - evalJsonlFileContentSource, - evalJsonlFileIdSource, - evalResponsesSource - ); - - if (evalJsonlFileContentSource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalJsonlFileIdSource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalResponsesSource != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalResponsesSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalResponsesSource).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Source3 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.IsEvalJsonlFileContentSource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileContentSource, typeInfo); - } - else if (value.IsEvalJsonlFileIdSource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalJsonlFileIdSource, typeInfo); - } - else if (value.IsEvalResponsesSource) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalResponsesSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalResponsesSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalResponsesSource, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamType.g.cs new file mode 100644 index 00000000..e7f298dc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SpecificApplyPatchParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SpecificApplyPatchParamType 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::tryAGI.OpenAI.SpecificApplyPatchParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SpecificApplyPatchParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SpecificApplyPatchParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SpecificApplyPatchParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SpecificApplyPatchParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeNullable.g.cs new file mode 100644 index 00000000..bf39bcea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SpecificApplyPatchParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SpecificApplyPatchParamType? 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::tryAGI.OpenAI.SpecificApplyPatchParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SpecificApplyPatchParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SpecificApplyPatchParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SpecificApplyPatchParamType? 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::tryAGI.OpenAI.SpecificApplyPatchParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamType.g.cs new file mode 100644 index 00000000..f0d4ac60 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SpecificFunctionShellParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SpecificFunctionShellParamType 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::tryAGI.OpenAI.SpecificFunctionShellParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SpecificFunctionShellParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SpecificFunctionShellParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SpecificFunctionShellParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.SpecificFunctionShellParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeNullable.g.cs new file mode 100644 index 00000000..8c26bc44 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class SpecificFunctionShellParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.SpecificFunctionShellParamType? 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::tryAGI.OpenAI.SpecificFunctionShellParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.SpecificFunctionShellParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.SpecificFunctionShellParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.SpecificFunctionShellParamType? 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::tryAGI.OpenAI.SpecificFunctionShellParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Status.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Status.g.cs new file mode 100644 index 00000000..918272db --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Status.g.cs @@ -0,0 +1,112 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class StatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.Status 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::tryAGI.OpenAI.ActiveStatus? active = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ActiveStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ActiveStatus).Name}"); + active = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.LockedStatus? locked = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LockedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LockedStatus).Name}"); + locked = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ClosedStatus? closed = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClosedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClosedStatus).Name}"); + closed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.Status( + active, + locked, + closed + ); + + if (active != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ActiveStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ActiveStatus).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (locked != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LockedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LockedStatus).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (closed != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClosedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClosedStatus).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.Status 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.IsActive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ActiveStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ActiveStatus).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Active, typeInfo); + } + else if (value.IsLocked) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LockedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LockedStatus).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Locked, typeInfo); + } + else if (value.IsClosed) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClosedStatus), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClosedStatus).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Closed, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryType.g.cs deleted file mode 100644 index 49974079..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class SummaryTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.SummaryType 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::tryAGI.OpenAI.SummaryTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.SummaryType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.SummaryType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.SummaryType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.SummaryTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryTypeNullable.g.cs deleted file mode 100644 index f5263b33..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SummaryTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class SummaryTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.SummaryType? 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::tryAGI.OpenAI.SummaryTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.SummaryType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.SummaryType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.SummaryType? 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::tryAGI.OpenAI.SummaryTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObject.g.cs new file mode 100644 index 00000000..f06e6d00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskGroupItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskGroupItemObject 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::tryAGI.OpenAI.TaskGroupItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskGroupItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskGroupItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskGroupItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TaskGroupItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectNullable.g.cs new file mode 100644 index 00000000..fdf4a01c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskGroupItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskGroupItemObject? 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::tryAGI.OpenAI.TaskGroupItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskGroupItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskGroupItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskGroupItemObject? 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::tryAGI.OpenAI.TaskGroupItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemType.g.cs new file mode 100644 index 00000000..afe76ef4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskGroupItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskGroupItemType 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::tryAGI.OpenAI.TaskGroupItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskGroupItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskGroupItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskGroupItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TaskGroupItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeNullable.g.cs new file mode 100644 index 00000000..077b01ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskGroupItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskGroupItemType? 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::tryAGI.OpenAI.TaskGroupItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskGroupItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskGroupItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskGroupItemType? 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::tryAGI.OpenAI.TaskGroupItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObject.g.cs new file mode 100644 index 00000000..00f59289 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskItemObject 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::tryAGI.OpenAI.TaskItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TaskItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObjectNullable.g.cs new file mode 100644 index 00000000..89ad22e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskItemObject? 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::tryAGI.OpenAI.TaskItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskItemObject? 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::tryAGI.OpenAI.TaskItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemType.g.cs new file mode 100644 index 00000000..368249e9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskItemType 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::tryAGI.OpenAI.TaskItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TaskItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemTypeNullable.g.cs new file mode 100644 index 00000000..448bb883 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskItemType? 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::tryAGI.OpenAI.TaskItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskItemType? 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::tryAGI.OpenAI.TaskItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskType.g.cs new file mode 100644 index 00000000..383b761c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskType 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::tryAGI.OpenAI.TaskTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TaskTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskTypeNullable.g.cs new file mode 100644 index 00000000..0669cd84 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TaskTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TaskTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TaskType? 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::tryAGI.OpenAI.TaskTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TaskType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TaskType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TaskType? 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::tryAGI.OpenAI.TaskTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TestingCriteriaItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TestingCriteriaItem.g.cs deleted file mode 100644 index a24ac582..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TestingCriteriaItem.g.cs +++ /dev/null @@ -1,162 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class TestingCriteriaItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.TestingCriteriaItem 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::tryAGI.OpenAI.CreateEvalLabelModelGrader? createEvalLabelModelGrader = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader).Name}"); - createEvalLabelModelGrader = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalGraderStringCheck? evalGraderStringCheck = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderStringCheck).Name}"); - evalGraderStringCheck = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalGraderTextSimilarity? evalGraderTextSimilarity = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity).Name}"); - evalGraderTextSimilarity = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalGraderPython? evalGraderPython = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderPython).Name}"); - evalGraderPython = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.EvalGraderScoreModel? evalGraderScoreModel = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderScoreModel).Name}"); - evalGraderScoreModel = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.TestingCriteriaItem( - createEvalLabelModelGrader, - evalGraderStringCheck, - evalGraderTextSimilarity, - evalGraderPython, - evalGraderScoreModel - ); - - if (createEvalLabelModelGrader != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalGraderStringCheck != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderStringCheck).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalGraderTextSimilarity != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalGraderPython != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderPython).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (evalGraderScoreModel != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderScoreModel).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.TestingCriteriaItem 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.IsCreateEvalLabelModelGrader) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateEvalLabelModelGrader, typeInfo); - } - else if (value.IsEvalGraderStringCheck) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderStringCheck), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderStringCheck).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalGraderStringCheck, typeInfo); - } - else if (value.IsEvalGraderTextSimilarity) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalGraderTextSimilarity, typeInfo); - } - else if (value.IsEvalGraderPython) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderPython), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderPython).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalGraderPython, typeInfo); - } - else if (value.IsEvalGraderScoreModel) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.EvalGraderScoreModel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.EvalGraderScoreModel).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EvalGraderScoreModel, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotation.g.cs deleted file mode 100644 index 05abd412..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotation.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class TextAnnotationJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.TextAnnotation 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::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? messageContentAnnotationsFileCitationObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject).Name}"); - messageContentAnnotationsFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? messageContentAnnotationsFilePathObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject).Name}"); - messageContentAnnotationsFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.TextAnnotation( - messageContentAnnotationsFileCitationObject, - messageContentAnnotationsFilePathObject - ); - - if (messageContentAnnotationsFileCitationObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (messageContentAnnotationsFilePathObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.TextAnnotation 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.IsMessageContentAnnotationsFileCitationObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentAnnotationsFileCitationObject, typeInfo); - } - else if (value.IsMessageContentAnnotationsFilePathObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentAnnotationsFilePathObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotationDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotationDelta.g.cs deleted file mode 100644 index 5125c417..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextAnnotationDelta.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class TextAnnotationDeltaJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.TextAnnotationDelta 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::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? messageContentAnnotationsFileCitationObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject).Name}"); - messageContentAnnotationsFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? messageContentAnnotationsFilePathObject = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject).Name}"); - messageContentAnnotationsFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.TextAnnotationDelta( - messageContentAnnotationsFileCitationObject, - messageContentAnnotationsFilePathObject - ); - - if (messageContentAnnotationsFileCitationObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (messageContentAnnotationsFilePathObject != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.TextAnnotationDelta 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.IsMessageContentAnnotationsFileCitationObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentAnnotationsFileCitationObject, typeInfo); - } - else if (value.IsMessageContentAnnotationsFilePathObject) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentAnnotationsFilePathObject, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextResponseFormatConfiguration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextResponseFormatConfiguration.g.cs index 5c55b6d0..bf950a91 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextResponseFormatConfiguration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TextResponseFormatConfiguration.g.cs @@ -17,60 +17,60 @@ public class TextResponseFormatConfigurationJsonConverter : global::System.Text. var readerCopy = reader; - global::tryAGI.OpenAI.ResponseFormatText? value1 = default; + global::tryAGI.OpenAI.ResponseFormatText? text = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.TextResponseFormatJsonSchema? value2 = default; + global::tryAGI.OpenAI.TextResponseFormatJsonSchema? jsonSchema = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.ResponseFormatJsonObject? value3 = default; + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.TextResponseFormatConfiguration( - value1, - value2, - value3 + text, + jsonSchema, + jsonObject ); - if (value1 != null) + if (text != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (jsonSchema != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (jsonObject != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); @@ -89,23 +89,23 @@ 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.IsValue1) + if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsValue2) + else if (value.IsJsonSchema) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeInfo); } - else if (value.IsValue3) + else if (value.IsJsonObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItem.g.cs new file mode 100644 index 00000000..33cd6f95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItem.g.cs @@ -0,0 +1,187 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ThreadItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadItem 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::tryAGI.OpenAI.UserMessageItem? chatkitUserMessage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageItem).Name}"); + chatkitUserMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.AssistantMessageItem? chatkitAssistantMessage = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantMessageItem).Name}"); + chatkitAssistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.WidgetMessageItem? chatkitWidget = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WidgetMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WidgetMessageItem).Name}"); + chatkitWidget = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ClientToolCallItem? chatkitClientToolCall = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClientToolCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClientToolCallItem).Name}"); + chatkitClientToolCall = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.TaskItem? chatkitTask = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskItem).Name}"); + chatkitTask = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.TaskGroupItem? chatkitTaskGroup = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskGroupItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskGroupItem).Name}"); + chatkitTaskGroup = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ThreadItem( + chatkitUserMessage, + chatkitAssistantMessage, + chatkitWidget, + chatkitClientToolCall, + chatkitTask, + chatkitTaskGroup + ); + + if (chatkitUserMessage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (chatkitAssistantMessage != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantMessageItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (chatkitWidget != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WidgetMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WidgetMessageItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (chatkitClientToolCall != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClientToolCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClientToolCallItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (chatkitTask != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (chatkitTaskGroup != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskGroupItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskGroupItem).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadItem 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.IsChatkitUserMessage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UserMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UserMessageItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitUserMessage, typeInfo); + } + else if (value.IsChatkitAssistantMessage) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantMessageItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitAssistantMessage, typeInfo); + } + else if (value.IsChatkitWidget) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WidgetMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WidgetMessageItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitWidget, typeInfo); + } + else if (value.IsChatkitClientToolCall) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ClientToolCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ClientToolCallItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitClientToolCall, typeInfo); + } + else if (value.IsChatkitTask) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitTask, typeInfo); + } + else if (value.IsChatkitTaskGroup) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TaskGroupItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TaskGroupItem).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatkitTaskGroup, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObject.g.cs new file mode 100644 index 00000000..49c71179 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadItemListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadItemListResourceObject 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::tryAGI.OpenAI.ThreadItemListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadItemListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadItemListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadItemListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ThreadItemListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectNullable.g.cs new file mode 100644 index 00000000..402a7bf6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadItemListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadItemListResourceObject? 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::tryAGI.OpenAI.ThreadItemListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadItemListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadItemListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadItemListResourceObject? 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::tryAGI.OpenAI.ThreadItemListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObject.g.cs new file mode 100644 index 00000000..8a562d36 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadListResourceObject 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::tryAGI.OpenAI.ThreadListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ThreadListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectNullable.g.cs new file mode 100644 index 00000000..5e5af2b4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadListResourceObject? 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::tryAGI.OpenAI.ThreadListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadListResourceObject? 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::tryAGI.OpenAI.ThreadListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObject.g.cs new file mode 100644 index 00000000..12dc081c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadResourceObject 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::tryAGI.OpenAI.ThreadResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ThreadResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObjectNullable.g.cs new file mode 100644 index 00000000..240a5c47 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ThreadResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ThreadResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ThreadResourceObject? 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::tryAGI.OpenAI.ThreadResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ThreadResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ThreadResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ThreadResourceObject? 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::tryAGI.OpenAI.ThreadResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObject.g.cs new file mode 100644 index 00000000..7a557224 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TokenCountsResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TokenCountsResourceObject 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::tryAGI.OpenAI.TokenCountsResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TokenCountsResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TokenCountsResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TokenCountsResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TokenCountsResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectNullable.g.cs new file mode 100644 index 00000000..7d6a0d7b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TokenCountsResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TokenCountsResourceObject? 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::tryAGI.OpenAI.TokenCountsResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TokenCountsResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TokenCountsResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TokenCountsResourceObject? 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::tryAGI.OpenAI.TokenCountsResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Tool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Tool.g.cs index 92018915..07126012 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Tool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Tool.g.cs @@ -40,6 +40,18 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv { } + readerCopy = reader; + global::tryAGI.OpenAI.ComputerTool? computer = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerTool).Name}"); + computer = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + readerCopy = reader; global::tryAGI.OpenAI.ComputerUsePreviewTool? computerUsePreview = default; try @@ -65,12 +77,12 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv } readerCopy = reader; - global::tryAGI.OpenAI.MCPTool? mCP = default; + global::tryAGI.OpenAI.MCPTool? mcp = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); - mCP = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + mcp = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -89,23 +101,23 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv } readerCopy = reader; - global::tryAGI.OpenAI.ImageGenTool? imageGen = default; + global::tryAGI.OpenAI.ImageGenTool? imageGeneration = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenTool).Name}"); - imageGen = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + imageGeneration = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.LocalShellTool? localShell = default; + global::tryAGI.OpenAI.LocalShellToolParam? localShell = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolParam).Name}"); localShell = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -113,17 +125,53 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv } readerCopy = reader; - global::tryAGI.OpenAI.CustomTool? custom = default; + global::tryAGI.OpenAI.FunctionShellToolParam? shell = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellToolParam).Name}"); + shell = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CustomToolParam? custom = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); custom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } + readerCopy = reader; + global::tryAGI.OpenAI.NamespaceToolParam? @namespace = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.NamespaceToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.NamespaceToolParam).Name}"); + @namespace = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolSearchToolParam? toolSearch = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchToolParam).Name}"); + toolSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + readerCopy = reader; global::tryAGI.OpenAI.WebSearchPreviewTool? webSearchPreview = default; try @@ -136,17 +184,34 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv { } + readerCopy = reader; + global::tryAGI.OpenAI.ApplyPatchToolParam? applyPatch = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolParam).Name}"); + applyPatch = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + var result = new global::tryAGI.OpenAI.Tool( function, fileSearch, + computer, computerUsePreview, webSearch, - mCP, + mcp, codeInterpreter, - imageGen, + imageGeneration, localShell, + shell, custom, - webSearchPreview + @namespace, + toolSearch, + webSearchPreview, + applyPatch ); if (function != null) @@ -161,6 +226,12 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchTool).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + else if (computer != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerTool).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } else if (computerUsePreview != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerUsePreviewTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? @@ -173,7 +244,7 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchTool).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (mCP != null) + else if (mcp != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); @@ -185,7 +256,7 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterTool).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (imageGen != null) + else if (imageGeneration != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenTool).Name}"); @@ -193,14 +264,32 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv } else if (localShell != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (shell != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellToolParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (custom != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (@namespace != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.NamespaceToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.NamespaceToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (toolSearch != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchToolParam).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } else if (webSearchPreview != null) @@ -209,6 +298,12 @@ public class ToolJsonConverter : global::System.Text.Json.Serialization.JsonConv throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchPreviewTool).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } + else if (applyPatch != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } return result; } @@ -234,6 +329,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileSearchTool).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } + else if (value.IsComputer) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ComputerTool).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Computer, typeInfo); + } else if (value.IsComputerUsePreview) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ComputerUsePreviewTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? @@ -246,11 +347,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchTool).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearch, typeInfo); } - else if (value.IsMCP) + else if (value.IsMcp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCP, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Mcp, typeInfo); } else if (value.IsCodeInterpreter) { @@ -258,30 +359,54 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CodeInterpreterTool).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsImageGen) + else if (value.IsImageGeneration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ImageGenTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ImageGenTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGen, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGeneration, typeInfo); } else if (value.IsLocalShell) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.LocalShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.LocalShellToolParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShell, typeInfo); } + else if (value.IsShell) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionShellToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionShellToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Shell, typeInfo); + } else if (value.IsCustom) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomTool).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeInfo); } + else if (value.IsNamespace) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.NamespaceToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.NamespaceToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Namespace, typeInfo); + } + else if (value.IsToolSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolSearchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolSearchToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearch, typeInfo); + } else if (value.IsWebSearchPreview) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchPreviewTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchPreviewTool).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchPreview, typeInfo); } + else if (value.IsApplyPatch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatch, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoice5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoice5.g.cs deleted file mode 100644 index 79d41454..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoice5.g.cs +++ /dev/null @@ -1,187 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ToolChoice5JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.ToolChoice5 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::tryAGI.OpenAI.ToolChoiceOptions? choiceOptions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); - choiceOptions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ToolChoiceAllowed? choiceAllowed = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); - choiceAllowed = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ToolChoiceTypes? choiceTypes = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); - choiceTypes = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ToolChoiceFunction? choiceFunction = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); - choiceFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ToolChoiceMCP? choiceMCP = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); - choiceMCP = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.ToolChoiceCustom? choiceCustom = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); - choiceCustom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ToolChoice5( - choiceOptions, - choiceAllowed, - choiceTypes, - choiceFunction, - choiceMCP, - choiceCustom - ); - - if (choiceOptions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (choiceAllowed != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (choiceTypes != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (choiceFunction != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (choiceMCP != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (choiceCustom != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.ToolChoice5 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.IsChoiceOptions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceOptions, typeInfo); - } - else if (value.IsChoiceAllowed) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceAllowed, typeInfo); - } - else if (value.IsChoiceTypes) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceTypes, typeInfo); - } - else if (value.IsChoiceFunction) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceFunction, typeInfo); - } - else if (value.IsChoiceMCP) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceMCP, typeInfo); - } - else if (value.IsChoiceCustom) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChoiceCustom, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoiceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoiceParam.g.cs new file mode 100644 index 00000000..831df4b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolChoiceParam.g.cs @@ -0,0 +1,237 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ToolChoiceParamJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolChoiceParam 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::tryAGI.OpenAI.ToolChoiceOptions? toolChoiceMode = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); + toolChoiceMode = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolChoiceAllowed? allowedTools = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); + allowedTools = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolChoiceTypes? hostedTool = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); + hostedTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolChoiceFunction? functionTool = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); + functionTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolChoiceMCP? mcpTool = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); + mcpTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.ToolChoiceCustom? customTool = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); + customTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.SpecificApplyPatchParam? specificApplyPatchToolChoice = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam).Name}"); + specificApplyPatchToolChoice = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.SpecificFunctionShellParam? specificShellToolChoice = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam).Name}"); + specificShellToolChoice = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ToolChoiceParam( + toolChoiceMode, + allowedTools, + hostedTool, + functionTool, + mcpTool, + customTool, + specificApplyPatchToolChoice, + specificShellToolChoice + ); + + if (toolChoiceMode != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (allowedTools != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (hostedTool != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (functionTool != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (mcpTool != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (customTool != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (specificApplyPatchToolChoice != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (specificShellToolChoice != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolChoiceParam 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.IsToolChoiceMode) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceOptions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceOptions).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolChoiceMode, typeInfo); + } + else if (value.IsAllowedTools) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceAllowed).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AllowedTools, typeInfo); + } + else if (value.IsHostedTool) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceTypes), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceTypes).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.HostedTool, typeInfo); + } + else if (value.IsFunctionTool) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceFunction).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionTool, typeInfo); + } + else if (value.IsMcpTool) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceMCP), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceMCP).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpTool, typeInfo); + } + else if (value.IsCustomTool) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ToolChoiceCustom), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ToolChoiceCustom).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomTool, typeInfo); + } + else if (value.IsSpecificApplyPatchToolChoice) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SpecificApplyPatchToolChoice, typeInfo); + } + else if (value.IsSpecificShellToolChoice) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SpecificShellToolChoice, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamType.g.cs new file mode 100644 index 00000000..ef3f1570 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchCallItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchCallItemParamType 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::tryAGI.OpenAI.ToolSearchCallItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchCallItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchCallItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchCallItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeNullable.g.cs new file mode 100644 index 00000000..df06768b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchCallItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchCallItemParamType? 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::tryAGI.OpenAI.ToolSearchCallItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchCallItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchCallItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchCallItemParamType? 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::tryAGI.OpenAI.ToolSearchCallItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallType.g.cs new file mode 100644 index 00000000..efb93ce3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchCallTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchCallType 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::tryAGI.OpenAI.ToolSearchCallTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchCallType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchCallType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchCallTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeNullable.g.cs new file mode 100644 index 00000000..3ea85b22 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchCallTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchCallType? 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::tryAGI.OpenAI.ToolSearchCallTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchCallType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchCallType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchCallType? 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::tryAGI.OpenAI.ToolSearchCallTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionType.g.cs new file mode 100644 index 00000000..f3c9282d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchExecutionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchExecutionType 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::tryAGI.OpenAI.ToolSearchExecutionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchExecutionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchExecutionType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchExecutionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchExecutionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeNullable.g.cs new file mode 100644 index 00000000..6af5ebe2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchExecutionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchExecutionType? 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::tryAGI.OpenAI.ToolSearchExecutionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchExecutionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchExecutionType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchExecutionType? 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::tryAGI.OpenAI.ToolSearchExecutionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamType.g.cs new file mode 100644 index 00000000..64395a25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchOutputItemParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchOutputItemParamType 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::tryAGI.OpenAI.ToolSearchOutputItemParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchOutputItemParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchOutputItemParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchOutputItemParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeNullable.g.cs new file mode 100644 index 00000000..4f69a283 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchOutputItemParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchOutputItemParamType? 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::tryAGI.OpenAI.ToolSearchOutputItemParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchOutputItemParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchOutputItemParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchOutputItemParamType? 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::tryAGI.OpenAI.ToolSearchOutputItemParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputType.g.cs new file mode 100644 index 00000000..f6681a1e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchOutputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchOutputType 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::tryAGI.OpenAI.ToolSearchOutputTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchOutputType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchOutputType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchOutputTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeNullable.g.cs new file mode 100644 index 00000000..45842d7c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchOutputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchOutputType? 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::tryAGI.OpenAI.ToolSearchOutputTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchOutputType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchOutputType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchOutputType? 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::tryAGI.OpenAI.ToolSearchOutputTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamType.g.cs new file mode 100644 index 00000000..fa308b35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchToolParamType 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::tryAGI.OpenAI.ToolSearchToolParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchToolParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchToolParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.ToolSearchToolParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeNullable.g.cs new file mode 100644 index 00000000..1fd53834 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class ToolSearchToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolSearchToolParamType? 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::tryAGI.OpenAI.ToolSearchToolParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.ToolSearchToolParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.ToolSearchToolParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolSearchToolParamType? 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::tryAGI.OpenAI.ToolSearchToolParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem.g.cs deleted file mode 100644 index 3663a1c2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ToolsItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.ChatCompletionTool? chatCompletionTool = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionTool).Name}"); - chatCompletionTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.CustomToolChatCompletions? customToolChatCompletions = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletions).Name}"); - customToolChatCompletions = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ToolsItem( - chatCompletionTool, - customToolChatCompletions - ); - - if (chatCompletionTool != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionTool).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (customToolChatCompletions != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletions).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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.IsChatCompletionTool) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatCompletionTool, typeInfo); - } - else if (value.IsCustomToolChatCompletions) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolChatCompletions), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolChatCompletions).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolChatCompletions, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem13.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem13.g.cs new file mode 100644 index 00000000..210c6952 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem13.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class ToolsItem13JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.ToolsItem13 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::tryAGI.OpenAI.FunctionToolParam? function = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolParam).Name}"); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.CustomToolParam? custom = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); + custom = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.ToolsItem13( + function, + custom + ); + + if (function != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (custom != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.ToolsItem13 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.IsFunction) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FunctionToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FunctionToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); + } + else if (value.IsCustom) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.CustomToolParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.CustomToolParam).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem2.g.cs deleted file mode 100644 index 8fa13ec7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem2.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ToolsItem2JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.AssistantToolsCode? assistantCode = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly).Name}"); - assistantFileSearchTypeOnly = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ToolsItem2( - assistantCode, - assistantFileSearchTypeOnly - ); - - if (assistantCode != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (assistantFileSearchTypeOnly != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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::tryAGI.OpenAI.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); - } - else if (value.IsAssistantFileSearchTypeOnly) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearchTypeOnly, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem5.g.cs deleted file mode 100644 index 50577a78..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ToolsItem5.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public class ToolsItem5JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.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; - global::tryAGI.OpenAI.RealtimeFunctionTool? realtimeFunctionTool = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeFunctionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeFunctionTool).Name}"); - realtimeFunctionTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::tryAGI.OpenAI.MCPTool? mCPTool = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); - mCPTool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::tryAGI.OpenAI.ToolsItem5( - realtimeFunctionTool, - mCPTool - ); - - if (realtimeFunctionTool != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeFunctionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeFunctionTool).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (mCPTool != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.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.IsRealtimeFunctionTool) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RealtimeFunctionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RealtimeFunctionTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RealtimeFunctionTool, typeInfo); - } - else if (value.IsMCPTool) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MCPTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MCPTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPTool, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventType.g.cs new file mode 100644 index 00000000..5e48bae5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptTextSegmentEventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptTextSegmentEventType 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::tryAGI.OpenAI.TranscriptTextSegmentEventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptTextSegmentEventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptTextSegmentEventType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptTextSegmentEventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TranscriptTextSegmentEventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeNullable.g.cs new file mode 100644 index 00000000..1b31826f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptTextSegmentEventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptTextSegmentEventType? 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::tryAGI.OpenAI.TranscriptTextSegmentEventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptTextSegmentEventType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptTextSegmentEventType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptTextSegmentEventType? 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::tryAGI.OpenAI.TranscriptTextSegmentEventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategy.g.cs new file mode 100644 index 00000000..cbc234c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategy.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class TranscriptionChunkingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptionChunkingStrategy 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.VadConfig? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VadConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VadConfig).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.TranscriptionChunkingStrategy( + value1, + value2 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VadConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VadConfig).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptionChunkingStrategy 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VadConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VadConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnum.g.cs new file mode 100644 index 00000000..af603e56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptionChunkingStrategyEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnumNullable.g.cs new file mode 100644 index 00000000..6683fb91 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionChunkingStrategyEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptionChunkingStrategyEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentType.g.cs new file mode 100644 index 00000000..a842a503 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptionDiarizedSegmentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType 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::tryAGI.OpenAI.TranscriptionDiarizedSegmentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TranscriptionDiarizedSegmentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeNullable.g.cs new file mode 100644 index 00000000..d266a8e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TranscriptionDiarizedSegmentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType? 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::tryAGI.OpenAI.TranscriptionDiarizedSegmentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType? 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::tryAGI.OpenAI.TranscriptionDiarizedSegmentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnum.g.cs new file mode 100644 index 00000000..5ede8b97 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TruncationEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TruncationEnum 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::tryAGI.OpenAI.TruncationEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TruncationEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TruncationEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TruncationEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TruncationEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnumNullable.g.cs new file mode 100644 index 00000000..52088cba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TruncationEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TruncationEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TruncationEnum? 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::tryAGI.OpenAI.TruncationEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TruncationEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TruncationEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TruncationEnum? 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::tryAGI.OpenAI.TruncationEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamType.g.cs new file mode 100644 index 00000000..52b2bba8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TypeParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TypeParamType 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::tryAGI.OpenAI.TypeParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TypeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TypeParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TypeParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.TypeParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamTypeNullable.g.cs new file mode 100644 index 00000000..bcb8039d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class TypeParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.TypeParamType? 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::tryAGI.OpenAI.TypeParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.TypeParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.TypeParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.TypeParamType? 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::tryAGI.OpenAI.TypeParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1.g.cs deleted file mode 100644 index a8ca84b5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class TypeType1JsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.TypeType1 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::tryAGI.OpenAI.TypeType1Extensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.TypeType1)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.TypeType1); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.TypeType1 value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.TypeType1Extensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1Nullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1Nullable.g.cs deleted file mode 100644 index ed555576..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.TypeType1Nullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class TypeType1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.TypeType1? 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::tryAGI.OpenAI.TypeType1Extensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.TypeType1)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.TypeType1?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.TypeType1? 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::tryAGI.OpenAI.TypeType1Extensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceType.g.cs new file mode 100644 index 00000000..d28dd2b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UrlAnnotationSourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UrlAnnotationSourceType 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::tryAGI.OpenAI.UrlAnnotationSourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UrlAnnotationSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UrlAnnotationSourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UrlAnnotationSourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UrlAnnotationSourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeNullable.g.cs new file mode 100644 index 00000000..7ee564c5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UrlAnnotationSourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UrlAnnotationSourceType? 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::tryAGI.OpenAI.UrlAnnotationSourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UrlAnnotationSourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UrlAnnotationSourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UrlAnnotationSourceType? 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::tryAGI.OpenAI.UrlAnnotationSourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationType.g.cs new file mode 100644 index 00000000..fcebd41b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UrlAnnotationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UrlAnnotationType 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::tryAGI.OpenAI.UrlAnnotationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UrlAnnotationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UrlAnnotationType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UrlAnnotationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UrlAnnotationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeNullable.g.cs new file mode 100644 index 00000000..abb5fb90 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UrlAnnotationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UrlAnnotationType? 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::tryAGI.OpenAI.UrlAnnotationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UrlAnnotationType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UrlAnnotationType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UrlAnnotationType? 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::tryAGI.OpenAI.UrlAnnotationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObject.g.cs new file mode 100644 index 00000000..67be4991 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserListResourceObject 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::tryAGI.OpenAI.UserListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObjectNullable.g.cs new file mode 100644 index 00000000..48115b50 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserListResourceObject? 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::tryAGI.OpenAI.UserListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserListResourceObject? 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::tryAGI.OpenAI.UserListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextType.g.cs new file mode 100644 index 00000000..2dd7beeb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageInputTextTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageInputTextType 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::tryAGI.OpenAI.UserMessageInputTextTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageInputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageInputTextType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageInputTextType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserMessageInputTextTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeNullable.g.cs new file mode 100644 index 00000000..ad649b9b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageInputTextTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageInputTextType? 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::tryAGI.OpenAI.UserMessageInputTextTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageInputTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageInputTextType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageInputTextType? 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::tryAGI.OpenAI.UserMessageInputTextTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObject.g.cs new file mode 100644 index 00000000..a8e9842a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageItemObject 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::tryAGI.OpenAI.UserMessageItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserMessageItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObjectNullable.g.cs new file mode 100644 index 00000000..9e348f70 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageItemObject? 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::tryAGI.OpenAI.UserMessageItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageItemObject? 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::tryAGI.OpenAI.UserMessageItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemType.g.cs new file mode 100644 index 00000000..5879e18c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageItemType 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::tryAGI.OpenAI.UserMessageItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserMessageItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemTypeNullable.g.cs new file mode 100644 index 00000000..baad207f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageItemType? 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::tryAGI.OpenAI.UserMessageItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageItemType? 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::tryAGI.OpenAI.UserMessageItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextType.g.cs new file mode 100644 index 00000000..3e0fc962 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageQuotedTextTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageQuotedTextType 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::tryAGI.OpenAI.UserMessageQuotedTextTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageQuotedTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageQuotedTextType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageQuotedTextType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserMessageQuotedTextTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeNullable.g.cs new file mode 100644 index 00000000..d18440e4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserMessageQuotedTextTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserMessageQuotedTextType? 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::tryAGI.OpenAI.UserMessageQuotedTextTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserMessageQuotedTextType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserMessageQuotedTextType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserMessageQuotedTextType? 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::tryAGI.OpenAI.UserMessageQuotedTextTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObject.g.cs new file mode 100644 index 00000000..e789098e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserRoleAssignmentObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserRoleAssignmentObject 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::tryAGI.OpenAI.UserRoleAssignmentObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserRoleAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserRoleAssignmentObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserRoleAssignmentObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.UserRoleAssignmentObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectNullable.g.cs new file mode 100644 index 00000000..eae5a7be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class UserRoleAssignmentObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.UserRoleAssignmentObject? 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::tryAGI.OpenAI.UserRoleAssignmentObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.UserRoleAssignmentObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.UserRoleAssignmentObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.UserRoleAssignmentObject? 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::tryAGI.OpenAI.UserRoleAssignmentObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Verbosity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Verbosity.g.cs deleted file mode 100644 index e84317a2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Verbosity.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class VerbosityJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Verbosity 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::tryAGI.OpenAI.VerbosityExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.Verbosity)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.Verbosity); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Verbosity value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.VerbosityExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnum.g.cs new file mode 100644 index 00000000..3af51980 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VerbosityEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VerbosityEnum 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::tryAGI.OpenAI.VerbosityEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VerbosityEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VerbosityEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VerbosityEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VerbosityEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnumNullable.g.cs new file mode 100644 index 00000000..85990a98 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VerbosityEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VerbosityEnum? 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::tryAGI.OpenAI.VerbosityEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VerbosityEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VerbosityEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VerbosityEnum? 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::tryAGI.OpenAI.VerbosityEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityNullable.g.cs deleted file mode 100644 index 44ee5eed..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VerbosityNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class VerbosityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.Verbosity? 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::tryAGI.OpenAI.VerbosityExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.Verbosity)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.Verbosity?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.Verbosity? 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::tryAGI.OpenAI.VerbosityExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariant.g.cs new file mode 100644 index 00000000..22d96a38 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariant.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoContentVariantJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoContentVariant 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::tryAGI.OpenAI.VideoContentVariantExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoContentVariant)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoContentVariant); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoContentVariant value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoContentVariantExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariantNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariantNullable.g.cs new file mode 100644 index 00000000..acb85761 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoContentVariantNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoContentVariantNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoContentVariant? 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::tryAGI.OpenAI.VideoContentVariantExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoContentVariant)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoContentVariant?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoContentVariant? 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::tryAGI.OpenAI.VideoContentVariantExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObject.g.cs new file mode 100644 index 00000000..580c25ff --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoListResourceObject 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::tryAGI.OpenAI.VideoListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObjectNullable.g.cs new file mode 100644 index 00000000..38736597 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoListResourceObject? 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::tryAGI.OpenAI.VideoListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoListResourceObject? 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::tryAGI.OpenAI.VideoListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModel.g.cs new file mode 100644 index 00000000..d4f86815 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModel.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class VideoModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoModel 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; + string? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.VideoModelEnum? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VideoModelEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VideoModelEnum).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.VideoModel( + value1, + value2 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VideoModelEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VideoModelEnum).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoModel 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(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VideoModelEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VideoModelEnum).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnum.g.cs new file mode 100644 index 00000000..8ea0eb07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnum.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoModelEnumJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoModelEnum 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::tryAGI.OpenAI.VideoModelEnumExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoModelEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoModelEnum); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoModelEnum value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoModelEnumExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnumNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnumNullable.g.cs new file mode 100644 index 00000000..b1fd2b3c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoModelEnumNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoModelEnumNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoModelEnum? 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::tryAGI.OpenAI.VideoModelEnumExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoModelEnum)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoModelEnum?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoModelEnum? 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::tryAGI.OpenAI.VideoModelEnumExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObject.g.cs new file mode 100644 index 00000000..3f7b18a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoResourceObject 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::tryAGI.OpenAI.VideoResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObjectNullable.g.cs new file mode 100644 index 00000000..76f03de9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoResourceObject? 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::tryAGI.OpenAI.VideoResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoResourceObject? 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::tryAGI.OpenAI.VideoResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSeconds.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSeconds.g.cs new file mode 100644 index 00000000..dca78678 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSeconds.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoSecondsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoSeconds 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::tryAGI.OpenAI.VideoSecondsExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoSeconds)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoSeconds); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoSeconds value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoSecondsExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSecondsNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSecondsNullable.g.cs new file mode 100644 index 00000000..df94d019 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSecondsNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoSecondsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoSeconds? 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::tryAGI.OpenAI.VideoSecondsExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoSeconds)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoSeconds?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoSeconds? 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::tryAGI.OpenAI.VideoSecondsExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSize.g.cs new file mode 100644 index 00000000..0aed6d6e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSize.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoSizeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoSize 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::tryAGI.OpenAI.VideoSizeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoSize)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoSize); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoSize value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoSizeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSizeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSizeNullable.g.cs new file mode 100644 index 00000000..40449193 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoSizeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoSizeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoSize? 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::tryAGI.OpenAI.VideoSizeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoSize)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoSize?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoSize? 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::tryAGI.OpenAI.VideoSizeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatus.g.cs new file mode 100644 index 00000000..f9cb32d5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoStatus 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::tryAGI.OpenAI.VideoStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VideoStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatusNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatusNullable.g.cs new file mode 100644 index 00000000..a0b06a3d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VideoStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VideoStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VideoStatus? 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::tryAGI.OpenAI.VideoStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VideoStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VideoStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VideoStatus? 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::tryAGI.OpenAI.VideoStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObject.g.cs new file mode 100644 index 00000000..798b85f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentDeletedResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject 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::tryAGI.OpenAI.VoiceConsentDeletedResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VoiceConsentDeletedResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectNullable.g.cs new file mode 100644 index 00000000..830e2c1a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentDeletedResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject? 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::tryAGI.OpenAI.VoiceConsentDeletedResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject? 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::tryAGI.OpenAI.VoiceConsentDeletedResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObject.g.cs new file mode 100644 index 00000000..880e9174 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentListResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentListResourceObject 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::tryAGI.OpenAI.VoiceConsentListResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentListResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentListResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VoiceConsentListResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectNullable.g.cs new file mode 100644 index 00000000..08253b8a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentListResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentListResourceObject? 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::tryAGI.OpenAI.VoiceConsentListResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentListResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentListResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentListResourceObject? 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::tryAGI.OpenAI.VoiceConsentListResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObject.g.cs new file mode 100644 index 00000000..40f9af26 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentResourceObject 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::tryAGI.OpenAI.VoiceConsentResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VoiceConsentResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectNullable.g.cs new file mode 100644 index 00000000..f5ae813d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceConsentResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceConsentResourceObject? 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::tryAGI.OpenAI.VoiceConsentResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceConsentResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceConsentResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceConsentResourceObject? 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::tryAGI.OpenAI.VoiceConsentResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoice.g.cs new file mode 100644 index 00000000..4c0734cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoice.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public class VoiceIdsOrCustomVoiceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceIdsOrCustomVoice 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::tryAGI.OpenAI.VoiceIdsShared? value1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VoiceIdsShared), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsShared).Name}"); + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? value2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2).Name}"); + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::tryAGI.OpenAI.VoiceIdsOrCustomVoice( + value1, + value2 + ); + + if (value1 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VoiceIdsShared), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsShared).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + else if (value2 != null) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2).Name}"); + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice 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::tryAGI.OpenAI.VoiceIdsShared), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsShared).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + } + else if (value.IsValue2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObject.g.cs new file mode 100644 index 00000000..8407cbb7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceResourceObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceResourceObject 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::tryAGI.OpenAI.VoiceResourceObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceResourceObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceResourceObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.VoiceResourceObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObjectNullable.g.cs new file mode 100644 index 00000000..7b240e79 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.VoiceResourceObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class VoiceResourceObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.VoiceResourceObject? 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::tryAGI.OpenAI.VoiceResourceObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.VoiceResourceObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.VoiceResourceObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.VoiceResourceObject? 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::tryAGI.OpenAI.VoiceResourceObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamType.g.cs new file mode 100644 index 00000000..dfe1d55f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WaitParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WaitParamType 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::tryAGI.OpenAI.WaitParamTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WaitParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WaitParamType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WaitParamType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.WaitParamTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamTypeNullable.g.cs new file mode 100644 index 00000000..bc82718c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitParamTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WaitParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WaitParamType? 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::tryAGI.OpenAI.WaitParamTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WaitParamType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WaitParamType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WaitParamType? 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::tryAGI.OpenAI.WaitParamTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitType.g.cs deleted file mode 100644 index c71427a9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class WaitTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.WaitType 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::tryAGI.OpenAI.WaitTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.WaitType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.WaitType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.WaitType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.WaitTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitTypeNullable.g.cs deleted file mode 100644 index db096057..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WaitTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class WaitTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.WaitType? 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::tryAGI.OpenAI.WaitTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.WaitType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.WaitType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.WaitType? 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::tryAGI.OpenAI.WaitTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationType.g.cs deleted file mode 100644 index 29b46c00..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class WebSearchApproximateLocationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.WebSearchApproximateLocationType 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::tryAGI.OpenAI.WebSearchApproximateLocationTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.WebSearchApproximateLocationType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.WebSearchApproximateLocationType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.WebSearchApproximateLocationType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::tryAGI.OpenAI.WebSearchApproximateLocationTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeNullable.g.cs deleted file mode 100644 index 8fc5db82..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI.JsonConverters -{ - /// - public sealed class WebSearchApproximateLocationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::tryAGI.OpenAI.WebSearchApproximateLocationType? 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::tryAGI.OpenAI.WebSearchApproximateLocationTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::tryAGI.OpenAI.WebSearchApproximateLocationType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::tryAGI.OpenAI.WebSearchApproximateLocationType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::tryAGI.OpenAI.WebSearchApproximateLocationType? 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::tryAGI.OpenAI.WebSearchApproximateLocationTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs new file mode 100644 index 00000000..d785d917 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WebSearchApproximateLocationWebSearchApproximateLocation1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeNullable.g.cs new file mode 100644 index 00000000..e7532eec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WebSearchApproximateLocationWebSearchApproximateLocation1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type? 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type? 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchToolCallAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchToolCallAction.g.cs index 862fc3d9..93515916 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchToolCallAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchToolCallAction.g.cs @@ -17,60 +17,60 @@ public class WebSearchToolCallActionJsonConverter : global::System.Text.Json.Ser var readerCopy = reader; - global::tryAGI.OpenAI.WebSearchActionSearch? value1 = default; + global::tryAGI.OpenAI.WebSearchActionSearch? search = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionSearch).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + search = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchActionOpenPage? value2 = default; + global::tryAGI.OpenAI.WebSearchActionOpenPage? openPage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + openPage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::tryAGI.OpenAI.WebSearchActionFind? value3 = default; + global::tryAGI.OpenAI.WebSearchActionFind? findInPage = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionFind), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionFind).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + findInPage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } var result = new global::tryAGI.OpenAI.WebSearchToolCallAction( - value1, - value2, - value3 + search, + openPage, + findInPage ); - if (value1 != null) + if (search != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionSearch).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) + else if (openPage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value3 != null) + else if (findInPage != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionFind), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionFind).Name}"); @@ -89,23 +89,23 @@ 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.IsValue1) + if (value.IsSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Search, typeInfo); } - else if (value.IsValue2) + else if (value.IsOpenPage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenPage, typeInfo); } - else if (value.IsValue3) + else if (value.IsFindInPage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.WebSearchActionFind), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.WebSearchActionFind).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FindInPage, typeInfo); } } } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObject.g.cs new file mode 100644 index 00000000..e16ee2d9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObject.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WidgetMessageItemObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WidgetMessageItemObject 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::tryAGI.OpenAI.WidgetMessageItemObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WidgetMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WidgetMessageItemObject); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WidgetMessageItemObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.WidgetMessageItemObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectNullable.g.cs new file mode 100644 index 00000000..842e0f26 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WidgetMessageItemObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WidgetMessageItemObject? 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::tryAGI.OpenAI.WidgetMessageItemObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WidgetMessageItemObject)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WidgetMessageItemObject?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WidgetMessageItemObject? 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::tryAGI.OpenAI.WidgetMessageItemObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemType.g.cs new file mode 100644 index 00000000..25e84162 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WidgetMessageItemTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WidgetMessageItemType 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::tryAGI.OpenAI.WidgetMessageItemTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WidgetMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WidgetMessageItemType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WidgetMessageItemType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::tryAGI.OpenAI.WidgetMessageItemTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeNullable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeNullable.g.cs new file mode 100644 index 00000000..b0d5b08d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace tryAGI.OpenAI.JsonConverters +{ + /// + public sealed class WidgetMessageItemTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::tryAGI.OpenAI.WidgetMessageItemType? 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::tryAGI.OpenAI.WidgetMessageItemTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::tryAGI.OpenAI.WidgetMessageItemType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::tryAGI.OpenAI.WidgetMessageItemType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::tryAGI.OpenAI.WidgetMessageItemType? 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::tryAGI.OpenAI.WidgetMessageItemTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs index a35ccc14..8833d314 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs @@ -14,10 +14,12 @@ public sealed partial class JsonSerializerContextTypes /// /// public global::System.Collections.Generic.Dictionary? StringStringDictionary { get; set; } + /// /// /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + /// /// /// @@ -38,2171 +40,2171 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.DateTimeOffset? Type3 { get; set; } + public string? Type3 { get; set; } /// /// /// - public string? Type4 { get; set; } + public global::System.DateTimeOffset? Type4 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AdminApiKeyOwner? Type5 { get; set; } + public object? Type5 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Annotation? Type6 { get; set; } + public global::tryAGI.OpenAI.AdminApiKeyOwner? Type6 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileCitationBody? Type7 { get; set; } + public global::tryAGI.OpenAI.ApiKeyList? Type7 { get; set; } /// /// /// - public int? Type8 { get; set; } + public global::System.Collections.Generic.IList? Type8 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileCitationBodyType? Type9 { get; set; } + public bool? Type9 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UrlCitationBody? Type10 { get; set; } + public global::tryAGI.OpenAI.AssignedRoleDetails? Type10 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UrlCitationBodyType? Type11 { get; set; } + public global::System.Collections.Generic.IList? Type11 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileCitationBody? Type12 { get; set; } + public long? Type12 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileCitationBodyType? Type13 { get; set; } + public global::tryAGI.OpenAI.AssistantObject? Type13 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FilePath? Type14 { get; set; } + public global::tryAGI.OpenAI.AssistantObjectObject? Type14 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FilePathType? Type15 { get; set; } + public global::System.Collections.Generic.IList>? Type15 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnnotationDiscriminator? Type16 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type16 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ApiKeyList? Type17 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsCode? Type17 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type18 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsCodeType? Type18 { get; set; } /// /// /// - public bool? Type19 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFileSearch? Type19 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ApproximateLocation? Type20 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFileSearchType? Type20 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ApproximateLocationType? Type21 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? Type21 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantObject? Type22 { get; set; } + public int? Type22 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type23 { get; set; } + public global::tryAGI.OpenAI.FileSearchRankingOptions? Type23 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantObjectObject? Type24 { get; set; } + public global::tryAGI.OpenAI.FileSearchRanker? Type24 { get; set; } /// /// /// - public object? Type25 { get; set; } + public double? Type25 { get; set; } /// /// /// - public double? Type26 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFunction? Type26 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantObjectToolResources? Type27 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFunctionType? Type27 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? Type28 { get; set; } + public global::tryAGI.OpenAI.FunctionObject? Type28 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type29 { get; set; } + public global::tryAGI.OpenAI.AssistantObjectToolResources2? Type29 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? Type30 { get; set; } + public global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? Type30 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type31 { get; set; } + public global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? Type31 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantTool? Type32 { get; set; } + public global::System.Collections.Generic.Dictionary? Type32 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsCode? Type33 { get; set; } + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? Type33 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsCodeType? Type34 { get; set; } + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum? Type34 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFileSearch? Type35 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatText? Type35 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? Type36 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatTextType? Type36 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchRankingOptions? Type37 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatJsonObject? Type37 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchRanker? Type38 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatJsonObjectType? Type38 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFileSearchType? Type39 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatJsonSchema? Type39 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFunction? Type40 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatJsonSchemaType? Type40 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionObject? Type41 { get; set; } + public global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchema? Type41 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFunctionType? Type42 { get; set; } + public global::tryAGI.OpenAI.AssistantStreamEvent? Type42 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolDiscriminator? Type43 { get; set; } + public global::tryAGI.OpenAI.ThreadStreamEvent? Type43 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantStreamEvent? Type44 { get; set; } + public global::tryAGI.OpenAI.ThreadStreamEventVariant1? Type44 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadStreamEvent? Type45 { get; set; } + public global::tryAGI.OpenAI.ThreadStreamEventVariant1Event? Type45 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadStreamEventVariant1? Type46 { get; set; } + public global::tryAGI.OpenAI.ThreadObject? Type46 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadObject? Type47 { get; set; } + public global::tryAGI.OpenAI.ThreadObjectObject? Type47 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadObjectObject? Type48 { get; set; } + public global::tryAGI.OpenAI.ThreadObjectToolResources2? Type48 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadObjectToolResources? Type49 { get; set; } + public global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? Type49 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? Type50 { get; set; } + public global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? Type50 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? Type51 { get; set; } + public global::tryAGI.OpenAI.RunStreamEvent? Type51 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadStreamEventVariant1Event? Type52 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant1? Type52 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ThreadStreamEventDiscriminator? Type53 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant1Event? Type53 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEvent? Type54 { get; set; } + public global::tryAGI.OpenAI.RunObject? Type54 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant1? Type55 { get; set; } + public global::tryAGI.OpenAI.RunObjectObject? Type55 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObject? Type56 { get; set; } + public global::tryAGI.OpenAI.RunObjectStatus? Type56 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectIncompleteDetails? Type57 { get; set; } + public global::tryAGI.OpenAI.RunObjectRequiredAction? Type57 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectIncompleteDetailsReason? Type58 { get; set; } + public global::tryAGI.OpenAI.RunObjectRequiredActionType? Type58 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectLastError? Type59 { get; set; } + public global::tryAGI.OpenAI.RunObjectRequiredActionSubmitToolOutputs? Type59 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectLastErrorCode? Type60 { get; set; } + public global::System.Collections.Generic.IList? Type60 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectObject? Type61 { get; set; } + public global::tryAGI.OpenAI.RunToolCallObject? Type61 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectRequiredAction? Type62 { get; set; } + public global::tryAGI.OpenAI.RunToolCallObjectType? Type62 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectRequiredActionSubmitToolOutputs? Type63 { get; set; } + public global::tryAGI.OpenAI.RunToolCallObjectFunction? Type63 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type64 { get; set; } + public global::tryAGI.OpenAI.RunObjectLastError? Type64 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunToolCallObject? Type65 { get; set; } + public global::tryAGI.OpenAI.RunObjectLastErrorCode? Type65 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunToolCallObjectFunction? Type66 { get; set; } + public global::tryAGI.OpenAI.RunObjectIncompleteDetails? Type66 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunToolCallObjectType? Type67 { get; set; } + public global::tryAGI.OpenAI.RunObjectIncompleteDetailsReason? Type67 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunObjectRequiredActionType? Type68 { get; set; } + public global::tryAGI.OpenAI.RunCompletionUsageVariant1? Type68 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? Type69 { get; set; } + public global::tryAGI.OpenAI.AllOf? Type69 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum? Type70 { get; set; } + public global::tryAGI.OpenAI.TruncationObject? Type70 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatText? Type71 { get; set; } + public global::tryAGI.OpenAI.TruncationObjectType? Type71 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatTextType? Type72 { get; set; } + public global::tryAGI.OpenAI.AllOf? Type72 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatJsonObject? Type73 { get; set; } + public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? Type73 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatJsonObjectType? Type74 { get; set; } + public global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum? Type74 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatJsonSchema? Type75 { get; set; } + public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Type75 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchema? Type76 { get; set; } + public global::tryAGI.OpenAI.AssistantsNamedToolChoiceType? Type76 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatJsonSchemaType? Type77 { get; set; } + public global::tryAGI.OpenAI.AssistantsNamedToolChoiceFunction? Type77 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStatus? Type78 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant2? Type78 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? Type79 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant2Event? Type79 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum? Type80 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant3? Type80 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Type81 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant3Event? Type81 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsNamedToolChoiceFunction? Type82 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant4? Type82 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantsNamedToolChoiceType? Type83 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant4Event? Type83 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TruncationObject? Type84 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant5? Type84 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TruncationObjectType? Type85 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant5Event? Type85 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunCompletionUsage? Type86 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant6? Type86 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant1Event? Type87 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant6Event? Type87 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant2? Type88 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant7? Type88 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant2Event? Type89 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant7Event? Type89 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant3? Type90 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant8? Type90 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant3Event? Type91 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant8Event? Type91 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant4? Type92 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant9? Type92 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant4Event? Type93 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant9Event? Type93 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant5? Type94 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant10? Type94 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant5Event? Type95 { get; set; } + public global::tryAGI.OpenAI.RunStreamEventVariant10Event? Type95 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant6? Type96 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEvent? Type96 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant6Event? Type97 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant1? Type97 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant7? Type98 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant1Event? Type98 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant7Event? Type99 { get; set; } + public global::tryAGI.OpenAI.RunStepObject? Type99 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant8? Type100 { get; set; } + public global::tryAGI.OpenAI.RunStepObjectObject? Type100 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant8Event? Type101 { get; set; } + public global::tryAGI.OpenAI.RunStepObjectType? Type101 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant9? Type102 { get; set; } + public global::tryAGI.OpenAI.RunStepObjectStatus? Type102 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant9Event? Type103 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type103 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant10? Type104 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? Type104 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventVariant10Event? Type105 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectType? Type105 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStreamEventDiscriminator? Type106 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectMessageCreation? Type106 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEvent? Type107 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? Type107 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant1? Type108 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsObjectType? Type108 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObject? Type109 { get; set; } + public global::System.Collections.Generic.IList>? Type109 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectLastError? Type110 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type110 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectLastErrorCode? Type111 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? Type111 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectObject? Type112 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectType? Type112 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectStatus? Type113 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter? Type113 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectStepDetails? Type114 { get; set; } + public global::System.Collections.Generic.IList>? Type114 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? Type115 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type115 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectMessageCreation? Type116 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Type116 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectType? Type117 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObjectType? Type117 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? Type118 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Type118 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type119 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectType? Type119 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCall? Type120 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage? Type120 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? Type121 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? Type121 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter? Type122 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectType? Type122 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type123 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch? Type123 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? Type124 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject? Type124 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Type125 { get; set; } + public global::System.Collections.Generic.IList? Type125 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObjectType? Type126 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObject? Type126 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Type127 { get; set; } + public global::System.Collections.Generic.IList? Type127 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage? Type128 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItem? Type128 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectType? Type129 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? Type129 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? Type130 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? Type130 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectType? Type131 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectType? Type131 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? Type132 { get; set; } + public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction? Type132 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch? Type133 { get; set; } + public global::tryAGI.OpenAI.RunStepObjectLastError2? Type133 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchRankingOptionsObject? Type134 { get; set; } + public global::tryAGI.OpenAI.RunStepObjectLastErrorCode? Type134 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type135 { get; set; } + public global::tryAGI.OpenAI.RunStepCompletionUsageVariant1? Type135 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObject? Type136 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Type136 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type137 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant2Event? Type137 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItem? Type138 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Type138 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? Type139 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant3Event? Type139 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectType? Type140 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaObject? Type140 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? Type141 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaObjectObject? Type141 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction? Type142 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaObjectDelta? Type142 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectType? Type143 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type143 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator? Type144 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? Type144 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDetailsToolCallsObjectType? Type145 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType? Type145 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator? Type146 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? Type146 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepObjectType? Type147 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? Type147 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepCompletionUsage? Type148 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObjectType? Type148 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant1Event? Type149 { get; set; } + public global::System.Collections.Generic.IList>? Type149 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Type150 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type150 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant2Event? Type151 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? Type151 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Type152 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType? Type152 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaObject? Type153 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? Type153 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaObjectDelta? Type154 { get; set; } + public global::System.Collections.Generic.IList>? Type154 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails? Type155 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type155 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? Type156 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Type156 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? Type157 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType? Type157 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType? Type158 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Type158 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? Type159 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType? Type159 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type160 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Type160 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall? Type161 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? Type161 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? Type162 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType? Type162 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? Type163 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? Type163 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type164 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType? Type164 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? Type165 { get; set; } + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Type165 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Type166 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Type166 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Type167 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant4Event? Type167 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? Type168 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Type168 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType? Type169 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant5Event? Type169 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? Type170 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Type170 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType? Type171 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant6Event? Type171 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? Type172 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Type172 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Type173 { get; set; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant7Event? Type173 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType? Type174 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEvent? Type174 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator? Type175 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant1? Type175 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObjectType? Type176 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant1Event? Type176 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? Type177 { get; set; } + public global::tryAGI.OpenAI.MessageObject? Type177 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaObjectObject? Type178 { get; set; } + public global::tryAGI.OpenAI.MessageObjectObject? Type178 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant3Event? Type179 { get; set; } + public global::tryAGI.OpenAI.MessageObjectStatus? Type179 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Type180 { get; set; } + public global::tryAGI.OpenAI.MessageObjectIncompleteDetails2? Type180 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant4Event? Type181 { get; set; } + public global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason? Type181 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Type182 { get; set; } + public global::tryAGI.OpenAI.MessageObjectRole? Type182 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant5Event? Type183 { get; set; } + public global::System.Collections.Generic.IList>? Type183 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Type184 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type184 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant6Event? Type185 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageFileObject? Type185 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Type186 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageFileObjectType? Type186 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventVariant7Event? Type187 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageFileObjectImageFile? Type187 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepStreamEventDiscriminator? Type188 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageFileObjectImageFileDetail? Type188 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEvent? Type189 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageUrlObject? Type189 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant1? Type190 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageUrlObjectType? Type190 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObject? Type191 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrl? Type191 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type192 { get; set; } + public global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrlDetail? Type192 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectAttachment? Type193 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextObject? Type193 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type194 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextObjectType? Type194 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type195 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextObjectText? Type195 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? Type196 { get; set; } + public global::System.Collections.Generic.IList>? Type196 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnlyType? Type197 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type197 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type198 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? Type198 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContent? Type199 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectType? Type199 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageFileObject? Type200 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectFileCitation? Type200 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageFileObjectImageFile? Type201 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? Type201 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageFileObjectImageFileDetail? Type202 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectType? Type202 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageFileObjectType? Type203 { get; set; } + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectFilePath? Type203 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageUrlObject? Type204 { get; set; } + public global::tryAGI.OpenAI.MessageContentRefusalObject? Type204 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrl? Type205 { get; set; } + public global::tryAGI.OpenAI.MessageContentRefusalObjectType? Type205 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrlDetail? Type206 { get; set; } + public global::System.Collections.Generic.IList? Type206 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentImageUrlObjectType? Type207 { get; set; } + public global::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item? Type207 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextObject? Type208 { get; set; } + public global::System.Collections.Generic.IList>? Type208 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextObjectText? Type209 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type209 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type210 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? Type210 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextAnnotation? Type211 { get; set; } + public global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnlyType? Type211 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? Type212 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant2? Type212 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectFileCitation? Type213 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant2Event? Type213 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectType? Type214 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant3? Type214 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? Type215 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant3Event? Type215 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectFilePath? Type216 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaObject? Type216 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectType? Type217 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaObjectObject? Type217 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextAnnotationDiscriminator? Type218 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaObjectDelta? Type218 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentTextObjectType? Type219 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaObjectDeltaRole? Type219 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentRefusalObject? Type220 { get; set; } + public global::System.Collections.Generic.IList>? Type220 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentRefusalObjectType? Type221 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type221 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentDiscriminator? Type222 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? Type222 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectIncompleteDetails? Type223 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectType? Type223 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason? Type224 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? Type224 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectObject? Type225 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? Type225 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectRole? Type226 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextObject? Type226 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageObjectStatus? Type227 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextObjectType? Type227 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant1Event? Type228 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? Type228 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant2? Type229 { get; set; } + public global::System.Collections.Generic.IList>? Type229 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant2Event? Type230 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type230 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant3? Type231 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? Type231 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaObject? Type232 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType? Type232 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaObjectDelta? Type233 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? Type233 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type234 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? Type234 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentDelta? Type235 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType? Type235 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? Type236 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? Type236 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? Type237 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? Type237 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? Type238 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentRefusalObjectType? Type238 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectType? Type239 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? Type239 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextObject? Type240 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectType? Type240 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? Type241 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? Type242 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextAnnotationDelta? Type243 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant4? Type243 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? Type244 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant4Event? Type244 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? Type245 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant5? Type245 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType? Type246 { get; set; } + public global::tryAGI.OpenAI.MessageStreamEventVariant5Event? Type246 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? Type247 { get; set; } + public global::tryAGI.OpenAI.ErrorEvent? Type247 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? Type248 { get; set; } + public global::tryAGI.OpenAI.ErrorEventEvent? Type248 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType? Type249 { get; set; } + public global::tryAGI.OpenAI.Error? Type249 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator? Type250 { get; set; } + public global::tryAGI.OpenAI.DoneEvent? Type250 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentTextObjectType? Type251 { get; set; } + public global::tryAGI.OpenAI.DoneEventEvent? Type251 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? Type252 { get; set; } + public global::tryAGI.OpenAI.DoneEventData? Type252 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentRefusalObjectType? Type253 { get; set; } + public global::tryAGI.OpenAI.AssistantSupportedModels? Type253 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? Type254 { get; set; } + public global::tryAGI.OpenAI.AudioResponseFormat? Type254 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? Type255 { get; set; } + public global::tryAGI.OpenAI.AudioTranscription? Type255 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? Type256 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type256 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectType? Type257 { get; set; } + public global::tryAGI.OpenAI.AudioTranscriptionModel? Type257 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentDeltaDiscriminator? Type258 { get; set; } + public global::tryAGI.OpenAI.AuditLog? Type258 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaObjectDeltaRole? Type259 { get; set; } + public global::tryAGI.OpenAI.AuditLogEventType? Type259 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageDeltaObjectObject? Type260 { get; set; } + public global::tryAGI.OpenAI.AuditLogProject? Type260 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant3Event? Type261 { get; set; } + public global::tryAGI.OpenAI.AuditLogActor? Type261 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant4? Type262 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorType? Type262 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant4Event? Type263 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorSession? Type263 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant5? Type264 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorUser? Type264 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventVariant5Event? Type265 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorApiKey? Type265 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStreamEventDiscriminator? Type266 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorApiKeyType? Type266 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ErrorEvent? Type267 { get; set; } + public global::tryAGI.OpenAI.AuditLogActorServiceAccount? Type267 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Error? Type268 { get; set; } + public global::tryAGI.OpenAI.AuditLogApiKeyCreated? Type268 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ErrorEventEvent? Type269 { get; set; } + public global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? Type269 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantStreamEventDiscriminator? Type270 { get; set; } + public global::tryAGI.OpenAI.AuditLogApiKeyUpdated? Type270 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType? Type271 { get; set; } + public global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? Type271 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Type272 { get; set; } + public global::tryAGI.OpenAI.AuditLogApiKeyDeleted? Type272 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType? Type273 { get; set; } + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreated? Type273 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AssistantSupportedModels? Type274 { get; set; } + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? Type274 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AudioResponseFormat? Type275 { get; set; } + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionDeleted? Type275 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AudioTranscription? Type276 { get; set; } + public global::tryAGI.OpenAI.AuditLogExternalKeyRegistered? Type276 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AudioTranscriptionModel? Type277 { get; set; } + public global::tryAGI.OpenAI.AuditLogExternalKeyRemoved? Type277 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLog? Type278 { get; set; } + public global::tryAGI.OpenAI.AuditLogGroupCreated? Type278 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActor? Type279 { get; set; } + public global::tryAGI.OpenAI.AuditLogGroupCreatedData? Type279 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorApiKey? Type280 { get; set; } + public global::tryAGI.OpenAI.AuditLogGroupUpdated? Type280 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorServiceAccount? Type281 { get; set; } + public global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested? Type281 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorApiKeyType? Type282 { get; set; } + public global::tryAGI.OpenAI.AuditLogGroupDeleted? Type282 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorUser? Type283 { get; set; } + public global::tryAGI.OpenAI.AuditLogScimEnabled? Type283 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorSession? Type284 { get; set; } + public global::tryAGI.OpenAI.AuditLogScimDisabled? Type284 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogActorType? Type285 { get; set; } + public global::tryAGI.OpenAI.AuditLogInviteSent? Type285 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogApiKeyCreated? Type286 { get; set; } + public global::tryAGI.OpenAI.AuditLogInviteSentData? Type286 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? Type287 { get; set; } + public global::tryAGI.OpenAI.AuditLogInviteAccepted? Type287 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogApiKeyDeleted? Type288 { get; set; } + public global::tryAGI.OpenAI.AuditLogInviteDeleted? Type288 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogApiKeyUpdated? Type289 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistCreated? Type289 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? Type290 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated? Type290 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificateCreated? Type291 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted? Type291 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificateDeleted? Type292 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated? Type292 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificateUpdated? Type293 { get; set; } + public global::System.Collections.Generic.IList? Type293 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificatesActivated? Type294 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig? Type294 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type295 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated? Type295 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificatesActivatedCertificate? Type296 { get; set; } + public global::System.Collections.Generic.IList? Type296 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? Type297 { get; set; } + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig? Type297 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type298 { get; set; } + public global::tryAGI.OpenAI.AuditLogLoginFailed? Type298 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCertificatesDeactivatedCertificate? Type299 { get; set; } + public global::tryAGI.OpenAI.AuditLogLogoutFailed? Type299 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreated? Type300 { get; set; } + public global::tryAGI.OpenAI.AuditLogOrganizationUpdated? Type300 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? Type301 { get; set; } + public global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? Type301 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionDeleted? Type302 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectCreated? Type302 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogInviteAccepted? Type303 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectCreatedData? Type303 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogInviteDeleted? Type304 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectUpdated? Type304 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogInviteSent? Type305 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? Type305 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogInviteSentData? Type306 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectArchived? Type306 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogLoginFailed? Type307 { get; set; } + public global::tryAGI.OpenAI.AuditLogProjectDeleted? Type307 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogLogoutFailed? Type308 { get; set; } + public global::tryAGI.OpenAI.AuditLogRateLimitUpdated? Type308 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogOrganizationUpdated? Type309 { get; set; } + public global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? Type309 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? Type310 { get; set; } + public global::tryAGI.OpenAI.AuditLogRateLimitDeleted? Type310 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProject? Type311 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleCreated? Type311 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProjectArchived? Type312 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleUpdated? Type312 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProjectCreated? Type313 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested? Type313 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProjectCreatedData? Type314 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleDeleted? Type314 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProjectUpdated? Type315 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated? Type315 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? Type316 { get; set; } + public global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted? Type316 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogRateLimitDeleted? Type317 { get; set; } + public global::tryAGI.OpenAI.AuditLogServiceAccountCreated? Type317 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogRateLimitUpdated? Type318 { get; set; } + public global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? Type318 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? Type319 { get; set; } + public global::tryAGI.OpenAI.AuditLogServiceAccountUpdated? Type319 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogServiceAccountCreated? Type320 { get; set; } + public global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? Type320 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? Type321 { get; set; } + public global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? Type321 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? Type322 { get; set; } + public global::tryAGI.OpenAI.AuditLogUserAdded? Type322 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogServiceAccountUpdated? Type323 { get; set; } + public global::tryAGI.OpenAI.AuditLogUserAddedData? Type323 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? Type324 { get; set; } + public global::tryAGI.OpenAI.AuditLogUserUpdated? Type324 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogEventType? Type325 { get; set; } + public global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? Type325 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogUserAdded? Type326 { get; set; } + public global::tryAGI.OpenAI.AuditLogUserDeleted? Type326 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogUserAddedData? Type327 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificateCreated? Type327 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogUserDeleted? Type328 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificateUpdated? Type328 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogUserUpdated? Type329 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificateDeleted? Type329 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? Type330 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificatesActivated? Type330 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AutoChunkingStrategyRequestParam? Type331 { get; set; } + public global::System.Collections.Generic.IList? Type331 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AutoChunkingStrategyRequestParamType? Type332 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificatesActivatedCertificate? Type332 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Batch? Type333 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? Type333 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchErrors? Type334 { get; set; } + public global::System.Collections.Generic.IList? Type334 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type335 { get; set; } + public global::tryAGI.OpenAI.AuditLogCertificatesDeactivatedCertificate? Type335 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchError? Type336 { get; set; } + public global::tryAGI.OpenAI.AutoChunkingStrategyRequestParam? Type336 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchObject? Type337 { get; set; } + public global::tryAGI.OpenAI.AutoChunkingStrategyRequestParamType? Type337 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestCounts? Type338 { get; set; } + public global::tryAGI.OpenAI.Batch? Type338 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchStatus? Type339 { get; set; } + public global::tryAGI.OpenAI.BatchObject? Type339 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchFileExpirationAfter? Type340 { get; set; } + public global::tryAGI.OpenAI.BatchErrors? Type340 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchFileExpirationAfterAnchor? Type341 { get; set; } + public global::System.Collections.Generic.IList? Type341 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestInput? Type342 { get; set; } + public global::tryAGI.OpenAI.BatchErrorsDataItem? Type342 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestInputMethod? Type343 { get; set; } + public global::tryAGI.OpenAI.BatchStatus? Type343 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestOutput? Type344 { get; set; } + public global::tryAGI.OpenAI.BatchRequestCounts? Type344 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestOutputError? Type345 { get; set; } + public global::tryAGI.OpenAI.BatchUsage? Type345 { get; set; } /// /// /// - public global::tryAGI.OpenAI.BatchRequestOutputResponse? Type346 { get; set; } + public global::tryAGI.OpenAI.BatchUsageInputTokensDetails? Type346 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Certificate? Type347 { get; set; } + public global::tryAGI.OpenAI.BatchUsageOutputTokensDetails? Type347 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CertificateCertificateDetails? Type348 { get; set; } + public global::tryAGI.OpenAI.BatchFileExpirationAfter? Type348 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CertificateObject? Type349 { get; set; } + public global::tryAGI.OpenAI.BatchFileExpirationAfterAnchor? Type349 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionAllowedTools? Type350 { get; set; } + public global::tryAGI.OpenAI.Certificate? Type350 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionAllowedToolsMode? Type351 { get; set; } + public global::tryAGI.OpenAI.CertificateObject? Type351 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type352 { get; set; } + public global::tryAGI.OpenAI.CertificateCertificateDetails? Type352 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? Type353 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionAllowedTools? Type353 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoiceType? Type354 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionAllowedToolsMode? Type354 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionDeleted? Type355 { get; set; } + public global::System.Collections.Generic.IList? Type355 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionDeletedObject? Type356 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? Type356 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionFunctionCallOption? Type357 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoiceType? Type357 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionFunctions? Type358 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionDeleted? Type358 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionList? Type359 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionDeletedObject? Type359 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type360 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionFunctionCallOption? Type360 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionResponse? Type361 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionFunctions? Type361 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type362 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionList? Type362 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionResponseChoice? Type363 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionListObject? Type363 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type364 { get; set; } + public global::System.Collections.Generic.IList? Type364 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs? Type365 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionResponse? Type365 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type366 { get; set; } + public global::System.Collections.Generic.IList? Type366 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionTokenLogprob? Type367 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionResponseChoice? Type367 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type368 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type368 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type369 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessage? Type369 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprob? Type370 { get; set; } + public global::System.Collections.Generic.IList? Type370 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessage? Type371 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallsItem? Type371 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type372 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Type372 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotation? Type373 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallType? Type373 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotationType? Type374 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction? Type374 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotationUrlCitation? Type375 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? Type375 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio? Type376 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallType? Type376 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageFunctionCall? Type377 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom? Type377 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionResponseMessageRole? Type378 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallDiscriminator? Type378 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type379 { get; set; } + public global::System.Collections.Generic.IList? Type379 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallsItem? Type380 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotation? Type380 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Type381 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotationType? Type381 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction? Type382 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageAnnotationUrlCitation? Type382 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallType? Type383 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageRole? Type383 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? Type384 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageFunctionCall? Type384 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom? Type385 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2? Type385 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallType? Type386 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2? Type386 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallDiscriminator? Type387 { get; set; } + public global::System.Collections.Generic.IList? Type387 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionResponseObject? Type388 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionTokenLogprob? Type388 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ServiceTier? Type389 { get; set; } + public global::System.Collections.Generic.IList? Type389 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompletionUsage? Type390 { get; set; } + public global::System.Collections.Generic.IList? Type390 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompletionUsageCompletionTokensDetails? Type391 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprob? Type391 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompletionUsagePromptTokensDetails? Type392 { get; set; } + public global::tryAGI.OpenAI.ServiceTierEnum? Type392 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionListObject? Type393 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionResponseObject? Type393 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageList? Type394 { get; set; } + public global::tryAGI.OpenAI.CompletionUsage? Type394 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type395 { get; set; } + public global::tryAGI.OpenAI.CompletionUsageCompletionTokensDetails? Type395 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AllOf? Type396 { get; set; } + public global::tryAGI.OpenAI.CompletionUsagePromptTokensDetails? Type396 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageListDataItem? Type397 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageList? Type397 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type398 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageListObject? Type398 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type399 { get; set; } + public global::System.Collections.Generic.IList>? Type399 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Type400 { get; set; } + public global::tryAGI.OpenAI.AllOf? Type400 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartTextType? Type401 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageListDataItem? Type401 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? Type402 { get; set; } + public global::System.Collections.Generic.IList>? Type402 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl? Type403 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type403 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Type404 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Type404 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageType? Type405 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartTextType? Type405 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageListObject? Type406 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? Type406 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunk? Type407 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageType? Type407 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? Type408 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl? Type408 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkType? Type409 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Type409 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type410 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunk? Type410 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionModalitie? Type411 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkType? Type411 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? Type412 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? Type412 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceFunction? Type413 { get; set; } + public global::System.Collections.Generic.IList? Type413 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceType? Type414 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionModalitiesVariant1Item? Type414 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? Type415 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? Type415 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomCustom? Type416 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceType? Type416 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomType? Type417 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceFunction? Type417 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Type418 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? Type418 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio? Type419 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomType? Type419 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall? Type420 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomCustom? Type420 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRole? Type421 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Type421 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPart? Type422 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type422 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Type423 { get; set; } + public global::System.Collections.Generic.IList? Type423 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusalType? Type424 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPart? Type424 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator? Type425 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Type425 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage? Type426 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusalType? Type426 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type427 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPartDiscriminator? Type427 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type428 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRole? Type428 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessageRole? Type429 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2? Type429 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Type430 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2? Type430 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageRole? Type431 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage? Type431 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessage? Type432 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type432 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage? Type433 { get; set; } + public global::System.Collections.Generic.IList? Type433 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type434 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessageRole? Type434 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type435 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Type435 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageContentPart? Type436 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageRole? Type436 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageRole? Type437 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessage? Type437 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestUserMessage? Type438 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage? Type438 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type439 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type439 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type440 { get; set; } + public global::System.Collections.Generic.IList? Type440 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPart? Type441 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageContentPart? Type441 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? Type442 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageRole? Type442 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio? Type443 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestUserMessage? Type443 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudioFormat? Type444 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type444 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioType? Type445 { get; set; } + public global::System.Collections.Generic.IList? Type445 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? Type446 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPart? Type446 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileFile? Type447 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? Type447 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileType? Type448 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioType? Type448 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? Type449 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio? Type449 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageRole? Type450 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudioFormat? Type450 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Type451 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? Type451 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type452 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileType? Type452 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type453 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileFile? Type453 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestToolMessageContentPart? Type454 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageRole? Type454 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestToolMessageRole? Type455 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Type455 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRequestMessageDiscriminator? Type456 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestToolMessageRole? Type456 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionRole? Type457 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type457 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionStreamOptions? Type458 { get; set; } + public global::System.Collections.Generic.IList? Type458 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionStreamResponseDelta? Type459 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestToolMessageContentPart? Type459 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaFunctionCall? Type460 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageDiscriminator? Type460 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRole? Type461 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionRole? Type461 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type462 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? Type462 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionTool? Type463 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionStreamResponseDelta? Type463 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionToolType? Type464 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaFunctionCall? Type464 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionToolChoiceOption? Type465 { get; set; } + public global::System.Collections.Generic.IList? Type465 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? Type466 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRole? Type466 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChatModel? Type467 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionTool? Type467 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChunkingStrategyRequestParam? Type468 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionToolType? Type468 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Type469 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionToolChoiceOption? Type469 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StaticChunkingStrategy? Type470 { get; set; } + public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? Type470 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParamType? Type471 { get; set; } + public global::tryAGI.OpenAI.ChunkingStrategyRequestParam? Type471 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChunkingStrategyRequestParamDiscriminator? Type472 { get; set; } + public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Type472 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChunkingStrategyResponse? Type473 { get; set; } + public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParamType? Type473 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? Type474 { get; set; } + public global::tryAGI.OpenAI.StaticChunkingStrategy? Type474 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParamType? Type475 { get; set; } + public global::tryAGI.OpenAI.ChunkingStrategyRequestParamDiscriminator? Type475 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? Type476 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterFileOutput? Type476 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OtherChunkingStrategyResponseParamType? Type477 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterFileOutputType? Type477 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator? Type478 { get; set; } + public global::System.Collections.Generic.IList? Type478 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Click? Type479 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterFileOutputFile? Type479 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ClickButton? Type480 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterTextOutput? Type480 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ClickType? Type481 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterTextOutputType? Type481 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterFileOutput? Type482 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterTool? Type482 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type483 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolType? Type483 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterFileOutputFile? Type484 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type484 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterFileOutputType? Type485 { get; set; } + public global::tryAGI.OpenAI.AutoCodeInterpreterToolParam? Type485 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterOutputImage? Type486 { get; set; } + public global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType? Type486 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterOutputImageType? Type487 { get; set; } + public global::tryAGI.OpenAI.ContainerMemoryLimit? Type487 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? Type488 { get; set; } + public global::tryAGI.OpenAI.NetworkPolicy2? Type488 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterOutputLogsType? Type489 { get; set; } + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Type489 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterTextOutput? Type490 { get; set; } + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType? Type490 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterTextOutputType? Type491 { get; set; } + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Type491 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterTool? Type492 { get; set; } + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType? Type492 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type493 { get; set; } + public global::System.Collections.Generic.IList? Type493 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolAuto? Type494 { get; set; } + public global::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam? Type494 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolAutoType? Type495 { get; set; } + public global::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator? Type495 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolType? Type496 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolCall? Type496 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolCall? Type497 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolCallType? Type497 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type498 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolCallStatus? Type498 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputsItem? Type499 { get; set; } + public global::System.Collections.Generic.IList? Type499 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator? Type500 { get; set; } + public global::tryAGI.OpenAI.OutputsVariant1Item? Type500 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator? Type501 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? Type501 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolCallStatus? Type502 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterOutputLogsType? Type502 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CodeInterpreterToolCallType? Type503 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterOutputImage? Type503 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComparisonFilter? Type504 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterOutputImageType? Type504 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComparisonFilterType? Type505 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator? Type505 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type506 { get; set; } + public global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator? Type506 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompleteUploadRequest? Type507 { get; set; } + public global::tryAGI.OpenAI.ComparisonFilter? Type507 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompoundFilter? Type508 { get; set; } + public global::tryAGI.OpenAI.ComparisonFilterType? Type508 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type509 { get; set; } + public global::tryAGI.OpenAI.OneOf>>? Type509 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type510 { get; set; } + public global::System.Collections.Generic.IList>? Type510 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CompoundFilterType? Type511 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type511 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerAction? Type512 { get; set; } + public global::tryAGI.OpenAI.CompleteUploadRequest? Type512 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DoubleClick? Type513 { get; set; } + public global::tryAGI.OpenAI.CompoundFilter? Type513 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DoubleClickType? Type514 { get; set; } + public global::tryAGI.OpenAI.CompoundFilterType? Type514 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Drag? Type515 { get; set; } + public global::System.Collections.Generic.IList? Type515 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type516 { get; set; } + public global::tryAGI.OpenAI.FiltersItem? Type516 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Coordinate? Type517 { get; set; } + public global::tryAGI.OpenAI.CompoundFilterFilterDiscriminator? Type517 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DragType? Type518 { get; set; } + public global::tryAGI.OpenAI.ComputerAction? Type518 { get; set; } /// /// /// - public global::tryAGI.OpenAI.KeyPress? Type519 { get; set; } + public global::tryAGI.OpenAI.ClickParam? Type519 { get; set; } /// /// /// - public global::tryAGI.OpenAI.KeyPressType? Type520 { get; set; } + public global::tryAGI.OpenAI.ClickParamType? Type520 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Move? Type521 { get; set; } + public global::tryAGI.OpenAI.ClickButtonType? Type521 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MoveType? Type522 { get; set; } + public global::tryAGI.OpenAI.DoubleClickAction? Type522 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Screenshot? Type523 { get; set; } + public global::tryAGI.OpenAI.DoubleClickActionType? Type523 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ScreenshotType? Type524 { get; set; } + public global::tryAGI.OpenAI.DragParam? Type524 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Scroll? Type525 { get; set; } + public global::tryAGI.OpenAI.DragParamType? Type525 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ScrollType? Type526 { get; set; } + public global::System.Collections.Generic.IList? Type526 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Type? Type527 { get; set; } + public global::tryAGI.OpenAI.CoordParam? Type527 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TypeType1? Type528 { get; set; } + public global::tryAGI.OpenAI.KeyPressAction? Type528 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Wait? Type529 { get; set; } + public global::tryAGI.OpenAI.KeyPressActionType? Type529 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WaitType? Type530 { get; set; } + public global::tryAGI.OpenAI.MoveParam? Type530 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerActionDiscriminator? Type531 { get; set; } + public global::tryAGI.OpenAI.MoveParamType? Type531 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerCallOutputItemParam? Type532 { get; set; } + public global::tryAGI.OpenAI.ScreenshotParam? Type532 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type533 { get; set; } + public global::tryAGI.OpenAI.ScreenshotParamType? Type533 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerCallSafetyCheckParam? Type534 { get; set; } + public global::tryAGI.OpenAI.ScrollParam? Type534 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerScreenshotImage? Type535 { get; set; } + public global::tryAGI.OpenAI.ScrollParamType? Type535 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerScreenshotImageType? Type536 { get; set; } + public global::tryAGI.OpenAI.TypeParam? Type536 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerCallOutputItemParamType? Type537 { get; set; } + public global::tryAGI.OpenAI.TypeParamType? Type537 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerEnvironment? Type538 { get; set; } + public global::tryAGI.OpenAI.WaitParam? Type538 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerScreenshotContent? Type539 { get; set; } + public global::tryAGI.OpenAI.WaitParamType? Type539 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerScreenshotContentType? Type540 { get; set; } + public global::tryAGI.OpenAI.ComputerActionDiscriminator? Type540 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCall? Type541 { get; set; } + public global::System.Collections.Generic.IList? Type541 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type542 { get; set; } + public global::tryAGI.OpenAI.ComputerScreenshotImage? Type542 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallSafetyCheck? Type543 { get; set; } + public global::tryAGI.OpenAI.ComputerScreenshotImageType? Type543 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallStatus? Type544 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCall? Type544 { get; set; } /// /// /// @@ -2210,51 +2212,51 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallOutput? Type546 { get; set; } + public global::System.Collections.Generic.IList? Type546 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallOutputStatus? Type547 { get; set; } + public global::tryAGI.OpenAI.ComputerCallSafetyCheckParam? Type547 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallOutputType? Type548 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallStatus? Type548 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallOutputResource? Type549 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallOutput? Type549 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Type550 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallOutputType? Type550 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerUsePreviewTool? Type551 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallOutputStatus? Type551 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ComputerUsePreviewToolType? Type552 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? Type552 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileListResource? Type553 { get; set; } + public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Type553 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type554 { get; set; } + public global::tryAGI.OpenAI.ContainerFileListResource? Type554 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileResource? Type555 { get; set; } + public global::tryAGI.OpenAI.ContainerFileListResourceObject? Type555 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileResourceObject? Type556 { get; set; } + public global::System.Collections.Generic.IList? Type556 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerFileListResourceObject? Type557 { get; set; } + public global::tryAGI.OpenAI.ContainerFileResource? Type557 { get; set; } /// /// /// @@ -2262,75 +2264,75 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList? Type559 { get; set; } + public global::tryAGI.OpenAI.ContainerListResourceObject? Type559 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerResource? Type560 { get; set; } + public global::System.Collections.Generic.IList? Type560 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerResourceExpiresAfter? Type561 { get; set; } + public global::tryAGI.OpenAI.ContainerResource? Type561 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerResourceExpiresAfterAnchor? Type562 { get; set; } + public global::tryAGI.OpenAI.ContainerResourceExpiresAfter? Type562 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContainerListResourceObject? Type563 { get; set; } + public global::tryAGI.OpenAI.ContainerResourceExpiresAfterAnchor? Type563 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Content5? Type564 { get; set; } + public global::tryAGI.OpenAI.ContainerResourceMemoryLimit? Type564 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputContent? Type565 { get; set; } + public global::tryAGI.OpenAI.ContainerResourceNetworkPolicy? Type565 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputTextContent? Type566 { get; set; } + public global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType? Type566 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputTextContentType? Type567 { get; set; } + public global::tryAGI.OpenAI.Content5? Type567 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputImageContent? Type568 { get; set; } + public global::tryAGI.OpenAI.InputContent? Type568 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageDetail? Type569 { get; set; } + public global::tryAGI.OpenAI.InputTextContent? Type569 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputImageContentType? Type570 { get; set; } + public global::tryAGI.OpenAI.InputTextContentType? Type570 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputFileContent? Type571 { get; set; } + public global::tryAGI.OpenAI.InputImageContent? Type571 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputFileContentType? Type572 { get; set; } + public global::tryAGI.OpenAI.InputImageContentType? Type572 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputAudio? Type573 { get; set; } + public global::tryAGI.OpenAI.ImageDetail? Type573 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputAudioInputAudio1? Type574 { get; set; } + public global::tryAGI.OpenAI.InputFileContent? Type574 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputAudioInputAudio1Format? Type575 { get; set; } + public global::tryAGI.OpenAI.InputFileContentType? Type575 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputAudioType? Type576 { get; set; } + public global::tryAGI.OpenAI.FileInputDetail? Type576 { get; set; } /// /// /// @@ -2346,7306 +2348,9851 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList? Type580 { get; set; } + public global::tryAGI.OpenAI.OutputTextContentType? Type580 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type581 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Annotation? Type582 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileCitationBody? Type583 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileCitationBodyType? Type584 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlCitationBody? Type585 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlCitationBodyType? Type586 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ContainerFileCitationBody? Type587 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ContainerFileCitationBodyType? Type588 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FilePath? Type589 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FilePathType? Type590 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AnnotationDiscriminator? Type591 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type592 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.LogProb? Type593 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type594 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TopLogProb? Type595 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RefusalContent? Type596 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RefusalContentType? Type597 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ReasoningTextContent? Type598 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ReasoningTextContentType? Type599 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OutputContentDiscriminator? Type600 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ConversationItem? Type601 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Message? Type602 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.MessageType? Type603 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.MessageStatus? Type604 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.MessageRole? Type605 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type606 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ContentItem3? Type607 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TextContent? Type608 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TextContentType? Type609 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SummaryTextContent? Type610 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SummaryTextContentType? Type611 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ComputerScreenshotContent? Type612 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ComputerScreenshotContentType? Type613 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.MessageContentItemDiscriminator? Type614 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallResource? Type615 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCall? Type616 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallType? Type617 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallStatus? Type618 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Type619 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallOutputResource? Type620 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallOutput? Type621 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FunctionToolCallOutputType? Type622 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type581 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type623 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LogProb? Type582 { get; set; } + public global::System.Collections.Generic.IList? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type583 { get; set; } + public global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput? Type625 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TopLogProb? Type584 { get; set; } + public global::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator? Type626 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputTextContentType? Type585 { get; set; } + public global::tryAGI.OpenAI.FunctionToolCallOutputStatus? Type627 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RefusalContent? Type586 { get; set; } + public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Type628 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RefusalContentType? Type587 { get; set; } + public global::tryAGI.OpenAI.FileSearchToolCall? Type629 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningTextContent? Type588 { get; set; } + public global::tryAGI.OpenAI.FileSearchToolCallType? Type630 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningTextContentType? Type589 { get; set; } + public global::tryAGI.OpenAI.FileSearchToolCallStatus? Type631 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputContentDiscriminator? Type590 { get; set; } + public global::System.Collections.Generic.IList? Type632 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Conversation? Type591 { get; set; } + public global::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item? Type633 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationResource? Type592 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type634 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationResourceObject? Type593 { get; set; } + public float? Type635 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Conversation2? Type594 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolCall? Type636 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationItem? Type595 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolCallType? Type637 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Message? Type596 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolCallStatus? Type638 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type597 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolCallAction? Type639 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContentItem? Type598 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionSearch? Type640 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextContent? Type599 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionSearchType? Type641 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextContentType? Type600 { get; set; } + public global::System.Collections.Generic.IList? Type642 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SummaryTextContent? Type601 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionSearchSource? Type643 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SummaryTextContentType? Type602 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionSearchSourceType? Type644 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageContentItemDiscriminator? Type603 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionOpenPage? Type645 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageRole? Type604 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionOpenPageType? Type646 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageStatus? Type605 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionFind? Type647 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageType? Type606 { get; set; } + public global::tryAGI.OpenAI.WebSearchActionFindType? Type648 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallResource? Type607 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolCallActionDiscriminator? Type649 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCall? Type608 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolCall? Type650 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallStatus? Type609 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolCallType? Type651 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallType? Type610 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolCallStatus? Type652 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Type611 { get; set; } + public global::tryAGI.OpenAI.ToolSearchCall? Type653 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallOutputResource? Type612 { get; set; } + public global::tryAGI.OpenAI.ToolSearchCallType? Type654 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallOutput? Type613 { get; set; } + public global::tryAGI.OpenAI.ToolSearchExecutionType? Type655 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallOutputStatus? Type614 { get; set; } + public global::tryAGI.OpenAI.FunctionCallStatus? Type656 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallOutputType? Type615 { get; set; } + public global::tryAGI.OpenAI.ToolSearchOutput? Type657 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Type616 { get; set; } + public global::tryAGI.OpenAI.ToolSearchOutputType? Type658 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchToolCall? Type617 { get; set; } + public global::System.Collections.Generic.IList? Type659 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type618 { get; set; } + public global::tryAGI.OpenAI.Tool? Type660 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchToolCallResult? Type619 { get; set; } + public global::tryAGI.OpenAI.FunctionTool? Type661 { get; set; } /// /// /// - public float? Type620 { get; set; } + public global::tryAGI.OpenAI.FunctionToolType? Type662 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchToolCallStatus? Type621 { get; set; } + public global::tryAGI.OpenAI.FileSearchTool? Type663 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchToolCallType? Type622 { get; set; } + public global::tryAGI.OpenAI.FileSearchToolType? Type664 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolCall? Type623 { get; set; } + public global::tryAGI.OpenAI.RankingOptions? Type665 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolCallAction? Type624 { get; set; } + public global::tryAGI.OpenAI.RankerVersionType? Type666 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionSearch? Type625 { get; set; } + public global::tryAGI.OpenAI.HybridSearchOptions? Type667 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type626 { get; set; } + public global::tryAGI.OpenAI.Filters2? Type668 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionSearchSource? Type627 { get; set; } + public global::tryAGI.OpenAI.ComputerTool? Type669 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionSearchSourceType? Type628 { get; set; } + public global::tryAGI.OpenAI.ComputerToolType? Type670 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionSearchType? Type629 { get; set; } + public global::tryAGI.OpenAI.ComputerUsePreviewTool? Type671 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionOpenPage? Type630 { get; set; } + public global::tryAGI.OpenAI.ComputerUsePreviewToolType? Type672 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionOpenPageType? Type631 { get; set; } + public global::tryAGI.OpenAI.ComputerEnvironment? Type673 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionFind? Type632 { get; set; } + public global::tryAGI.OpenAI.WebSearchTool? Type674 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchActionFindType? Type633 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolType? Type675 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolCallActionDiscriminator? Type634 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolFilters2? Type676 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolCallStatus? Type635 { get; set; } + public global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1? Type677 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolCallType? Type636 { get; set; } + public global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type? Type678 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolCall? Type637 { get; set; } + public global::tryAGI.OpenAI.WebSearchToolSearchContextSize? Type679 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolCallStatus? Type638 { get; set; } + public global::tryAGI.OpenAI.MCPTool? Type680 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolCallType? Type639 { get; set; } + public global::tryAGI.OpenAI.MCPToolType? Type681 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningItem? Type640 { get; set; } + public global::tryAGI.OpenAI.MCPToolConnectorId? Type682 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type641 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::tryAGI.OpenAI.MCPToolFilter>? Type683 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningItemStatus? Type642 { get; set; } + public global::tryAGI.OpenAI.MCPToolFilter? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type643 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type685 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Summary? Type644 { get; set; } + public global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum? Type686 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SummaryType? Type645 { get; set; } + public global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum2? Type687 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningItemType? Type646 { get; set; } + public global::tryAGI.OpenAI.ImageGenTool? Type688 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCall? Type647 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolType? Type689 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellExecAction? Type648 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type690 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellExecActionType? Type649 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolModel? Type691 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCallStatus? Type650 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolQuality? Type692 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCallType? Type651 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolSize? Type693 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCallOutput? Type652 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolOutputFormat? Type694 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCallOutputStatus? Type653 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolModeration? Type695 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolCallOutputType? Type654 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolBackground? Type696 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPListTools? Type655 { get; set; } + public global::tryAGI.OpenAI.InputFidelity? Type697 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::tryAGI.OpenAI.ImageGenToolInputImageMask? Type698 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPListToolsTool? Type657 { get; set; } + public global::tryAGI.OpenAI.ImageGenActionEnum? Type699 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPListToolsType? Type658 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolParam? Type700 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalRequest? Type659 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolParamType? Type701 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalRequestType? Type660 { get; set; } + public global::tryAGI.OpenAI.FunctionShellToolParam? Type702 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalResponseResource? Type661 { get; set; } + public global::tryAGI.OpenAI.FunctionShellToolParamType? Type703 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalResponseResourceType? Type662 { get; set; } + public global::tryAGI.OpenAI.EnvironmentVariant1? Type704 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPToolCall? Type663 { get; set; } + public global::tryAGI.OpenAI.ContainerAutoParam? Type705 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPToolCallType? Type664 { get; set; } + public global::tryAGI.OpenAI.ContainerAutoParamType? Type706 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolCall? Type665 { get; set; } + public global::tryAGI.OpenAI.NetworkPolicy3? Type707 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolCallType? Type666 { get; set; } + public global::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator? Type708 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolCallOutput? Type667 { get; set; } + public global::System.Collections.Generic.IList? Type709 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolCallOutputType? Type668 { get; set; } + public global::tryAGI.OpenAI.SkillsItem2? Type710 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationItemDiscriminator? Type669 { get; set; } + public global::tryAGI.OpenAI.SkillReferenceParam? Type711 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationItemList? Type670 { get; set; } + public global::tryAGI.OpenAI.SkillReferenceParamType? Type712 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::tryAGI.OpenAI.InlineSkillParam? Type713 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationItemListObject? Type672 { get; set; } + public global::tryAGI.OpenAI.InlineSkillParamType? Type714 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ConversationParam? Type673 { get; set; } + public global::tryAGI.OpenAI.InlineSkillSourceParam? Type715 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CostsResult? Type674 { get; set; } + public global::tryAGI.OpenAI.InlineSkillSourceParamType? Type716 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CostsResultAmount? Type675 { get; set; } + public global::tryAGI.OpenAI.InlineSkillSourceParamMediaType? Type717 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CostsResultObject? Type676 { get; set; } + public global::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator? Type718 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequest? Type677 { get; set; } + public global::tryAGI.OpenAI.LocalEnvironmentParam? Type719 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type678 { get; set; } + public global::tryAGI.OpenAI.LocalEnvironmentParamType? Type720 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningEffort? Type679 { get; set; } + public global::System.Collections.Generic.IList? Type721 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResources? Type680 { get; set; } + public global::tryAGI.OpenAI.LocalSkillParam? Type722 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type681 { get; set; } + public global::tryAGI.OpenAI.ContainerReferenceParam? Type723 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type682 { get; set; } + public global::tryAGI.OpenAI.ContainerReferenceParamType? Type724 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type683 { get; set; } + public global::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator? Type725 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type684 { get; set; } + public global::tryAGI.OpenAI.CustomToolParam? Type726 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type685 { get; set; } + public global::tryAGI.OpenAI.CustomToolParamType? Type727 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type686 { get; set; } + public global::tryAGI.OpenAI.Format2? Type728 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type687 { get; set; } + public global::tryAGI.OpenAI.CustomTextFormatParam? Type729 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type688 { get; set; } + public global::tryAGI.OpenAI.CustomTextFormatParamType? Type730 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type689 { get; set; } + public global::tryAGI.OpenAI.CustomGrammarFormatParam? Type731 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type690 { get; set; } + public global::tryAGI.OpenAI.CustomGrammarFormatParamType? Type732 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type691 { get; set; } + public global::tryAGI.OpenAI.GrammarSyntax1? Type733 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequest? Type692 { get; set; } + public global::tryAGI.OpenAI.CustomToolParamFormatDiscriminator? Type734 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModelResponseProperties? Type693 { get; set; } + public global::tryAGI.OpenAI.NamespaceToolParam? Type735 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelResponseProperties? Type694 { get; set; } + public global::tryAGI.OpenAI.NamespaceToolParamType? Type736 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Type695 { get; set; } + public global::System.Collections.Generic.IList? Type737 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Type696 { get; set; } + public global::tryAGI.OpenAI.ToolsItem13? Type738 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Type697 { get; set; } + public global::tryAGI.OpenAI.FunctionToolParam? Type739 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat? Type698 { get; set; } + public global::tryAGI.OpenAI.FunctionToolParamType? Type740 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VoiceIdsShared? Type699 { get; set; } + public global::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator? Type741 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Type700 { get; set; } + public global::tryAGI.OpenAI.ToolSearchToolParam? Type742 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type701 { get; set; } + public global::tryAGI.OpenAI.ToolSearchToolParamType? Type743 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall? Type702 { get; set; } + public global::tryAGI.OpenAI.WebSearchPreviewTool? Type744 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type703 { get; set; } + public global::tryAGI.OpenAI.WebSearchPreviewToolType? Type745 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type704 { get; set; } + public global::tryAGI.OpenAI.ApproximateLocation? Type746 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type705 { get; set; } + public global::tryAGI.OpenAI.ApproximateLocationType? Type747 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type706 { get; set; } + public global::tryAGI.OpenAI.SearchContextSize? Type748 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseModalitie? Type707 { get; set; } + public global::System.Collections.Generic.IList? Type749 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelIdsShared? Type708 { get; set; } + public global::tryAGI.OpenAI.SearchContentType? Type750 { get; set; } /// /// /// - public global::tryAGI.OpenAI.PredictionContent? Type709 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolParam? Type751 { get; set; } /// /// /// - public global::tryAGI.OpenAI.PredictionContentType? Type710 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolParamType? Type752 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator? Type711 { get; set; } + public global::tryAGI.OpenAI.ToolDiscriminator? Type753 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type712 { get; set; } + public global::tryAGI.OpenAI.FunctionCallOutputStatusEnum? Type754 { get; set; } /// /// /// - public global::tryAGI.OpenAI.StopConfiguration? Type713 { get; set; } + public global::tryAGI.OpenAI.ReasoningItem? Type755 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type714 { get; set; } + public global::tryAGI.OpenAI.ReasoningItemType? Type756 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolsItem? Type715 { get; set; } + public global::System.Collections.Generic.IList? Type757 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletions? Type716 { get; set; } + public global::System.Collections.Generic.IList? Type758 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustom? Type717 { get; set; } + public global::tryAGI.OpenAI.ReasoningItemStatus? Type759 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Format2? Type718 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCall? Type760 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? Type719 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallType? Type761 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type? Type720 { get; set; } + public global::tryAGI.OpenAI.LocalShellExecAction? Type762 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? Type721 { get; set; } + public global::tryAGI.OpenAI.LocalShellExecActionType? Type763 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar? Type722 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallStatus? Type764 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? Type723 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallOutput? Type765 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type? Type724 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallOutputType? Type766 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator? Type725 { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2? Type767 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolChatCompletionsType? Type726 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCall? Type768 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator? Type727 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallType? Type769 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Verbosity? Type728 { get; set; } + public global::tryAGI.OpenAI.FunctionShellAction? Type770 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? Type729 { get; set; } + public global::tryAGI.OpenAI.LocalShellCallStatus? Type771 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchContextSize? Type730 { get; set; } + public global::tryAGI.OpenAI.EnvironmentVariant12? Type772 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? Type731 { get; set; } + public global::tryAGI.OpenAI.LocalEnvironmentResource? Type773 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchLocation? Type732 { get; set; } + public global::tryAGI.OpenAI.LocalEnvironmentResourceType? Type774 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationType? Type733 { get; set; } + public global::tryAGI.OpenAI.ContainerReferenceResource? Type775 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponse? Type734 { get; set; } + public global::tryAGI.OpenAI.ContainerReferenceResourceType? Type776 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type735 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator? Type777 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoice? Type736 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutput? Type778 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type737 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputType? Type779 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type738 { get; set; } + public global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum? Type780 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseObject? Type739 { get; set; } + public global::System.Collections.Generic.IList? Type781 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionRequest? Type740 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputContent? Type782 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type741 { get; set; } + public global::tryAGI.OpenAI.Outcome? Type783 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionRequestModel? Type742 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? Type784 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type743 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType? Type785 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type744 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? Type786 { get; set; } /// /// /// - public long? Type745 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType? Type787 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionResponse? Type746 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator? Type788 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type747 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCall? Type789 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionResponseChoice? Type748 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallType? Type790 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionResponseChoiceFinishReason? Type749 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCallStatus? Type791 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs? Type750 { get; set; } + public global::tryAGI.OpenAI.Operation? Type792 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type751 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperation? Type793 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type752 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType? Type794 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type753 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? Type795 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateCompletionResponseObject? Type754 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType? Type796 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateContainerBody? Type755 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? Type797 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? Type756 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType? Type798 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfterAnchor? Type757 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator? Type799 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateContainerFileBody? Type758 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? Type800 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateConversationBody? Type759 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputType? Type801 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type760 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCallOutputStatus? Type802 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputItem? Type761 { get; set; } + public global::tryAGI.OpenAI.MCPListTools? Type803 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EasyInputMessage? Type762 { get; set; } + public global::tryAGI.OpenAI.MCPListToolsType? Type804 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type763 { get; set; } + public global::System.Collections.Generic.IList? Type805 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type764 { get; set; } + public global::tryAGI.OpenAI.MCPListToolsTool? Type806 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EasyInputMessageRole? Type765 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalRequest? Type807 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EasyInputMessageType? Type766 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalRequestType? Type808 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Item? Type767 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalResponseResource? Type809 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessage? Type768 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalResponseResourceType? Type810 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessageRole? Type769 { get; set; } + public global::tryAGI.OpenAI.MCPToolCall? Type811 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessageStatus? Type770 { get; set; } + public global::tryAGI.OpenAI.MCPToolCallType? Type812 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessageType? Type771 { get; set; } + public global::tryAGI.OpenAI.MCPToolCallStatus? Type813 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessage? Type772 { get; set; } + public global::tryAGI.OpenAI.CustomToolCall? Type814 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type773 { get; set; } + public global::tryAGI.OpenAI.CustomToolCallType? Type815 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessageContent? Type774 { get; set; } + public global::tryAGI.OpenAI.CustomToolCallOutput? Type816 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessageContentDiscriminator? Type775 { get; set; } + public global::tryAGI.OpenAI.CustomToolCallOutputType? Type817 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessageRole? Type776 { get; set; } + public global::tryAGI.OpenAI.ConversationItemDiscriminator? Type818 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessageStatus? Type777 { get; set; } + public global::tryAGI.OpenAI.ConversationItemList? Type819 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputMessageType? Type778 { get; set; } + public global::tryAGI.OpenAI.ConversationItemListObject? Type820 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionCallOutputItemParam? Type779 { get; set; } + public global::System.Collections.Generic.IList? Type821 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionCallOutputItemParamType? Type780 { get; set; } + public global::tryAGI.OpenAI.ConversationParam? Type822 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalResponse? Type781 { get; set; } + public global::tryAGI.OpenAI.ConversationParam2? Type823 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPApprovalResponseType? Type782 { get; set; } + public global::tryAGI.OpenAI.CostsResult? Type824 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ItemDiscriminator? Type783 { get; set; } + public global::tryAGI.OpenAI.CostsResultObject? Type825 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ItemReferenceParam? Type784 { get; set; } + public global::tryAGI.OpenAI.CostsResultAmount? Type826 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ItemReferenceParamType? Type785 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequest? Type827 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputItemDiscriminator? Type786 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type828 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingRequest? Type787 { get; set; } + public global::tryAGI.OpenAI.ReasoningEffortEnum? Type829 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? Type788 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResources2? Type830 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type789 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type831 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingRequestModel? Type790 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type832 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingResponse? Type791 { get; set; } + public global::System.Collections.Generic.IList? Type833 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type792 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type834 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Embedding? Type793 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type835 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type794 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? Type836 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EmbeddingObject? Type795 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? Type837 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingResponseObject? Type796 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? Type838 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEmbeddingResponseUsage? Type797 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? Type839 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? Type798 { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? Type840 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessages? Type799 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequest? Type841 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? Type800 { get; set; } + public global::tryAGI.OpenAI.CreateModelResponseProperties? Type842 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type801 { get; set; } + public global::tryAGI.OpenAI.ModelResponseProperties? Type843 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type802 { get; set; } + public global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2? Type844 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItem? Type803 { get; set; } + public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Type845 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type804 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Type846 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemContentVariant3? Type805 { get; set; } + public global::System.Collections.Generic.IList? Type847 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemContentVariant3Type? Type806 { get; set; } + public global::tryAGI.OpenAI.ModelIdsShared? Type848 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemContentVariant4? Type807 { get; set; } + public global::tryAGI.OpenAI.ModelIdsSharedEnum? Type849 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemContentVariant4Type? Type808 { get; set; } + public global::System.Collections.Generic.IList? Type850 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemRole? Type809 { get; set; } + public global::tryAGI.OpenAI.ResponseModalitiesVariant1Item? Type851 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalItemType? Type810 { get; set; } + public global::tryAGI.OpenAI.VerbosityEnum? Type852 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type? Type811 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? Type853 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? Type812 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? Type854 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type? Type813 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationType? Type855 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator? Type814 { get; set; } + public global::tryAGI.OpenAI.WebSearchLocation? Type856 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams? Type815 { get; set; } + public global::tryAGI.OpenAI.WebSearchContextSize? Type857 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type816 { get; set; } + public global::tryAGI.OpenAI.ResponseFormat? Type858 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Source? Type817 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator? Type859 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? Type818 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Type860 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type819 { get; set; } + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? Type861 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalJsonlFileContentSourceContentItem? Type820 { get; set; } + public global::tryAGI.OpenAI.VoiceIdsShared? Type862 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalJsonlFileContentSourceType? Type821 { get; set; } + public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Type863 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? Type822 { get; set; } + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? Type864 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalJsonlFileIdSourceType? Type823 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat? Type865 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalStoredCompletionsSource? Type824 { get; set; } + public global::tryAGI.OpenAI.StopConfiguration? Type866 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalStoredCompletionsSourceType? Type825 { get; set; } + public global::System.Collections.Generic.Dictionary? Type867 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator? Type826 { get; set; } + public global::tryAGI.OpenAI.PredictionContent? Type868 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType? Type827 { get; set; } + public global::tryAGI.OpenAI.PredictionContentType? Type869 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? Type828 { get; set; } + public global::System.Collections.Generic.IList>? Type870 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType? Type829 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type871 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalItem? Type830 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletions? Type872 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalItemVariant1? Type831 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsType? Type873 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? Type832 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustom? Type874 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Source2? Type833 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type875 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator? Type834 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat? Type876 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType? Type835 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType? Type877 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalLabelModelGrader? Type836 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat? Type878 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type837 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType? Type879 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalLabelModelGraderType? Type838 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar? Type880 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? Type839 { get; set; } + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax? Type881 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType? Type840 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type882 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalRequest? Type841 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2FunctionCall? Type883 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig? Type842 { get; set; } + public global::System.Collections.Generic.IList? Type884 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? Type843 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponse? Type885 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType? Type844 { get; set; } + public global::System.Collections.Generic.IList? Type886 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator? Type845 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoice? Type887 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type846 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type888 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TestingCriteriaItem? Type847 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type889 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderStringCheck? Type848 { get; set; } + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseObject? Type890 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderStringCheck? Type849 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionRequest? Type891 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderStringCheckOperation? Type850 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type892 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderStringCheckType? Type851 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionRequestModel? Type893 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderTextSimilarity? Type852 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type894 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderTextSimilarity? Type853 { get; set; } + public global::System.Collections.Generic.IList>? Type895 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric? Type854 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionResponse? Type896 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderTextSimilarityType? Type855 { get; set; } + public global::System.Collections.Generic.IList? Type897 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Type856 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionResponseChoice? Type898 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderPython? Type857 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionResponseChoiceFinishReason? Type899 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderPython? Type858 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2? Type900 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderPythonType? Type859 { get; set; } + public global::System.Collections.Generic.IList? Type901 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Type860 { get; set; } + public global::System.Collections.Generic.IList>? Type902 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderScoreModel? Type861 { get; set; } + public global::System.Collections.Generic.Dictionary? Type903 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderScoreModel? Type862 { get; set; } + public global::tryAGI.OpenAI.CreateCompletionResponseObject? Type904 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type863 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBody? Type905 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderScoreModelSamplingParams? Type864 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? Type906 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderScoreModelType? Type865 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfterAnchor? Type907 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Type866 { get; set; } + public global::System.Collections.Generic.IList? Type908 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator? Type867 { get; set; } + public global::tryAGI.OpenAI.SkillsItem? Type909 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? Type868 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator? Type910 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessages2? Type869 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? Type911 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? Type870 { get; set; } + public global::tryAGI.OpenAI.NetworkPolicy? Type912 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type871 { get; set; } + public global::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator? Type913 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type872 { get; set; } + public global::tryAGI.OpenAI.CreateContainerFileBody? Type914 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem? Type873 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingRequest? Type915 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type? Type874 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type916 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? Type875 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingRequestModel? Type917 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type? Type876 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? Type918 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator? Type877 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingResponse? Type919 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParams? Type878 { get; set; } + public global::System.Collections.Generic.IList? Type920 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? Type879 { get; set; } + public global::tryAGI.OpenAI.Embedding? Type921 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextResponseFormatConfiguration? Type880 { get; set; } + public global::System.Collections.Generic.IList? Type922 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? Type881 { get; set; } + public global::tryAGI.OpenAI.EmbeddingObject? Type923 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType? Type882 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingResponseObject? Type924 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator? Type883 { get; set; } + public global::tryAGI.OpenAI.CreateEmbeddingResponseUsage? Type925 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type884 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? Type926 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Tool? Type885 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType? Type927 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionTool? Type886 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type928 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionToolType? Type887 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages? Type929 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchTool? Type888 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType? Type930 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RankingOptions? Type889 { get; set; } + public global::System.Collections.Generic.IList>? Type931 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RankerVersionType? Type890 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type932 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileSearchToolType? Type891 { get; set; } + public global::tryAGI.OpenAI.EasyInputMessage? Type933 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchTool? Type892 { get; set; } + public global::tryAGI.OpenAI.EasyInputMessageRole? Type934 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolFilters? Type893 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type935 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolSearchContextSize? Type894 { get; set; } + public global::System.Collections.Generic.IList? Type936 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchToolType? Type895 { get; set; } + public global::tryAGI.OpenAI.MessagePhase? Type937 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchApproximateLocation? Type896 { get; set; } + public global::tryAGI.OpenAI.EasyInputMessageType? Type938 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchApproximateLocationType? Type897 { get; set; } + public global::tryAGI.OpenAI.EvalItem? Type939 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPTool? Type898 { get; set; } + public global::tryAGI.OpenAI.EvalItemRole? Type940 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPToolConnectorId? Type899 { get; set; } + public global::tryAGI.OpenAI.EvalItemContent? Type941 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPToolType? Type900 { get; set; } + public global::tryAGI.OpenAI.EvalItemContentItem? Type942 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenTool? Type901 { get; set; } + public global::tryAGI.OpenAI.EvalItemContentOutputText? Type943 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolBackground? Type902 { get; set; } + public global::tryAGI.OpenAI.EvalItemContentOutputTextType? Type944 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageInputFidelity? Type903 { get; set; } + public global::tryAGI.OpenAI.EvalItemInputImage? Type945 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolInputImageMask? Type904 { get; set; } + public global::tryAGI.OpenAI.EvalItemInputImageType? Type946 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolModel? Type905 { get; set; } + public global::tryAGI.OpenAI.InputAudio? Type947 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolModeration? Type906 { get; set; } + public global::tryAGI.OpenAI.InputAudioType? Type948 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolOutputFormat? Type907 { get; set; } + public global::tryAGI.OpenAI.InputAudioInputAudio1? Type949 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolQuality? Type908 { get; set; } + public global::tryAGI.OpenAI.InputAudioInputAudio1Format? Type950 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolSize? Type909 { get; set; } + public global::System.Collections.Generic.IList? Type951 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenToolType? Type910 { get; set; } + public global::tryAGI.OpenAI.EvalItemType? Type952 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellTool? Type911 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages? Type953 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LocalShellToolType? Type912 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType? Type954 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomTool? Type913 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams? Type955 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Format? Type914 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type956 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatVariant1? Type915 { get; set; } + public global::System.Collections.Generic.IList? Type957 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatVariant1Type? Type916 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type958 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatVariant2? Type917 { get; set; } + public global::tryAGI.OpenAI.EvalJsonlFileContentSource? Type959 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax? Type918 { get; set; } + public global::tryAGI.OpenAI.EvalJsonlFileContentSourceType? Type960 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatVariant2Type? Type919 { get; set; } + public global::System.Collections.Generic.IList? Type961 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolFormatDiscriminator? Type920 { get; set; } + public global::tryAGI.OpenAI.EvalJsonlFileContentSourceContentItem? Type962 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CustomToolType? Type921 { get; set; } + public global::tryAGI.OpenAI.EvalJsonlFileIdSource? Type963 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchPreviewTool? Type922 { get; set; } + public global::tryAGI.OpenAI.EvalJsonlFileIdSourceType? Type964 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SearchContextSize? Type923 { get; set; } + public global::tryAGI.OpenAI.EvalStoredCompletionsSource? Type965 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebSearchPreviewToolType? Type924 { get; set; } + public global::tryAGI.OpenAI.EvalStoredCompletionsSourceType? Type966 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolDiscriminator? Type925 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? Type967 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Source3? Type926 { get; set; } + public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType? Type968 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalResponsesSource? Type927 { get; set; } + public global::tryAGI.OpenAI.CreateEvalItem? Type969 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalResponsesSourceType? Type928 { get; set; } + public global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? Type970 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator? Type929 { get; set; } + public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? Type971 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType? Type930 { get; set; } + public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType? Type972 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateEvalRunRequest? Type931 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type973 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type932 { get; set; } + public global::tryAGI.OpenAI.CreateEvalLabelModelGrader? Type974 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFileRequest? Type933 { get; set; } + public global::tryAGI.OpenAI.CreateEvalLabelModelGraderType? Type975 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileExpirationAfter? Type934 { get; set; } + public global::System.Collections.Generic.IList? Type976 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FileExpirationAfterAnchor? Type935 { get; set; } + public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? Type977 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FilePurpose? Type936 { get; set; } + public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType? Type978 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningCheckpointPermissionRequest? Type937 { get; set; } + public global::tryAGI.OpenAI.CreateEvalRequest? Type979 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequest? Type938 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type980 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparameters? Type939 { get; set; } + public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? Type981 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type940 { get; set; } + public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType? Type982 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type941 { get; set; } + public global::System.Collections.Generic.IList>? Type983 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type942 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type984 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type943 { get; set; } + public global::tryAGI.OpenAI.EvalGraderStringCheck? Type985 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type944 { get; set; } + public global::tryAGI.OpenAI.GraderStringCheck? Type986 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type945 { get; set; } + public global::tryAGI.OpenAI.GraderStringCheckType? Type987 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type946 { get; set; } + public global::tryAGI.OpenAI.GraderStringCheckOperation? Type988 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegration? Type947 { get; set; } + public global::tryAGI.OpenAI.EvalGraderTextSimilarity? Type989 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegrationType? Type948 { get; set; } + public global::tryAGI.OpenAI.GraderTextSimilarity? Type990 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type949 { get; set; } + public global::tryAGI.OpenAI.GraderTextSimilarityType? Type991 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneMethod? Type950 { get; set; } + public global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric? Type992 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOMethod? Type951 { get; set; } + public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Type993 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOHyperparameters? Type952 { get; set; } + public global::tryAGI.OpenAI.EvalGraderPython? Type994 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type953 { get; set; } + public global::tryAGI.OpenAI.GraderPython? Type995 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOHyperparametersBatchSize? Type954 { get; set; } + public global::tryAGI.OpenAI.GraderPythonType? Type996 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type955 { get; set; } + public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Type997 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOHyperparametersBeta? Type956 { get; set; } + public global::tryAGI.OpenAI.EvalGraderScoreModel? Type998 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type957 { get; set; } + public global::tryAGI.OpenAI.GraderScoreModel? Type999 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOHyperparametersLearningRateMultiplier? Type958 { get; set; } + public global::tryAGI.OpenAI.GraderScoreModelType? Type1000 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type959 { get; set; } + public global::tryAGI.OpenAI.GraderScoreModelSamplingParams? Type1001 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneDPOHyperparametersNEpochs? Type960 { get; set; } + public global::System.Collections.Generic.IList? Type1002 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementMethod? Type961 { get; set; } + public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Type1003 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type962 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? Type1004 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderMulti? Type963 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType? Type1005 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type964 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1006 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderLabelModel? Type965 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate? Type1007 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderLabelModelType? Type966 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType? Type1008 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GraderMultiType? Type967 { get; set; } + public global::System.Collections.Generic.IList>? Type1009 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparameters? Type968 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1010 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type969 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem? Type1011 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersBatchSize? Type970 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference? Type1012 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type971 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType? Type1013 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersComputeMultiplier? Type972 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParams? Type1014 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type973 { get; set; } + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? Type1015 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersEvalInterval? Type974 { get; set; } + public global::tryAGI.OpenAI.TextResponseFormatConfiguration? Type1016 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type975 { get; set; } + public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? Type1017 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersEvalSamples? Type976 { get; set; } + public global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType? Type1018 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type977 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1019 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersLearningRateMultiplier? Type978 { get; set; } + public global::tryAGI.OpenAI.EvalResponsesSource? Type1020 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type979 { get; set; } + public global::tryAGI.OpenAI.EvalResponsesSourceType? Type1021 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersNEpochs? Type980 { get; set; } + public global::tryAGI.OpenAI.CreateEvalRunRequest? Type1022 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? Type981 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1023 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneSupervisedMethod? Type982 { get; set; } + public global::tryAGI.OpenAI.CreateFileRequest? Type1024 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneSupervisedHyperparameters? Type983 { get; set; } + public global::tryAGI.OpenAI.CreateFileRequestPurpose? Type1025 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type984 { get; set; } + public global::tryAGI.OpenAI.FileExpirationAfter? Type1026 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersBatchSize? Type985 { get; set; } + public global::tryAGI.OpenAI.FileExpirationAfterAnchor? Type1027 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type986 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningCheckpointPermissionRequest? Type1028 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersLearningRateMultiplier? Type987 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequest? Type1029 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type988 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1030 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersNEpochs? Type989 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestModel? Type1031 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneMethodType? Type990 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparameters? Type1032 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type991 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1033 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateFineTuningJobRequestModel? Type992 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type1034 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequest? Type993 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1035 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestBackground? Type994 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type1036 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type995 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1037 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type996 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type1038 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type997 { get; set; } + public global::System.Collections.Generic.IList? Type1039 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestModel? Type998 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegration? Type1040 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? Type999 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegrationType? Type1041 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestQuality? Type1000 { get; set; } + public global::tryAGI.OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type1042 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? Type1001 { get; set; } + public global::tryAGI.OpenAI.FineTuneMethod? Type1043 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageEditRequestSize? Type1002 { get; set; } + public global::tryAGI.OpenAI.FineTuneMethodType? Type1044 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequest? Type1003 { get; set; } + public global::tryAGI.OpenAI.FineTuneSupervisedMethod? Type1045 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestBackground? Type1004 { get; set; } + public global::tryAGI.OpenAI.FineTuneSupervisedHyperparameters? Type1046 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1005 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1047 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestModel? Type1006 { get; set; } + public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersBatchSize? Type1048 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestModeration? Type1007 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1049 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestOutputFormat? Type1008 { get; set; } + public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersLearningRateMultiplier? Type1050 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestQuality? Type1009 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1051 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestResponseFormat? Type1010 { get; set; } + public global::tryAGI.OpenAI.FineTuneSupervisedHyperparametersNEpochs? Type1052 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestSize? Type1011 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOMethod? Type1053 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageRequestStyle? Type1012 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOHyperparameters? Type1054 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageVariationRequest? Type1013 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1055 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1014 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOHyperparametersBeta? Type1056 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageVariationRequestModel? Type1015 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1057 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageVariationRequestResponseFormat? Type1016 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOHyperparametersBatchSize? Type1058 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateImageVariationRequestSize? Type1017 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1059 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateMessageRequest? Type1018 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOHyperparametersLearningRateMultiplier? Type1060 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1019 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1061 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateMessageRequestAttachment? Type1020 { get; set; } + public global::tryAGI.OpenAI.FineTuneDPOHyperparametersNEpochs? Type1062 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1021 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementMethod? Type1063 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolsItem2? Type1022 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1064 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator? Type1023 { get; set; } + public global::tryAGI.OpenAI.GraderMulti? Type1065 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type1024 { get; set; } + public global::tryAGI.OpenAI.GraderMultiType? Type1066 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1025 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1067 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ContentVariant2Item? Type1026 { get; set; } + public global::tryAGI.OpenAI.GraderLabelModel? Type1068 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageRequestContentTextObject? Type1027 { get; set; } + public global::tryAGI.OpenAI.GraderLabelModelType? Type1069 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MessageRequestContentTextObjectType? Type1028 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparameters? Type1070 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? Type1029 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1071 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateMessageRequestRole? Type1030 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersBatchSize? Type1072 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationRequest? Type1031 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1073 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList>? Type1032 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersLearningRateMultiplier? Type1074 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1033 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1075 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputVariant3Item? Type1034 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersNEpochs? Type1076 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModerationImageURLInput? Type1035 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? Type1077 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModerationImageURLInputImageUrl? Type1036 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1078 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModerationImageURLInputType? Type1037 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersComputeMultiplier? Type1079 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModerationTextInput? Type1038 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1080 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModerationTextInputType? Type1039 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersEvalInterval? Type1081 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? Type1040 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1082 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1041 { get; set; } + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersEvalSamples? Type1083 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationRequestModel? Type1042 { get; set; } + public global::tryAGI.OpenAI.CreateGroupBody? Type1084 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponse? Type1043 { get; set; } + public global::tryAGI.OpenAI.CreateGroupUserBody? Type1085 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1044 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequest? Type1086 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResult? Type1045 { get; set; } + public global::tryAGI.OpenAI.AnyOf>? Type1087 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategories? Type1046 { get; set; } + public global::System.Collections.Generic.IList? Type1088 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type1047 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestBackground? Type1089 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1048 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1090 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type1049 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestModel? Type1091 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1050 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestSize? Type1092 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type1051 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? Type1093 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1052 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? Type1094 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type1053 { get; set; } + public global::tryAGI.OpenAI.CreateImageEditRequestQuality? Type1095 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1054 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequest? Type1096 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type1055 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1097 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1056 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestModel? Type1098 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type1057 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestQuality? Type1099 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1058 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestResponseFormat? Type1100 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type1059 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestOutputFormat? Type1101 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1060 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestSize? Type1102 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type1061 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestModeration? Type1103 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1062 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestBackground? Type1104 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type1063 { get; set; } + public global::tryAGI.OpenAI.CreateImageRequestStyle? Type1105 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1064 { get; set; } + public global::tryAGI.OpenAI.CreateImageVariationRequest? Type1106 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type1065 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1107 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1066 { get; set; } + public global::tryAGI.OpenAI.CreateImageVariationRequestModel? Type1108 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type1067 { get; set; } + public global::tryAGI.OpenAI.CreateImageVariationRequestResponseFormat? Type1109 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1068 { get; set; } + public global::tryAGI.OpenAI.CreateImageVariationRequestSize? Type1110 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type1069 { get; set; } + public global::tryAGI.OpenAI.CreateMessageRequest? Type1111 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1070 { get; set; } + public global::tryAGI.OpenAI.CreateMessageRequestRole? Type1112 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type1071 { get; set; } + public global::tryAGI.OpenAI.OneOf>>? Type1113 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1072 { get; set; } + public global::System.Collections.Generic.IList>? Type1114 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type1073 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1115 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryScores? Type1074 { get; set; } + public global::tryAGI.OpenAI.MessageRequestContentTextObject? Type1116 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateResponse? Type1075 { get; set; } + public global::tryAGI.OpenAI.MessageRequestContentTextObjectType? Type1117 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseProperties? Type1076 { get; set; } + public global::System.Collections.Generic.IList? Type1118 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelIdsResponses? Type1077 { get; set; } + public global::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item? Type1119 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelIdsResponsesEnum? Type1078 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequest? Type1120 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Prompt2? Type1079 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList>>? Type1121 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1080 { get; set; } + public global::System.Collections.Generic.IList>? Type1122 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponsePropertiesText? Type1081 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1123 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoice5? Type1082 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Type1124 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceOptions? Type1083 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? Type1125 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceAllowed? Type1084 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? Type1126 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceAllowedMode? Type1085 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Type1127 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceAllowedType? Type1086 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? Type1128 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceTypes? Type1087 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1129 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceTypesType? Type1088 { get; set; } + public global::tryAGI.OpenAI.CreateModerationRequestModel? Type1130 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceFunction? Type1089 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponse? Type1131 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceFunctionType? Type1090 { get; set; } + public global::System.Collections.Generic.IList? Type1132 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceMCP? Type1091 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResult? Type1133 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceMCPType? Type1092 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategories? Type1134 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceCustom? Type1093 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryScores? Type1135 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolChoiceCustomType? Type1094 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type1136 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator? Type1095 { get; set; } + public global::System.Collections.Generic.IList? Type1137 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponsePropertiesTruncation? Type1096 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type1138 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateResponseVariant3? Type1097 { get; set; } + public global::System.Collections.Generic.IList? Type1139 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1098 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type1140 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Includable? Type1099 { get; set; } + public global::System.Collections.Generic.IList? Type1141 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type1100 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type1142 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseStreamOptions? Type1101 { get; set; } + public global::System.Collections.Generic.IList? Type1143 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateRunRequest? Type1102 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type1144 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1103 { get; set; } + public global::System.Collections.Generic.IList? Type1145 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateRunRequestWithoutStream? Type1104 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type1146 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechRequest? Type1105 { get; set; } + public global::System.Collections.Generic.IList? Type1147 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1106 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type1148 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechRequestModel? Type1107 { get; set; } + public global::System.Collections.Generic.IList? Type1149 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? Type1108 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type1150 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? Type1109 { get; set; } + public global::System.Collections.Generic.IList? Type1151 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent? Type1110 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type1152 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? Type1111 { get; set; } + public global::System.Collections.Generic.IList? Type1153 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SpeechAudioDeltaEventType? Type1112 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type1154 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SpeechAudioDoneEvent? Type1113 { get; set; } + public global::System.Collections.Generic.IList? Type1155 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SpeechAudioDoneEventType? Type1114 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type1156 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SpeechAudioDoneEventUsage? Type1115 { get; set; } + public global::System.Collections.Generic.IList? Type1157 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateSpeechResponseStreamEventDiscriminator? Type1116 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type1158 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequest? Type1117 { get; set; } + public global::System.Collections.Generic.IList? Type1159 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1118 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type1160 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestModel? Type1119 { get; set; } + public global::System.Collections.Generic.IList? Type1161 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequest? Type1120 { get; set; } + public global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type1162 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResources? Type1121 { get; set; } + public global::tryAGI.OpenAI.CreateResponse? Type1163 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type1122 { get; set; } + public global::tryAGI.OpenAI.ResponseProperties? Type1164 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? Type1123 { get; set; } + public global::tryAGI.OpenAI.ModelIdsResponses? Type1165 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1124 { get; set; } + public global::tryAGI.OpenAI.ModelIdsResponsesEnum? Type1166 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type1125 { get; set; } + public global::tryAGI.OpenAI.Reasoning? Type1167 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type1126 { get; set; } + public global::tryAGI.OpenAI.ReasoningSummary2? Type1168 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type1127 { get; set; } + public global::tryAGI.OpenAI.ReasoningGenerateSummary2? Type1169 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type1128 { get; set; } + public global::tryAGI.OpenAI.ResponseTextParam? Type1170 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type1129 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceParam? Type1171 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type1130 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceOptions? Type1172 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type1131 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceAllowed? Type1173 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type1132 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceAllowedType? Type1174 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? Type1133 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceAllowedMode? Type1175 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type1134 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceTypes? Type1176 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type1135 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceTypesType? Type1177 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream? Type1136 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceFunction? Type1178 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1137 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceFunctionType? Type1179 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamModel? Type1138 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceMCP? Type1180 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources? Type1139 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceMCPType? Type1181 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter? Type1140 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceCustom? Type1182 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch? Type1141 { get; set; } + public global::tryAGI.OpenAI.ToolChoiceCustomType? Type1183 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionRequest? Type1142 { get; set; } + public global::tryAGI.OpenAI.SpecificApplyPatchParam? Type1184 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1143 { get; set; } + public global::tryAGI.OpenAI.SpecificApplyPatchParamType? Type1185 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptionInclude? Type1144 { get; set; } + public global::tryAGI.OpenAI.SpecificFunctionShellParam? Type1186 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1145 { get; set; } + public global::tryAGI.OpenAI.SpecificFunctionShellParamType? Type1187 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionRequestModel? Type1146 { get; set; } + public global::tryAGI.OpenAI.PromptVariant1? Type1188 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1147 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1189 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type1148 { get; set; } + public global::tryAGI.OpenAI.ResponsePropertiesTruncation2? Type1190 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseJson? Type1149 { get; set; } + public global::tryAGI.OpenAI.CreateResponseVariant3? Type1191 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1150 { get; set; } + public global::tryAGI.OpenAI.InputParam? Type1192 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseJsonLogprob? Type1151 { get; set; } + public global::System.Collections.Generic.IList? Type1193 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage? Type1152 { get; set; } + public global::tryAGI.OpenAI.InputItem? Type1194 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextUsageTokens? Type1153 { get; set; } + public global::tryAGI.OpenAI.Item? Type1195 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? Type1154 { get; set; } + public global::tryAGI.OpenAI.InputMessage? Type1196 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextUsageTokensType? Type1155 { get; set; } + public global::tryAGI.OpenAI.InputMessageType? Type1197 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Type1156 { get; set; } + public global::tryAGI.OpenAI.InputMessageRole? Type1198 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextUsageDurationType? Type1157 { get; set; } + public global::tryAGI.OpenAI.InputMessageStatus? Type1199 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator? Type1158 { get; set; } + public global::tryAGI.OpenAI.OutputMessage? Type1200 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent? Type1159 { get; set; } + public global::tryAGI.OpenAI.OutputMessageType? Type1201 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDeltaEvent? Type1160 { get; set; } + public global::tryAGI.OpenAI.OutputMessageRole? Type1202 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1161 { get; set; } + public global::System.Collections.Generic.IList? Type1203 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDeltaEventLogprob? Type1162 { get; set; } + public global::tryAGI.OpenAI.OutputMessageContent? Type1204 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDeltaEventType? Type1163 { get; set; } + public global::tryAGI.OpenAI.OutputMessageContentDiscriminator? Type1205 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDoneEvent? Type1164 { get; set; } + public global::tryAGI.OpenAI.OutputMessageStatus? Type1206 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1165 { get; set; } + public global::tryAGI.OpenAI.ComputerCallOutputItemParam? Type1207 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDoneEventLogprob? Type1166 { get; set; } + public global::tryAGI.OpenAI.ComputerCallOutputItemParamType? Type1208 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptTextDoneEventType? Type1167 { get; set; } + public global::tryAGI.OpenAI.FunctionCallItemStatus? Type1209 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEventDiscriminator? Type1168 { get; set; } + public global::tryAGI.OpenAI.FunctionCallOutputItemParam? Type1210 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranscriptionResponseVerboseJson? Type1169 { get; set; } + public global::tryAGI.OpenAI.FunctionCallOutputItemParamType? Type1211 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1170 { get; set; } + public global::tryAGI.OpenAI.OneOf>? Type1212 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptionSegment? Type1171 { get; set; } + public global::System.Collections.Generic.IList? Type1213 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1172 { get; set; } + public global::tryAGI.OpenAI.OutputVariant2Item? Type1214 { get; set; } /// /// /// - public global::tryAGI.OpenAI.TranscriptionWord? Type1173 { get; set; } + public global::tryAGI.OpenAI.InputTextContentParam? Type1215 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranslationRequest? Type1174 { get; set; } + public global::tryAGI.OpenAI.InputTextContentParamType? Type1216 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1175 { get; set; } + public global::tryAGI.OpenAI.InputImageContentParamAutoParam? Type1217 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranslationRequestModel? Type1176 { get; set; } + public global::tryAGI.OpenAI.InputImageContentParamAutoParamType? Type1218 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranslationRequestResponseFormat? Type1177 { get; set; } + public global::tryAGI.OpenAI.DetailEnum? Type1219 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranslationResponseJson? Type1178 { get; set; } + public global::tryAGI.OpenAI.InputFileContentParam? Type1220 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateTranslationResponseVerboseJson? Type1179 { get; set; } + public global::tryAGI.OpenAI.InputFileContentParamType? Type1221 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateUploadRequest? Type1180 { get; set; } + public global::tryAGI.OpenAI.FileDetailEnum? Type1222 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateUploadRequestPurpose? Type1181 { get; set; } + public global::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator? Type1223 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequest? Type1182 { get; set; } + public global::tryAGI.OpenAI.ToolSearchCallItemParam? Type1224 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateVectorStoreFileRequest? Type1183 { get; set; } + public global::tryAGI.OpenAI.ToolSearchCallItemParamType? Type1225 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateVectorStoreRequest? Type1184 { get; set; } + public global::tryAGI.OpenAI.ToolSearchOutputItemParam? Type1226 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreExpirationAfter? Type1185 { get; set; } + public global::tryAGI.OpenAI.ToolSearchOutputItemParamType? Type1227 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreExpirationAfterAnchor? Type1186 { get; set; } + public global::tryAGI.OpenAI.CompactionSummaryItemParam? Type1228 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteAssistantResponse? Type1187 { get; set; } + public global::tryAGI.OpenAI.CompactionSummaryItemParamType? Type1229 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteAssistantResponseObject? Type1188 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallItemParam? Type1230 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteCertificateResponse? Type1189 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallItemParamType? Type1231 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteCertificateResponseObject? Type1190 { get; set; } + public global::tryAGI.OpenAI.FunctionShellActionParam? Type1232 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteFileResponse? Type1191 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallItemStatus? Type1233 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteFileResponseObject? Type1192 { get; set; } + public global::tryAGI.OpenAI.EnvironmentVariant13? Type1234 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse? Type1193 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator? Type1235 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponseObject? Type1194 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? Type1236 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteMessageResponse? Type1195 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType? Type1237 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteMessageResponseObject? Type1196 { get; set; } + public global::System.Collections.Generic.IList? Type1238 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteModelResponse? Type1197 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputContentParam? Type1239 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteThreadResponse? Type1198 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam? Type1240 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteThreadResponseObject? Type1199 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? Type1241 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteVectorStoreFileResponse? Type1200 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType? Type1242 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteVectorStoreFileResponseObject? Type1201 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? Type1243 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteVectorStoreResponse? Type1202 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType? Type1244 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteVectorStoreResponseObject? Type1203 { get; set; } + public global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator? Type1245 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeletedConversation? Type1204 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? Type1246 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeletedConversationResource? Type1205 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType? Type1247 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeletedConversationResourceObject? Type1206 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCallStatusParam? Type1248 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DetailEnum? Type1207 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchOperationParam? Type1249 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DoneEvent? Type1208 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? Type1250 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DoneEventData? Type1209 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType? Type1251 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DoneEventEvent? Type1210 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? Type1252 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ErrorResponse? Type1211 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType? Type1253 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Eval? Type1212 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? Type1254 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalDataSourceConfig? Type1213 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType? Type1255 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalCustomDataSourceConfig? Type1214 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator? Type1256 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalCustomDataSourceConfigType? Type1215 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? Type1257 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalLogsDataSourceConfig? Type1216 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType? Type1258 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalLogsDataSourceConfigType? Type1217 { get; set; } + public global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam? Type1259 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? Type1218 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalResponse? Type1260 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType? Type1219 { get; set; } + public global::tryAGI.OpenAI.MCPApprovalResponseType? Type1261 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator? Type1220 { get; set; } + public global::tryAGI.OpenAI.ItemDiscriminator? Type1262 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalObject? Type1221 { get; set; } + public global::tryAGI.OpenAI.ItemReferenceParam? Type1263 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type1222 { get; set; } + public global::tryAGI.OpenAI.ItemReferenceParamType2? Type1264 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1223 { get; set; } + public global::tryAGI.OpenAI.InputItemDiscriminator? Type1265 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalGraderLabelModel? Type1224 { get; set; } + public global::System.Collections.Generic.IList? Type1266 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalApiError? Type1225 { get; set; } + public global::tryAGI.OpenAI.IncludeEnum? Type1267 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalList? Type1226 { get; set; } + public global::tryAGI.OpenAI.ResponseStreamOptionsVariant1? Type1268 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1227 { get; set; } + public global::System.Collections.Generic.IList? Type1269 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalListObject? Type1228 { get; set; } + public global::tryAGI.OpenAI.ContextManagementParam? Type1270 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRun? Type1229 { get; set; } + public global::tryAGI.OpenAI.CreateRunRequest? Type1271 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunDataSource? Type1230 { get; set; } + public global::System.Collections.Generic.IList? Type1272 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunDataSourceDiscriminator? Type1231 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechRequest? Type1273 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunObject? Type1232 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1274 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1233 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechRequestModel? Type1275 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunPerModelUsageItem? Type1234 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? Type1276 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1235 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? Type1277 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunPerTestingCriteriaResult? Type1236 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent? Type1278 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunResultCounts? Type1237 { get; set; } + public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? Type1279 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunList? Type1238 { get; set; } + public global::tryAGI.OpenAI.SpeechAudioDeltaEventType? Type1280 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1239 { get; set; } + public global::tryAGI.OpenAI.SpeechAudioDoneEvent? Type1281 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunListObject? Type1240 { get; set; } + public global::tryAGI.OpenAI.SpeechAudioDoneEventType? Type1282 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItem? Type1241 { get; set; } + public global::tryAGI.OpenAI.SpeechAudioDoneEventUsage? Type1283 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemObject? Type1242 { get; set; } + public global::tryAGI.OpenAI.CreateSpeechResponseStreamEventDiscriminator? Type1284 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1243 { get; set; } + public global::tryAGI.OpenAI.CreateThreadAndRunRequest? Type1285 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemResult? Type1244 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequest? Type1286 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemSample? Type1245 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResources2? Type1287 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1246 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type1288 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemSampleInputItem? Type1247 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? Type1289 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1248 { get; set; } + public global::System.Collections.Generic.IList? Type1290 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemSampleOutputItem? Type1249 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type1291 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage? Type1250 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1292 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemList? Type1251 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? Type1293 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1252 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? Type1294 { get; set; } /// /// /// - public global::tryAGI.OpenAI.EvalRunOutputItemListObject? Type1253 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? Type1295 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Filters? Type1254 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? Type1296 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type1255 { get; set; } + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? Type1297 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Type1256 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1298 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneChatRequestInput? Type1257 { get; set; } + public global::tryAGI.OpenAI.CreateThreadAndRunRequestModel? Type1299 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type1258 { get; set; } + public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? Type1300 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1259 { get; set; } + public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type1301 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTunePreferenceRequestInput? Type1260 { get; set; } + public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type1302 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput? Type1261 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionRequest? Type1303 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type1262 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1304 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1263 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionRequestModel? Type1305 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuneReinforcementRequestInput? Type1264 { get; set; } + public global::System.Collections.Generic.IList? Type1306 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type1265 { get; set; } + public global::tryAGI.OpenAI.TranscriptionInclude? Type1307 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1266 { get; set; } + public global::System.Collections.Generic.IList? Type1308 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningCheckpointPermission? Type1267 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type1309 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningCheckpointPermissionObject? Type1268 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1310 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningIntegration? Type1269 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1? Type1311 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningIntegrationType? Type1270 { get; set; } + public global::tryAGI.OpenAI.VadConfig? Type1312 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningIntegrationWandb? Type1271 { get; set; } + public global::tryAGI.OpenAI.VadConfigType? Type1313 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJob? Type1272 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson? Type1314 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobError? Type1273 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask? Type1315 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobHyperparameters? Type1274 { get; set; } + public global::System.Collections.Generic.IList? Type1316 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1275 { get; set; } + public global::tryAGI.OpenAI.TranscriptionDiarizedSegment? Type1317 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobHyperparametersLearningRateMultiplier? Type1276 { get; set; } + public global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType? Type1318 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1277 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage? Type1319 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobHyperparametersNEpochs? Type1278 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextUsageTokens? Type1320 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1279 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextUsageTokensType? Type1321 { get; set; } /// /// /// - public global::tryAGI.OpenAI.IntegrationsItem? Type1280 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? Type1322 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator? Type1281 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Type1323 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobObject? Type1282 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextUsageDurationType? Type1324 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobStatus? Type1283 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator? Type1325 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobCheckpoint? Type1284 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseJson? Type1326 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics? Type1285 { get; set; } + public global::System.Collections.Generic.IList? Type1327 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobCheckpointObject? Type1286 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseJsonLogprob? Type1328 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobEvent? Type1287 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1329 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobEventLevel? Type1288 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent? Type1330 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobEventObject? Type1289 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextSegmentEvent? Type1331 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FineTuningJobEventType? Type1290 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextSegmentEventType? Type1332 { get; set; } /// /// /// - public global::tryAGI.OpenAI.FunctionCallItemStatus? Type1291 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDeltaEvent? Type1333 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Image2? Type1292 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDeltaEventType? Type1334 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEvent? Type1293 { get; set; } + public global::System.Collections.Generic.IList? Type1335 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEventBackground? Type1294 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDeltaEventLogprob? Type1336 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat? Type1295 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDoneEvent? Type1337 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEventQuality? Type1296 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDoneEventType? Type1338 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEventSize? Type1297 { get; set; } + public global::System.Collections.Generic.IList? Type1339 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditCompletedEventType? Type1298 { get; set; } + public global::tryAGI.OpenAI.TranscriptTextDoneEventLogprob? Type1340 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesUsage? Type1299 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEventDiscriminator? Type1341 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesUsageInputTokensDetails? Type1300 { get; set; } + public global::tryAGI.OpenAI.CreateTranscriptionResponseVerboseJson? Type1342 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEvent? Type1301 { get; set; } + public global::System.Collections.Generic.IList? Type1343 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEventBackground? Type1302 { get; set; } + public global::tryAGI.OpenAI.TranscriptionWord? Type1344 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEventOutputFormat? Type1303 { get; set; } + public global::System.Collections.Generic.IList? Type1345 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEventQuality? Type1304 { get; set; } + public global::tryAGI.OpenAI.TranscriptionSegment? Type1346 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEventSize? Type1305 { get; set; } + public global::tryAGI.OpenAI.CreateTranslationRequest? Type1347 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditPartialImageEventType? Type1306 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1348 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditStreamEvent? Type1307 { get; set; } + public global::tryAGI.OpenAI.CreateTranslationRequestModel? Type1349 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageEditStreamEventDiscriminator? Type1308 { get; set; } + public global::tryAGI.OpenAI.CreateTranslationRequestResponseFormat? Type1350 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEvent? Type1309 { get; set; } + public global::tryAGI.OpenAI.CreateTranslationResponseJson? Type1351 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEventBackground? Type1310 { get; set; } + public global::tryAGI.OpenAI.CreateTranslationResponseVerboseJson? Type1352 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat? Type1311 { get; set; } + public global::tryAGI.OpenAI.CreateUploadRequest? Type1353 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEventQuality? Type1312 { get; set; } + public global::tryAGI.OpenAI.CreateUploadRequestPurpose? Type1354 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEventSize? Type1313 { get; set; } + public global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequest? Type1355 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenCompletedEventType? Type1314 { get; set; } + public global::System.Collections.Generic.IList? Type1356 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenInputUsageDetails? Type1315 { get; set; } + public global::tryAGI.OpenAI.CreateVectorStoreFileRequest? Type1357 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEvent? Type1316 { get; set; } + public global::tryAGI.OpenAI.CreateVectorStoreRequest? Type1358 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEventBackground? Type1317 { get; set; } + public global::tryAGI.OpenAI.VectorStoreExpirationAfter? Type1359 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEventOutputFormat? Type1318 { get; set; } + public global::tryAGI.OpenAI.VectorStoreExpirationAfterAnchor? Type1360 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEventQuality? Type1319 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1361 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEventSize? Type1320 { get; set; } + public global::tryAGI.OpenAI.CreateVoiceConsentRequest? Type1362 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenPartialImageEventType? Type1321 { get; set; } + public global::tryAGI.OpenAI.CreateVoiceRequest? Type1363 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenStreamEvent? Type1322 { get; set; } + public global::tryAGI.OpenAI.DeleteAssistantResponse? Type1364 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenStreamEventDiscriminator? Type1323 { get; set; } + public global::tryAGI.OpenAI.DeleteAssistantResponseObject? Type1365 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImageGenUsage? Type1324 { get; set; } + public global::tryAGI.OpenAI.DeleteCertificateResponse? Type1366 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesResponse? Type1325 { get; set; } + public global::tryAGI.OpenAI.DeleteCertificateResponseObject? Type1367 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesResponseBackground? Type1326 { get; set; } + public global::tryAGI.OpenAI.DeleteFileResponse? Type1368 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1327 { get; set; } + public global::tryAGI.OpenAI.DeleteFileResponseObject? Type1369 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesResponseOutputFormat? Type1328 { get; set; } + public global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse? Type1370 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesResponseQuality? Type1329 { get; set; } + public global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponseObject? Type1371 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ImagesResponseSize? Type1330 { get; set; } + public global::tryAGI.OpenAI.DeleteMessageResponse? Type1372 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessageResource? Type1331 { get; set; } + public global::tryAGI.OpenAI.DeleteMessageResponseObject? Type1373 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InputMessageResourceVariant2? Type1332 { get; set; } + public global::tryAGI.OpenAI.DeleteModelResponse? Type1374 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Invite? Type1333 { get; set; } + public global::tryAGI.OpenAI.DeleteThreadResponse? Type1375 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteObject? Type1334 { get; set; } + public global::tryAGI.OpenAI.DeleteThreadResponseObject? Type1376 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1335 { get; set; } + public global::tryAGI.OpenAI.DeleteVectorStoreFileResponse? Type1377 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteProject? Type1336 { get; set; } + public global::tryAGI.OpenAI.DeleteVectorStoreFileResponseObject? Type1378 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteProjectRole? Type1337 { get; set; } + public global::tryAGI.OpenAI.DeleteVectorStoreResponse? Type1379 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteRole? Type1338 { get; set; } + public global::tryAGI.OpenAI.DeleteVectorStoreResponseObject? Type1380 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteStatus? Type1339 { get; set; } + public global::tryAGI.OpenAI.DeletedConversation? Type1381 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteDeleteResponse? Type1340 { get; set; } + public global::tryAGI.OpenAI.DeletedConversationResource? Type1382 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteDeleteResponseObject? Type1341 { get; set; } + public global::tryAGI.OpenAI.DeletedConversationResourceObject? Type1383 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteListResponse? Type1342 { get; set; } + public global::tryAGI.OpenAI.DeletedRoleAssignmentResource? Type1384 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1343 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParam? Type1385 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteListResponseObject? Type1344 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1386 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteRequest? Type1345 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamModel? Type1387 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1346 { get; set; } + public global::System.Collections.Generic.IList? Type1388 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteRequestProject? Type1347 { get; set; } + public global::tryAGI.OpenAI.ImageRefParam? Type1389 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteRequestProjectRole? Type1348 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2? Type1390 { get; set; } /// /// /// - public global::tryAGI.OpenAI.InviteRequestRole? Type1349 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2? Type1391 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ItemResource? Type1350 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamSize2? Type1392 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ItemResourceDiscriminator? Type1351 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2? Type1393 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListAssistantsResponse? Type1352 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2? Type1394 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1353 { get; set; } + public global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2? Type1395 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListAuditLogsResponse? Type1354 { get; set; } + public global::tryAGI.OpenAI.ErrorResponse? Type1396 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1355 { get; set; } + public global::tryAGI.OpenAI.Eval? Type1397 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListAuditLogsResponseObject? Type1356 { get; set; } + public global::tryAGI.OpenAI.EvalObject? Type1398 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListBatchesResponse? Type1357 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1399 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1358 { get; set; } + public global::tryAGI.OpenAI.EvalCustomDataSourceConfig? Type1400 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListBatchesResponseObject? Type1359 { get; set; } + public global::tryAGI.OpenAI.EvalCustomDataSourceConfigType? Type1401 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListCertificatesResponse? Type1360 { get; set; } + public global::tryAGI.OpenAI.EvalLogsDataSourceConfig? Type1402 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1361 { get; set; } + public global::tryAGI.OpenAI.EvalLogsDataSourceConfigType? Type1403 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListCertificatesResponseObject? Type1362 { get; set; } + public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? Type1404 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFilesResponse? Type1363 { get; set; } + public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType? Type1405 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1364 { get; set; } + public global::System.Collections.Generic.IList>? Type1406 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OpenAIFile? Type1365 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1407 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OpenAIFileObject? Type1366 { get; set; } + public global::tryAGI.OpenAI.EvalGraderLabelModel? Type1408 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OpenAIFilePurpose? Type1367 { get; set; } + public global::tryAGI.OpenAI.EvalApiError? Type1409 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OpenAIFileStatus? Type1368 { get; set; } + public global::tryAGI.OpenAI.EvalList? Type1410 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse? Type1369 { get; set; } + public global::tryAGI.OpenAI.EvalListObject? Type1411 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1370 { get; set; } + public global::System.Collections.Generic.IList? Type1412 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject? Type1371 { get; set; } + public global::tryAGI.OpenAI.EvalRun? Type1413 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse? Type1372 { get; set; } + public global::tryAGI.OpenAI.EvalRunObject? Type1414 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1373 { get; set; } + public global::tryAGI.OpenAI.EvalRunResultCounts? Type1415 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject? Type1374 { get; set; } + public global::System.Collections.Generic.IList? Type1416 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningJobEventsResponse? Type1375 { get; set; } + public global::tryAGI.OpenAI.EvalRunPerModelUsageItem? Type1417 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1376 { get; set; } + public global::System.Collections.Generic.IList? Type1418 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningJobEventsResponseObject? Type1377 { get; set; } + public global::tryAGI.OpenAI.EvalRunPerTestingCriteriaResult? Type1419 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListMessagesResponse? Type1378 { get; set; } + public global::tryAGI.OpenAI.EvalRunList? Type1420 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1379 { get; set; } + public global::tryAGI.OpenAI.EvalRunListObject? Type1421 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListModelsResponse? Type1380 { get; set; } + public global::System.Collections.Generic.IList? Type1422 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1381 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItem? Type1423 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Model16? Type1382 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemObject? Type1424 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelObject? Type1383 { get; set; } + public global::System.Collections.Generic.IList? Type1425 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListModelsResponseObject? Type1384 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemResult? Type1426 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse? Type1385 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemSample? Type1427 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1386 { get; set; } + public global::System.Collections.Generic.IList? Type1428 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponseObject? Type1387 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemSampleInputItem? Type1429 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListRunStepsResponse? Type1388 { get; set; } + public global::System.Collections.Generic.IList? Type1430 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1389 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemSampleOutputItem? Type1431 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListRunsResponse? Type1390 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage? Type1432 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1391 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemList? Type1433 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListVectorStoreFilesResponse? Type1392 { get; set; } + public global::tryAGI.OpenAI.EvalRunOutputItemListObject? Type1434 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1393 { get; set; } + public global::System.Collections.Generic.IList? Type1435 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileObject? Type1394 { get; set; } + public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type1436 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileObjectLastError? Type1395 { get; set; } + public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? Type1437 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode? Type1396 { get; set; } + public global::tryAGI.OpenAI.FineTuningCheckpointPermission? Type1438 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileObjectObject? Type1397 { get; set; } + public global::tryAGI.OpenAI.FineTuningCheckpointPermissionObject? Type1439 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileObjectStatus? Type1398 { get; set; } + public global::tryAGI.OpenAI.FineTuningIntegration? Type1440 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListVectorStoresResponse? Type1399 { get; set; } + public global::tryAGI.OpenAI.FineTuningIntegrationType? Type1441 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1400 { get; set; } + public global::tryAGI.OpenAI.FineTuningIntegrationWandb? Type1442 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreObject? Type1401 { get; set; } + public global::tryAGI.OpenAI.FineTuningJob? Type1443 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreObjectFileCounts? Type1402 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobError2? Type1444 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreObjectObject? Type1403 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobHyperparameters? Type1445 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreObjectStatus? Type1404 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1446 { get; set; } /// /// /// - public global::tryAGI.OpenAI.LogProbProperties? Type1405 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSizeVariant1? Type1447 { get; set; } /// /// /// - public global::tryAGI.OpenAI.MCPToolFilter? Type1406 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1448 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModelIds? Type1407 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobHyperparametersLearningRateMultiplier? Type1449 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyAssistantRequest? Type1408 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1450 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResources? Type1409 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobHyperparametersNEpochs? Type1451 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type1410 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobObject? Type1452 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type1411 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobStatus? Type1453 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyCertificateRequest? Type1412 { get; set; } + public global::System.Collections.Generic.IList? Type1454 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyMessageRequest? Type1413 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobCheckpoint? Type1455 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyRunRequest? Type1414 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics? Type1456 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyThreadRequest? Type1415 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobCheckpointObject? Type1457 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyThreadRequestToolResources? Type1416 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobEvent? Type1458 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type1417 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobEventObject? Type1459 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type1418 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobEventLevel? Type1460 { get; set; } /// /// /// - public global::tryAGI.OpenAI.NoiseReductionType? Type1419 { get; set; } + public global::tryAGI.OpenAI.FineTuningJobEventType? Type1461 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputAudio? Type1420 { get; set; } + public global::tryAGI.OpenAI.Group? Type1462 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputAudioType? Type1421 { get; set; } + public global::tryAGI.OpenAI.GroupObject? Type1463 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputItem? Type1422 { get; set; } + public global::tryAGI.OpenAI.GroupDeletedResource? Type1464 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OutputItemDiscriminator? Type1423 { get; set; } + public global::tryAGI.OpenAI.GroupDeletedResourceObject? Type1465 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Project? Type1424 { get; set; } + public global::tryAGI.OpenAI.GroupListResource? Type1466 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectObject? Type1425 { get; set; } + public global::tryAGI.OpenAI.GroupListResourceObject? Type1467 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectStatus? Type1426 { get; set; } + public global::System.Collections.Generic.IList? Type1468 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKey? Type1427 { get; set; } + public global::tryAGI.OpenAI.GroupResponse? Type1469 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyObject? Type1428 { get; set; } + public global::tryAGI.OpenAI.GroupResourceWithSuccess? Type1470 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyOwner? Type1429 { get; set; } + public global::tryAGI.OpenAI.GroupRoleAssignment? Type1471 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccount? Type1430 { get; set; } + public global::tryAGI.OpenAI.GroupRoleAssignmentObject? Type1472 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountObject? Type1431 { get; set; } + public global::tryAGI.OpenAI.Role? Type1473 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountRole? Type1432 { get; set; } + public global::tryAGI.OpenAI.RoleObject? Type1474 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyOwnerType? Type1433 { get; set; } + public global::tryAGI.OpenAI.GroupUserAssignment? Type1475 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUser? Type1434 { get; set; } + public global::tryAGI.OpenAI.GroupUserAssignmentObject? Type1476 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserObject? Type1435 { get; set; } + public global::tryAGI.OpenAI.GroupUserDeletedResource? Type1477 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserRole? Type1436 { get; set; } + public global::tryAGI.OpenAI.GroupUserDeletedResourceObject? Type1478 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponse? Type1437 { get; set; } + public global::tryAGI.OpenAI.Image2? Type1479 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponseObject? Type1438 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEvent? Type1480 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyListResponse? Type1439 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEventType? Type1481 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1440 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEventSize? Type1482 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectApiKeyListResponseObject? Type1441 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEventQuality? Type1483 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectCreateRequest? Type1442 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEventBackground? Type1484 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectListResponse? Type1443 { get; set; } + public global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat? Type1485 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1444 { get; set; } + public global::tryAGI.OpenAI.ImagesUsage? Type1486 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectListResponseObject? Type1445 { get; set; } + public global::tryAGI.OpenAI.ImagesUsageInputTokensDetails? Type1487 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectRateLimit? Type1446 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEvent? Type1488 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectRateLimitObject? Type1447 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEventType? Type1489 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectRateLimitListResponse? Type1448 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEventSize? Type1490 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1449 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEventQuality? Type1491 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectRateLimitListResponseObject? Type1450 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEventBackground? Type1492 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectRateLimitUpdateRequest? Type1451 { get; set; } + public global::tryAGI.OpenAI.ImageEditPartialImageEventOutputFormat? Type1493 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountApiKey? Type1452 { get; set; } + public global::tryAGI.OpenAI.ImageEditStreamEvent? Type1494 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountApiKeyObject? Type1453 { get; set; } + public global::tryAGI.OpenAI.ImageEditStreamEventDiscriminator? Type1495 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountCreateRequest? Type1454 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEvent? Type1496 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponse? Type1455 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEventType? Type1497 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseObject? Type1456 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEventSize? Type1498 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseRole? Type1457 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEventQuality? Type1499 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponse? Type1458 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEventBackground? Type1500 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponseObject? Type1459 { get; set; } + public global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat? Type1501 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountListResponse? Type1460 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEvent? Type1502 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1461 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEventType? Type1503 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectServiceAccountListResponseObject? Type1462 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEventSize? Type1504 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUpdateRequest? Type1463 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEventQuality? Type1505 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserCreateRequest? Type1464 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEventBackground? Type1506 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserCreateRequestRole? Type1465 { get; set; } + public global::tryAGI.OpenAI.ImageGenPartialImageEventOutputFormat? Type1507 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserDeleteResponse? Type1466 { get; set; } + public global::tryAGI.OpenAI.ImageGenStreamEvent? Type1508 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserDeleteResponseObject? Type1467 { get; set; } + public global::tryAGI.OpenAI.ImageGenStreamEventDiscriminator? Type1509 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserListResponse? Type1468 { get; set; } + public global::tryAGI.OpenAI.ImagesResponse? Type1510 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1469 { get; set; } + public global::System.Collections.Generic.IList? Type1511 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserUpdateRequest? Type1470 { get; set; } + public global::tryAGI.OpenAI.ImagesResponseBackground? Type1512 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ProjectUserUpdateRequestRole? Type1471 { get; set; } + public global::tryAGI.OpenAI.ImagesResponseOutputFormat? Type1513 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormats? Type1472 { get; set; } + public global::tryAGI.OpenAI.ImagesResponseSize? Type1514 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? Type1473 { get; set; } + public global::tryAGI.OpenAI.ImagesResponseQuality? Type1515 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type? Type1474 { get; set; } + public global::tryAGI.OpenAI.ImageGenUsage? Type1516 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? Type1475 { get; set; } + public global::tryAGI.OpenAI.ImageGenOutputTokensDetails? Type1517 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type? Type1476 { get; set; } + public global::tryAGI.OpenAI.ImageGenInputUsageDetails? Type1518 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? Type1477 { get; set; } + public global::tryAGI.OpenAI.InputMessageResource? Type1519 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type? Type1478 { get; set; } + public global::tryAGI.OpenAI.InputMessageResourceVariant2? Type1520 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator? Type1479 { get; set; } + public global::tryAGI.OpenAI.Invite? Type1521 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreate? Type1480 { get; set; } + public global::tryAGI.OpenAI.InviteObject? Type1522 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItem? Type1481 { get; set; } + public global::tryAGI.OpenAI.InviteRole? Type1523 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemObject? Type1482 { get; set; } + public global::tryAGI.OpenAI.InviteStatus? Type1524 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemType? Type1483 { get; set; } + public global::System.Collections.Generic.IList? Type1525 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemStatus? Type1484 { get; set; } + public global::tryAGI.OpenAI.InviteProject? Type1526 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemRole? Type1485 { get; set; } + public global::tryAGI.OpenAI.InviteProjectRole? Type1527 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1486 { get; set; } + public global::tryAGI.OpenAI.InviteDeleteResponse? Type1528 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemContentItem? Type1487 { get; set; } + public global::tryAGI.OpenAI.InviteDeleteResponseObject? Type1529 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemContentItemType? Type1488 { get; set; } + public global::tryAGI.OpenAI.InviteListResponse? Type1530 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType? Type1489 { get; set; } + public global::tryAGI.OpenAI.InviteListResponseObject? Type1531 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemDelete? Type1490 { get; set; } + public global::System.Collections.Generic.IList? Type1532 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemDeleteType? Type1491 { get; set; } + public global::tryAGI.OpenAI.InviteProjectGroupBody? Type1533 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemRetrieve? Type1492 { get; set; } + public global::tryAGI.OpenAI.InviteRequest? Type1534 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemRetrieveType? Type1493 { get; set; } + public global::tryAGI.OpenAI.InviteRequestRole? Type1535 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncate? Type1494 { get; set; } + public global::System.Collections.Generic.IList? Type1536 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncateType? Type1495 { get; set; } + public global::tryAGI.OpenAI.InviteRequestProject? Type1537 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferAppend? Type1496 { get; set; } + public global::tryAGI.OpenAI.InviteRequestProjectRole? Type1538 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferAppendType? Type1497 { get; set; } + public global::tryAGI.OpenAI.ItemResource? Type1539 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferClear? Type1498 { get; set; } + public global::tryAGI.OpenAI.ItemResourceDiscriminator? Type1540 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferClearType? Type1499 { get; set; } + public global::tryAGI.OpenAI.ListAssistantsResponse? Type1541 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferCommit? Type1500 { get; set; } + public global::System.Collections.Generic.IList? Type1542 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferCommitType? Type1501 { get; set; } + public global::tryAGI.OpenAI.ListAuditLogsResponse? Type1543 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventOutputAudioBufferClear? Type1502 { get; set; } + public global::tryAGI.OpenAI.ListAuditLogsResponseObject? Type1544 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventOutputAudioBufferClearType? Type1503 { get; set; } + public global::System.Collections.Generic.IList? Type1545 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancel? Type1504 { get; set; } + public global::tryAGI.OpenAI.ListBatchesResponse? Type1546 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancelType? Type1505 { get; set; } + public global::System.Collections.Generic.IList? Type1547 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreate? Type1506 { get; set; } + public global::tryAGI.OpenAI.ListBatchesResponseObject? Type1548 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? Type1507 { get; set; } + public global::tryAGI.OpenAI.ListCertificatesResponse? Type1549 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1508 { get; set; } + public global::System.Collections.Generic.IList? Type1550 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsConversation? Type1509 { get; set; } + public global::tryAGI.OpenAI.ListCertificatesResponseObject? Type1551 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1510 { get; set; } + public global::tryAGI.OpenAI.ListFilesResponse? Type1552 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1511 { get; set; } + public global::System.Collections.Generic.IList? Type1553 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsMaxOutputTokens? Type1512 { get; set; } + public global::tryAGI.OpenAI.OpenAIFile? Type1554 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1513 { get; set; } + public global::tryAGI.OpenAI.OpenAIFileObject? Type1555 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsModalitie? Type1514 { get; set; } + public global::tryAGI.OpenAI.OpenAIFilePurpose? Type1556 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsOutputAudioFormat? Type1515 { get; set; } + public global::tryAGI.OpenAI.OpenAIFileStatus? Type1557 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1516 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse? Type1558 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1517 { get; set; } + public global::System.Collections.Generic.IList? Type1559 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsTool? Type1518 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject? Type1560 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? Type1519 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse? Type1561 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreateType? Type1520 { get; set; } + public global::System.Collections.Generic.IList? Type1562 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdate? Type1521 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject? Type1563 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequest? Type1522 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningJobEventsResponse? Type1564 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret? Type1523 { get; set; } + public global::System.Collections.Generic.IList? Type1565 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? Type1524 { get; set; } + public global::tryAGI.OpenAI.ListFineTuningJobEventsResponseObject? Type1566 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1525 { get; set; } + public global::tryAGI.OpenAI.ListMessagesResponse? Type1567 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestMaxResponseOutputTokens? Type1526 { get; set; } + public global::System.Collections.Generic.IList? Type1568 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1527 { get; set; } + public global::tryAGI.OpenAI.ListModelsResponse? Type1569 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestModalitie? Type1528 { get; set; } + public global::tryAGI.OpenAI.ListModelsResponseObject? Type1570 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1529 { get; set; } + public global::System.Collections.Generic.IList? Type1571 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTool? Type1530 { get; set; } + public global::tryAGI.OpenAI.Model17? Type1572 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? Type1531 { get; set; } + public global::tryAGI.OpenAI.ModelObject? Type1573 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1532 { get; set; } + public global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse? Type1574 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum? Type1533 { get; set; } + public global::System.Collections.Generic.IList? Type1575 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum2? Type1534 { get; set; } + public global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponseObject? Type1576 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTruncation? Type1535 { get; set; } + public global::tryAGI.OpenAI.ListRunStepsResponse? Type1577 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTruncationEnum? Type1536 { get; set; } + public global::System.Collections.Generic.IList? Type1578 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTruncationEnum2? Type1537 { get; set; } + public global::tryAGI.OpenAI.ListRunsResponse? Type1579 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTruncationEnumType? Type1538 { get; set; } + public global::System.Collections.Generic.IList? Type1580 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? Type1539 { get; set; } + public global::tryAGI.OpenAI.ListVectorStoreFilesResponse? Type1581 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdateType? Type1540 { get; set; } + public global::System.Collections.Generic.IList? Type1582 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventTranscriptionSessionUpdate? Type1541 { get; set; } + public global::tryAGI.OpenAI.VectorStoreFileObject? Type1583 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest? Type1542 { get; set; } + public global::tryAGI.OpenAI.VectorStoreFileObjectObject? Type1584 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1543 { get; set; } + public global::tryAGI.OpenAI.VectorStoreFileObjectStatus? Type1585 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestIncludeItem? Type1544 { get; set; } + public global::tryAGI.OpenAI.VectorStoreFileObjectLastError2? Type1586 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? Type1545 { get; set; } + public global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode? Type1587 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? Type1546 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1588 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? Type1547 { get; set; } + public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? Type1589 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? Type1548 { get; set; } + public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParamType? Type1590 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaClientEventTranscriptionSessionUpdateType? Type1549 { get; set; } + public global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? Type1591 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponse? Type1550 { get; set; } + public global::tryAGI.OpenAI.OtherChunkingStrategyResponseParamType? Type1592 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1551 { get; set; } + public global::tryAGI.OpenAI.ListVectorStoresResponse? Type1593 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseMaxOutputTokens? Type1552 { get; set; } + public global::System.Collections.Generic.IList? Type1594 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1553 { get; set; } + public global::tryAGI.OpenAI.VectorStoreObject? Type1595 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseModalitie? Type1554 { get; set; } + public global::tryAGI.OpenAI.VectorStoreObjectObject? Type1596 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseObject? Type1555 { get; set; } + public global::tryAGI.OpenAI.VectorStoreObjectFileCounts? Type1597 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? Type1556 { get; set; } + public global::tryAGI.OpenAI.VectorStoreObjectStatus? Type1598 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseStatus? Type1557 { get; set; } + public global::tryAGI.OpenAI.LogProbProperties? Type1599 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetails? Type1558 { get; set; } + public global::tryAGI.OpenAI.ModelIds? Type1600 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? Type1559 { get; set; } + public global::tryAGI.OpenAI.ModelIdsCompaction? Type1601 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsReason? Type1560 { get; set; } + public global::tryAGI.OpenAI.ModifyAssistantRequest? Type1602 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? Type1561 { get; set; } + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2? Type1603 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseUsage? Type1562 { get; set; } + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type1604 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? Type1563 { get; set; } + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type1605 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? Type1564 { get; set; } + public global::tryAGI.OpenAI.ModifyCertificateRequest? Type1606 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? Type1565 { get; set; } + public global::tryAGI.OpenAI.ModifyMessageRequest? Type1607 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreated? Type1566 { get; set; } + public global::tryAGI.OpenAI.ModifyRunRequest? Type1608 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType? Type1567 { get; set; } + public global::tryAGI.OpenAI.ModifyThreadRequest? Type1609 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemDeleted? Type1568 { get; set; } + public global::tryAGI.OpenAI.ModifyThreadRequestToolResources2? Type1610 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemDeletedType? Type1569 { get; set; } + public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type1611 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted? Type1570 { get; set; } + public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type1612 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1571 { get; set; } + public global::tryAGI.OpenAI.NoiseReductionType? Type1613 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType? Type1572 { get; set; } + public global::tryAGI.OpenAI.OutputAudio? Type1614 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1573 { get; set; } + public global::tryAGI.OpenAI.OutputAudioType? Type1615 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta? Type1574 { get; set; } + public global::tryAGI.OpenAI.OutputItem? Type1616 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType? Type1575 { get; set; } + public global::tryAGI.OpenAI.CompactionBody? Type1617 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed? Type1576 { get; set; } + public global::tryAGI.OpenAI.CompactionBodyType? Type1618 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError? Type1577 { get; set; } + public global::tryAGI.OpenAI.OutputItemDiscriminator? Type1619 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedType? Type1578 { get; set; } + public global::tryAGI.OpenAI.Project? Type1620 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment? Type1579 { get; set; } + public global::tryAGI.OpenAI.ProjectObject? Type1621 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentType? Type1580 { get; set; } + public global::tryAGI.OpenAI.ProjectStatus? Type1622 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrieved? Type1581 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKey? Type1623 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrievedType? Type1582 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyObject? Type1624 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncated? Type1583 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyOwner? Type1625 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncatedType? Type1584 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyOwnerType? Type1626 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventError? Type1585 { get; set; } + public global::tryAGI.OpenAI.ProjectUser? Type1627 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError? Type1586 { get; set; } + public global::tryAGI.OpenAI.ProjectUserObject? Type1628 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventErrorType? Type1587 { get; set; } + public global::tryAGI.OpenAI.ProjectUserRole? Type1629 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCleared? Type1588 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccount? Type1630 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferClearedType? Type1589 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountObject? Type1631 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommitted? Type1590 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountRole? Type1632 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType? Type1591 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponse? Type1633 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStarted? Type1592 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponseObject? Type1634 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStartedType? Type1593 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyListResponse? Type1635 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStopped? Type1594 { get; set; } + public global::tryAGI.OpenAI.ProjectApiKeyListResponseObject? Type1636 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStoppedType? Type1595 { get; set; } + public global::System.Collections.Generic.IList? Type1637 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsCompleted? Type1596 { get; set; } + public global::tryAGI.OpenAI.ProjectCreateRequest? Type1638 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsCompletedType? Type1597 { get; set; } + public global::tryAGI.OpenAI.ProjectCreateRequestGeography? Type1639 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsFailed? Type1598 { get; set; } + public global::tryAGI.OpenAI.ProjectGroup? Type1640 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsFailedType? Type1599 { get; set; } + public global::tryAGI.OpenAI.ProjectGroupObject? Type1641 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsInProgress? Type1600 { get; set; } + public global::tryAGI.OpenAI.ProjectGroupDeletedResource? Type1642 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsInProgressType? Type1601 { get; set; } + public global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject? Type1643 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdated? Type1602 { get; set; } + public global::tryAGI.OpenAI.ProjectGroupListResource? Type1644 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1603 { get; set; } + public global::tryAGI.OpenAI.ProjectGroupListResourceObject? Type1645 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimit? Type1604 { get; set; } + public global::System.Collections.Generic.IList? Type1646 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimitName? Type1605 { get; set; } + public global::tryAGI.OpenAI.ProjectListResponse? Type1647 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedType? Type1606 { get; set; } + public global::tryAGI.OpenAI.ProjectListResponseObject? Type1648 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDelta? Type1607 { get; set; } + public global::System.Collections.Generic.IList? Type1649 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDeltaType? Type1608 { get; set; } + public global::tryAGI.OpenAI.ProjectRateLimit? Type1650 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDone? Type1609 { get; set; } + public global::tryAGI.OpenAI.ProjectRateLimitObject? Type1651 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDoneType? Type1610 { get; set; } + public global::tryAGI.OpenAI.ProjectRateLimitListResponse? Type1652 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDelta? Type1611 { get; set; } + public global::tryAGI.OpenAI.ProjectRateLimitListResponseObject? Type1653 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDeltaType? Type1612 { get; set; } + public global::System.Collections.Generic.IList? Type1654 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDone? Type1613 { get; set; } + public global::tryAGI.OpenAI.ProjectRateLimitUpdateRequest? Type1655 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDoneType? Type1614 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountApiKey? Type1656 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAdded? Type1615 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountApiKeyObject? Type1657 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPart? Type1616 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountCreateRequest? Type1658 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? Type1617 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponse? Type1659 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedType? Type1618 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseObject? Type1660 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDone? Type1619 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseRole? Type1661 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePart? Type1620 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponse? Type1662 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? Type1621 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponseObject? Type1663 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDoneType? Type1622 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountListResponse? Type1664 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseCreated? Type1623 { get; set; } + public global::tryAGI.OpenAI.ProjectServiceAccountListResponseObject? Type1665 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseCreatedType? Type1624 { get; set; } + public global::System.Collections.Generic.IList? Type1666 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseDone? Type1625 { get; set; } + public global::tryAGI.OpenAI.ProjectUpdateRequest? Type1667 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseDoneType? Type1626 { get; set; } + public global::tryAGI.OpenAI.ProjectUserCreateRequest? Type1668 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta? Type1627 { get; set; } + public global::tryAGI.OpenAI.ProjectUserCreateRequestRole? Type1669 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaType? Type1628 { get; set; } + public global::tryAGI.OpenAI.ProjectUserDeleteResponse? Type1670 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDone? Type1629 { get; set; } + public global::tryAGI.OpenAI.ProjectUserDeleteResponseObject? Type1671 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneType? Type1630 { get; set; } + public global::tryAGI.OpenAI.ProjectUserListResponse? Type1672 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDelta? Type1631 { get; set; } + public global::System.Collections.Generic.IList? Type1673 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType? Type1632 { get; set; } + public global::tryAGI.OpenAI.ProjectUserUpdateRequest? Type1674 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDone? Type1633 { get; set; } + public global::tryAGI.OpenAI.ProjectUserUpdateRequestRole? Type1675 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDoneType? Type1634 { get; set; } + public global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody? Type1676 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompleted? Type1635 { get; set; } + public global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody? Type1677 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompletedType? Type1636 { get; set; } + public global::tryAGI.OpenAI.PublicRoleListResource? Type1678 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailed? Type1637 { get; set; } + public global::tryAGI.OpenAI.PublicRoleListResourceObject? Type1679 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailedType? Type1638 { get; set; } + public global::System.Collections.Generic.IList? Type1680 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgress? Type1639 { get; set; } + public global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody? Type1681 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgressType? Type1640 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormats? Type1682 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAdded? Type1641 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? Type1683 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAddedType? Type1642 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType? Type1684 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDone? Type1643 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? Type1685 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDoneType? Type1644 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType? Type1686 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDelta? Type1645 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? Type1687 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDeltaType? Type1646 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType? Type1688 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDone? Type1647 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreate? Type1689 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDoneType? Type1648 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType? Type1690 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreated? Type1649 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItem? Type1691 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSession? Type1650 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemObject? Type1692 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionObject? Type1651 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemType? Type1693 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionVoice? Type1652 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemStatus? Type1694 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeAudioFormat? Type1653 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemRole? Type1695 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionInputAudioTranscription? Type1654 { get; set; } + public global::System.Collections.Generic.IList? Type1696 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionTurnDetection? Type1655 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemContentItem? Type1697 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionTurnDetectionType? Type1656 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemContentItemType? Type1698 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1657 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemDelete? Type1699 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionTool? Type1658 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemDeleteType? Type1700 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionToolChoice? Type1659 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemRetrieve? Type1701 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OneOf? Type1660 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemRetrieveType? Type1702 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionMaxOutputTokens? Type1661 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncate? Type1703 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreatedType? Type1662 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncateType? Type1704 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdated? Type1663 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferAppend? Type1705 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdatedType? Type1664 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferAppendType? Type1706 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreated? Type1665 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferClear? Type1707 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse? Type1666 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferClearType? Type1708 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseClientSecret? Type1667 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferCommit? Type1709 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1668 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferCommitType? Type1710 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseModalitie? Type1669 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventOutputAudioBufferClear? Type1711 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseTurnDetection? Type1670 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventOutputAudioBufferClearType? Type1712 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreatedType? Type1671 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancel? Type1713 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdated? Type1672 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancelType? Type1714 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdatedType? Type1673 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreate? Type1715 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEvent? Type1674 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreateType? Type1716 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate? Type1675 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? Type1717 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType? Type1676 { get; set; } + public global::System.Collections.Generic.IList? Type1718 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete? Type1677 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsModalitie? Type1719 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemDeleteType? Type1678 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsOutputAudioFormat? Type1720 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve? Type1679 { get; set; } + public global::System.Collections.Generic.IList? Type1721 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieveType? Type1680 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsTool? Type1722 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate? Type1681 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? Type1723 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncateType? Type1682 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1724 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend? Type1683 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1725 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppendType? Type1684 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsMaxOutputTokens? Type1726 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear? Type1685 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1727 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClearType? Type1686 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsConversation? Type1728 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear? Type1687 { get; set; } + public global::System.Collections.Generic.IList? Type1729 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClearType? Type1688 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdate? Type1730 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit? Type1689 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdateType? Type1731 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommitType? Type1690 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequest? Type1732 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventResponseCancel? Type1691 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret? Type1733 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventResponseCancelType? Type1692 { get; set; } + public global::System.Collections.Generic.IList? Type1734 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventResponseCreate? Type1693 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestModalitie? Type1735 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParams? Type1694 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? Type1736 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? Type1695 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1737 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudioOutput? Type1696 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum? Type1738 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1697 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum2? Type1739 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsConversation? Type1698 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? Type1740 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1699 { get; set; } + public global::System.Collections.Generic.IList? Type1741 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsMaxOutputTokens? Type1700 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTool? Type1742 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1701 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? Type1743 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsOutputModalitie? Type1702 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1744 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type1703 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestMaxResponseOutputTokens? Type1745 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1704 { get; set; } + public global::tryAGI.OpenAI.RealtimeTruncation? Type1746 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeFunctionTool? Type1705 { get; set; } + public global::tryAGI.OpenAI.RealtimeTruncationEnum? Type1747 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeFunctionToolType? Type1706 { get; set; } + public global::tryAGI.OpenAI.RealtimeTruncationEnum2? Type1748 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventResponseCreateType? Type1707 { get; set; } + public global::tryAGI.OpenAI.RealtimeTruncationEnumType? Type1749 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventSessionUpdate? Type1708 { get; set; } + public global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits? Type1750 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1709 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventTranscriptionSessionUpdate? Type1751 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? Type1710 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaClientEventTranscriptionSessionUpdateType? Type1752 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? Type1711 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest? Type1753 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInput? Type1712 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? Type1754 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInputNoiseReduction? Type1713 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? Type1755 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioOutput? Type1714 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? Type1756 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1715 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? Type1757 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAIncludeItem? Type1716 { get; set; } + public global::System.Collections.Generic.IList? Type1758 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1717 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestIncludeItem? Type1759 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAMaxOutputTokens? Type1718 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponse? Type1760 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1719 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseObject? Type1761 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAModel? Type1720 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseStatus? Type1762 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1721 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetails? Type1763 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAOutputModalitie? Type1722 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? Type1764 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1723 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsReason? Type1765 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToolsItem5? Type1724 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? Type1766 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator? Type1725 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseUsage? Type1767 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1726 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? Type1768 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGATracingEnum? Type1727 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? Type1769 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGATracingEnum2? Type1728 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? Type1770 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType? Type1729 { get; set; } + public global::System.Collections.Generic.IList? Type1771 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? Type1730 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseModalitie? Type1772 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio? Type1731 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? Type1773 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput? Type1732 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1774 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction? Type1733 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaResponseMaxOutputTokens? Type1775 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1734 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreated? Type1776 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAIncludeItem? Type1735 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType? Type1777 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType? Type1736 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemDeleted? Type1778 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventSessionUpdateType? Type1737 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemDeletedType? Type1779 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventDiscriminator? Type1738 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted? Type1780 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventTranscriptionSessionUpdate? Type1739 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType? Type1781 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeClientEventTranscriptionSessionUpdateType? Type1740 { get; set; } + public global::System.Collections.Generic.IList? Type1782 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConnectParams? Type1741 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta? Type1783 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCall? Type1742 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType? Type1784 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallObject? Type1743 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed? Type1785 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallStatus? Type1744 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedType? Type1786 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType? Type1745 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError? Type1787 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutput? Type1746 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment? Type1788 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputObject? Type1747 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentType? Type1789 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputStatus? Type1748 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrieved? Type1790 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType? Type1749 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrievedType? Type1791 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistant? Type1750 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncated? Type1792 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1751 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncatedType? Type1793 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItem? Type1752 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventError? Type1794 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? Type1753 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventErrorType? Type1795 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantObject? Type1754 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError? Type1796 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole? Type1755 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCleared? Type1797 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantStatus? Type1756 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferClearedType? Type1798 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType? Type1757 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommitted? Type1799 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystem? Type1758 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType? Type1800 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1759 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStarted? Type1801 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItem? Type1760 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStartedType? Type1802 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItemType? Type1761 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStopped? Type1803 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemObject? Type1762 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStoppedType? Type1804 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole? Type1763 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsCompleted? Type1805 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemStatus? Type1764 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsCompletedType? Type1806 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType? Type1765 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsFailed? Type1807 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUser? Type1766 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsFailedType? Type1808 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1767 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsInProgress? Type1809 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItem? Type1768 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsInProgressType? Type1810 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? Type1769 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdated? Type1811 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? Type1770 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedType? Type1812 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserObject? Type1771 { get; set; } + public global::System.Collections.Generic.IList? Type1813 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole? Type1772 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimit? Type1814 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserStatus? Type1773 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimitName? Type1815 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType? Type1774 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDelta? Type1816 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReference? Type1775 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDeltaType? Type1817 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1776 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDone? Type1818 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItem? Type1777 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDoneType? Type1819 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? Type1778 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDelta? Type1820 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceObject? Type1779 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDeltaType? Type1821 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceRole? Type1780 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDone? Type1822 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceStatus? Type1781 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDoneType? Type1823 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? Type1782 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAdded? Type1824 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest? Type1783 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedType? Type1825 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? Type1784 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPart? Type1826 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfterAnchor? Type1785 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? Type1827 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Session? Type1786 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDone? Type1828 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator? Type1787 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDoneType? Type1829 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretResponse? Type1788 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePart? Type1830 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Session2? Type1789 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? Type1831 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? Type1790 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseCreated? Type1832 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudio? Type1791 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseCreatedType? Type1833 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInput? Type1792 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseDone? Type1834 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInputNoiseReduction? Type1793 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseDoneType? Type1835 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioOutput? Type1794 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta? Type1836 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAClientSecret? Type1795 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaType? Type1837 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1796 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDone? Type1838 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAIncludeItem? Type1797 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneType? Type1839 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1798 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDelta? Type1840 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAMaxOutputTokens? Type1799 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType? Type1841 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type1800 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDone? Type1842 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAModel? Type1801 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDoneType? Type1843 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1802 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompleted? Type1844 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAOutputModalitie? Type1803 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompletedType? Type1845 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType? Type1804 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailed? Type1846 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? Type1805 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailedType? Type1847 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? Type1806 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgress? Type1848 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInput? Type1807 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgressType? Type1849 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? Type1808 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAdded? Type1850 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection? Type1809 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAddedType? Type1851 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1810 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDone? Type1852 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAIncludeItem? Type1811 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDoneType? Type1853 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType? Type1812 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDelta? Type1854 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeCreateClientSecretResponseSessionDiscriminator? Type1813 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDeltaType? Type1855 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPApprovalRequest? Type1814 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDone? Type1856 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPApprovalRequestType? Type1815 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDoneType? Type1857 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPApprovalResponse? Type1816 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreated? Type1858 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType? Type1817 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreatedType? Type1859 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPHTTPError? Type1818 { get; set; } + public global::tryAGI.OpenAI.RealtimeSession? Type1860 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPHTTPErrorType? Type1819 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionObject? Type1861 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPListTools? Type1820 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionVoice? Type1862 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPListToolsType? Type1821 { get; set; } + public global::tryAGI.OpenAI.RealtimeAudioFormat? Type1863 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPProtocolError? Type1822 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionInputAudioTranscription? Type1864 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPProtocolErrorType? Type1823 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionTurnDetection? Type1865 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPToolCall? Type1824 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionTurnDetectionType? Type1866 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPToolCallType? Type1825 { get; set; } + public global::System.Collections.Generic.IList? Type1867 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPToolExecutionError? Type1826 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionTool? Type1868 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeMCPToolExecutionErrorType? Type1827 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionToolChoice? Type1869 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponse? Type1828 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1870 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseObject? Type1829 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionMaxOutputTokens? Type1871 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseStatus? Type1830 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdated? Type1872 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseUsage? Type1831 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdatedType? Type1873 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEvent? Type1832 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreated? Type1874 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeError? Type1833 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreatedType? Type1875 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeErrorType? Type1834 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse? Type1876 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeErrorDetails? Type1835 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseClientSecret? Type1877 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreated? Type1836 { get; set; } + public global::System.Collections.Generic.IList? Type1878 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreatedType? Type1837 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseModalitie? Type1879 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionUpdated? Type1838 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseTurnDetection? Type1880 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionUpdatedType? Type1839 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdated? Type1881 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationCreated? Type1840 { get; set; } + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdatedType? Type1882 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationCreatedType? Type1841 { get; set; } + public global::tryAGI.OpenAI.RealtimeCallCreateRequest? Type1883 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversation? Type1842 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? Type1884 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationObject? Type1843 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType? Type1885 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemCreated? Type1844 { get; set; } + public global::System.Collections.Generic.IList? Type1886 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemCreatedType? Type1845 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAOutputModalitie? Type1887 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type1846 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type1888 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type1847 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAModel? Type1889 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type1848 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? Type1890 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type1849 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInput? Type1891 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? Type1850 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInputNoiseReduction? Type1892 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemTruncatedType? Type1851 { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? Type1893 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? Type1852 { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? Type1894 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemDeletedType? Type1853 { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? Type1895 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? Type1854 { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? Type1896 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommittedType? Type1855 { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator? Type1897 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? Type1856 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioOutput? Type1898 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferClearedType? Type1857 { get; set; } + public global::System.Collections.Generic.IList? Type1899 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? Type1858 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAIncludeItem? Type1900 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type1859 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1901 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? Type1860 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGATracingEnum? Type1902 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type1861 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGATracingEnum2? Type1903 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreated? Type1862 { get; set; } + public global::System.Collections.Generic.IList>? Type1904 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreatedType? Type1863 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1905 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseDone? Type1864 { get; set; } + public global::tryAGI.OpenAI.RealtimeFunctionTool? Type1906 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseDoneType? Type1865 { get; set; } + public global::tryAGI.OpenAI.RealtimeFunctionToolType? Type1907 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? Type1866 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1908 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseOutputItemAddedType? Type1867 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAMaxOutputTokens? Type1909 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? Type1868 { get; set; } + public global::tryAGI.OpenAI.RealtimeCallReferRequest? Type1910 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseOutputItemDoneType? Type1869 { get; set; } + public global::tryAGI.OpenAI.RealtimeCallRejectRequest? Type1911 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? Type1870 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEvent? Type1912 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseContentPartAddedType? Type1871 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate? Type1913 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeContentPart? Type1872 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType? Type1914 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeContentPartType? Type1873 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete? Type1915 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? Type1874 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemDeleteType? Type1916 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseContentPartDoneType? Type1875 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve? Type1917 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseTextDelta? Type1876 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieveType? Type1918 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseTextDeltaType? Type1877 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate? Type1919 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseTextDone? Type1878 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncateType? Type1920 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseTextDoneType? Type1879 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend? Type1921 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? Type1880 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppendType? Type1922 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type1881 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear? Type1923 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? Type1882 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClearType? Type1924 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDoneType? Type1883 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear? Type1925 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? Type1884 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClearType? Type1926 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioDeltaType? Type1885 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit? Type1927 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioDone? Type1886 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommitType? Type1928 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseAudioDoneType? Type1887 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventResponseCancel? Type1929 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type1888 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventResponseCancelType? Type1930 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type1889 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventResponseCreate? Type1931 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type1890 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventResponseCreateType? Type1932 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type1891 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParams? Type1933 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? Type1892 { get; set; } + public global::System.Collections.Generic.IList? Type1934 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedType? Type1893 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsOutputModalitie? Type1935 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1894 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? Type1936 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type1895 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudioOutput? Type1937 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type1896 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1938 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationCreated? Type1897 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsMaxOutputTokens? Type1939 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation? Type1898 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1940 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject? Type1899 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsConversation? Type1941 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedType? Type1900 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventSessionUpdate? Type1942 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAdded? Type1901 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventSessionUpdateType? Type1943 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType? Type1902 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type1944 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreated? Type1903 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? Type1945 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType? Type1904 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType? Type1946 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDeleted? Type1905 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio? Type1947 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDeletedType? Type1906 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInput? Type1948 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDone? Type1907 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction? Type1949 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType? Type1908 { get; set; } + public global::System.Collections.Generic.IList? Type1950 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type1909 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAIncludeItem? Type1951 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? Type1910 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventDiscriminator? Type1952 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta? Type1911 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventTranscriptionSessionUpdate? Type1953 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType? Type1912 { get; set; } + public global::tryAGI.OpenAI.RealtimeClientEventTranscriptionSessionUpdateType? Type1954 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type1913 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCall? Type1955 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type1914 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallObject? Type1956 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? Type1915 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType? Type1957 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment? Type1916 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallStatus? Type1958 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentType? Type1917 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutput? Type1959 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrieved? Type1918 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputObject? Type1960 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrievedType? Type1919 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType? Type1961 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncated? Type1920 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputStatus? Type1962 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncatedType? Type1921 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistant? Type1963 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventError? Type1922 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantObject? Type1964 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventErrorError? Type1923 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType? Type1965 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventErrorType? Type1924 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantStatus? Type1966 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCleared? Type1925 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole? Type1967 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferClearedType? Type1926 { get; set; } + public global::System.Collections.Generic.IList? Type1968 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type1927 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItem? Type1969 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType? Type1928 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? Type1970 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type1929 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystem? Type1971 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType? Type1930 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemObject? Type1972 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type1931 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType? Type1973 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType? Type1932 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemStatus? Type1974 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered? Type1933 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole? Type1975 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggeredType? Type1934 { get; set; } + public global::System.Collections.Generic.IList? Type1976 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsCompleted? Type1935 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItem? Type1977 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsCompletedType? Type1936 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItemType? Type1978 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsFailed? Type1937 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUser? Type1979 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsFailedType? Type1938 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserObject? Type1980 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsInProgress? Type1939 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType? Type1981 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsInProgressType? Type1940 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserStatus? Type1982 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferCleared? Type1941 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole? Type1983 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferClearedType? Type1942 { get; set; } + public global::System.Collections.Generic.IList? Type1984 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStarted? Type1943 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItem? Type1985 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStartedType? Type1944 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? Type1986 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStopped? Type1945 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? Type1987 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStoppedType? Type1946 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReference? Type1988 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdated? Type1947 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? Type1989 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1948 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceObject? Type1990 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type1949 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceStatus? Type1991 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimitName? Type1950 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceRole? Type1992 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedType? Type1951 { get; set; } + public global::System.Collections.Generic.IList? Type1993 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDelta? Type1952 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItem? Type1994 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDeltaType? Type1953 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? Type1995 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDone? Type1954 { get; set; } + public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest? Type1996 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDoneType? Type1955 { get; set; } + public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? Type1997 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type1956 { get; set; } + public global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfterAnchor? Type1998 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType? Type1957 { get; set; } + public global::tryAGI.OpenAI.RealtimeCreateClientSecretResponse? Type1999 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type1958 { get; set; } + public global::tryAGI.OpenAI.Session2? Type2000 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType? Type1959 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? Type2001 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAdded? Type1960 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAClientSecret? Type2002 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type1961 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType? Type2003 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type1962 { get; set; } + public global::System.Collections.Generic.IList? Type2004 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedType? Type1963 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAOutputModalitie? Type2005 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDone? Type1964 { get; set; } + public global::tryAGI.OpenAI.AnyOf? Type2006 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePart? Type1965 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAModel? Type2007 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? Type1966 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudio? Type2008 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDoneType? Type1967 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInput? Type2009 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseCreated? Type1968 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInputNoiseReduction? Type2010 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseCreatedType? Type1969 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioOutput? Type2011 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseDone? Type1970 { get; set; } + public global::System.Collections.Generic.IList? Type2012 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseDoneType? Type1971 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAIncludeItem? Type2013 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type1972 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type2014 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType? Type1973 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum? Type2015 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type1974 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2? Type2016 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType? Type1975 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type2017 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta? Type1976 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAMaxOutputTokens? Type2018 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType? Type1977 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? Type2019 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone? Type1978 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType? Type2020 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDoneType? Type1979 { get; set; } + public global::System.Collections.Generic.IList? Type2021 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompleted? Type1980 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAIncludeItem? Type2022 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompletedType? Type1981 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? Type2023 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailed? Type1982 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInput? Type2024 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailedType? Type1983 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? Type2025 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgress? Type1984 { get; set; } + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection? Type2026 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgressType? Type1985 { get; set; } + public global::tryAGI.OpenAI.RealtimeCreateClientSecretResponseSessionDiscriminator? Type2027 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAdded? Type1986 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPApprovalRequest? Type2028 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAddedType? Type1987 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPApprovalRequestType? Type2029 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDone? Type1988 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPApprovalResponse? Type2030 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDoneType? Type1989 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType? Type2031 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDelta? Type1990 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPHTTPError? Type2032 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDeltaType? Type1991 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPHTTPErrorType? Type2033 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDone? Type1992 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPListTools? Type2034 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDoneType? Type1993 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPListToolsType? Type2035 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventSessionCreated? Type1994 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPProtocolError? Type2036 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventSessionCreatedType? Type1995 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPProtocolErrorType? Type2037 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventSessionUpdated? Type1996 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPToolCall? Type2038 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventSessionUpdatedType? Type1997 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPToolCallType? Type2039 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdated? Type1998 { get; set; } + public global::tryAGI.OpenAI.OneOf? Type2040 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdatedType? Type1999 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPToolExecutionError? Type2041 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponse? Type2000 { get; set; } + public global::tryAGI.OpenAI.RealtimeMCPToolExecutionErrorType? Type2042 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? Type2001 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponse? Type2043 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInput? Type2002 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseObject? Type2044 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? Type2003 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseStatus? Type2045 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputTurnDetection? Type2004 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseUsage? Type2046 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioOutput? Type2005 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEvent? Type2047 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2006 { get; set; } + public global::tryAGI.OpenAI.RealtimeError? Type2048 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseIncludeItem? Type2007 { get; set; } + public global::tryAGI.OpenAI.RealtimeErrorType? Type2049 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type2008 { get; set; } + public global::tryAGI.OpenAI.RealtimeErrorDetails? Type2050 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseMaxOutputTokens? Type2009 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreated? Type2051 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2010 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionCreatedType? Type2052 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseOutputModalitie? Type2011 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionUpdated? Type2053 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2012 { get; set; } + public global::tryAGI.OpenAI.RealtimeSessionUpdatedType? Type2054 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type2013 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationCreated? Type2055 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum? Type2014 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationCreatedType? Type2056 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum2? Type2015 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversation? Type2057 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? Type2016 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationObject? Type2058 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Reasoning? Type2017 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemCreated? Type2059 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningGenerateSummary? Type2018 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemCreatedType? Type2060 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ReasoningSummary? Type2019 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type2061 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Response? Type2020 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type2062 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseVariant3? Type2021 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type2063 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseError? Type2022 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type2064 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseErrorCode? Type2023 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? Type2065 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails? Type2024 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemTruncatedType? Type2066 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? Type2025 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? Type2067 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseVariant3Object? Type2026 { get; set; } + public global::tryAGI.OpenAI.RealtimeConversationItemDeletedType? Type2068 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2027 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? Type2069 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseVariant3Status? Type2028 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommittedType? Type2070 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseUsage? Type2029 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? Type2071 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseUsageInputTokensDetails? Type2030 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferClearedType? Type2072 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseUsageOutputTokensDetails? Type2031 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? Type2073 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? Type2032 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type2074 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioDeltaEventType? Type2033 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? Type2075 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioDoneEvent? Type2034 { get; set; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type2076 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioDoneEventType? Type2035 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreated? Type2077 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? Type2036 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseCreatedType? Type2078 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEventType? Type2037 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseDone? Type2079 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? Type2038 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseDoneType? Type2080 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEventType? Type2039 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? Type2081 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? Type2040 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemAddedType? Type2082 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEventType? Type2041 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? Type2083 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? Type2042 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemDoneType? Type2084 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEventType? Type2043 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? Type2085 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? Type2044 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseContentPartAddedType? Type2086 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEventType? Type2045 { get; set; } + public global::tryAGI.OpenAI.RealtimeContentPart? Type2087 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? Type2046 { get; set; } + public global::tryAGI.OpenAI.RealtimeContentPartType? Type2088 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEventType? Type2047 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? Type2089 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? Type2048 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseContentPartDoneType? Type2090 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEventType? Type2049 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseTextDelta? Type2091 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCompletedEvent? Type2050 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseTextDeltaType? Type2092 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCompletedEventType? Type2051 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseTextDone? Type2093 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? Type2052 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseTextDoneType? Type2094 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseContentPartAddedEventType? Type2053 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? Type2095 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? Type2054 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type2096 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseContentPartDoneEventType? Type2055 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? Type2097 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCreatedEvent? Type2056 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDoneType? Type2098 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCreatedEventType? Type2057 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? Type2099 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? Type2058 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDeltaType? Type2100 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEventType? Type2059 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDone? Type2101 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? Type2060 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDoneType? Type2102 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEventType? Type2061 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type2103 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseErrorEvent? Type2062 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type2104 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseErrorEventType? Type2063 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type2105 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFailedEvent? Type2064 { get; set; } + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type2106 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFailedEventType? Type2065 { get; set; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? Type2107 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? Type2066 { get; set; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedType? Type2108 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEventType? Type2067 { get; set; } + public global::System.Collections.Generic.IList? Type2109 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? Type2068 { get; set; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type2110 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEventType? Type2069 { get; set; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type2111 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? Type2070 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationCreated? Type2112 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEventType? Type2071 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedType? Type2113 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatTextGrammar? Type2072 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation? Type2114 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatTextGrammarType? Type2073 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAdded? Type2115 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatTextPython? Type2074 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType? Type2116 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFormatTextPythonType? Type2075 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreated? Type2117 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? Type2076 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType? Type2118 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEventType? Type2077 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDeleted? Type2119 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? Type2078 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDeletedType? Type2120 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEventType? Type2079 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDone? Type2121 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? Type2080 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType? Type2122 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEventType? Type2081 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type2123 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? Type2082 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? Type2124 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEventType? Type2083 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDelta? Type2125 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? Type2084 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType? Type2126 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEventType? Type2085 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type2127 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? Type2086 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? Type2128 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEventType? Type2087 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type2129 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseInProgressEvent? Type2088 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegment? Type2130 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseInProgressEventType? Type2089 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentType? Type2131 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseIncompleteEvent? Type2090 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrieved? Type2132 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseIncompleteEventType? Type2091 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrievedType? Type2133 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseItemList? Type2092 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncated? Type2134 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2093 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncatedType? Type2135 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseItemListObject? Type2094 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventError? Type2136 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseLogProb? Type2095 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventErrorType? Type2137 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2096 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventErrorError? Type2138 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseLogProbTopLogprob? Type2097 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCleared? Type2139 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? Type2098 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferClearedType? Type2140 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEventType? Type2099 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type2141 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? Type2100 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType? Type2142 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEventType? Type2101 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived? Type2143 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? Type2102 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType? Type2144 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallCompletedEventType? Type2103 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type2145 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? Type2104 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType? Type2146 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallFailedEventType? Type2105 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type2147 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? Type2106 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType? Type2148 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPCallInProgressEventType? Type2107 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggered? Type2149 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? Type2108 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggeredType? Type2150 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEventType? Type2109 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsCompleted? Type2151 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? Type2110 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsCompletedType? Type2152 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEventType? Type2111 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsFailed? Type2153 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? Type2112 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsFailedType? Type2154 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEventType? Type2113 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsInProgress? Type2155 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? Type2114 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsInProgressType? Type2156 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputItemAddedEventType? Type2115 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferCleared? Type2157 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? Type2116 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferClearedType? Type2158 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputItemDoneEventType? Type2117 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStarted? Type2159 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? Type2118 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStartedType? Type2160 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEventType? Type2119 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStopped? Type2161 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseQueuedEvent? Type2120 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStoppedType? Type2162 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseQueuedEventType? Type2121 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdated? Type2163 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? Type2122 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedType? Type2164 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart? Type2123 { get; set; } + public global::System.Collections.Generic.IList? Type2165 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPartType? Type2124 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type2166 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventType? Type2125 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimitName? Type2167 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? Type2126 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDelta? Type2168 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart? Type2127 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDeltaType? Type2169 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPartType? Type2128 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDone? Type2170 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventType? Type2129 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDoneType? Type2171 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? Type2130 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type2172 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEventType? Type2131 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType? Type2173 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? Type2132 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type2174 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEventType? Type2133 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType? Type2175 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? Type2134 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAdded? Type2176 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEventType? Type2135 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedType? Type2177 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? Type2136 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type2178 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseReasoningTextDoneEventType? Type2137 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type2179 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? Type2138 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDone? Type2180 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseRefusalDeltaEventType? Type2139 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDoneType? Type2181 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? Type2140 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePart? Type2182 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseRefusalDoneEventType? Type2141 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? Type2183 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseStreamEvent? Type2142 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseCreated? Type2184 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseTextDeltaEvent? Type2143 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseCreatedType? Type2185 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2144 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseDone? Type2186 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseTextDeltaEventType? Type2145 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseDoneType? Type2187 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseTextDoneEvent? Type2146 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type2188 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseTextDoneEventType? Type2147 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType? Type2189 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? Type2148 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type2190 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEventType? Type2149 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType? Type2191 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? Type2150 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDelta? Type2192 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEventType? Type2151 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType? Type2193 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? Type2152 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDone? Type2194 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEventType? Type2153 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDoneType? Type2195 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResponseStreamEventDiscriminator? Type2154 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompleted? Type2196 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunGraderRequest? Type2155 { get; set; } + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompletedType? Type2197 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailed? Type2198 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailedType? Type2199 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgress? Type2200 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgressType? Type2201 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAdded? Type2202 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAddedType? Type2203 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDone? Type2204 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDoneType? Type2205 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDelta? Type2206 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDeltaType? Type2207 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDone? Type2208 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDoneType? Type2209 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventSessionCreated? Type2210 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventSessionCreatedType? Type2211 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventSessionUpdated? Type2212 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventSessionUpdatedType? Type2213 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdated? Type2214 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdatedType? Type2215 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponse? Type2216 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2217 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseIncludeItem? Type2218 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2219 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseOutputModalitie? Type2220 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? Type2221 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInput? Type2222 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? Type2223 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputTurnDetection? Type2224 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioOutput? Type2225 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2226 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum? Type2227 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum2? Type2228 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? Type2229 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2230 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2231 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseMaxOutputTokens? Type2232 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Response? Type2233 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseVariant3? Type2234 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseVariant3Object? Type2235 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseVariant3Status? Type2236 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseErrorVariant1? Type2237 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseErrorCode? Type2238 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2? Type2239 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? Type2240 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2241 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf>? Type2242 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseUsage? Type2243 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseUsageInputTokensDetails? Type2244 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseUsageOutputTokensDetails? Type2245 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Conversation22? Type2246 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? Type2247 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioDeltaEventType? Type2248 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioDoneEvent? Type2249 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioDoneEventType? Type2250 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? Type2251 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEventType? Type2252 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? Type2253 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEventType? Type2254 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? Type2255 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEventType? Type2256 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? Type2257 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEventType? Type2258 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? Type2259 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEventType? Type2260 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? Type2261 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEventType? Type2262 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? Type2263 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEventType? Type2264 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCompletedEvent? Type2265 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCompletedEventType? Type2266 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? Type2267 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseContentPartAddedEventType? Type2268 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? Type2269 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseContentPartDoneEventType? Type2270 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCreatedEvent? Type2271 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCreatedEventType? Type2272 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? Type2273 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEventType? Type2274 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? Type2275 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEventType? Type2276 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseErrorEvent? Type2277 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseErrorEventType? Type2278 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFailedEvent? Type2279 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFailedEventType? Type2280 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? Type2281 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEventType? Type2282 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? Type2283 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEventType? Type2284 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? Type2285 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEventType? Type2286 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFormatTextGrammar? Type2287 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFormatTextGrammarType? Type2288 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFormatTextPython? Type2289 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFormatTextPythonType? Type2290 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? Type2291 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEventType? Type2292 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? Type2293 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEventType? Type2294 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? Type2295 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEventType? Type2296 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? Type2297 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEventType? Type2298 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? Type2299 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEventType? Type2300 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? Type2301 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEventType? Type2302 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseInProgressEvent? Type2303 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseInProgressEventType? Type2304 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseIncompleteEvent? Type2305 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseIncompleteEventType? Type2306 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseItemList? Type2307 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseItemListObject? Type2308 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2309 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseLogProb? Type2310 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2311 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseLogProbTopLogprob? Type2312 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? Type2313 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEventType? Type2314 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? Type2315 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEventType? Type2316 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? Type2317 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallCompletedEventType? Type2318 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? Type2319 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallFailedEventType? Type2320 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? Type2321 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPCallInProgressEventType? Type2322 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? Type2323 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEventType? Type2324 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? Type2325 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEventType? Type2326 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? Type2327 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEventType? Type2328 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? Type2329 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputItemAddedEventType? Type2330 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? Type2331 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputItemDoneEventType? Type2332 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? Type2333 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEventType? Type2334 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseQueuedEvent? Type2335 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseQueuedEventType? Type2336 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? Type2337 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventType? Type2338 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart? Type2339 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPartType? Type2340 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? Type2341 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventType? Type2342 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart? Type2343 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPartType? Type2344 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? Type2345 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEventType? Type2346 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? Type2347 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEventType? Type2348 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? Type2349 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEventType? Type2350 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? Type2351 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseReasoningTextDoneEventType? Type2352 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? Type2353 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseRefusalDeltaEventType? Type2354 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? Type2355 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseRefusalDoneEventType? Type2356 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseStreamEvent? Type2357 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseTextDeltaEvent? Type2358 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseTextDeltaEventType? Type2359 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2360 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseTextDoneEvent? Type2361 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseTextDoneEventType? Type2362 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? Type2363 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEventType? Type2364 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? Type2365 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEventType? Type2366 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? Type2367 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEventType? Type2368 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseStreamEventDiscriminator? Type2369 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesClientEvent? Type2370 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreate? Type2371 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? Type2372 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type? Type2373 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesClientEventDiscriminator? Type2374 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesServerEvent? Type2375 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponsesServerEventDiscriminator? Type2376 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RoleDeletedResource? Type2377 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RoleDeletedResourceObject? Type2378 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RoleListResource? Type2379 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RoleListResourceObject? Type2380 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2381 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RunGraderRequest? Type2382 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RunGraderResponse? Type2383 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RunGraderResponseMetadata? Type2384 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RunGraderResponseMetadataErrors? Type2385 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SubmitToolOutputsRunRequest? Type2386 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2387 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SubmitToolOutputsRunRequestToolOutput? Type2388 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ToggleCertificatesRequest? Type2389 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TranscriptionChunkingStrategy? Type2390 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? Type2391 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateGroupBody? Type2392 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateVectorStoreFileAttributesRequest? Type2393 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateVectorStoreRequest? Type2394 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AllOf? Type2395 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateVoiceConsentRequest? Type2396 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Upload? Type2397 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UploadStatus? Type2398 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UploadObject? Type2399 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AllOf? Type2400 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UploadCertificateRequest? Type2401 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UploadPart? Type2402 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UploadPartObject? Type2403 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioSpeechesResult? Type2404 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioSpeechesResultObject? Type2405 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? Type2406 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioTranscriptionsResultObject? Type2407 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? Type2408 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultObject? Type2409 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCompletionsResult? Type2410 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCompletionsResultObject? Type2411 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageEmbeddingsResult? Type2412 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageEmbeddingsResultObject? Type2413 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesResult? Type2414 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesResultObject? Type2415 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageModerationsResult? Type2416 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageModerationsResultObject? Type2417 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageResponse? Type2418 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageResponseObject? Type2419 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2420 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageTimeBucket? Type2421 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageTimeBucketObject? Type2422 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList>? Type2423 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2424 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageVectorStoresResult? Type2425 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageVectorStoresResultObject? Type2426 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.User? Type2427 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserObject? Type2428 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserRole? Type2429 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserDeleteResponse? Type2430 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserDeleteResponseObject? Type2431 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserListResource? Type2432 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserListResourceObject? Type2433 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2434 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserListResponse? Type2435 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserListResponseObject? Type2436 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserRoleAssignment? Type2437 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserRoleAssignmentObject? Type2438 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserRoleUpdateRequest? Type2439 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserRoleUpdateRequestRole? Type2440 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ValidateGraderRequest? Type2441 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ValidateGraderResponse? Type2442 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileBatchObject? Type2443 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileBatchObjectObject? Type2444 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileBatchObjectStatus? Type2445 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts? Type2446 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileContentResponse? Type2447 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileContentResponseObject? Type2448 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2449 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreFileContentResponseDataItem? Type2450 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchRequest? Type2451 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf>? Type2452 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2453 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? Type2454 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptionsRanker? Type2455 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchResultContentObject? Type2456 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchResultContentObjectType? Type2457 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchResultItem? Type2458 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2459 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchResultsPage? Type2460 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VectorStoreSearchResultsPageObject? Type2461 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2462 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentDeletedResource? Type2463 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject? Type2464 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentListResource? Type2465 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentListResourceObject? Type2466 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2467 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentResource? Type2468 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceConsentResourceObject? Type2469 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceResource? Type2470 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VoiceResourceObject? Type2471 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCancelled? Type2472 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCancelledData? Type2473 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCancelledObject? Type2474 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCancelledType? Type2475 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCompleted? Type2476 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCompletedData? Type2477 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCompletedObject? Type2478 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchCompletedType? Type2479 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchExpired? Type2480 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchExpiredData? Type2481 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchExpiredObject? Type2482 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchExpiredType? Type2483 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchFailed? Type2484 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchFailedData? Type2485 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchFailedObject? Type2486 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookBatchFailedType? Type2487 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunCanceled? Type2488 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunCanceledData? Type2489 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunCanceledObject? Type2490 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunCanceledType? Type2491 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunFailed? Type2492 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunFailedData? Type2493 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunFailedObject? Type2494 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunFailedType? Type2495 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunSucceeded? Type2496 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunSucceededData? Type2497 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunSucceededObject? Type2498 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookEvalRunSucceededType? Type2499 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobCancelled? Type2500 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData? Type2501 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledObject? Type2502 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledType? Type2503 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobFailed? Type2504 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobFailedData? Type2505 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobFailedObject? Type2506 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobFailedType? Type2507 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobSucceeded? Type2508 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData? Type2509 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededObject? Type2510 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededType? Type2511 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookRealtimeCallIncoming? Type2512 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData? Type2513 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2514 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingDataSipHeader? Type2515 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingObject? Type2516 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingType? Type2517 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCancelled? Type2518 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCancelledData? Type2519 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCancelledObject? Type2520 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCancelledType? Type2521 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCompleted? Type2522 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCompletedData? Type2523 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCompletedObject? Type2524 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseCompletedType? Type2525 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseFailed? Type2526 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseFailedData? Type2527 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseFailedObject? Type2528 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseFailedType? Type2529 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseIncomplete? Type2530 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseIncompleteData? Type2531 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseIncompleteObject? Type2532 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WebhookResponseIncompleteType? Type2533 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ConversationResource? Type2534 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ConversationResourceObject? Type2535 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateConversationBody? Type2536 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateConversationBody? Type2537 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OrderEnum? Type2538 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoModel? Type2539 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoModelEnum? Type2540 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoStatus? Type2541 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoSize? Type2542 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Error2? Type2543 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoResource? Type2544 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoResourceObject? Type2545 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoListResource? Type2546 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoListResourceObject? Type2547 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2548 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ImageRefParam2? Type2549 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoSeconds? Type2550 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateVideoBody? Type2551 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedVideoResource? Type2552 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedVideoResourceObject? Type2553 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.VideoContentVariant? Type2554 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateVideoRemixBody? Type2555 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TruncationEnum? Type2556 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TokenCountsBody? Type2557 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TokenCountsResource? Type2558 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TokenCountsResourceObject? Type2559 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CompactResponseMethodPublicBody? Type2560 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ItemField? Type2561 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ItemFieldDiscriminator? Type2562 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CompactResource? Type2563 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CompactResourceObject? Type2564 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2565 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillResource? Type2566 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillResourceObject? Type2567 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillListResource? Type2568 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillListResourceObject? Type2569 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2570 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateSkillBody? Type2571 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf, byte[]>? Type2572 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SetDefaultSkillVersionBody? Type2573 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedSkillResource? Type2574 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedSkillResourceObject? Type2575 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillVersionResource? Type2576 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillVersionResourceObject? Type2577 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillVersionListResource? Type2578 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.SkillVersionListResourceObject? Type2579 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2580 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateSkillVersionBody? Type2581 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedSkillVersionResource? Type2582 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedSkillVersionResourceObject? Type2583 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatkitWorkflowTracing? Type2584 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatkitWorkflow? Type2585 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2586 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionRateLimits? Type2587 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionStatus? Type2588 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling? Type2589 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionFileUpload? Type2590 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionHistory? Type2591 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionChatkitConfiguration? Type2592 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionResource? Type2593 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatSessionResourceObject? Type2594 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WorkflowTracingParam? Type2595 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WorkflowParam? Type2596 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ExpiresAfterParam? Type2597 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ExpiresAfterParamAnchor? Type2598 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RateLimitsParam? Type2599 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AutomaticThreadTitlingParam? Type2600 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileUploadParam? Type2601 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.HistoryParam? Type2602 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ChatkitConfigurationParam? Type2603 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateChatSessionBody? Type2604 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageInputText? Type2605 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageInputTextType? Type2606 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageQuotedText? Type2607 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageQuotedTextType? Type2608 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AttachmentType? Type2609 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Attachment? Type2610 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ToolChoice8? Type2611 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.InferenceOptions? Type2612 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageItem? Type2613 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageItemObject? Type2614 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageItemType? Type2615 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2616 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ContentItem4? Type2617 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator? Type2618 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2619 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileAnnotationSource? Type2620 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileAnnotationSourceType? Type2621 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileAnnotation? Type2622 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.FileAnnotationType? Type2623 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlAnnotationSource? Type2624 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlAnnotationSourceType? Type2625 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlAnnotation? Type2626 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UrlAnnotationType? Type2627 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputText? Type2628 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputTextType? Type2629 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2630 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AnnotationsItem3? Type2631 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator? Type2632 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AssistantMessageItem? Type2633 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AssistantMessageItemObject? Type2634 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AssistantMessageItemType? Type2635 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2636 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WidgetMessageItem? Type2637 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WidgetMessageItemObject? Type2638 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.WidgetMessageItemType? Type2639 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClientToolCallStatus? Type2640 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClientToolCallItem? Type2641 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClientToolCallItemObject? Type2642 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClientToolCallItemType? Type2643 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskType? Type2644 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskItem? Type2645 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskItemObject? Type2646 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskItemType? Type2647 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskGroupTask? Type2648 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskGroupItem? Type2649 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskGroupItemObject? Type2650 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.TaskGroupItemType? Type2651 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2652 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadItem? Type2653 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadItemDiscriminator? Type2654 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadItemListResource? Type2655 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadItemListResourceObject? Type2656 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2657 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ActiveStatus? Type2658 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ActiveStatusType? Type2659 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.LockedStatus? Type2660 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.LockedStatusType? Type2661 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClosedStatus? Type2662 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ClosedStatusType? Type2663 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadResource? Type2664 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadResourceObject? Type2665 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.Status? Type2666 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadResourceStatusDiscriminator? Type2667 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedThreadResource? Type2668 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeletedThreadResourceObject? Type2669 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadListResource? Type2670 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ThreadListResourceObject? Type2671 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2672 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DragPoint? Type2673 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventType? Type2674 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeServerEventBase? Type2675 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionUpdate? Type2676 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeSessionUpdateType? Type2677 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferAppend? Type2678 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferAppendType? Type2679 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommit? Type2680 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitType? Type2681 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferClear? Type2682 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeInputAudioBufferClearType? Type2683 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemCreate? Type2684 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemCreateType? Type2685 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemTruncate? Type2686 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemTruncateType? Type2687 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemDelete? Type2688 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeConversationItemDeleteType? Type2689 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreate? Type2690 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateType? Type2691 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponse? Type2692 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2693 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponseModalitie? Type2694 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponseVoice? Type2695 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2696 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponseTool? Type2697 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2698 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponseToolChoice? Type2699 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2700 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type2701 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCancel? Type2702 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.RealtimeResponseCancelType? Type2703 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateBatchRequest? Type2704 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateBatchRequestEndpoint? Type2705 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow? Type2706 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateChatCompletionRequest? Type2707 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateConversationItemsRequest? Type2708 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UpdateEvalRequest? Type2709 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AdminApiKeysCreateRequest? Type2710 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListAssistantsOrder? Type2711 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListChatCompletionsOrder? Type2712 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetChatCompletionMessagesOrder? Type2713 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListContainersOrder? Type2714 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListContainerFilesOrder? Type2715 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListConversationItemsOrder? Type2716 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListEvalsOrder? Type2717 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListEvalsOrderBy? Type2718 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetEvalRunsOrder? Type2719 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetEvalRunsStatus? Type2720 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetEvalRunOutputItemsStatus? Type2721 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetEvalRunOutputItemsOrder? Type2722 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListFilesOrder? Type2723 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionsOrder? Type2724 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AdminApiKeysListOrder? Type2725 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListAuditLogsEffectiveAt? Type2726 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2727 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListOrganizationCertificatesOrder? Type2728 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2729 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetCertificateIncludeItem? Type2730 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCostsBucketWidth? Type2731 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2732 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCostsGroupByItem? Type2733 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListGroupsOrder? Type2734 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListGroupRoleAssignmentsOrder? Type2735 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListGroupUsersOrder? Type2736 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListProjectCertificatesOrder? Type2737 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListProjectGroupsOrder? Type2738 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListRolesOrder? Type2739 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioSpeechesBucketWidth? Type2740 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2741 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioSpeechesGroupByItem? Type2742 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioTranscriptionsBucketWidth? Type2743 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2744 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageAudioTranscriptionsGroupByItem? Type2745 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsBucketWidth? Type2746 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2747 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsGroupByItem? Type2748 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCompletionsBucketWidth? Type2749 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2750 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageCompletionsGroupByItem? Type2751 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageEmbeddingsBucketWidth? Type2752 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2753 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageEmbeddingsGroupByItem? Type2754 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesBucketWidth? Type2755 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2756 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesSource? Type2757 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2758 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesSize? Type2759 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2760 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageImagesGroupByItem? Type2761 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageModerationsBucketWidth? Type2762 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2763 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageModerationsGroupByItem? Type2764 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageVectorStoresBucketWidth? Type2765 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2766 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.UsageVectorStoresGroupByItem? Type2767 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? Type2768 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? Type2769 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListProjectRolesOrder? Type2770 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? Type2771 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListInputItemsOrder? Type2772 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListMessagesOrder? Type2773 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListRunsOrder? Type2774 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2775 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.CreateRunIncludeItem? Type2776 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListRunStepsOrder? Type2777 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2778 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListRunStepsIncludeItem? Type2779 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type2780 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.GetRunStepIncludeItem? Type2781 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListVectorStoresOrder? Type2782 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListFilesInVectorStoreBatchOrder? Type2783 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListFilesInVectorStoreBatchFilter? Type2784 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListVectorStoreFilesOrder? Type2785 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.ListVectorStoreFilesFilter? Type2786 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2787 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.OneOf? Type2788 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeleteEvalResponse? Type2789 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.DeleteEvalRunResponse? Type2790 { get; set; } + /// + /// + /// + public global::tryAGI.OpenAI.AdminApiKeysDeleteResponse? Type2791 { get; set; } + /// /// /// - public global::tryAGI.OpenAI.RunGraderRequestGrader? Type2156 { get; set; } + public global::System.Collections.Generic.List? ListType0 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator? Type2157 { get; set; } + public global::System.Collections.Generic.List? ListType1 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunGraderResponse? Type2158 { get; set; } + public global::System.Collections.Generic.List>? ListType2 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunGraderResponseMetadata? Type2159 { get; set; } + public global::System.Collections.Generic.List? ListType3 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RunGraderResponseMetadataErrors? Type2160 { get; set; } + public global::System.Collections.Generic.List>? ListType4 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SubmitToolOutputsRunRequest? Type2161 { get; set; } + public global::System.Collections.Generic.List>? ListType5 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2162 { get; set; } + public global::System.Collections.Generic.List? ListType6 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SubmitToolOutputsRunRequestToolOutput? Type2163 { get; set; } + public global::System.Collections.Generic.List? ListType7 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream? Type2164 { get; set; } + public global::System.Collections.Generic.List>? ListType8 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2165 { get; set; } + public global::System.Collections.Generic.List>? ListType9 { get; set; } /// /// /// - public global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput? Type2166 { get; set; } + public global::System.Collections.Generic.List>? ListType10 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ToggleCertificatesRequest? Type2167 { get; set; } + public global::System.Collections.Generic.List>? ListType11 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UpdateConversationBody? Type2168 { get; set; } + public global::System.Collections.Generic.List? ListType12 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UpdateVectorStoreFileAttributesRequest? Type2169 { get; set; } + public global::System.Collections.Generic.List>? ListType13 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UpdateVectorStoreRequest? Type2170 { get; set; } + public global::System.Collections.Generic.List>? ListType14 { get; set; } /// /// /// - public global::tryAGI.OpenAI.Upload? Type2171 { get; set; } + public global::System.Collections.Generic.List>? ListType15 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UploadObject? Type2172 { get; set; } + public global::System.Collections.Generic.List? ListType16 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UploadStatus? Type2173 { get; set; } + public global::System.Collections.Generic.List? ListType17 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UploadCertificateRequest? Type2174 { get; set; } + public global::System.Collections.Generic.List? ListType18 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UploadPart? Type2175 { get; set; } + public global::System.Collections.Generic.List? ListType19 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UploadPartObject? Type2176 { get; set; } + public global::System.Collections.Generic.List? ListType20 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioSpeechesResult? Type2177 { get; set; } + public global::System.Collections.Generic.List? ListType21 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioSpeechesResultObject? Type2178 { get; set; } + public global::System.Collections.Generic.List? ListType22 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? Type2179 { get; set; } + public global::System.Collections.Generic.List? ListType23 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioTranscriptionsResultObject? Type2180 { get; set; } + public global::System.Collections.Generic.List? ListType24 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? Type2181 { get; set; } + public global::System.Collections.Generic.List? ListType25 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultObject? Type2182 { get; set; } + public global::System.Collections.Generic.List? ListType26 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCompletionsResult? Type2183 { get; set; } + public global::System.Collections.Generic.List? ListType27 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCompletionsResultObject? Type2184 { get; set; } + public global::System.Collections.Generic.List? ListType28 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageEmbeddingsResult? Type2185 { get; set; } + public global::System.Collections.Generic.List>? ListType29 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageEmbeddingsResultObject? Type2186 { get; set; } + public global::System.Collections.Generic.List>? ListType30 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesResult? Type2187 { get; set; } + public global::System.Collections.Generic.List? ListType31 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesResultObject? Type2188 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType32 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageModerationsResult? Type2189 { get; set; } + public global::System.Collections.Generic.List? ListType33 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageModerationsResultObject? Type2190 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType34 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageResponse? Type2191 { get; set; } + public global::System.Collections.Generic.List? ListType35 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2192 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType36 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageTimeBucket? Type2193 { get; set; } + public global::System.Collections.Generic.List? ListType37 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageTimeBucketObject? Type2194 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType38 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2195 { get; set; } + public global::System.Collections.Generic.List? ListType39 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ResultItem? Type2196 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType40 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageVectorStoresResult? Type2197 { get; set; } + public global::System.Collections.Generic.List? ListType41 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageVectorStoresResultObject? Type2198 { get; set; } + public global::System.Collections.Generic.List? ListType42 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator? Type2199 { get; set; } + public global::System.Collections.Generic.List? ListType43 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageResponseObject? Type2200 { get; set; } + public global::System.Collections.Generic.List? ListType44 { get; set; } /// /// /// - public global::tryAGI.OpenAI.User? Type2201 { get; set; } + public global::System.Collections.Generic.List? ListType45 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserObject? Type2202 { get; set; } + public global::tryAGI.OpenAI.OneOf>>? ListType46 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserRole? Type2203 { get; set; } + public global::System.Collections.Generic.List>? ListType47 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserDeleteResponse? Type2204 { get; set; } + public global::System.Collections.Generic.List? ListType48 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserDeleteResponseObject? Type2205 { get; set; } + public global::System.Collections.Generic.List? ListType49 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserListResponse? Type2206 { get; set; } + public global::System.Collections.Generic.List? ListType50 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2207 { get; set; } + public global::System.Collections.Generic.List? ListType51 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserListResponseObject? Type2208 { get; set; } + public global::System.Collections.Generic.List? ListType52 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserRoleUpdateRequest? Type2209 { get; set; } + public global::System.Collections.Generic.List? ListType53 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UserRoleUpdateRequestRole? Type2210 { get; set; } + public global::System.Collections.Generic.List? ListType54 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VadConfig? Type2211 { get; set; } + public global::System.Collections.Generic.List? ListType55 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VadConfigType? Type2212 { get; set; } + public global::System.Collections.Generic.List? ListType56 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ValidateGraderRequest? Type2213 { get; set; } + public global::System.Collections.Generic.List? ListType57 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ValidateGraderResponse? Type2214 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType58 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileBatchObject? Type2215 { get; set; } + public global::System.Collections.Generic.List? ListType59 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts? Type2216 { get; set; } + public global::System.Collections.Generic.List? ListType60 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileBatchObjectObject? Type2217 { get; set; } + public global::System.Collections.Generic.List? ListType61 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileBatchObjectStatus? Type2218 { get; set; } + public global::System.Collections.Generic.List? ListType62 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileContentResponse? Type2219 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::tryAGI.OpenAI.MCPToolFilter>? ListType63 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2220 { get; set; } + public global::System.Collections.Generic.List? ListType64 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileContentResponseDataItem? Type2221 { get; set; } + public global::System.Collections.Generic.List? ListType65 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreFileContentResponseObject? Type2222 { get; set; } + public global::System.Collections.Generic.List? ListType66 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchRequest? Type2223 { get; set; } + public global::System.Collections.Generic.List? ListType67 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type2224 { get; set; } + public global::System.Collections.Generic.List? ListType68 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf>? Type2225 { get; set; } + public global::System.Collections.Generic.List? ListType69 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? Type2226 { get; set; } + public global::System.Collections.Generic.List? ListType70 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptionsRanker? Type2227 { get; set; } + public global::System.Collections.Generic.List? ListType71 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchResultContentObject? Type2228 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchResultContentObjectType? Type2229 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchResultItem? Type2230 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2231 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchResultsPage? Type2232 { get; set; } + public global::System.Collections.Generic.List>? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2233 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::tryAGI.OpenAI.VectorStoreSearchResultsPageObject? Type2234 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCancelled? Type2235 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.List, global::System.Collections.Generic.List>>? ListType79 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCancelledData? Type2236 { get; set; } + public global::System.Collections.Generic.List>? ListType80 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCancelledObject? Type2237 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCancelledType? Type2238 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCompleted? Type2239 { get; set; } + public global::System.Collections.Generic.List>? ListType83 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCompletedData? Type2240 { get; set; } + public global::System.Collections.Generic.List? ListType84 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCompletedObject? Type2241 { get; set; } + public global::System.Collections.Generic.List? ListType85 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchCompletedType? Type2242 { get; set; } + public global::System.Collections.Generic.List? ListType86 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchExpired? Type2243 { get; set; } + public global::System.Collections.Generic.List>? ListType87 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchExpiredData? Type2244 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType88 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchExpiredObject? Type2245 { get; set; } + public global::System.Collections.Generic.List? ListType89 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchExpiredType? Type2246 { get; set; } + public global::System.Collections.Generic.List? ListType90 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchFailed? Type2247 { get; set; } + public global::System.Collections.Generic.List? ListType91 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchFailedData? Type2248 { get; set; } + public global::System.Collections.Generic.List? ListType92 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchFailedObject? Type2249 { get; set; } + public global::System.Collections.Generic.List? ListType93 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookBatchFailedType? Type2250 { get; set; } + public global::System.Collections.Generic.List>? ListType94 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunCanceled? Type2251 { get; set; } + public global::System.Collections.Generic.List? ListType95 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunCanceledData? Type2252 { get; set; } + public global::System.Collections.Generic.List>? ListType96 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunCanceledObject? Type2253 { get; set; } + public global::System.Collections.Generic.List? ListType97 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunCanceledType? Type2254 { get; set; } + public global::tryAGI.OpenAI.AnyOf>? ListType98 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunFailed? Type2255 { get; set; } + public global::System.Collections.Generic.List? ListType99 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunFailedData? Type2256 { get; set; } + public global::tryAGI.OpenAI.OneOf>>? ListType100 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunFailedObject? Type2257 { get; set; } + public global::System.Collections.Generic.List>? ListType101 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunFailedType? Type2258 { get; set; } + public global::System.Collections.Generic.List? ListType102 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunSucceeded? Type2259 { get; set; } + public global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.List>>? ListType103 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunSucceededData? Type2260 { get; set; } + public global::System.Collections.Generic.List>? ListType104 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunSucceededObject? Type2261 { get; set; } + public global::System.Collections.Generic.List? ListType105 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookEvalRunSucceededType? Type2262 { get; set; } + public global::System.Collections.Generic.List? ListType106 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobCancelled? Type2263 { get; set; } + public global::System.Collections.Generic.List? ListType107 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData? Type2264 { get; set; } + public global::System.Collections.Generic.List? ListType108 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledObject? Type2265 { get; set; } + public global::System.Collections.Generic.List? ListType109 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobCancelledType? Type2266 { get; set; } + public global::System.Collections.Generic.List? ListType110 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobFailed? Type2267 { get; set; } + public global::System.Collections.Generic.List? ListType111 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobFailedData? Type2268 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobFailedObject? Type2269 { get; set; } + public global::System.Collections.Generic.List? ListType113 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobFailedType? Type2270 { get; set; } + public global::System.Collections.Generic.List? ListType114 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobSucceeded? Type2271 { get; set; } + public global::System.Collections.Generic.List? ListType115 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData? Type2272 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededObject? Type2273 { get; set; } + public global::System.Collections.Generic.List? ListType117 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookFineTuningJobSucceededType? Type2274 { get; set; } + public global::System.Collections.Generic.List? ListType118 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookRealtimeCallIncoming? Type2275 { get; set; } + public global::System.Collections.Generic.List? ListType119 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData? Type2276 { get; set; } + public global::System.Collections.Generic.List? ListType120 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2277 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType121 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingDataSipHeader? Type2278 { get; set; } + public global::System.Collections.Generic.List? ListType122 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingObject? Type2279 { get; set; } + public global::System.Collections.Generic.List? ListType123 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookRealtimeCallIncomingType? Type2280 { get; set; } + public global::System.Collections.Generic.List? ListType124 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCancelled? Type2281 { get; set; } + public global::System.Collections.Generic.List? ListType125 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCancelledData? Type2282 { get; set; } + public global::System.Collections.Generic.List? ListType126 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCancelledObject? Type2283 { get; set; } + public global::System.Collections.Generic.List? ListType127 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCancelledType? Type2284 { get; set; } + public global::System.Collections.Generic.List? ListType128 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCompleted? Type2285 { get; set; } + public global::System.Collections.Generic.List? ListType129 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCompletedData? Type2286 { get; set; } + public global::System.Collections.Generic.List? ListType130 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCompletedObject? Type2287 { get; set; } + public global::System.Collections.Generic.List? ListType131 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseCompletedType? Type2288 { get; set; } + public global::System.Collections.Generic.List? ListType132 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseFailed? Type2289 { get; set; } + public global::System.Collections.Generic.List? ListType133 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseFailedData? Type2290 { get; set; } + public global::System.Collections.Generic.List? ListType134 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseFailedObject? Type2291 { get; set; } + public global::System.Collections.Generic.List? ListType135 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseFailedType? Type2292 { get; set; } + public global::System.Collections.Generic.List? ListType136 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseIncomplete? Type2293 { get; set; } + public global::System.Collections.Generic.List? ListType137 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseIncompleteData? Type2294 { get; set; } + public global::System.Collections.Generic.List>? ListType138 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseIncompleteObject? Type2295 { get; set; } + public global::System.Collections.Generic.List? ListType139 { get; set; } /// /// /// - public global::tryAGI.OpenAI.WebhookResponseIncompleteType? Type2296 { get; set; } + public global::System.Collections.Generic.List? ListType140 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventType? Type2297 { get; set; } + public global::System.Collections.Generic.List? ListType141 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeServerEventBase? Type2298 { get; set; } + public global::System.Collections.Generic.List? ListType142 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionUpdate? Type2299 { get; set; } + public global::System.Collections.Generic.List? ListType143 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeSessionUpdateType? Type2300 { get; set; } + public global::System.Collections.Generic.List? ListType144 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferAppend? Type2301 { get; set; } + public global::System.Collections.Generic.List? ListType145 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferAppendType? Type2302 { get; set; } + public global::System.Collections.Generic.List? ListType146 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommit? Type2303 { get; set; } + public global::System.Collections.Generic.List? ListType147 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitType? Type2304 { get; set; } + public global::System.Collections.Generic.List? ListType148 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferClear? Type2305 { get; set; } + public global::System.Collections.Generic.List? ListType149 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeInputAudioBufferClearType? Type2306 { get; set; } + public global::System.Collections.Generic.List? ListType150 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemCreate? Type2307 { get; set; } + public global::System.Collections.Generic.List? ListType151 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemCreateType? Type2308 { get; set; } + public global::System.Collections.Generic.List? ListType152 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemTruncate? Type2309 { get; set; } + public global::System.Collections.Generic.List? ListType153 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemTruncateType? Type2310 { get; set; } + public global::System.Collections.Generic.List? ListType154 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemDelete? Type2311 { get; set; } + public global::System.Collections.Generic.List? ListType155 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeConversationItemDeleteType? Type2312 { get; set; } + public global::System.Collections.Generic.List? ListType156 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreate? Type2313 { get; set; } + public global::System.Collections.Generic.List? ListType157 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateType? Type2314 { get; set; } + public global::System.Collections.Generic.List? ListType158 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponse? Type2315 { get; set; } + public global::System.Collections.Generic.List? ListType159 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2316 { get; set; } + public global::System.Collections.Generic.List? ListType160 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponseModalitie? Type2317 { get; set; } + public global::System.Collections.Generic.List? ListType161 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponseVoice? Type2318 { get; set; } + public global::System.Collections.Generic.List? ListType162 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2319 { get; set; } + public global::System.Collections.Generic.List? ListType163 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponseTool? Type2320 { get; set; } + public global::System.Collections.Generic.List? ListType164 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OneOf? Type2321 { get; set; } + public global::System.Collections.Generic.List? ListType165 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponseToolChoice? Type2322 { get; set; } + public global::System.Collections.Generic.List? ListType166 { get; set; } /// /// /// - public global::tryAGI.OpenAI.OneOf? Type2323 { get; set; } + public global::System.Collections.Generic.List? ListType167 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type2324 { get; set; } + public global::System.Collections.Generic.List? ListType168 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCancel? Type2325 { get; set; } + public global::System.Collections.Generic.List? ListType169 { get; set; } /// /// /// - public global::tryAGI.OpenAI.RealtimeResponseCancelType? Type2326 { get; set; } + public global::System.Collections.Generic.List? ListType170 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateBatchRequest? Type2327 { get; set; } + public global::System.Collections.Generic.List? ListType171 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow? Type2328 { get; set; } + public global::System.Collections.Generic.List? ListType172 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateBatchRequestEndpoint? Type2329 { get; set; } + public global::System.Collections.Generic.List? ListType173 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UpdateChatCompletionRequest? Type2330 { get; set; } + public global::System.Collections.Generic.List? ListType174 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateConversationItemsRequest? Type2331 { get; set; } + public global::System.Collections.Generic.List? ListType175 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UpdateEvalRequest? Type2332 { get; set; } + public global::System.Collections.Generic.List? ListType176 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AdminApiKeysCreateRequest? Type2333 { get; set; } + public global::System.Collections.Generic.List? ListType177 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListAssistantsOrder? Type2334 { get; set; } + public global::System.Collections.Generic.List? ListType178 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListChatCompletionsOrder? Type2335 { get; set; } + public global::System.Collections.Generic.List? ListType179 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetChatCompletionMessagesOrder? Type2336 { get; set; } + public global::System.Collections.Generic.List? ListType180 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListContainersOrder? Type2337 { get; set; } + public global::System.Collections.Generic.List? ListType181 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListContainerFilesOrder? Type2338 { get; set; } + public global::System.Collections.Generic.List? ListType182 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListConversationItemsOrder? Type2339 { get; set; } + public global::System.Collections.Generic.List? ListType183 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListEvalsOrder? Type2340 { get; set; } + public global::System.Collections.Generic.List? ListType184 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListEvalsOrderBy? Type2341 { get; set; } + public global::System.Collections.Generic.List? ListType185 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetEvalRunsOrder? Type2342 { get; set; } + public global::System.Collections.Generic.List? ListType186 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetEvalRunsStatus? Type2343 { get; set; } + public global::System.Collections.Generic.List? ListType187 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetEvalRunOutputItemsStatus? Type2344 { get; set; } + public global::System.Collections.Generic.List? ListType188 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetEvalRunOutputItemsOrder? Type2345 { get; set; } + public global::System.Collections.Generic.List>? ListType189 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFilesOrder? Type2346 { get; set; } + public global::System.Collections.Generic.List? ListType190 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionsOrder? Type2347 { get; set; } + public global::System.Collections.Generic.List? ListType191 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AdminApiKeysListOrder? Type2348 { get; set; } + public global::System.Collections.Generic.List? ListType192 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListAuditLogsEffectiveAt? Type2349 { get; set; } + public global::System.Collections.Generic.List? ListType193 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2350 { get; set; } + public global::System.Collections.Generic.List? ListType194 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListOrganizationCertificatesOrder? Type2351 { get; set; } + public global::System.Collections.Generic.List? ListType195 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2352 { get; set; } + public global::System.Collections.Generic.List? ListType196 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetCertificateIncludeItem? Type2353 { get; set; } + public global::System.Collections.Generic.List? ListType197 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCostsBucketWidth? Type2354 { get; set; } + public global::System.Collections.Generic.List? ListType198 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2355 { get; set; } + public global::System.Collections.Generic.List? ListType199 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCostsGroupByItem? Type2356 { get; set; } + public global::System.Collections.Generic.List? ListType200 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListProjectCertificatesOrder? Type2357 { get; set; } + public global::System.Collections.Generic.List? ListType201 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioSpeechesBucketWidth? Type2358 { get; set; } + public global::System.Collections.Generic.List? ListType202 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2359 { get; set; } + public global::System.Collections.Generic.List? ListType203 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioSpeechesGroupByItem? Type2360 { get; set; } + public global::System.Collections.Generic.List? ListType204 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioTranscriptionsBucketWidth? Type2361 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType205 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2362 { get; set; } + public global::System.Collections.Generic.List? ListType206 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageAudioTranscriptionsGroupByItem? Type2363 { get; set; } + public global::System.Collections.Generic.List? ListType207 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsBucketWidth? Type2364 { get; set; } + public global::System.Collections.Generic.List? ListType208 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2365 { get; set; } + public global::System.Collections.Generic.List? ListType209 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsGroupByItem? Type2366 { get; set; } + public global::System.Collections.Generic.List? ListType210 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCompletionsBucketWidth? Type2367 { get; set; } + public global::System.Collections.Generic.List? ListType211 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2368 { get; set; } + public global::System.Collections.Generic.List>? ListType212 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageCompletionsGroupByItem? Type2369 { get; set; } + public global::System.Collections.Generic.List? ListType213 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageEmbeddingsBucketWidth? Type2370 { get; set; } + public global::System.Collections.Generic.List? ListType214 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2371 { get; set; } + public global::tryAGI.OpenAI.OneOf>? ListType215 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageEmbeddingsGroupByItem? Type2372 { get; set; } + public global::System.Collections.Generic.List? ListType216 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesBucketWidth? Type2373 { get; set; } + public global::System.Collections.Generic.List? ListType217 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2374 { get; set; } + public global::System.Collections.Generic.List? ListType218 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesSource? Type2375 { get; set; } + public global::System.Collections.Generic.List? ListType219 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2376 { get; set; } + public global::System.Collections.Generic.List? ListType220 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesSize? Type2377 { get; set; } + public global::System.Collections.Generic.List? ListType221 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2378 { get; set; } + public global::System.Collections.Generic.List? ListType222 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageImagesGroupByItem? Type2379 { get; set; } + public global::tryAGI.OpenAI.OneOf, byte[]>? ListType223 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageModerationsBucketWidth? Type2380 { get; set; } + public global::System.Collections.Generic.List? ListType224 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2381 { get; set; } + public global::System.Collections.Generic.List? ListType225 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageModerationsGroupByItem? Type2382 { get; set; } + public global::System.Collections.Generic.List? ListType226 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageVectorStoresBucketWidth? Type2383 { get; set; } + public global::System.Collections.Generic.List? ListType227 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2384 { get; set; } + public global::System.Collections.Generic.List? ListType228 { get; set; } /// /// /// - public global::tryAGI.OpenAI.UsageVectorStoresGroupByItem? Type2385 { get; set; } + public global::System.Collections.Generic.List? ListType229 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListInputItemsOrder? Type2386 { get; set; } + public global::System.Collections.Generic.List? ListType230 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListMessagesOrder? Type2387 { get; set; } + public global::System.Collections.Generic.List? ListType231 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListRunsOrder? Type2388 { get; set; } + public global::System.Collections.Generic.List? ListType232 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2389 { get; set; } + public global::System.Collections.Generic.List? ListType233 { get; set; } /// /// /// - public global::tryAGI.OpenAI.CreateRunIncludeItem? Type2390 { get; set; } + public global::System.Collections.Generic.List? ListType234 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListRunStepsOrder? Type2391 { get; set; } + public global::System.Collections.Generic.List? ListType235 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2392 { get; set; } + public global::System.Collections.Generic.List? ListType236 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListRunStepsIncludeItem? Type2393 { get; set; } + public global::System.Collections.Generic.List? ListType237 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2394 { get; set; } + public global::System.Collections.Generic.List? ListType238 { get; set; } /// /// /// - public global::tryAGI.OpenAI.GetRunStepIncludeItem? Type2395 { get; set; } + public global::System.Collections.Generic.List? ListType239 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListVectorStoresOrder? Type2396 { get; set; } + public global::System.Collections.Generic.List? ListType240 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFilesInVectorStoreBatchOrder? Type2397 { get; set; } + public global::System.Collections.Generic.List? ListType241 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListFilesInVectorStoreBatchFilter? Type2398 { get; set; } + public global::System.Collections.Generic.List? ListType242 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListVectorStoreFilesOrder? Type2399 { get; set; } + public global::System.Collections.Generic.List? ListType243 { get; set; } /// /// /// - public global::tryAGI.OpenAI.ListVectorStoreFilesFilter? Type2400 { get; set; } + public global::System.Collections.Generic.List? ListType244 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type2401 { get; set; } + public global::System.Collections.Generic.List? ListType245 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AnyOf? Type2402 { get; set; } + public global::System.Collections.Generic.List? ListType246 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteEvalResponse? Type2403 { get; set; } + public global::System.Collections.Generic.List? ListType247 { get; set; } /// /// /// - public global::tryAGI.OpenAI.DeleteEvalRunResponse? Type2404 { get; set; } + public global::System.Collections.Generic.List? ListType248 { get; set; } /// /// /// - public global::tryAGI.OpenAI.AdminApiKeysDeleteResponse? Type2405 { get; set; } + public global::System.Collections.Generic.List? ListType249 { get; set; } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.Json.g.cs new file mode 100644 index 00000000..1a3a3f63 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ActiveStatus + { + /// + /// 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::tryAGI.OpenAI.ActiveStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ActiveStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.ActiveStatus; + } + + /// + /// 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::tryAGI.OpenAI.ActiveStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ActiveStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ActiveStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.g.cs new file mode 100644 index 00000000..44544a5b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatus.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that a thread is active. + /// + public sealed partial class ActiveStatus + { + /// + /// Status discriminator that is always `active`.
+ /// Default Value: active + ///
+ /// global::tryAGI.OpenAI.ActiveStatusType.Active + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ActiveStatusTypeJsonConverter))] + public global::tryAGI.OpenAI.ActiveStatusType Type { get; set; } = global::tryAGI.OpenAI.ActiveStatusType.Active; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Status discriminator that is always `active`.
+ /// Default Value: active + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ActiveStatus( + global::tryAGI.OpenAI.ActiveStatusType type = global::tryAGI.OpenAI.ActiveStatusType.Active) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ActiveStatus() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatusType.g.cs new file mode 100644 index 00000000..7aafb35b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ActiveStatusType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Status discriminator that is always `active`.
+ /// Default Value: active + ///
+ public enum ActiveStatusType + { + /// + /// + /// + Active, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ActiveStatusTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ActiveStatusType value) + { + return value switch + { + ActiveStatusType.Active => "active", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ActiveStatusType? ToEnum(string value) + { + return value switch + { + "active" => ActiveStatusType.Active, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKey.g.cs index bfb1d2c9..952f7715 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKey.g.cs @@ -9,14 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class AdminApiKey { /// - /// The Unix timestamp (in seconds) of when the API key was created
- /// Example: 1711471533L + /// The object type, which is always `organization.admin_api_key`
+ /// Example: organization.admin_api_key ///
- /// 1711471533L - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + /// organization.admin_api_key + [global::System.Text.Json.Serialization.JsonPropertyName("object")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required string Object { get; set; } /// /// The identifier, which can be referenced in API endpoints
@@ -27,16 +26,6 @@ public sealed partial class AdminApiKey [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } - /// - /// The Unix timestamp (in seconds) of when the API key was last used
- /// Example: 1711471534L - ///
- /// 1711471534L - [global::System.Text.Json.Serialization.JsonPropertyName("last_used_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? LastUsedAt { get; set; } - /// /// The name of the API key
/// Example: Administration Key @@ -46,22 +35,6 @@ public sealed partial class AdminApiKey [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } - /// - /// The object type, which is always `organization.admin_api_key`
- /// Example: organization.admin_api_key - ///
- /// organization.admin_api_key - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("owner")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AdminApiKeyOwner Owner { get; set; } - /// /// The redacted value of the API key
/// Example: sk-admin...def @@ -79,6 +52,30 @@ public sealed partial class AdminApiKey [global::System.Text.Json.Serialization.JsonPropertyName("value")] public string? Value { get; set; } + /// + /// The Unix timestamp (in seconds) of when the API key was created
+ /// Example: 1711471533 + ///
+ /// 1711471533 + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_used_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset? LastUsedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("owner")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AdminApiKeyOwner Owner { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -88,27 +85,18 @@ public sealed partial class AdminApiKey /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the API key was created
- /// Example: 1711471533L + /// + /// The object type, which is always `organization.admin_api_key`
+ /// Example: organization.admin_api_key /// /// /// The identifier, which can be referenced in API endpoints
/// Example: key_abc /// - /// - /// The Unix timestamp (in seconds) of when the API key was last used
- /// Example: 1711471534L - /// /// /// The name of the API key
/// Example: Administration Key /// - /// - /// The object type, which is always `organization.admin_api_key`
- /// Example: organization.admin_api_key - /// - /// /// /// The redacted value of the API key
/// Example: sk-admin...def @@ -117,26 +105,32 @@ public sealed partial class AdminApiKey /// The value of the API key. Only shown on create.
/// Example: sk-admin-1234abcd /// + /// + /// The Unix timestamp (in seconds) of when the API key was created
+ /// Example: 1711471533 + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AdminApiKey( - global::System.DateTimeOffset createdAt, + string @object, string id, - global::System.DateTimeOffset? lastUsedAt, string name, - string @object, - global::tryAGI.OpenAI.AdminApiKeyOwner owner, string redactedValue, + global::System.DateTimeOffset createdAt, + global::System.DateTimeOffset? lastUsedAt, + global::tryAGI.OpenAI.AdminApiKeyOwner owner, string? value) { - this.CreatedAt = createdAt; + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.LastUsedAt = lastUsedAt; this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); - this.Owner = owner ?? throw new global::System.ArgumentNullException(nameof(owner)); this.RedactedValue = redactedValue ?? throw new global::System.ArgumentNullException(nameof(redactedValue)); + this.CreatedAt = createdAt; + this.LastUsedAt = lastUsedAt ?? throw new global::System.ArgumentNullException(nameof(lastUsedAt)); + this.Owner = owner ?? throw new global::System.ArgumentNullException(nameof(owner)); this.Value = value; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.Json.g.cs new file mode 100644 index 00000000..3d72b7e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AdminApiKeyLastUsedAt + { + /// + /// 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::tryAGI.OpenAI.AdminApiKeyLastUsedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AdminApiKeyLastUsedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.AdminApiKeyLastUsedAt; + } + + /// + /// 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::tryAGI.OpenAI.AdminApiKeyLastUsedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AdminApiKeyLastUsedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AdminApiKeyLastUsedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.g.cs new file mode 100644 index 00000000..89c83933 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyLastUsedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AdminApiKeyLastUsedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyOwner.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyOwner.g.cs index 316c13ef..665d0ab1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyOwner.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeyOwner.g.cs @@ -9,13 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class AdminApiKeyOwner { /// - /// The Unix timestamp (in seconds) of when the user was created
- /// Example: 1711471533L + /// Always `user`
+ /// Example: user ///
- /// 1711471533L - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CreatedAt { get; set; } + /// user + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// The object type, which is always organization.user
+ /// Example: organization.user + ///
+ /// organization.user + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + public string? Object { get; set; } /// /// The identifier, which can be referenced in API endpoints
@@ -34,12 +41,13 @@ public sealed partial class AdminApiKeyOwner public string? Name { get; set; } /// - /// The object type, which is always organization.user
- /// Example: organization.user + /// The Unix timestamp (in seconds) of when the user was created
+ /// Example: 1711471533 ///
- /// organization.user - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - public string? Object { get; set; } + /// 1711471533 + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? CreatedAt { get; set; } /// /// Always `owner`
@@ -49,14 +57,6 @@ public sealed partial class AdminApiKeyOwner [global::System.Text.Json.Serialization.JsonPropertyName("role")] public string? Role { get; set; } - /// - /// Always `user`
- /// Example: user - ///
- /// user - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -66,9 +66,13 @@ public sealed partial class AdminApiKeyOwner /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the user was created
- /// Example: 1711471533L + /// + /// Always `user`
+ /// Example: user + /// + /// + /// The object type, which is always organization.user
+ /// Example: organization.user /// /// /// The identifier, which can be referenced in API endpoints
@@ -78,35 +82,31 @@ public sealed partial class AdminApiKeyOwner /// The name of the user
/// Example: My Service Account /// - /// - /// The object type, which is always organization.user
- /// Example: organization.user + /// + /// The Unix timestamp (in seconds) of when the user was created
+ /// Example: 1711471533 /// /// /// Always `owner`
/// Example: owner /// - /// - /// Always `user`
- /// Example: user - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AdminApiKeyOwner( - global::System.DateTimeOffset? createdAt, + string? type, + string? @object, string? id, string? name, - string? @object, - string? role, - string? type) + global::System.DateTimeOffset? createdAt, + string? role) { - this.CreatedAt = createdAt; + this.Type = type; + this.Object = @object; this.Id = id; this.Name = name; - this.Object = @object; + this.CreatedAt = createdAt; this.Role = role; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeysDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeysDeleteResponse.g.cs index 44acaf2f..7b400cbd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeysDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AdminApiKeysDeleteResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class AdminApiKeysDeleteResponse { - /// - /// Example: true - /// - /// true - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - public bool? Deleted { get; set; } - /// /// Example: key_abc /// @@ -29,6 +22,13 @@ public sealed partial class AdminApiKeysDeleteResponse [global::System.Text.Json.Serialization.JsonPropertyName("object")] public string? Object { get; set; } + /// + /// Example: true + /// + /// true + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + public bool? Deleted { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,26 +38,26 @@ public sealed partial class AdminApiKeysDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// Example: true - /// /// /// Example: key_abc /// /// /// Example: organization.admin_api_key.deleted /// + /// + /// Example: true + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AdminApiKeysDeleteResponse( - bool? deleted, string? id, - string? @object) + string? @object, + bool? deleted) { - this.Deleted = deleted; this.Id = id; this.Object = @object; + this.Deleted = deleted; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation.g.cs index 4fd2d3e1..44898de6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// - /// + /// An annotation that applies to a span of output text. /// public readonly partial struct Annotation : global::System.IEquatable { @@ -13,123 +13,122 @@ namespace tryAGI.OpenAI /// A citation to a file. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileCitationBody? FileCitationBody { get; init; } + public global::tryAGI.OpenAI.FileCitationBody? FileCitation { get; init; } #else - public global::tryAGI.OpenAI.FileCitationBody? FileCitationBody { get; } + public global::tryAGI.OpenAI.FileCitationBody? FileCitation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitationBody))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitation))] #endif - public bool IsFileCitationBody => FileCitationBody != null; + public bool IsFileCitation => FileCitation != null; /// - /// + /// A citation for a web resource used to generate a model response. /// - public static implicit operator Annotation(global::tryAGI.OpenAI.FileCitationBody value) => new Annotation((global::tryAGI.OpenAI.FileCitationBody?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.UrlCitationBody? UrlCitation { get; init; } +#else + public global::tryAGI.OpenAI.UrlCitationBody? UrlCitation { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileCitationBody?(Annotation @this) => @this.FileCitationBody; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UrlCitation))] +#endif + public bool IsUrlCitation => UrlCitation != null; + + /// + /// A citation for a container file used to generate a model response. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerFileCitationBody? ContainerFileCitation { get; init; } +#else + public global::tryAGI.OpenAI.ContainerFileCitationBody? ContainerFileCitation { get; } +#endif /// /// /// - public Annotation(global::tryAGI.OpenAI.FileCitationBody? value) - { - FileCitationBody = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerFileCitation))] +#endif + public bool IsContainerFileCitation => ContainerFileCitation != null; /// - /// A citation for a web resource used to generate a model response. + /// A path to a file. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UrlCitationBody? UrlCitationBody { get; init; } + public global::tryAGI.OpenAI.FilePath? FilePath { get; init; } #else - public global::tryAGI.OpenAI.UrlCitationBody? UrlCitationBody { get; } + public global::tryAGI.OpenAI.FilePath? FilePath { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UrlCitationBody))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] #endif - public bool IsUrlCitationBody => UrlCitationBody != null; - + public bool IsFilePath => FilePath != null; /// /// /// - public static implicit operator Annotation(global::tryAGI.OpenAI.UrlCitationBody value) => new Annotation((global::tryAGI.OpenAI.UrlCitationBody?)value); + public static implicit operator Annotation(global::tryAGI.OpenAI.FileCitationBody value) => new Annotation((global::tryAGI.OpenAI.FileCitationBody?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.UrlCitationBody?(Annotation @this) => @this.UrlCitationBody; + public static implicit operator global::tryAGI.OpenAI.FileCitationBody?(Annotation @this) => @this.FileCitation; /// /// /// - public Annotation(global::tryAGI.OpenAI.UrlCitationBody? value) + public Annotation(global::tryAGI.OpenAI.FileCitationBody? value) { - UrlCitationBody = value; + FileCitation = value; } - /// - /// A citation for a container file used to generate a model response. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ContainerFileCitationBody? ContainerFileCitationBody { get; init; } -#else - public global::tryAGI.OpenAI.ContainerFileCitationBody? ContainerFileCitationBody { get; } -#endif - /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerFileCitationBody))] -#endif - public bool IsContainerFileCitationBody => ContainerFileCitationBody != null; + public static implicit operator Annotation(global::tryAGI.OpenAI.UrlCitationBody value) => new Annotation((global::tryAGI.OpenAI.UrlCitationBody?)value); /// /// /// - public static implicit operator Annotation(global::tryAGI.OpenAI.ContainerFileCitationBody value) => new Annotation((global::tryAGI.OpenAI.ContainerFileCitationBody?)value); + public static implicit operator global::tryAGI.OpenAI.UrlCitationBody?(Annotation @this) => @this.UrlCitation; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ContainerFileCitationBody?(Annotation @this) => @this.ContainerFileCitationBody; + public Annotation(global::tryAGI.OpenAI.UrlCitationBody? value) + { + UrlCitation = value; + } /// /// /// - public Annotation(global::tryAGI.OpenAI.ContainerFileCitationBody? value) - { - ContainerFileCitationBody = value; - } + public static implicit operator Annotation(global::tryAGI.OpenAI.ContainerFileCitationBody value) => new Annotation((global::tryAGI.OpenAI.ContainerFileCitationBody?)value); /// - /// A path to a file. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FilePath? FilePath { get; init; } -#else - public global::tryAGI.OpenAI.FilePath? FilePath { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ContainerFileCitationBody?(Annotation @this) => @this.ContainerFileCitation; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] -#endif - public bool IsFilePath => FilePath != null; + public Annotation(global::tryAGI.OpenAI.ContainerFileCitationBody? value) + { + ContainerFileCitation = value; + } /// /// @@ -153,15 +152,15 @@ public Annotation(global::tryAGI.OpenAI.FilePath? value) /// /// public Annotation( - global::tryAGI.OpenAI.FileCitationBody? fileCitationBody, - global::tryAGI.OpenAI.UrlCitationBody? urlCitationBody, - global::tryAGI.OpenAI.ContainerFileCitationBody? containerFileCitationBody, + global::tryAGI.OpenAI.FileCitationBody? fileCitation, + global::tryAGI.OpenAI.UrlCitationBody? urlCitation, + global::tryAGI.OpenAI.ContainerFileCitationBody? containerFileCitation, global::tryAGI.OpenAI.FilePath? filePath ) { - FileCitationBody = fileCitationBody; - UrlCitationBody = urlCitationBody; - ContainerFileCitationBody = containerFileCitationBody; + FileCitation = fileCitation; + UrlCitation = urlCitation; + ContainerFileCitation = containerFileCitation; FilePath = filePath; } @@ -170,18 +169,18 @@ public Annotation( ///
public object? Object => FilePath as object ?? - ContainerFileCitationBody as object ?? - UrlCitationBody as object ?? - FileCitationBody as object + ContainerFileCitation as object ?? + UrlCitation as object ?? + FileCitation as object ; /// /// /// public override string? ToString() => - FileCitationBody?.ToString() ?? - UrlCitationBody?.ToString() ?? - ContainerFileCitationBody?.ToString() ?? + FileCitation?.ToString() ?? + UrlCitation?.ToString() ?? + ContainerFileCitation?.ToString() ?? FilePath?.ToString() ; @@ -190,16 +189,16 @@ FileCitationBody as object ///
public bool Validate() { - return IsFileCitationBody || IsUrlCitationBody || IsContainerFileCitationBody || IsFilePath; + return IsFileCitation && !IsUrlCitation && !IsContainerFileCitation && !IsFilePath || !IsFileCitation && IsUrlCitation && !IsContainerFileCitation && !IsFilePath || !IsFileCitation && !IsUrlCitation && IsContainerFileCitation && !IsFilePath || !IsFileCitation && !IsUrlCitation && !IsContainerFileCitation && IsFilePath; } /// /// /// public TResult? Match( - global::System.Func? fileCitationBody = null, - global::System.Func? urlCitationBody = null, - global::System.Func? containerFileCitationBody = null, + global::System.Func? fileCitation = null, + global::System.Func? urlCitation = null, + global::System.Func? containerFileCitation = null, global::System.Func? filePath = null, bool validate = true) { @@ -208,17 +207,17 @@ public bool Validate() Validate(); } - if (IsFileCitationBody && fileCitationBody != null) + if (IsFileCitation && fileCitation != null) { - return fileCitationBody(FileCitationBody!); + return fileCitation(FileCitation!); } - else if (IsUrlCitationBody && urlCitationBody != null) + else if (IsUrlCitation && urlCitation != null) { - return urlCitationBody(UrlCitationBody!); + return urlCitation(UrlCitation!); } - else if (IsContainerFileCitationBody && containerFileCitationBody != null) + else if (IsContainerFileCitation && containerFileCitation != null) { - return containerFileCitationBody(ContainerFileCitationBody!); + return containerFileCitation(ContainerFileCitation!); } else if (IsFilePath && filePath != null) { @@ -232,9 +231,9 @@ public bool Validate() /// ///
public void Match( - global::System.Action? fileCitationBody = null, - global::System.Action? urlCitationBody = null, - global::System.Action? containerFileCitationBody = null, + global::System.Action? fileCitation = null, + global::System.Action? urlCitation = null, + global::System.Action? containerFileCitation = null, global::System.Action? filePath = null, bool validate = true) { @@ -243,17 +242,17 @@ public void Match( Validate(); } - if (IsFileCitationBody) + if (IsFileCitation) { - fileCitationBody?.Invoke(FileCitationBody!); + fileCitation?.Invoke(FileCitation!); } - else if (IsUrlCitationBody) + else if (IsUrlCitation) { - urlCitationBody?.Invoke(UrlCitationBody!); + urlCitation?.Invoke(UrlCitation!); } - else if (IsContainerFileCitationBody) + else if (IsContainerFileCitation) { - containerFileCitationBody?.Invoke(ContainerFileCitationBody!); + containerFileCitation?.Invoke(ContainerFileCitation!); } else if (IsFilePath) { @@ -268,11 +267,11 @@ public override int GetHashCode() { var fields = new object?[] { - FileCitationBody, + FileCitation, typeof(global::tryAGI.OpenAI.FileCitationBody), - UrlCitationBody, + UrlCitation, typeof(global::tryAGI.OpenAI.UrlCitationBody), - ContainerFileCitationBody, + ContainerFileCitation, typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), FilePath, typeof(global::tryAGI.OpenAI.FilePath), @@ -292,9 +291,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Annotation other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitationBody, other.FileCitationBody) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UrlCitationBody, other.UrlCitationBody) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerFileCitationBody, other.ContainerFileCitationBody) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitation, other.FileCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(UrlCitation, other.UrlCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerFileCitation, other.ContainerFileCitation) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePath, other.FilePath) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.Json.g.cs new file mode 100644 index 00000000..e0e2fe09 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct AnnotationsItem3 + { + /// + /// 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::tryAGI.OpenAI.AnnotationsItem3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AnnotationsItem3), + jsonSerializerContext) as global::tryAGI.OpenAI.AnnotationsItem3?; + } + + /// + /// 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::tryAGI.OpenAI.AnnotationsItem3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AnnotationsItem3), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnnotationsItem3?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.g.cs new file mode 100644 index 00000000..11269cff --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AnnotationsItem3.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Annotation object describing a cited source. + /// + public readonly partial struct AnnotationsItem3 : global::System.IEquatable + { + /// + /// Annotation that references an uploaded file. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileAnnotation? File { get; init; } +#else + public global::tryAGI.OpenAI.FileAnnotation? File { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(File))] +#endif + public bool IsFile => File != null; + + /// + /// Annotation that references a URL. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.UrlAnnotation? Url { get; init; } +#else + public global::tryAGI.OpenAI.UrlAnnotation? Url { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Url))] +#endif + public bool IsUrl => Url != null; + /// + /// + /// + public static implicit operator AnnotationsItem3(global::tryAGI.OpenAI.FileAnnotation value) => new AnnotationsItem3((global::tryAGI.OpenAI.FileAnnotation?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FileAnnotation?(AnnotationsItem3 @this) => @this.File; + + /// + /// + /// + public AnnotationsItem3(global::tryAGI.OpenAI.FileAnnotation? value) + { + File = value; + } + + /// + /// + /// + public static implicit operator AnnotationsItem3(global::tryAGI.OpenAI.UrlAnnotation value) => new AnnotationsItem3((global::tryAGI.OpenAI.UrlAnnotation?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.UrlAnnotation?(AnnotationsItem3 @this) => @this.Url; + + /// + /// + /// + public AnnotationsItem3(global::tryAGI.OpenAI.UrlAnnotation? value) + { + Url = value; + } + + /// + /// + /// + public AnnotationsItem3( + global::tryAGI.OpenAI.FileAnnotation? file, + global::tryAGI.OpenAI.UrlAnnotation? url + ) + { + File = file; + Url = url; + } + + /// + /// + /// + public object? Object => + Url as object ?? + File as object + ; + + /// + /// + /// + public override string? ToString() => + File?.ToString() ?? + Url?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsFile && !IsUrl || !IsFile && IsUrl; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? file = null, + global::System.Func? url = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsFile && file != null) + { + return file(File!); + } + else if (IsUrl && url != null) + { + return url(Url!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? file = null, + global::System.Action? url = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsFile) + { + file?.Invoke(File!); + } + else if (IsUrl) + { + url?.Invoke(Url!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + File, + typeof(global::tryAGI.OpenAI.FileAnnotation), + Url, + typeof(global::tryAGI.OpenAI.UrlAnnotation), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnnotationsItem3 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(File, other.File) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Url, other.Url) + ; + } + + /// + /// + /// + public static bool operator ==(AnnotationsItem3 obj1, AnnotationsItem3 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnnotationsItem3 obj1, AnnotationsItem3 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnnotationsItem3 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApiKeyList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApiKeyList.g.cs index a5e31bd2..c021c366 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApiKeyList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApiKeyList.g.cs @@ -9,17 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ApiKeyList { /// - /// + /// Example: list /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::System.Collections.Generic.IList? Data { get; set; } + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + public string? Object { get; set; } /// - /// Example: key_abc + /// /// - /// key_abc - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] - public string? FirstId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } /// /// Example: false @@ -28,6 +28,13 @@ public sealed partial class ApiKeyList [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] public bool? HasMore { get; set; } + /// + /// Example: key_abc + /// + /// key_abc + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + public string? FirstId { get; set; } + /// /// Example: key_xyz /// @@ -35,13 +42,6 @@ public sealed partial class ApiKeyList [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] public string? LastId { get; set; } - /// - /// Example: list - /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - public string? Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,34 +51,34 @@ public sealed partial class ApiKeyList /// /// Initializes a new instance of the class. /// - /// - /// - /// Example: key_abc + /// + /// Example: list /// + /// /// /// Example: false /// + /// + /// Example: key_abc + /// /// /// Example: key_xyz /// - /// - /// Example: list - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ApiKeyList( + string? @object, global::System.Collections.Generic.IList? data, - string? firstId, bool? hasMore, - string? lastId, - string? @object) + string? firstId, + string? lastId) { + this.Object = @object; this.Data = data; - this.FirstId = firstId; this.HasMore = hasMore; + this.FirstId = firstId; this.LastId = lastId; - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatus.g.cs new file mode 100644 index 00000000..67fbb3ba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatus.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ApplyPatchCallOutputStatus + { + /// + /// + /// + Completed, + /// + /// + /// + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCallOutputStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCallOutputStatus value) + { + return value switch + { + ApplyPatchCallOutputStatus.Completed => "completed", + ApplyPatchCallOutputStatus.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCallOutputStatus? ToEnum(string value) + { + return value switch + { + "completed" => ApplyPatchCallOutputStatus.Completed, + "failed" => ApplyPatchCallOutputStatus.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatusParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatusParam.g.cs new file mode 100644 index 00000000..510b7ec7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallOutputStatusParam.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Outcome values reported for apply_patch tool call outputs. + /// + public enum ApplyPatchCallOutputStatusParam + { + /// + /// + /// + Completed, + /// + /// + /// + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCallOutputStatusParamExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCallOutputStatusParam value) + { + return value switch + { + ApplyPatchCallOutputStatusParam.Completed => "completed", + ApplyPatchCallOutputStatusParam.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCallOutputStatusParam? ToEnum(string value) + { + return value switch + { + "completed" => ApplyPatchCallOutputStatusParam.Completed, + "failed" => ApplyPatchCallOutputStatusParam.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatus.g.cs new file mode 100644 index 00000000..b68e0bbc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatus.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ApplyPatchCallStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCallStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCallStatus value) + { + return value switch + { + ApplyPatchCallStatus.InProgress => "in_progress", + ApplyPatchCallStatus.Completed => "completed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCallStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => ApplyPatchCallStatus.InProgress, + "completed" => ApplyPatchCallStatus.Completed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatusParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatusParam.g.cs new file mode 100644 index 00000000..c90b27a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCallStatusParam.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Status values reported for apply_patch tool calls. + /// + public enum ApplyPatchCallStatusParam + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCallStatusParamExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCallStatusParam value) + { + return value switch + { + ApplyPatchCallStatusParam.InProgress => "in_progress", + ApplyPatchCallStatusParam.Completed => "completed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCallStatusParam? ToEnum(string value) + { + return value switch + { + "in_progress" => ApplyPatchCallStatusParam.InProgress, + "completed" => ApplyPatchCallStatusParam.Completed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.Json.g.cs new file mode 100644 index 00000000..f38688d2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchCreateFileOperation + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchCreateFileOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchCreateFileOperation; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchCreateFileOperation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchCreateFileOperation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.g.cs new file mode 100644 index 00000000..7a5a1673 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperation.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction describing how to create a file via the apply_patch tool. + /// + public sealed partial class ApplyPatchCreateFileOperation + { + /// + /// Create a new file with the provided diff.
+ /// Default Value: create_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType.CreateFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType.CreateFile; + + /// + /// Path of the file to create. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// Diff to apply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("diff")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Diff { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Create a new file with the provided diff.
+ /// Default Value: create_file + /// + /// + /// Path of the file to create. + /// + /// + /// Diff to apply. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchCreateFileOperation( + string path, + string diff, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType type = global::tryAGI.OpenAI.ApplyPatchCreateFileOperationType.CreateFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Diff = diff ?? throw new global::System.ArgumentNullException(nameof(diff)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchCreateFileOperation() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.Json.g.cs new file mode 100644 index 00000000..d4dc3743 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchCreateFileOperationParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.g.cs new file mode 100644 index 00000000..597e0f36 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParam.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction for creating a new file via the apply_patch tool. + /// + public sealed partial class ApplyPatchCreateFileOperationParam + { + /// + /// The operation type. Always `create_file`.
+ /// Default Value: create_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType.CreateFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCreateFileOperationParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType.CreateFile; + + /// + /// Path of the file to create relative to the workspace root. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// Unified diff content to apply when creating the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("diff")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Diff { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The operation type. Always `create_file`.
+ /// Default Value: create_file + /// + /// + /// Path of the file to create relative to the workspace root. + /// + /// + /// Unified diff content to apply when creating the file. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchCreateFileOperationParam( + string path, + string diff, + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType type = global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParamType.CreateFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Diff = diff ?? throw new global::System.ArgumentNullException(nameof(diff)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchCreateFileOperationParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParamType.g.cs new file mode 100644 index 00000000..40365116 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The operation type. Always `create_file`.
+ /// Default Value: create_file + ///
+ public enum ApplyPatchCreateFileOperationParamType + { + /// + /// + /// + CreateFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCreateFileOperationParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCreateFileOperationParamType value) + { + return value switch + { + ApplyPatchCreateFileOperationParamType.CreateFile => "create_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCreateFileOperationParamType? ToEnum(string value) + { + return value switch + { + "create_file" => ApplyPatchCreateFileOperationParamType.CreateFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationType.g.cs new file mode 100644 index 00000000..7ca97685 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchCreateFileOperationType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Create a new file with the provided diff.
+ /// Default Value: create_file + ///
+ public enum ApplyPatchCreateFileOperationType + { + /// + /// + /// + CreateFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchCreateFileOperationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchCreateFileOperationType value) + { + return value switch + { + ApplyPatchCreateFileOperationType.CreateFile => "create_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchCreateFileOperationType? ToEnum(string value) + { + return value switch + { + "create_file" => ApplyPatchCreateFileOperationType.CreateFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.Json.g.cs new file mode 100644 index 00000000..47d6d9fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchDeleteFileOperation + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.g.cs new file mode 100644 index 00000000..d7156956 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperation.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction describing how to delete a file via the apply_patch tool. + /// + public sealed partial class ApplyPatchDeleteFileOperation + { + /// + /// Delete the specified file.
+ /// Default Value: delete_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType.DeleteFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType.DeleteFile; + + /// + /// Path of the file to delete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Delete the specified file.
+ /// Default Value: delete_file + /// + /// + /// Path of the file to delete. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchDeleteFileOperation( + string path, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType type = global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationType.DeleteFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchDeleteFileOperation() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.Json.g.cs new file mode 100644 index 00000000..f255c252 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchDeleteFileOperationParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.g.cs new file mode 100644 index 00000000..669b3aea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParam.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction for deleting an existing file via the apply_patch tool. + /// + public sealed partial class ApplyPatchDeleteFileOperationParam + { + /// + /// The operation type. Always `delete_file`.
+ /// Default Value: delete_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType.DeleteFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchDeleteFileOperationParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType.DeleteFile; + + /// + /// Path of the file to delete relative to the workspace root. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The operation type. Always `delete_file`.
+ /// Default Value: delete_file + /// + /// + /// Path of the file to delete relative to the workspace root. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchDeleteFileOperationParam( + string path, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType type = global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParamType.DeleteFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchDeleteFileOperationParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParamType.g.cs new file mode 100644 index 00000000..9ac535a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The operation type. Always `delete_file`.
+ /// Default Value: delete_file + ///
+ public enum ApplyPatchDeleteFileOperationParamType + { + /// + /// + /// + DeleteFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchDeleteFileOperationParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchDeleteFileOperationParamType value) + { + return value switch + { + ApplyPatchDeleteFileOperationParamType.DeleteFile => "delete_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchDeleteFileOperationParamType? ToEnum(string value) + { + return value switch + { + "delete_file" => ApplyPatchDeleteFileOperationParamType.DeleteFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationType.g.cs new file mode 100644 index 00000000..61f8c93e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchDeleteFileOperationType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Delete the specified file.
+ /// Default Value: delete_file + ///
+ public enum ApplyPatchDeleteFileOperationType + { + /// + /// + /// + DeleteFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchDeleteFileOperationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchDeleteFileOperationType value) + { + return value switch + { + ApplyPatchDeleteFileOperationType.DeleteFile => "delete_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchDeleteFileOperationType? ToEnum(string value) + { + return value switch + { + "delete_file" => ApplyPatchDeleteFileOperationType.DeleteFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.Json.g.cs new file mode 100644 index 00000000..8002845f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ApplyPatchOperationParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchOperationParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchOperationParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchOperationParam?; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchOperationParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchOperationParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchOperationParam?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.g.cs new file mode 100644 index 00000000..76a9d49f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParam.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool. + /// + public readonly partial struct ApplyPatchOperationParam : global::System.IEquatable + { + /// + /// Instruction for creating a new file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? CreateFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? CreateFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateFile))] +#endif + public bool IsCreateFile => CreateFile != null; + + /// + /// Instruction for deleting an existing file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? DeleteFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? DeleteFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DeleteFile))] +#endif + public bool IsDeleteFile => DeleteFile != null; + + /// + /// Instruction for updating an existing file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? UpdateFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? UpdateFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UpdateFile))] +#endif + public bool IsUpdateFile => UpdateFile != null; + /// + /// + /// + public static implicit operator ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam value) => new ApplyPatchOperationParam((global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam?(ApplyPatchOperationParam @this) => @this.CreateFile; + + /// + /// + /// + public ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? value) + { + CreateFile = value; + } + + /// + /// + /// + public static implicit operator ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam value) => new ApplyPatchOperationParam((global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam?(ApplyPatchOperationParam @this) => @this.DeleteFile; + + /// + /// + /// + public ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? value) + { + DeleteFile = value; + } + + /// + /// + /// + public static implicit operator ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam value) => new ApplyPatchOperationParam((global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam?(ApplyPatchOperationParam @this) => @this.UpdateFile; + + /// + /// + /// + public ApplyPatchOperationParam(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? value) + { + UpdateFile = value; + } + + /// + /// + /// + public ApplyPatchOperationParam( + global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam? createFile, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam? deleteFile, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? updateFile + ) + { + CreateFile = createFile; + DeleteFile = deleteFile; + UpdateFile = updateFile; + } + + /// + /// + /// + public object? Object => + UpdateFile as object ?? + DeleteFile as object ?? + CreateFile as object + ; + + /// + /// + /// + public override string? ToString() => + CreateFile?.ToString() ?? + DeleteFile?.ToString() ?? + UpdateFile?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsCreateFile && !IsDeleteFile && !IsUpdateFile || !IsCreateFile && IsDeleteFile && !IsUpdateFile || !IsCreateFile && !IsDeleteFile && IsUpdateFile; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? createFile = null, + global::System.Func? deleteFile = null, + global::System.Func? updateFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCreateFile && createFile != null) + { + return createFile(CreateFile!); + } + else if (IsDeleteFile && deleteFile != null) + { + return deleteFile(DeleteFile!); + } + else if (IsUpdateFile && updateFile != null) + { + return updateFile(UpdateFile!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? createFile = null, + global::System.Action? deleteFile = null, + global::System.Action? updateFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCreateFile) + { + createFile?.Invoke(CreateFile!); + } + else if (IsDeleteFile) + { + deleteFile?.Invoke(DeleteFile!); + } + else if (IsUpdateFile) + { + updateFile?.Invoke(UpdateFile!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + CreateFile, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), + DeleteFile, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), + UpdateFile, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ApplyPatchOperationParam other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateFile, other.CreateFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(DeleteFile, other.DeleteFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(UpdateFile, other.UpdateFile) + ; + } + + /// + /// + /// + public static bool operator ==(ApplyPatchOperationParam obj1, ApplyPatchOperationParam obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ApplyPatchOperationParam obj1, ApplyPatchOperationParam obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ApplyPatchOperationParam o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.Json.g.cs new file mode 100644 index 00000000..f8b86835 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchOperationParamDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchOperationParamDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.g.cs new file mode 100644 index 00000000..e1c4d126 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchOperationParamDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchOperationParamDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchOperationParamDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchOperationParamDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.Json.g.cs new file mode 100644 index 00000000..6599ae31 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCall + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCall? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCall; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCall? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCall; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.g.cs new file mode 100644 index 00000000..e79ae43f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCall.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool call that applies file diffs by creating, deleting, or updating files. + /// + public sealed partial class ApplyPatchToolCall + { + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + ///
+ /// global::tryAGI.OpenAI.ApplyPatchToolCallType.ApplyPatchCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchToolCallType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchToolCallType.ApplyPatchCall; + + /// + /// The unique ID of the apply patch tool call. Populated when this item is returned via API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The status of the apply patch tool call. One of `in_progress` or `completed`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ApplyPatchCallStatus Status { get; set; } + + /// + /// One of the create_file, delete_file, or update_file operations applied via apply_patch. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OperationJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Operation Operation { get; set; } + + /// + /// The ID of the entity that created this tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + /// + /// + /// The unique ID of the apply patch tool call. Populated when this item is returned via API. + /// + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + /// + /// The status of the apply patch tool call. One of `in_progress` or `completed`. + /// + /// + /// One of the create_file, delete_file, or update_file operations applied via apply_patch. + /// + /// + /// The ID of the entity that created this tool call. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolCall( + string id, + string callId, + global::tryAGI.OpenAI.ApplyPatchCallStatus status, + global::tryAGI.OpenAI.Operation operation, + string? createdBy, + global::tryAGI.OpenAI.ApplyPatchToolCallType type = global::tryAGI.OpenAI.ApplyPatchToolCallType.ApplyPatchCall) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Status = status; + this.Operation = operation; + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolCall() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.Json.g.cs new file mode 100644 index 00000000..69626d09 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallItemParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallItemParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.g.cs new file mode 100644 index 00000000..09623b5f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParam.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool call representing a request to create, delete, or update files using diff patches. + /// + public sealed partial class ApplyPatchToolCallItemParam + { + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + ///
+ /// global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType.ApplyPatchCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType.ApplyPatchCall; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The status of the apply patch tool call. One of `in_progress` or `completed`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallStatusParamJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ApplyPatchCallStatusParam Status { get; set; } + + /// + /// The specific create, delete, or update instruction for the apply_patch tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParamJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ApplyPatchOperationParam Operation { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + /// + /// + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + /// + /// The status of the apply patch tool call. One of `in_progress` or `completed`. + /// + /// + /// The specific create, delete, or update instruction for the apply_patch tool call. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolCallItemParam( + string callId, + global::tryAGI.OpenAI.ApplyPatchCallStatusParam status, + global::tryAGI.OpenAI.ApplyPatchOperationParam operation, + string? id, + global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType type = global::tryAGI.OpenAI.ApplyPatchToolCallItemParamType.ApplyPatchCall) + { + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Status = status; + this.Operation = operation; + this.Type = type; + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolCallItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.Json.g.cs new file mode 100644 index 00000000..19c26b10 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallItemParamId + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.g.cs new file mode 100644 index 00000000..56140fbe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchToolCallItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamType.g.cs new file mode 100644 index 00000000..3bd20e77 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + ///
+ public enum ApplyPatchToolCallItemParamType + { + /// + /// + /// + ApplyPatchCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchToolCallItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchToolCallItemParamType value) + { + return value switch + { + ApplyPatchToolCallItemParamType.ApplyPatchCall => "apply_patch_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchToolCallItemParamType? ToEnum(string value) + { + return value switch + { + "apply_patch_call" => ApplyPatchToolCallItemParamType.ApplyPatchCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.Json.g.cs new file mode 100644 index 00000000..679fda02 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOperationDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOperationDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.g.cs new file mode 100644 index 00000000..e2934077 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOperationDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchToolCallOperationDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolCallOperationDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolCallOperationDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.Json.g.cs new file mode 100644 index 00000000..a5e2451d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOutput + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOutput; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.g.cs new file mode 100644 index 00000000..621b5a88 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutput.g.cs @@ -0,0 +1,106 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The output emitted by an apply patch tool call. + /// + public sealed partial class ApplyPatchToolCallOutput + { + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + ///
+ /// global::tryAGI.OpenAI.ApplyPatchToolCallOutputType.ApplyPatchCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchToolCallOutputType.ApplyPatchCallOutput; + + /// + /// The unique ID of the apply patch tool call output. Populated when this item is returned via API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The status of the apply patch tool call output. One of `completed` or `failed`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ApplyPatchCallOutputStatus Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public string? Output { get; set; } + + /// + /// The ID of the entity that created this tool call output. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + /// + /// + /// The unique ID of the apply patch tool call output. Populated when this item is returned via API. + /// + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + /// + /// The status of the apply patch tool call output. One of `completed` or `failed`. + /// + /// + /// + /// The ID of the entity that created this tool call output. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolCallOutput( + string id, + string callId, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatus status, + string? output, + string? createdBy, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputType type = global::tryAGI.OpenAI.ApplyPatchToolCallOutputType.ApplyPatchCallOutput) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Status = status; + this.Type = type; + this.Output = output; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolCallOutput() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.Json.g.cs new file mode 100644 index 00000000..00cb8835 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOutputItemParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.g.cs new file mode 100644 index 00000000..bb09683e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParam.g.cs @@ -0,0 +1,92 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The streamed output emitted by an apply patch tool call. + /// + public sealed partial class ApplyPatchToolCallOutputItemParam + { + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + ///
+ /// global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType.ApplyPatchCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolCallOutputItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType.ApplyPatchCallOutput; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The status of the apply patch tool call output. One of `completed` or `failed`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchCallOutputStatusParamJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public string? Output { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + /// + /// + /// + /// The unique ID of the apply patch tool call generated by the model. + /// + /// + /// The status of the apply patch tool call output. One of `completed` or `failed`. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolCallOutputItemParam( + string callId, + global::tryAGI.OpenAI.ApplyPatchCallOutputStatusParam status, + string? id, + string? output, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType type = global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamType.ApplyPatchCallOutput) + { + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Status = status; + this.Type = type; + this.Id = id; + this.Output = output; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolCallOutputItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.Json.g.cs new file mode 100644 index 00000000..0f1e42bc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOutputItemParamId + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.g.cs new file mode 100644 index 00000000..920685c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchToolCallOutputItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.Json.g.cs new file mode 100644 index 00000000..97cf88a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOutputItemParamOutput + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParamOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.g.cs new file mode 100644 index 00000000..fdded665 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchToolCallOutputItemParamOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamType.g.cs new file mode 100644 index 00000000..290ad938 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + ///
+ public enum ApplyPatchToolCallOutputItemParamType + { + /// + /// + /// + ApplyPatchCallOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchToolCallOutputItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchToolCallOutputItemParamType value) + { + return value switch + { + ApplyPatchToolCallOutputItemParamType.ApplyPatchCallOutput => "apply_patch_call_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchToolCallOutputItemParamType? ToEnum(string value) + { + return value switch + { + "apply_patch_call_output" => ApplyPatchToolCallOutputItemParamType.ApplyPatchCallOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.Json.g.cs new file mode 100644 index 00000000..b048d1c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolCallOutputOutput + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolCallOutputOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.g.cs new file mode 100644 index 00000000..712332dc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApplyPatchToolCallOutputOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputType.g.cs new file mode 100644 index 00000000..51bc522a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallOutputType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `apply_patch_call_output`.
+ /// Default Value: apply_patch_call_output + ///
+ public enum ApplyPatchToolCallOutputType + { + /// + /// + /// + ApplyPatchCallOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchToolCallOutputTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchToolCallOutputType value) + { + return value switch + { + ApplyPatchToolCallOutputType.ApplyPatchCallOutput => "apply_patch_call_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchToolCallOutputType? ToEnum(string value) + { + return value switch + { + "apply_patch_call_output" => ApplyPatchToolCallOutputType.ApplyPatchCallOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallType.g.cs new file mode 100644 index 00000000..d1bf3cc6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolCallType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `apply_patch_call`.
+ /// Default Value: apply_patch_call + ///
+ public enum ApplyPatchToolCallType + { + /// + /// + /// + ApplyPatchCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchToolCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchToolCallType value) + { + return value switch + { + ApplyPatchToolCallType.ApplyPatchCall => "apply_patch_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchToolCallType? ToEnum(string value) + { + return value switch + { + "apply_patch_call" => ApplyPatchToolCallType.ApplyPatchCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.Json.g.cs new file mode 100644 index 00000000..73bbe60b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchToolParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchToolParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.g.cs new file mode 100644 index 00000000..5fc04a42 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Allows the assistant to create, delete, or update files using unified diffs. + /// + public sealed partial class ApplyPatchToolParam + { + /// + /// The type of the tool. Always `apply_patch`.
+ /// Default Value: apply_patch + ///
+ /// global::tryAGI.OpenAI.ApplyPatchToolParamType.ApplyPatch + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchToolParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchToolParamType.ApplyPatch; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the tool. Always `apply_patch`.
+ /// Default Value: apply_patch + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchToolParam( + global::tryAGI.OpenAI.ApplyPatchToolParamType type = global::tryAGI.OpenAI.ApplyPatchToolParamType.ApplyPatch) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParamType.g.cs new file mode 100644 index 00000000..977f7209 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the tool. Always `apply_patch`.
+ /// Default Value: apply_patch + ///
+ public enum ApplyPatchToolParamType + { + /// + /// + /// + ApplyPatch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchToolParamType value) + { + return value switch + { + ApplyPatchToolParamType.ApplyPatch => "apply_patch", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchToolParamType? ToEnum(string value) + { + return value switch + { + "apply_patch" => ApplyPatchToolParamType.ApplyPatch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.Json.g.cs new file mode 100644 index 00000000..e6b5e639 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchUpdateFileOperation + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.g.cs new file mode 100644 index 00000000..d65a9b1c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperation.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction describing how to update a file via the apply_patch tool. + /// + public sealed partial class ApplyPatchUpdateFileOperation + { + /// + /// Update an existing file with the provided diff.
+ /// Default Value: update_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType.UpdateFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType.UpdateFile; + + /// + /// Path of the file to update. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// Diff to apply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("diff")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Diff { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Update an existing file with the provided diff.
+ /// Default Value: update_file + /// + /// + /// Path of the file to update. + /// + /// + /// Diff to apply. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchUpdateFileOperation( + string path, + string diff, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType type = global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationType.UpdateFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Diff = diff ?? throw new global::System.ArgumentNullException(nameof(diff)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchUpdateFileOperation() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.Json.g.cs new file mode 100644 index 00000000..ea08654d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApplyPatchUpdateFileOperationParam + { + /// + /// 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam; + } + + /// + /// 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::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.g.cs new file mode 100644 index 00000000..6f77e16e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParam.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Instruction for updating an existing file via the apply_patch tool. + /// + public sealed partial class ApplyPatchUpdateFileOperationParam + { + /// + /// The operation type. Always `update_file`.
+ /// Default Value: update_file + ///
+ /// global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType.UpdateFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApplyPatchUpdateFileOperationParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType Type { get; set; } = global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType.UpdateFile; + + /// + /// Path of the file to update relative to the workspace root. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// Unified diff content to apply to the existing file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("diff")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Diff { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The operation type. Always `update_file`.
+ /// Default Value: update_file + /// + /// + /// Path of the file to update relative to the workspace root. + /// + /// + /// Unified diff content to apply to the existing file. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ApplyPatchUpdateFileOperationParam( + string path, + string diff, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType type = global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParamType.UpdateFile) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Diff = diff ?? throw new global::System.ArgumentNullException(nameof(diff)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ApplyPatchUpdateFileOperationParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParamType.g.cs new file mode 100644 index 00000000..1be167d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The operation type. Always `update_file`.
+ /// Default Value: update_file + ///
+ public enum ApplyPatchUpdateFileOperationParamType + { + /// + /// + /// + UpdateFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchUpdateFileOperationParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchUpdateFileOperationParamType value) + { + return value switch + { + ApplyPatchUpdateFileOperationParamType.UpdateFile => "update_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchUpdateFileOperationParamType? ToEnum(string value) + { + return value switch + { + "update_file" => ApplyPatchUpdateFileOperationParamType.UpdateFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationType.g.cs new file mode 100644 index 00000000..37f3d134 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApplyPatchUpdateFileOperationType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Update an existing file with the provided diff.
+ /// Default Value: update_file + ///
+ public enum ApplyPatchUpdateFileOperationType + { + /// + /// + /// + UpdateFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ApplyPatchUpdateFileOperationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ApplyPatchUpdateFileOperationType value) + { + return value switch + { + ApplyPatchUpdateFileOperationType.UpdateFile => "update_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ApplyPatchUpdateFileOperationType? ToEnum(string value) + { + return value switch + { + "update_file" => ApplyPatchUpdateFileOperationType.UpdateFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocation.g.cs index 3439dfd5..6ffd1d9b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocation.g.cs @@ -9,37 +9,37 @@ namespace tryAGI.OpenAI public sealed partial class ApproximateLocation { /// - /// Free text input for the city of the user, e.g. `San Francisco`. + /// The type of location approximation. Always `approximate`.
+ /// Default Value: approximate ///
- [global::System.Text.Json.Serialization.JsonPropertyName("city")] - public string? City { get; set; } + /// global::tryAGI.OpenAI.ApproximateLocationType.Approximate + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeJsonConverter))] + public global::tryAGI.OpenAI.ApproximateLocationType Type { get; set; } = global::tryAGI.OpenAI.ApproximateLocationType.Approximate; /// - /// The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("country")] public string? Country { get; set; } /// - /// Free text input for the region of the user, e.g. `California`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("region")] public string? Region { get; set; } /// - /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("timezone")] - public string? Timezone { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("city")] + public string? City { get; set; } /// - /// The type of location approximation. Always `approximate`.
- /// Default Value: approximate + /// ///
- /// global::tryAGI.OpenAI.ApproximateLocationType.Approximate - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ApproximateLocationTypeJsonConverter))] - public global::tryAGI.OpenAI.ApproximateLocationType Type { get; set; } = global::tryAGI.OpenAI.ApproximateLocationType.Approximate; + [global::System.Text.Json.Serialization.JsonPropertyName("timezone")] + public string? Timezone { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -50,37 +50,29 @@ public sealed partial class ApproximateLocation /// /// Initializes a new instance of the class. /// - /// - /// Free text input for the city of the user, e.g. `San Francisco`. - /// - /// - /// The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - /// - /// - /// Free text input for the region of the user, e.g. `California`. - /// - /// - /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - /// /// /// The type of location approximation. Always `approximate`.
/// Default Value: approximate /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ApproximateLocation( - string? city, string? country, string? region, + string? city, string? timezone, global::tryAGI.OpenAI.ApproximateLocationType type = global::tryAGI.OpenAI.ApproximateLocationType.Approximate) { - this.City = city; + this.Type = type; this.Country = country; this.Region = region; + this.City = city; this.Timezone = timezone; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.Json.g.cs new file mode 100644 index 00000000..3c983245 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApproximateLocationCity + { + /// + /// 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::tryAGI.OpenAI.ApproximateLocationCity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApproximateLocationCity), + jsonSerializerContext) as global::tryAGI.OpenAI.ApproximateLocationCity; + } + + /// + /// 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::tryAGI.OpenAI.ApproximateLocationCity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApproximateLocationCity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApproximateLocationCity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.g.cs new file mode 100644 index 00000000..ff0f6635 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApproximateLocationCity + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.Json.g.cs new file mode 100644 index 00000000..bd6fddcb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApproximateLocationCountry + { + /// + /// 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::tryAGI.OpenAI.ApproximateLocationCountry? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApproximateLocationCountry), + jsonSerializerContext) as global::tryAGI.OpenAI.ApproximateLocationCountry; + } + + /// + /// 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::tryAGI.OpenAI.ApproximateLocationCountry? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApproximateLocationCountry), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApproximateLocationCountry; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.g.cs new file mode 100644 index 00000000..fbbf2e4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationCountry.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApproximateLocationCountry + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.Json.g.cs new file mode 100644 index 00000000..5992570d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApproximateLocationRegion + { + /// + /// 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::tryAGI.OpenAI.ApproximateLocationRegion? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApproximateLocationRegion), + jsonSerializerContext) as global::tryAGI.OpenAI.ApproximateLocationRegion; + } + + /// + /// 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::tryAGI.OpenAI.ApproximateLocationRegion? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApproximateLocationRegion), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApproximateLocationRegion; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.g.cs new file mode 100644 index 00000000..1299baa8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationRegion.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApproximateLocationRegion + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.Json.g.cs new file mode 100644 index 00000000..6e9a3b56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ApproximateLocationTimezone + { + /// + /// 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::tryAGI.OpenAI.ApproximateLocationTimezone? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ApproximateLocationTimezone), + jsonSerializerContext) as global::tryAGI.OpenAI.ApproximateLocationTimezone; + } + + /// + /// 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::tryAGI.OpenAI.ApproximateLocationTimezone? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ApproximateLocationTimezone), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ApproximateLocationTimezone; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.g.cs new file mode 100644 index 00000000..4e584b74 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ApproximateLocationTimezone.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ApproximateLocationTimezone + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.Json.g.cs new file mode 100644 index 00000000..01e703d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetails + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetails; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.g.cs new file mode 100644 index 00000000..db817999 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetails.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Detailed information about a role assignment entry returned when listing assignments. + /// + public sealed partial class AssignedRoleDetails + { + /// + /// Identifier for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Name of the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Permissions associated with the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Permissions { get; set; } + + /// + /// Resource type the role applies to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResourceType { get; set; } + + /// + /// Whether the role is predefined by OpenAI. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("predefined_role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool PredefinedRole { get; set; } + + /// + /// Description of the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Description { get; set; } + + /// + /// When the role was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long? CreatedAt { get; set; } + + /// + /// When the role was last updated. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long? UpdatedAt { get; set; } + + /// + /// Identifier of the actor who created the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? CreatedBy { get; set; } + + /// + /// User details for the actor that created the role, when available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by_user_obj")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object? CreatedByUserObj { get; set; } + + /// + /// Arbitrary metadata stored on the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object? Metadata { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the role. + /// + /// + /// Name of the role. + /// + /// + /// Permissions associated with the role. + /// + /// + /// Resource type the role applies to. + /// + /// + /// Whether the role is predefined by OpenAI. + /// + /// + /// Description of the role. + /// + /// + /// When the role was created. + /// + /// + /// When the role was last updated. + /// + /// + /// Identifier of the actor who created the role. + /// + /// + /// User details for the actor that created the role, when available. + /// + /// + /// Arbitrary metadata stored on the role. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AssignedRoleDetails( + string id, + string name, + global::System.Collections.Generic.IList permissions, + string resourceType, + bool predefinedRole, + string? description, + long? createdAt, + long? updatedAt, + string? createdBy, + object? createdByUserObj, + object? metadata) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Permissions = permissions ?? throw new global::System.ArgumentNullException(nameof(permissions)); + this.ResourceType = resourceType ?? throw new global::System.ArgumentNullException(nameof(resourceType)); + this.PredefinedRole = predefinedRole; + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.CreatedAt = createdAt ?? throw new global::System.ArgumentNullException(nameof(createdAt)); + this.UpdatedAt = updatedAt ?? throw new global::System.ArgumentNullException(nameof(updatedAt)); + this.CreatedBy = createdBy ?? throw new global::System.ArgumentNullException(nameof(createdBy)); + this.CreatedByUserObj = createdByUserObj ?? throw new global::System.ArgumentNullException(nameof(createdByUserObj)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + } + + /// + /// Initializes a new instance of the class. + /// + public AssignedRoleDetails() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.Json.g.cs new file mode 100644 index 00000000..42c3a172 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsCreatedAt + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.g.cs new file mode 100644 index 00000000..8b0b3dae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// When the role was created. + /// + public sealed partial class AssignedRoleDetailsCreatedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.Json.g.cs new file mode 100644 index 00000000..7c73ac07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsCreatedBy + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedBy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.g.cs new file mode 100644 index 00000000..4cff9903 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedBy.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Identifier of the actor who created the role. + /// + public sealed partial class AssignedRoleDetailsCreatedBy + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.Json.g.cs new file mode 100644 index 00000000..ff790d8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsCreatedByUserObj + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.g.cs new file mode 100644 index 00000000..8b4f7d4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// User details for the actor that created the role, when available. + /// + public sealed partial class AssignedRoleDetailsCreatedByUserObj + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.Json.g.cs new file mode 100644 index 00000000..89cb34d9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsCreatedByUserObj2 + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsCreatedByUserObj2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.g.cs new file mode 100644 index 00000000..486a3fab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsCreatedByUserObj2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssignedRoleDetailsCreatedByUserObj2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.Json.g.cs new file mode 100644 index 00000000..c21e54c8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsDescription + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsDescription; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.g.cs new file mode 100644 index 00000000..c072d062 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Description of the role. + /// + public sealed partial class AssignedRoleDetailsDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.Json.g.cs new file mode 100644 index 00000000..a28bae19 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsMetadata + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsMetadata), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsMetadata; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsMetadata; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.g.cs new file mode 100644 index 00000000..e5547521 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Arbitrary metadata stored on the role. + /// + public sealed partial class AssignedRoleDetailsMetadata + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.Json.g.cs new file mode 100644 index 00000000..4e6a668f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsMetadata2 + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsMetadata2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsMetadata2), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsMetadata2; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsMetadata2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsMetadata2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsMetadata2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.g.cs new file mode 100644 index 00000000..0b90b0ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsMetadata2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssignedRoleDetailsMetadata2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.Json.g.cs new file mode 100644 index 00000000..a63b6ecf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssignedRoleDetailsUpdatedAt + { + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt; + } + + /// + /// 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::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssignedRoleDetailsUpdatedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.g.cs new file mode 100644 index 00000000..a34ee201 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssignedRoleDetailsUpdatedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// When the role was last updated. + /// + public sealed partial class AssignedRoleDetailsUpdatedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.Json.g.cs new file mode 100644 index 00000000..afdda110 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantMessageItem + { + /// + /// 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::tryAGI.OpenAI.AssistantMessageItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantMessageItem), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantMessageItem; + } + + /// + /// 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::tryAGI.OpenAI.AssistantMessageItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantMessageItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantMessageItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.g.cs new file mode 100644 index 00000000..148d6cc6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItem.g.cs @@ -0,0 +1,113 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Assistant-authored message within a thread. + /// + public sealed partial class AssistantMessageItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.AssistantMessageItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemObjectJsonConverter))] + public global::tryAGI.OpenAI.AssistantMessageItemObject Object { get; set; } = global::tryAGI.OpenAI.AssistantMessageItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Type discriminator that is always `chatkit.assistant_message`.
+ /// Default Value: chatkit.assistant_message + ///
+ /// global::tryAGI.OpenAI.AssistantMessageItemType.ChatkitAssistantMessage + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantMessageItemTypeJsonConverter))] + public global::tryAGI.OpenAI.AssistantMessageItemType Type { get; set; } = global::tryAGI.OpenAI.AssistantMessageItemType.ChatkitAssistantMessage; + + /// + /// Ordered assistant response segments. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Type discriminator that is always `chatkit.assistant_message`.
+ /// Default Value: chatkit.assistant_message + /// + /// + /// Ordered assistant response segments. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AssistantMessageItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + global::System.Collections.Generic.IList content, + global::tryAGI.OpenAI.AssistantMessageItemObject @object = global::tryAGI.OpenAI.AssistantMessageItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.AssistantMessageItemType type = global::tryAGI.OpenAI.AssistantMessageItemType.ChatkitAssistantMessage) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public AssistantMessageItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemObject.g.cs new file mode 100644 index 00000000..caeafd32 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum AssistantMessageItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageItemObject value) + { + return value switch + { + AssistantMessageItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => AssistantMessageItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemType.g.cs new file mode 100644 index 00000000..1afcfce1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantMessageItemType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.assistant_message`.
+ /// Default Value: chatkit.assistant_message + ///
+ public enum AssistantMessageItemType + { + /// + /// + /// + ChatkitAssistantMessage, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageItemType value) + { + return value switch + { + AssistantMessageItemType.ChatkitAssistantMessage => "chatkit.assistant_message", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageItemType? ToEnum(string value) + { + return value switch + { + "chatkit.assistant_message" => AssistantMessageItemType.ChatkitAssistantMessage, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObject.g.cs index 16187411..ed9e3658 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObject.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -6,106 +8,110 @@ namespace tryAGI.OpenAI /// /// Represents an `assistant` that can call the model and use tools. /// + [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class AssistantObject { /// - /// The Unix timestamp (in seconds) for when the assistant was created. + /// The identifier, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + [global::System.Obsolete("This property marked as deprecated.")] + public required string Id { get; set; } /// - /// The description of the assistant. The maximum length is 512 characters. + /// The object type, which is always `assistant`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string? Description { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantObjectObjectJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.AssistantObjectObject Object { get; set; } /// - /// The identifier, which can be referenced in API endpoints. + /// The Unix timestamp (in seconds) for when the assistant was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + [global::System.Obsolete("This property marked as deprecated.")] + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? Instructions { get; set; } + [global::System.Obsolete("This property marked as deprecated.")] + public required string? Name { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonPropertyName("description")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Obsolete("This property marked as deprecated.")] + public required string? Description { get; set; } /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. /// [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] public required string Model { get; set; } /// - /// The name of the assistant. The maximum length is 256 characters. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? Name { get; set; } + [global::System.Obsolete("This property marked as deprecated.")] + public required string? Instructions { get; set; } /// - /// The object type, which is always `assistant`. + /// 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`.
+ /// Default Value: [] ///
- [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.AssistantObjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] + public required global::System.Collections.Generic.IList> Tools { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - public object? ResponseFormat { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.AssistantObjectToolResources2? ToolResources { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] + public required global::System.Collections.Generic.Dictionary? Metadata { 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. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.AssistantObjectToolResources? ToolResources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + [global::System.Obsolete("This property marked as deprecated.")] + public double? Temperature { get; set; } /// - /// 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")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tools { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + [global::System.Obsolete("This property marked as deprecated.")] + public double? TopP { get; set; } /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -116,83 +122,61 @@ public sealed partial class AssistantObject /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the assistant was created. - /// - /// - /// The description of the assistant. The maximum length is 512 characters. - /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// /// /// The object type, which is always `assistant`. /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 + /// + /// The Unix timestamp (in seconds) for when the assistant was created. /// - /// - /// 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. + /// + /// + /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. /// + /// /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// 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`.
+ /// Default Value: [] /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AssistantObject( + string id, global::System.DateTimeOffset createdAt, + string? name, string? description, - string id, + string model, string? instructions, + global::System.Collections.Generic.IList> tools, global::System.Collections.Generic.Dictionary? metadata, - string model, - string? name, - global::System.Collections.Generic.IList tools, global::tryAGI.OpenAI.AssistantObjectObject @object, - object? responseFormat, + global::tryAGI.OpenAI.AssistantObjectToolResources2? toolResources, double? temperature, - global::tryAGI.OpenAI.AssistantObjectToolResources? toolResources, - double? topP) + double? topP, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Instructions = instructions ?? throw new global::System.ArgumentNullException(nameof(instructions)); - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Instructions = instructions ?? throw new global::System.ArgumentNullException(nameof(instructions)); this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Object = @object; - this.ResponseFormat = responseFormat; - this.Temperature = temperature; this.ToolResources = toolResources; + this.Temperature = temperature; this.TopP = topP; + this.ResponseFormat = responseFormat; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.Json.g.cs new file mode 100644 index 00000000..dd1705bf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectDescription + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectDescription; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.g.cs new file mode 100644 index 00000000..f3fc27ba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.Json.g.cs new file mode 100644 index 00000000..6597050a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectInstructions + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectInstructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectInstructions), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectInstructions; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectInstructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectInstructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectInstructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.g.cs new file mode 100644 index 00000000..ce485e56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectInstructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectInstructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.Json.g.cs new file mode 100644 index 00000000..53b0101d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectName + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectName), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectName; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.g.cs new file mode 100644 index 00000000..c81a3ffb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.Json.g.cs new file mode 100644 index 00000000..6435f757 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectResponseFormat + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectResponseFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectResponseFormat; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectResponseFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectResponseFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectResponseFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.g.cs new file mode 100644 index 00000000..96921321 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectResponseFormat.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectResponseFormat + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.Json.g.cs new file mode 100644 index 00000000..89f404c0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectTemperature + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectTemperature; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.g.cs new file mode 100644 index 00000000..f2fa7c9c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources.g.cs index 524cb14c..58b23c76 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// 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. + /// /// public sealed partial class AssistantObjectToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public AssistantObjectToolResources( - global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public AssistantObjectToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.Json.g.cs new file mode 100644 index 00000000..8e0b5ad6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectToolResources2 + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.g.cs new file mode 100644 index 00000000..1d366d65 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// 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. + /// + public sealed partial class AssistantObjectToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AssistantObjectToolResources2( + global::tryAGI.OpenAI.AssistantObjectToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.AssistantObjectToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public AssistantObjectToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesCodeInterpreter.g.cs index f867604a..059900d4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class AssistantObjectToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class AssistantObjectToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesFileSearch.g.cs index c203a2df..9e379619 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectToolResourcesFileSearch.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class AssistantObjectToolResourcesFileSearch { /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } @@ -24,7 +24,7 @@ public sealed partial class AssistantObjectToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.Json.g.cs new file mode 100644 index 00000000..5d67b332 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AssistantObjectTopP + { + /// + /// 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::tryAGI.OpenAI.AssistantObjectTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AssistantObjectTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.AssistantObjectTopP; + } + + /// + /// 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::tryAGI.OpenAI.AssistantObjectTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AssistantObjectTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantObjectTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.g.cs new file mode 100644 index 00000000..644e349f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantObjectTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AssistantObjectTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEvent.g.cs index 4b65d4f1..9471f839 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEvent.g.cs @@ -18,7 +18,7 @@ namespace tryAGI.OpenAI /// `thread.message.in_progress` event, many `thread.message.delta` events, and finally a
/// `thread.message.completed` event.
/// We may add additional events over time, so we recommend handling unknown events gracefully
- /// in your code. See the [Assistants API quickstart](https://platform.openai.com/docs/assistants/overview) to learn how to
+ /// in your code. See the [Assistants API quickstart](/docs/assistants/overview) to learn how to
/// integrate the Assistants API with streaming. ///
public readonly partial struct AssistantStreamEvent : global::System.IEquatable @@ -43,107 +43,140 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.ThreadStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.ThreadStreamEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEvent? Run { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEvent? Run { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ThreadStreamEvent?(AssistantStreamEvent @this) => @this.Thread; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Run))] +#endif + public bool IsRun => Run != null; /// /// /// - public AssistantStreamEvent(global::tryAGI.OpenAI.ThreadStreamEvent? value) - { - Thread = value; - } +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStepStreamEvent? RunStep { get; init; } +#else + public global::tryAGI.OpenAI.RunStepStreamEvent? RunStep { get; } +#endif /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEvent? Run { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEvent? Run { get; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStep))] #endif + public bool IsRunStep => RunStep != null; /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Run))] + public global::tryAGI.OpenAI.MessageStreamEvent? Message { get; init; } +#else + public global::tryAGI.OpenAI.MessageStreamEvent? Message { get; } #endif - public bool IsRun => Run != null; /// /// /// - public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.RunStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.RunStreamEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] +#endif + public bool IsMessage => Message != null; /// - /// + /// Occurs when an [error](/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEvent?(AssistantStreamEvent @this) => @this.Run; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ErrorEvent? Error { get; init; } +#else + public global::tryAGI.OpenAI.ErrorEvent? Error { get; } +#endif /// /// /// - public AssistantStreamEvent(global::tryAGI.OpenAI.RunStreamEvent? value) - { - Run = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] +#endif + public bool IsError => Error != null; /// - /// + /// Occurs when a stream ends. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEvent? RunStep { get; init; } + public global::tryAGI.OpenAI.DoneEvent? Done { get; init; } #else - public global::tryAGI.OpenAI.RunStepStreamEvent? RunStep { get; } + public global::tryAGI.OpenAI.DoneEvent? Done { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStep))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Done))] #endif - public bool IsRunStep => RunStep != null; + public bool IsDone => Done != null; + /// + /// + /// + public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.ThreadStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.ThreadStreamEvent?)value); /// /// /// - public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.RunStepStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.RunStepStreamEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ThreadStreamEvent?(AssistantStreamEvent @this) => @this.Thread; /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStepStreamEvent?(AssistantStreamEvent @this) => @this.RunStep; + public AssistantStreamEvent(global::tryAGI.OpenAI.ThreadStreamEvent? value) + { + Thread = value; + } /// /// /// - public AssistantStreamEvent(global::tryAGI.OpenAI.RunStepStreamEvent? value) + public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.RunStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.RunStreamEvent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RunStreamEvent?(AssistantStreamEvent @this) => @this.Run; + + /// + /// + /// + public AssistantStreamEvent(global::tryAGI.OpenAI.RunStreamEvent? value) { - RunStep = value; + Run = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageStreamEvent? Message { get; init; } -#else - public global::tryAGI.OpenAI.MessageStreamEvent? Message { get; } -#endif + public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.RunStepStreamEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.RunStepStreamEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] -#endif - public bool IsMessage => Message != null; + public static implicit operator global::tryAGI.OpenAI.RunStepStreamEvent?(AssistantStreamEvent @this) => @this.RunStep; + + /// + /// + /// + public AssistantStreamEvent(global::tryAGI.OpenAI.RunStepStreamEvent? value) + { + RunStep = value; + } /// /// @@ -164,38 +197,39 @@ public AssistantStreamEvent(global::tryAGI.OpenAI.MessageStreamEvent? value) } /// - /// Occurs when an [error](https://platform.openai.com/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::tryAGI.OpenAI.ErrorEvent? Error { get; init; } -#else - public global::tryAGI.OpenAI.ErrorEvent? Error { get; } -#endif + public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.ErrorEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.ErrorEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] -#endif - public bool IsError => Error != null; + public static implicit operator global::tryAGI.OpenAI.ErrorEvent?(AssistantStreamEvent @this) => @this.Error; /// /// /// - public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.ErrorEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.ErrorEvent?)value); + public AssistantStreamEvent(global::tryAGI.OpenAI.ErrorEvent? value) + { + Error = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ErrorEvent?(AssistantStreamEvent @this) => @this.Error; + public static implicit operator AssistantStreamEvent(global::tryAGI.OpenAI.DoneEvent value) => new AssistantStreamEvent((global::tryAGI.OpenAI.DoneEvent?)value); /// /// /// - public AssistantStreamEvent(global::tryAGI.OpenAI.ErrorEvent? value) + public static implicit operator global::tryAGI.OpenAI.DoneEvent?(AssistantStreamEvent @this) => @this.Done; + + /// + /// + /// + public AssistantStreamEvent(global::tryAGI.OpenAI.DoneEvent? value) { - Error = value; + Done = value; } /// @@ -206,7 +240,8 @@ public AssistantStreamEvent( global::tryAGI.OpenAI.RunStreamEvent? run, global::tryAGI.OpenAI.RunStepStreamEvent? runStep, global::tryAGI.OpenAI.MessageStreamEvent? message, - global::tryAGI.OpenAI.ErrorEvent? error + global::tryAGI.OpenAI.ErrorEvent? error, + global::tryAGI.OpenAI.DoneEvent? done ) { Thread = thread; @@ -214,12 +249,14 @@ public AssistantStreamEvent( RunStep = runStep; Message = message; Error = error; + Done = done; } /// /// /// public object? Object => + Done as object ?? Error as object ?? Message as object ?? RunStep as object ?? @@ -235,7 +272,8 @@ Thread as object Run?.ToString() ?? RunStep?.ToString() ?? Message?.ToString() ?? - Error?.ToString() + Error?.ToString() ?? + Done?.ToString() ; /// @@ -243,7 +281,7 @@ Thread as object /// public bool Validate() { - return IsThread || IsRun || IsRunStep || IsMessage || IsError; + 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; } /// @@ -255,6 +293,7 @@ public bool Validate() global::System.Func? runStep = null, global::System.Func? message = null, global::System.Func? error = null, + global::System.Func? done = null, bool validate = true) { if (validate) @@ -282,6 +321,10 @@ public bool Validate() { return error(Error!); } + else if (IsDone && done != null) + { + return done(Done!); + } return default(TResult); } @@ -295,6 +338,7 @@ public void Match( global::System.Action? runStep = null, global::System.Action? message = null, global::System.Action? error = null, + global::System.Action? done = null, bool validate = true) { if (validate) @@ -322,6 +366,10 @@ public void Match( { error?.Invoke(Error!); } + else if (IsDone) + { + done?.Invoke(Done!); + } } /// @@ -341,6 +389,8 @@ public override int GetHashCode() typeof(global::tryAGI.OpenAI.MessageStreamEvent), Error, typeof(global::tryAGI.OpenAI.ErrorEvent), + Done, + typeof(global::tryAGI.OpenAI.DoneEvent), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -361,7 +411,8 @@ public bool Equals(AssistantStreamEvent other) 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(Error, other.Error) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Done, other.Done) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.Json.g.cs deleted file mode 100644 index 59d6d408..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class AssistantStreamEventDiscriminator - { - /// - /// 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::tryAGI.OpenAI.AssistantStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AssistantStreamEventDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.AssistantStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AssistantStreamEventDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantStreamEventDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.g.cs deleted file mode 100644 index 35cdcbc1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantStreamEventDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class AssistantStreamEventDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public AssistantStreamEventDiscriminator( - string? @event) - { - this.Event = @event; - } - - /// - /// Initializes a new instance of the class. - /// - public AssistantStreamEventDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.Json.g.cs deleted file mode 100644 index 4bf62cff..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct AssistantTool - { - /// - /// 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::tryAGI.OpenAI.AssistantTool? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AssistantTool), - jsonSerializerContext) as global::tryAGI.OpenAI.AssistantTool?; - } - - /// - /// 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::tryAGI.OpenAI.AssistantTool? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AssistantTool), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantTool?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.g.cs deleted file mode 100644 index 2493cd1d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantTool.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct AssistantTool : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantToolsCode? ToolsCode { get; init; } -#else - public global::tryAGI.OpenAI.AssistantToolsCode? ToolsCode { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolsCode))] -#endif - public bool IsToolsCode => ToolsCode != null; - - /// - /// - /// - public static implicit operator AssistantTool(global::tryAGI.OpenAI.AssistantToolsCode value) => new AssistantTool((global::tryAGI.OpenAI.AssistantToolsCode?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.AssistantToolsCode?(AssistantTool @this) => @this.ToolsCode; - - /// - /// - /// - public AssistantTool(global::tryAGI.OpenAI.AssistantToolsCode? value) - { - ToolsCode = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantToolsFileSearch? ToolsFileSearch { get; init; } -#else - public global::tryAGI.OpenAI.AssistantToolsFileSearch? ToolsFileSearch { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolsFileSearch))] -#endif - public bool IsToolsFileSearch => ToolsFileSearch != null; - - /// - /// - /// - public static implicit operator AssistantTool(global::tryAGI.OpenAI.AssistantToolsFileSearch value) => new AssistantTool((global::tryAGI.OpenAI.AssistantToolsFileSearch?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.AssistantToolsFileSearch?(AssistantTool @this) => @this.ToolsFileSearch; - - /// - /// - /// - public AssistantTool(global::tryAGI.OpenAI.AssistantToolsFileSearch? value) - { - ToolsFileSearch = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantToolsFunction? ToolsFunction { get; init; } -#else - public global::tryAGI.OpenAI.AssistantToolsFunction? ToolsFunction { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolsFunction))] -#endif - public bool IsToolsFunction => ToolsFunction != null; - - /// - /// - /// - public static implicit operator AssistantTool(global::tryAGI.OpenAI.AssistantToolsFunction value) => new AssistantTool((global::tryAGI.OpenAI.AssistantToolsFunction?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.AssistantToolsFunction?(AssistantTool @this) => @this.ToolsFunction; - - /// - /// - /// - public AssistantTool(global::tryAGI.OpenAI.AssistantToolsFunction? value) - { - ToolsFunction = value; - } - - /// - /// - /// - public AssistantTool( - global::tryAGI.OpenAI.AssistantToolsCode? toolsCode, - global::tryAGI.OpenAI.AssistantToolsFileSearch? toolsFileSearch, - global::tryAGI.OpenAI.AssistantToolsFunction? toolsFunction - ) - { - ToolsCode = toolsCode; - ToolsFileSearch = toolsFileSearch; - ToolsFunction = toolsFunction; - } - - /// - /// - /// - public object? Object => - ToolsFunction as object ?? - ToolsFileSearch as object ?? - ToolsCode as object - ; - - /// - /// - /// - public override string? ToString() => - ToolsCode?.ToString() ?? - ToolsFileSearch?.ToString() ?? - ToolsFunction?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsToolsCode || IsToolsFileSearch || IsToolsFunction; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? toolsCode = null, - global::System.Func? toolsFileSearch = null, - global::System.Func? toolsFunction = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsToolsCode && toolsCode != null) - { - return toolsCode(ToolsCode!); - } - else if (IsToolsFileSearch && toolsFileSearch != null) - { - return toolsFileSearch(ToolsFileSearch!); - } - else if (IsToolsFunction && toolsFunction != null) - { - return toolsFunction(ToolsFunction!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? toolsCode = null, - global::System.Action? toolsFileSearch = null, - global::System.Action? toolsFunction = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsToolsCode) - { - toolsCode?.Invoke(ToolsCode!); - } - else if (IsToolsFileSearch) - { - toolsFileSearch?.Invoke(ToolsFileSearch!); - } - else if (IsToolsFunction) - { - toolsFunction?.Invoke(ToolsFunction!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ToolsCode, - typeof(global::tryAGI.OpenAI.AssistantToolsCode), - ToolsFileSearch, - typeof(global::tryAGI.OpenAI.AssistantToolsFileSearch), - ToolsFunction, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AssistantTool other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolsCode, other.ToolsCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolsFileSearch, other.ToolsFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolsFunction, other.ToolsFunction) - ; - } - - /// - /// - /// - public static bool operator ==(AssistantTool obj1, AssistantTool obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AssistantTool obj1, AssistantTool obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AssistantTool o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.Json.g.cs deleted file mode 100644 index 8d3999cd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class AssistantToolDiscriminator - { - /// - /// 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::tryAGI.OpenAI.AssistantToolDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.AssistantToolDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.AssistantToolDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.AssistantToolDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.AssistantToolDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AssistantToolDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.g.cs deleted file mode 100644 index b5f9d3e9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class AssistantToolDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public AssistantToolDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public AssistantToolDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearch.g.cs index 8b529ff1..e4752e2c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearch.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class AssistantToolsFileSearch { - /// - /// Overrides for the file search tool. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? FileSearch { get; set; } - /// /// The type of tool being defined: `file_search` /// @@ -21,6 +15,12 @@ public sealed partial class AssistantToolsFileSearch [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFileSearchTypeJsonConverter))] public global::tryAGI.OpenAI.AssistantToolsFileSearchType Type { get; set; } + /// + /// Overrides for the file search tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? FileSearch { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +30,21 @@ public sealed partial class AssistantToolsFileSearch /// /// Initializes a new instance of the class. /// - /// - /// Overrides for the file search tool. - /// /// /// The type of tool being defined: `file_search` /// + /// + /// Overrides for the file search tool. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AssistantToolsFileSearch( - global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? fileSearch, - global::tryAGI.OpenAI.AssistantToolsFileSearchType type) + global::tryAGI.OpenAI.AssistantToolsFileSearchType type, + global::tryAGI.OpenAI.AssistantToolsFileSearchFileSearch? fileSearch) { - this.FileSearch = fileSearch; this.Type = type; + this.FileSearch = fileSearch; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearchFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearchFileSearch.g.cs index b375e516..7af6a0a3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearchFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFileSearchFileSearch.g.cs @@ -10,14 +10,14 @@ public sealed partial class AssistantToolsFileSearchFileSearch { /// /// The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.
- /// Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + /// Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_num_results")] public int? MaxNumResults { get; set; } /// /// The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.
- /// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + /// See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. ///
[global::System.Text.Json.Serialization.JsonPropertyName("ranking_options")] public global::tryAGI.OpenAI.FileSearchRankingOptions? RankingOptions { get; set; } @@ -33,11 +33,11 @@ public sealed partial class AssistantToolsFileSearchFileSearch ///
/// /// The maximum number of results the file search tool should output. The default is 20 for `gpt-4*` models and 5 for `gpt-3.5-turbo`. This number should be between 1 and 50 inclusive.
- /// Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + /// Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. /// /// /// The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.
- /// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + /// See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFunction.g.cs index a6e28586..8f32ca32 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantToolsFunction.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class AssistantToolsFunction { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FunctionObject Function { get; set; } - /// /// The type of tool being defined: `function` /// @@ -22,6 +15,13 @@ public sealed partial class AssistantToolsFunction [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantToolsFunctionTypeJsonConverter))] public global::tryAGI.OpenAI.AssistantToolsFunctionType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionObject Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class AssistantToolsFunction /// /// Initializes a new instance of the class. /// - /// /// /// The type of tool being defined: `function` /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiResponseFormatOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiResponseFormatOption.g.cs index b595946b..00a31aa1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiResponseFormatOption.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiResponseFormatOption.g.cs @@ -5,8 +5,8 @@ namespace tryAGI.OpenAI { /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/docs/guides/structured-outputs).
+ /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. ///
@@ -30,113 +30,112 @@ namespace tryAGI.OpenAI public bool IsValue1 => Value1 != null; /// - /// + /// Default response format. Used to generate text responses. /// - public static implicit operator AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum?(AssistantsApiResponseFormatOption @this) => @this.Value1; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// JSON object response format. An older method of generating JSON responses.
+ /// Using `json_schema` is recommended for models that support it. Note that the
+ /// model will not generate JSON without a system or user message instructing it
+ /// to do so. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFormatJsonObject? JsonObject { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFormatJsonObject? JsonObject { get; } +#endif /// /// /// - public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonObject))] +#endif + public bool IsJsonObject => JsonObject != null; /// - /// Default response format. Used to generate text responses. + /// JSON Schema response format. Used to generate structured JSON responses.
+ /// Learn more about [Structured Outputs](/docs/guides/structured-outputs). ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFormatText? Value2 { get; init; } + public global::tryAGI.OpenAI.ResponseFormatJsonSchema? JsonSchema { get; init; } #else - public global::tryAGI.OpenAI.ResponseFormatText? Value2 { get; } + public global::tryAGI.OpenAI.ResponseFormatJsonSchema? JsonSchema { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonSchema))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsJsonSchema => JsonSchema != null; /// /// /// - public static implicit operator AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatText value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.ResponseFormatText?)value); + public static implicit operator AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFormatText?(AssistantsApiResponseFormatOption @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum?(AssistantsApiResponseFormatOption @this) => @this.Value1; /// /// /// - public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatText? value) + public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum? value) { - Value2 = value; + Value1 = value; } - /// - /// JSON object response format. An older method of generating JSON responses.
- /// Using `json_schema` is recommended for models that support it. Note that the
- /// model will not generate JSON without a system or user message instructing it
- /// to do so. - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFormatJsonObject? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFormatJsonObject? 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 AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatText value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.ResponseFormatText?)value); /// /// /// - public static implicit operator AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJsonObject value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.ResponseFormatJsonObject?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseFormatText?(AssistantsApiResponseFormatOption @this) => @this.Text; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonObject?(AssistantsApiResponseFormatOption @this) => @this.Value3; + public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatText? value) + { + Text = value; + } /// /// /// - public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJsonObject? value) - { - Value3 = value; - } + public static implicit operator AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJsonObject value) => new AssistantsApiResponseFormatOption((global::tryAGI.OpenAI.ResponseFormatJsonObject?)value); /// - /// JSON Schema response format. Used to generate structured JSON responses.
- /// Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + /// ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFormatJsonSchema? Value4 { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFormatJsonSchema? Value4 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonObject?(AssistantsApiResponseFormatOption @this) => @this.JsonObject; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; + public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJsonObject? value) + { + JsonObject = value; + } /// /// @@ -146,14 +145,14 @@ public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJso /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonSchema?(AssistantsApiResponseFormatOption @this) => @this.Value4; + public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonSchema?(AssistantsApiResponseFormatOption @this) => @this.JsonSchema; /// /// /// public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJsonSchema? value) { - Value4 = value; + JsonSchema = value; } /// @@ -161,24 +160,24 @@ public AssistantsApiResponseFormatOption(global::tryAGI.OpenAI.ResponseFormatJso /// public AssistantsApiResponseFormatOption( global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum? value1, - global::tryAGI.OpenAI.ResponseFormatText? value2, - global::tryAGI.OpenAI.ResponseFormatJsonObject? value3, - global::tryAGI.OpenAI.ResponseFormatJsonSchema? value4 + global::tryAGI.OpenAI.ResponseFormatText? text, + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject, + global::tryAGI.OpenAI.ResponseFormatJsonSchema? jsonSchema ) { Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; + Text = text; + JsonObject = jsonObject; + JsonSchema = jsonSchema; } /// /// /// public object? Object => - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? + JsonSchema as object ?? + JsonObject as object ?? + Text as object ?? Value1 as object ; @@ -187,9 +186,9 @@ Value1 as object /// public override string? ToString() => Value1?.ToValueString() ?? - Value2?.ToString() ?? - Value3?.ToString() ?? - Value4?.ToString() + Text?.ToString() ?? + JsonObject?.ToString() ?? + JsonSchema?.ToString() ; /// @@ -197,7 +196,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3 || IsValue4; + return IsValue1 && !IsText && !IsJsonObject && !IsJsonSchema || !IsValue1 && IsText && !IsJsonObject && !IsJsonSchema || !IsValue1 && !IsText && IsJsonObject && !IsJsonSchema || !IsValue1 && !IsText && !IsJsonObject && IsJsonSchema; } /// @@ -205,9 +204,9 @@ public bool Validate() /// 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? text = null, + global::System.Func? jsonObject = null, + global::System.Func? jsonSchema = null, bool validate = true) { if (validate) @@ -219,17 +218,17 @@ public bool Validate() { return value1(Value1!); } - else if (IsValue2 && value2 != null) + else if (IsText && text != null) { - return value2(Value2!); + return text(Text!); } - else if (IsValue3 && value3 != null) + else if (IsJsonObject && jsonObject != null) { - return value3(Value3!); + return jsonObject(JsonObject!); } - else if (IsValue4 && value4 != null) + else if (IsJsonSchema && jsonSchema != null) { - return value4(Value4!); + return jsonSchema(JsonSchema!); } return default(TResult); @@ -240,9 +239,9 @@ public bool Validate() ///
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? text = null, + global::System.Action? jsonObject = null, + global::System.Action? jsonSchema = null, bool validate = true) { if (validate) @@ -254,17 +253,17 @@ public void Match( { value1?.Invoke(Value1!); } - else if (IsValue2) + else if (IsText) { - value2?.Invoke(Value2!); + text?.Invoke(Text!); } - else if (IsValue3) + else if (IsJsonObject) { - value3?.Invoke(Value3!); + jsonObject?.Invoke(JsonObject!); } - else if (IsValue4) + else if (IsJsonSchema) { - value4?.Invoke(Value4!); + jsonSchema?.Invoke(JsonSchema!); } } @@ -277,11 +276,11 @@ public override int GetHashCode() { Value1, typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), - Value2, + Text, typeof(global::tryAGI.OpenAI.ResponseFormatText), - Value3, + JsonObject, typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), - Value4, + JsonSchema, typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), }; const int offset = unchecked((int)2166136261); @@ -300,9 +299,9 @@ public bool Equals(AssistantsApiResponseFormatOption 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(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonSchema, other.JsonSchema) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiToolChoiceOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiToolChoiceOption.g.cs index b5ae7ea6..d1076300 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiToolChoiceOption.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsApiToolChoiceOption.g.cs @@ -30,6 +30,22 @@ namespace tryAGI.OpenAI #endif public bool IsValue1 => Value1 != null; + /// + /// Specifies a tool the model should use. Use to force the model to call a specific tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// @@ -48,23 +64,6 @@ public AssistantsApiToolChoiceOption(global::tryAGI.OpenAI.AssistantsApiToolChoi Value1 = value; } - /// - /// Specifies a tool the model should use. Use to force the model to call a specific tool. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.AssistantsNamedToolChoice? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - /// /// /// @@ -116,7 +115,7 @@ Value1 as object ///
public bool Validate() { - return IsValue1 || IsValue2; + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsNamedToolChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsNamedToolChoice.g.cs index a4dd6774..03767b89 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsNamedToolChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AssistantsNamedToolChoice.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class AssistantsNamedToolChoice { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - public global::tryAGI.OpenAI.AssistantsNamedToolChoiceFunction? Function { get; set; } - /// /// The type of the tool. If type is `function`, the function name must be set /// @@ -22,6 +16,12 @@ public sealed partial class AssistantsNamedToolChoice [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.AssistantsNamedToolChoiceType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::tryAGI.OpenAI.AssistantsNamedToolChoiceFunction? Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class AssistantsNamedToolChoice /// /// Initializes a new instance of the class. /// - /// /// /// The type of the tool. If type is `function`, the function name must be set /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.Json.g.cs new file mode 100644 index 00000000..2295259f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Attachment + { + /// + /// 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::tryAGI.OpenAI.Attachment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Attachment), + jsonSerializerContext) as global::tryAGI.OpenAI.Attachment; + } + + /// + /// 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::tryAGI.OpenAI.Attachment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Attachment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Attachment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.g.cs new file mode 100644 index 00000000..66b5bbe1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Attachment.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Attachment metadata included on thread items. + /// + public sealed partial class Attachment + { + /// + /// Attachment discriminator. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AttachmentTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AttachmentType Type { get; set; } + + /// + /// Identifier for the attachment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Original display name for the attachment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// MIME type of the attachment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mime_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string MimeType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("preview_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? PreviewUrl { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Attachment discriminator. + /// + /// + /// Identifier for the attachment. + /// + /// + /// Original display name for the attachment. + /// + /// + /// MIME type of the attachment. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Attachment( + global::tryAGI.OpenAI.AttachmentType type, + string id, + string name, + string mimeType, + string? previewUrl) + { + this.Type = type; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); + this.PreviewUrl = previewUrl ?? throw new global::System.ArgumentNullException(nameof(previewUrl)); + } + + /// + /// Initializes a new instance of the class. + /// + public Attachment() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.Json.g.cs new file mode 100644 index 00000000..8493df7a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AttachmentPreviewUrl + { + /// + /// 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::tryAGI.OpenAI.AttachmentPreviewUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AttachmentPreviewUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.AttachmentPreviewUrl; + } + + /// + /// 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::tryAGI.OpenAI.AttachmentPreviewUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AttachmentPreviewUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AttachmentPreviewUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.g.cs new file mode 100644 index 00000000..71d050e1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentPreviewUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AttachmentPreviewUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentType.g.cs new file mode 100644 index 00000000..9b3a939b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AttachmentType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum AttachmentType + { + /// + /// + /// + Image, + /// + /// + /// + File, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AttachmentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AttachmentType value) + { + return value switch + { + AttachmentType.Image => "image", + AttachmentType.File => "file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AttachmentType? ToEnum(string value) + { + return value switch + { + "image" => AttachmentType.Image, + "file" => AttachmentType.File, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioResponseFormat.g.cs index 42276db9..32c101fa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioResponseFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioResponseFormat.g.cs @@ -4,31 +4,35 @@ namespace tryAGI.OpenAI { /// - /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
+ /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// Default Value: json ///
public enum AudioResponseFormat { /// - /// `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. /// Json, /// - /// `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. /// Text, /// - /// `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. /// Srt, /// - /// `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. /// VerboseJson, /// - /// `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. /// Vtt, + /// + /// `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations. + /// + DiarizedJson, } /// @@ -48,6 +52,7 @@ public static string ToValueString(this AudioResponseFormat value) AudioResponseFormat.Srt => "srt", AudioResponseFormat.VerboseJson => "verbose_json", AudioResponseFormat.Vtt => "vtt", + AudioResponseFormat.DiarizedJson => "diarized_json", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -63,6 +68,7 @@ public static string ToValueString(this AudioResponseFormat value) "srt" => AudioResponseFormat.Srt, "verbose_json" => AudioResponseFormat.VerboseJson, "vtt" => AudioResponseFormat.Vtt, + "diarized_json" => AudioResponseFormat.DiarizedJson, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscription.g.cs index ced04cc9..61b49e04 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscription.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscription.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,6 +10,13 @@ namespace tryAGI.OpenAI /// public sealed partial class AudioTranscription { + /// + /// The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + /// /// The language of the input audio. Supplying the input language in
/// [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format
@@ -16,18 +25,11 @@ public sealed partial class AudioTranscription [global::System.Text.Json.Serialization.JsonPropertyName("language")] public string? Language { get; set; } - /// - /// The model to use for transcription. Current options are `whisper-1`, `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AudioTranscriptionModelJsonConverter))] - public global::tryAGI.OpenAI.AudioTranscriptionModel? Model { get; set; } - /// /// An optional text to guide the model's style or continue a previous audio
/// segment.
- /// For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
- /// For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". + /// For `whisper-1`, the [prompt is a list of keywords](/docs/guides/speech-to-text#prompting).
+ /// For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". ///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")] public string? Prompt { get; set; } @@ -41,30 +43,30 @@ public sealed partial class AudioTranscription /// /// Initializes a new instance of the class. /// + /// + /// The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels. + /// /// /// The language of the input audio. Supplying the input language in
/// [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format
/// will improve accuracy and latency. /// - /// - /// The model to use for transcription. Current options are `whisper-1`, `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`. - /// /// /// An optional text to guide the model's style or continue a previous audio
/// segment.
- /// For `whisper-1`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
- /// For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words related to technology". + /// For `whisper-1`, the [prompt is a list of keywords](/docs/guides/speech-to-text#prompting).
+ /// For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology". /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AudioTranscription( + global::tryAGI.OpenAI.AnyOf? model, string? language, - global::tryAGI.OpenAI.AudioTranscriptionModel? model, string? prompt) { - this.Language = language; this.Model = model; + this.Language = language; this.Prompt = prompt; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscriptionModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscriptionModel.g.cs index d8e8fe16..f6774427 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscriptionModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AudioTranscriptionModel.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The model to use for transcription. Current options are `whisper-1`, `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`. + /// /// public enum AudioTranscriptionModel { @@ -15,15 +15,19 @@ public enum AudioTranscriptionModel /// /// /// - Gpt4oTranscribeLatest, + Gpt4oMiniTranscribe, /// /// /// - Gpt4oMiniTranscribe, + Gpt4oMiniTranscribe20251215, /// /// /// Gpt4oTranscribe, + /// + /// + /// + Gpt4oTranscribeDiarize, } /// @@ -39,9 +43,10 @@ public static string ToValueString(this AudioTranscriptionModel value) return value switch { AudioTranscriptionModel.Whisper1 => "whisper-1", - AudioTranscriptionModel.Gpt4oTranscribeLatest => "gpt-4o-transcribe-latest", AudioTranscriptionModel.Gpt4oMiniTranscribe => "gpt-4o-mini-transcribe", + AudioTranscriptionModel.Gpt4oMiniTranscribe20251215 => "gpt-4o-mini-transcribe-2025-12-15", AudioTranscriptionModel.Gpt4oTranscribe => "gpt-4o-transcribe", + AudioTranscriptionModel.Gpt4oTranscribeDiarize => "gpt-4o-transcribe-diarize", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -53,9 +58,10 @@ public static string ToValueString(this AudioTranscriptionModel value) return value switch { "whisper-1" => AudioTranscriptionModel.Whisper1, - "gpt-4o-transcribe-latest" => AudioTranscriptionModel.Gpt4oTranscribeLatest, "gpt-4o-mini-transcribe" => AudioTranscriptionModel.Gpt4oMiniTranscribe, + "gpt-4o-mini-transcribe-2025-12-15" => AudioTranscriptionModel.Gpt4oMiniTranscribe20251215, "gpt-4o-transcribe" => AudioTranscriptionModel.Gpt4oTranscribe, + "gpt-4o-transcribe-diarize" => AudioTranscriptionModel.Gpt4oTranscribeDiarize, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLog.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLog.g.cs index 572dae3c..f2b1edfe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLog.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLog.g.cs @@ -8,6 +8,35 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLog { + /// + /// The ID of this log. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The event type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogEventTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AuditLogEventType Type { get; set; } + + /// + /// The Unix timestamp (in seconds) of the event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("effective_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset EffectiveAt { get; set; } + + /// + /// The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project")] + public global::tryAGI.OpenAI.AuditLogProject? Project { get; set; } + /// /// The actor who performed the audit logged action. /// @@ -21,6 +50,12 @@ public sealed partial class AuditLog [global::System.Text.Json.Serialization.JsonPropertyName("api_key.created")] public global::tryAGI.OpenAI.AuditLogApiKeyCreated? ApiKeyCreated { get; set; } + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key.updated")] + public global::tryAGI.OpenAI.AuditLogApiKeyUpdated? ApiKeyUpdated { get; set; } + /// /// The details for events with this `type`. /// @@ -28,67 +63,64 @@ public sealed partial class AuditLog public global::tryAGI.OpenAI.AuditLogApiKeyDeleted? ApiKeyDeleted { get; set; } /// - /// The details for events with this `type`. + /// The project and fine-tuned model checkpoint that the checkpoint permission was created for. /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key.updated")] - public global::tryAGI.OpenAI.AuditLogApiKeyUpdated? ApiKeyUpdated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("checkpoint.permission.created")] + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreated? CheckpointPermissionCreated { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificate.created")] - public global::tryAGI.OpenAI.AuditLogCertificateCreated? CertificateCreated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("checkpoint.permission.deleted")] + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionDeleted? CheckpointPermissionDeleted { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificate.deleted")] - public global::tryAGI.OpenAI.AuditLogCertificateDeleted? CertificateDeleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("external_key.registered")] + public global::tryAGI.OpenAI.AuditLogExternalKeyRegistered? ExternalKeyRegistered { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificate.updated")] - public global::tryAGI.OpenAI.AuditLogCertificateUpdated? CertificateUpdated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("external_key.removed")] + public global::tryAGI.OpenAI.AuditLogExternalKeyRemoved? ExternalKeyRemoved { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificates.activated")] - public global::tryAGI.OpenAI.AuditLogCertificatesActivated? CertificatesActivated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("group.created")] + public global::tryAGI.OpenAI.AuditLogGroupCreated? GroupCreated { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificates.deactivated")] - public global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? CertificatesDeactivated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("group.updated")] + public global::tryAGI.OpenAI.AuditLogGroupUpdated? GroupUpdated { get; set; } /// - /// The project and fine-tuned model checkpoint that the checkpoint permission was created for. + /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("checkpoint_permission.created")] - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreated? CheckpointPermissionCreated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("group.deleted")] + public global::tryAGI.OpenAI.AuditLogGroupDeleted? GroupDeleted { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("checkpoint_permission.deleted")] - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionDeleted? CheckpointPermissionDeleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("scim.enabled")] + public global::tryAGI.OpenAI.AuditLogScimEnabled? ScimEnabled { get; set; } /// - /// The Unix timestamp (in seconds) of the event. + /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("effective_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset EffectiveAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("scim.disabled")] + public global::tryAGI.OpenAI.AuditLogScimDisabled? ScimDisabled { get; set; } /// - /// The ID of this log. + /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("invite.sent")] + public global::tryAGI.OpenAI.AuditLogInviteSent? InviteSent { get; set; } /// /// The details for events with this `type`. @@ -105,8 +137,38 @@ public sealed partial class AuditLog /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("invite.sent")] - public global::tryAGI.OpenAI.AuditLogInviteSent? InviteSent { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("ip_allowlist.created")] + public global::tryAGI.OpenAI.AuditLogIpAllowlistCreated? IpAllowlistCreated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ip_allowlist.updated")] + public global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated? IpAllowlistUpdated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ip_allowlist.deleted")] + public global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted? IpAllowlistDeleted { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ip_allowlist.config.activated")] + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated? IpAllowlistConfigActivated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ip_allowlist.config.deactivated")] + public global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated? IpAllowlistConfigDeactivated { get; set; } + + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("login.succeeded")] + public object? LoginSucceeded { get; set; } /// /// The details for events with this `type`. @@ -114,6 +176,12 @@ public sealed partial class AuditLog [global::System.Text.Json.Serialization.JsonPropertyName("login.failed")] public global::tryAGI.OpenAI.AuditLogLoginFailed? LoginFailed { get; set; } + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logout.succeeded")] + public object? LogoutSucceeded { get; set; } + /// /// The details for events with this `type`. /// @@ -127,10 +195,16 @@ public sealed partial class AuditLog public global::tryAGI.OpenAI.AuditLogOrganizationUpdated? OrganizationUpdated { get; set; } /// - /// The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. + /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("project")] - public global::tryAGI.OpenAI.AuditLogProject? Project { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("project.created")] + public global::tryAGI.OpenAI.AuditLogProjectCreated? ProjectCreated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project.updated")] + public global::tryAGI.OpenAI.AuditLogProjectUpdated? ProjectUpdated { get; set; } /// /// The details for events with this `type`. @@ -141,14 +215,14 @@ public sealed partial class AuditLog /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("project.created")] - public global::tryAGI.OpenAI.AuditLogProjectCreated? ProjectCreated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("project.deleted")] + public global::tryAGI.OpenAI.AuditLogProjectDeleted? ProjectDeleted { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("project.updated")] - public global::tryAGI.OpenAI.AuditLogProjectUpdated? ProjectUpdated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limit.updated")] + public global::tryAGI.OpenAI.AuditLogRateLimitUpdated? RateLimitUpdated { get; set; } /// /// The details for events with this `type`. @@ -159,20 +233,38 @@ public sealed partial class AuditLog /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("rate_limit.updated")] - public global::tryAGI.OpenAI.AuditLogRateLimitUpdated? RateLimitUpdated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role.created")] + public global::tryAGI.OpenAI.AuditLogRoleCreated? RoleCreated { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("service_account.created")] - public global::tryAGI.OpenAI.AuditLogServiceAccountCreated? ServiceAccountCreated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role.updated")] + public global::tryAGI.OpenAI.AuditLogRoleUpdated? RoleUpdated { get; set; } /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("service_account.deleted")] - public global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? ServiceAccountDeleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role.deleted")] + public global::tryAGI.OpenAI.AuditLogRoleDeleted? RoleDeleted { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role.assignment.created")] + public global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated? RoleAssignmentCreated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role.assignment.deleted")] + public global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted? RoleAssignmentDeleted { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_account.created")] + public global::tryAGI.OpenAI.AuditLogServiceAccountCreated? ServiceAccountCreated { get; set; } /// /// The details for events with this `type`. @@ -181,12 +273,10 @@ public sealed partial class AuditLog public global::tryAGI.OpenAI.AuditLogServiceAccountUpdated? ServiceAccountUpdated { get; set; } /// - /// The event type. + /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogEventTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AuditLogEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("service_account.deleted")] + public global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? ServiceAccountDeleted { get; set; } /// /// The details for events with this `type`. @@ -194,6 +284,12 @@ public sealed partial class AuditLog [global::System.Text.Json.Serialization.JsonPropertyName("user.added")] public global::tryAGI.OpenAI.AuditLogUserAdded? UserAdded { get; set; } + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user.updated")] + public global::tryAGI.OpenAI.AuditLogUserUpdated? UserUpdated { get; set; } + /// /// The details for events with this `type`. /// @@ -203,8 +299,32 @@ public sealed partial class AuditLog /// /// The details for events with this `type`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("user.updated")] - public global::tryAGI.OpenAI.AuditLogUserUpdated? UserUpdated { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("certificate.created")] + public global::tryAGI.OpenAI.AuditLogCertificateCreated? CertificateCreated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificate.updated")] + public global::tryAGI.OpenAI.AuditLogCertificateUpdated? CertificateUpdated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificate.deleted")] + public global::tryAGI.OpenAI.AuditLogCertificateDeleted? CertificateDeleted { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificates.activated")] + public global::tryAGI.OpenAI.AuditLogCertificatesActivated? CertificatesActivated { get; set; } + + /// + /// The details for events with this `type`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificates.deactivated")] + public global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? CertificatesDeactivated { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -215,44 +335,59 @@ public sealed partial class AuditLog /// /// Initializes a new instance of the class. /// + /// + /// The ID of this log. + /// + /// + /// The event type. + /// + /// + /// The Unix timestamp (in seconds) of the event. + /// + /// + /// The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. + /// /// /// The actor who performed the audit logged action. /// /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// + /// The project and fine-tuned model checkpoint that the checkpoint permission was created for. + /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// - /// The project and fine-tuned model checkpoint that the checkpoint permission was created for. + /// + /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// - /// The Unix timestamp (in seconds) of the event. + /// + /// The details for events with this `type`. /// - /// - /// The ID of this log. + /// + /// The details for events with this `type`. /// /// /// The details for events with this `type`. @@ -260,126 +395,211 @@ public sealed partial class AuditLog /// /// The details for events with this `type`. /// - /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// /// The details for events with this `type`. /// + /// + /// The details for events with this `type`. + /// + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// /// /// The details for events with this `type`. /// + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// /// /// The details for events with this `type`. /// /// /// The details for events with this `type`. /// - /// - /// The project that the action was scoped to. Absent for actions not scoped to projects. Note that any admin actions taken via Admin API keys are associated with the default project. + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. /// /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// /// The details for events with this `type`. /// - /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// /// The details for events with this `type`. /// /// /// The details for events with this `type`. /// - /// - /// The event type. + /// + /// The details for events with this `type`. /// /// /// The details for events with this `type`. /// + /// + /// The details for events with this `type`. + /// /// /// The details for events with this `type`. /// - /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// + /// The details for events with this `type`. + /// + /// /// The details for events with this `type`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLog( - global::tryAGI.OpenAI.AuditLogActor actor, - global::System.DateTimeOffset effectiveAt, string id, global::tryAGI.OpenAI.AuditLogEventType type, + global::System.DateTimeOffset effectiveAt, + global::tryAGI.OpenAI.AuditLogActor actor, + global::tryAGI.OpenAI.AuditLogProject? project, global::tryAGI.OpenAI.AuditLogApiKeyCreated? apiKeyCreated, - global::tryAGI.OpenAI.AuditLogApiKeyDeleted? apiKeyDeleted, global::tryAGI.OpenAI.AuditLogApiKeyUpdated? apiKeyUpdated, - global::tryAGI.OpenAI.AuditLogCertificateCreated? certificateCreated, - global::tryAGI.OpenAI.AuditLogCertificateDeleted? certificateDeleted, - global::tryAGI.OpenAI.AuditLogCertificateUpdated? certificateUpdated, - global::tryAGI.OpenAI.AuditLogCertificatesActivated? certificatesActivated, - global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? certificatesDeactivated, + global::tryAGI.OpenAI.AuditLogApiKeyDeleted? apiKeyDeleted, global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreated? checkpointPermissionCreated, global::tryAGI.OpenAI.AuditLogCheckpointPermissionDeleted? checkpointPermissionDeleted, + global::tryAGI.OpenAI.AuditLogExternalKeyRegistered? externalKeyRegistered, + global::tryAGI.OpenAI.AuditLogExternalKeyRemoved? externalKeyRemoved, + global::tryAGI.OpenAI.AuditLogGroupCreated? groupCreated, + global::tryAGI.OpenAI.AuditLogGroupUpdated? groupUpdated, + global::tryAGI.OpenAI.AuditLogGroupDeleted? groupDeleted, + global::tryAGI.OpenAI.AuditLogScimEnabled? scimEnabled, + global::tryAGI.OpenAI.AuditLogScimDisabled? scimDisabled, + global::tryAGI.OpenAI.AuditLogInviteSent? inviteSent, global::tryAGI.OpenAI.AuditLogInviteAccepted? inviteAccepted, global::tryAGI.OpenAI.AuditLogInviteDeleted? inviteDeleted, - global::tryAGI.OpenAI.AuditLogInviteSent? inviteSent, + global::tryAGI.OpenAI.AuditLogIpAllowlistCreated? ipAllowlistCreated, + global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated? ipAllowlistUpdated, + global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted? ipAllowlistDeleted, + global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated? ipAllowlistConfigActivated, + global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated? ipAllowlistConfigDeactivated, + object? loginSucceeded, global::tryAGI.OpenAI.AuditLogLoginFailed? loginFailed, + object? logoutSucceeded, global::tryAGI.OpenAI.AuditLogLogoutFailed? logoutFailed, global::tryAGI.OpenAI.AuditLogOrganizationUpdated? organizationUpdated, - global::tryAGI.OpenAI.AuditLogProject? project, - global::tryAGI.OpenAI.AuditLogProjectArchived? projectArchived, global::tryAGI.OpenAI.AuditLogProjectCreated? projectCreated, global::tryAGI.OpenAI.AuditLogProjectUpdated? projectUpdated, - global::tryAGI.OpenAI.AuditLogRateLimitDeleted? rateLimitDeleted, + global::tryAGI.OpenAI.AuditLogProjectArchived? projectArchived, + global::tryAGI.OpenAI.AuditLogProjectDeleted? projectDeleted, global::tryAGI.OpenAI.AuditLogRateLimitUpdated? rateLimitUpdated, + global::tryAGI.OpenAI.AuditLogRateLimitDeleted? rateLimitDeleted, + global::tryAGI.OpenAI.AuditLogRoleCreated? roleCreated, + global::tryAGI.OpenAI.AuditLogRoleUpdated? roleUpdated, + global::tryAGI.OpenAI.AuditLogRoleDeleted? roleDeleted, + global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated? roleAssignmentCreated, + global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted? roleAssignmentDeleted, global::tryAGI.OpenAI.AuditLogServiceAccountCreated? serviceAccountCreated, - global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? serviceAccountDeleted, global::tryAGI.OpenAI.AuditLogServiceAccountUpdated? serviceAccountUpdated, + global::tryAGI.OpenAI.AuditLogServiceAccountDeleted? serviceAccountDeleted, global::tryAGI.OpenAI.AuditLogUserAdded? userAdded, + global::tryAGI.OpenAI.AuditLogUserUpdated? userUpdated, global::tryAGI.OpenAI.AuditLogUserDeleted? userDeleted, - global::tryAGI.OpenAI.AuditLogUserUpdated? userUpdated) + global::tryAGI.OpenAI.AuditLogCertificateCreated? certificateCreated, + global::tryAGI.OpenAI.AuditLogCertificateUpdated? certificateUpdated, + global::tryAGI.OpenAI.AuditLogCertificateDeleted? certificateDeleted, + global::tryAGI.OpenAI.AuditLogCertificatesActivated? certificatesActivated, + global::tryAGI.OpenAI.AuditLogCertificatesDeactivated? certificatesDeactivated) { - this.Actor = actor ?? throw new global::System.ArgumentNullException(nameof(actor)); - this.EffectiveAt = effectiveAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Type = type; + this.EffectiveAt = effectiveAt; + this.Actor = actor ?? throw new global::System.ArgumentNullException(nameof(actor)); + this.Project = project; this.ApiKeyCreated = apiKeyCreated; - this.ApiKeyDeleted = apiKeyDeleted; this.ApiKeyUpdated = apiKeyUpdated; - this.CertificateCreated = certificateCreated; - this.CertificateDeleted = certificateDeleted; - this.CertificateUpdated = certificateUpdated; - this.CertificatesActivated = certificatesActivated; - this.CertificatesDeactivated = certificatesDeactivated; + this.ApiKeyDeleted = apiKeyDeleted; this.CheckpointPermissionCreated = checkpointPermissionCreated; this.CheckpointPermissionDeleted = checkpointPermissionDeleted; + this.ExternalKeyRegistered = externalKeyRegistered; + this.ExternalKeyRemoved = externalKeyRemoved; + this.GroupCreated = groupCreated; + this.GroupUpdated = groupUpdated; + this.GroupDeleted = groupDeleted; + this.ScimEnabled = scimEnabled; + this.ScimDisabled = scimDisabled; + this.InviteSent = inviteSent; this.InviteAccepted = inviteAccepted; this.InviteDeleted = inviteDeleted; - this.InviteSent = inviteSent; + this.IpAllowlistCreated = ipAllowlistCreated; + this.IpAllowlistUpdated = ipAllowlistUpdated; + this.IpAllowlistDeleted = ipAllowlistDeleted; + this.IpAllowlistConfigActivated = ipAllowlistConfigActivated; + this.IpAllowlistConfigDeactivated = ipAllowlistConfigDeactivated; + this.LoginSucceeded = loginSucceeded; this.LoginFailed = loginFailed; + this.LogoutSucceeded = logoutSucceeded; this.LogoutFailed = logoutFailed; this.OrganizationUpdated = organizationUpdated; - this.Project = project; - this.ProjectArchived = projectArchived; this.ProjectCreated = projectCreated; this.ProjectUpdated = projectUpdated; - this.RateLimitDeleted = rateLimitDeleted; + this.ProjectArchived = projectArchived; + this.ProjectDeleted = projectDeleted; this.RateLimitUpdated = rateLimitUpdated; + this.RateLimitDeleted = rateLimitDeleted; + this.RoleCreated = roleCreated; + this.RoleUpdated = roleUpdated; + this.RoleDeleted = roleDeleted; + this.RoleAssignmentCreated = roleAssignmentCreated; + this.RoleAssignmentDeleted = roleAssignmentDeleted; this.ServiceAccountCreated = serviceAccountCreated; - this.ServiceAccountDeleted = serviceAccountDeleted; this.ServiceAccountUpdated = serviceAccountUpdated; + this.ServiceAccountDeleted = serviceAccountDeleted; this.UserAdded = userAdded; - this.UserDeleted = userDeleted; this.UserUpdated = userUpdated; + this.UserDeleted = userDeleted; + this.CertificateCreated = certificateCreated; + this.CertificateUpdated = certificateUpdated; + this.CertificateDeleted = certificateDeleted; + this.CertificatesActivated = certificatesActivated; + this.CertificatesDeactivated = certificatesDeactivated; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActor.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActor.g.cs index 25e7d955..d32b744d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActor.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActor.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class AuditLogActor { /// - /// The API Key used to perform the audit logged action. + /// The type of actor. Is either `session` or `api_key`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] - public global::tryAGI.OpenAI.AuditLogActorApiKey? ApiKey { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeJsonConverter))] + public global::tryAGI.OpenAI.AuditLogActorType? Type { get; set; } /// /// The session in which the audit logged action was performed. @@ -21,11 +22,10 @@ public sealed partial class AuditLogActor public global::tryAGI.OpenAI.AuditLogActorSession? Session { get; set; } /// - /// The type of actor. Is either `session` or `api_key`. + /// The API Key used to perform the audit logged action. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AuditLogActorTypeJsonConverter))] - public global::tryAGI.OpenAI.AuditLogActorType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] + public global::tryAGI.OpenAI.AuditLogActorApiKey? ApiKey { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -36,26 +36,26 @@ public sealed partial class AuditLogActor /// /// Initializes a new instance of the class. /// - /// - /// The API Key used to perform the audit logged action. + /// + /// The type of actor. Is either `session` or `api_key`. /// /// /// The session in which the audit logged action was performed. /// - /// - /// The type of actor. Is either `session` or `api_key`. + /// + /// The API Key used to perform the audit logged action. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogActor( - global::tryAGI.OpenAI.AuditLogActorApiKey? apiKey, + global::tryAGI.OpenAI.AuditLogActorType? type, global::tryAGI.OpenAI.AuditLogActorSession? session, - global::tryAGI.OpenAI.AuditLogActorType? type) + global::tryAGI.OpenAI.AuditLogActorApiKey? apiKey) { - this.ApiKey = apiKey; - this.Session = session; this.Type = type; + this.Session = session; + this.ApiKey = apiKey; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorApiKey.g.cs index ec094ff6..5de5cc79 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorApiKey.g.cs @@ -14,12 +14,6 @@ public sealed partial class AuditLogActorApiKey [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// The service account that performed the audit logged action. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("service_account")] - public global::tryAGI.OpenAI.AuditLogActorServiceAccount? ServiceAccount { get; set; } - /// /// The type of API key. Can be either `user` or `service_account`. /// @@ -33,6 +27,12 @@ public sealed partial class AuditLogActorApiKey [global::System.Text.Json.Serialization.JsonPropertyName("user")] public global::tryAGI.OpenAI.AuditLogActorUser? User { get; set; } + /// + /// The service account that performed the audit logged action. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_account")] + public global::tryAGI.OpenAI.AuditLogActorServiceAccount? ServiceAccount { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,28 +45,28 @@ public sealed partial class AuditLogActorApiKey /// /// The tracking id of the API key. /// - /// - /// The service account that performed the audit logged action. - /// /// /// The type of API key. Can be either `user` or `service_account`. /// /// /// The user who performed the audit logged action. /// + /// + /// The service account that performed the audit logged action. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogActorApiKey( string? id, - global::tryAGI.OpenAI.AuditLogActorServiceAccount? serviceAccount, global::tryAGI.OpenAI.AuditLogActorApiKeyType? type, - global::tryAGI.OpenAI.AuditLogActorUser? user) + global::tryAGI.OpenAI.AuditLogActorUser? user, + global::tryAGI.OpenAI.AuditLogActorServiceAccount? serviceAccount) { this.Id = id; - this.ServiceAccount = serviceAccount; this.Type = type; this.User = user; + this.ServiceAccount = serviceAccount; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorSession.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorSession.g.cs index 1fc4836f..4aaa55a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorSession.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorSession.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogActorSession { - /// - /// The IP address from which the action was performed. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("ip_address")] - public string? IpAddress { get; set; } - /// /// The user who performed the audit logged action. /// [global::System.Text.Json.Serialization.JsonPropertyName("user")] public global::tryAGI.OpenAI.AuditLogActorUser? User { get; set; } + /// + /// The IP address from which the action was performed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ip_address")] + public string? IpAddress { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogActorSession /// /// Initializes a new instance of the class. /// - /// - /// The IP address from which the action was performed. - /// /// /// The user who performed the audit logged action. /// + /// + /// The IP address from which the action was performed. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogActorSession( - string? ipAddress, - global::tryAGI.OpenAI.AuditLogActorUser? user) + global::tryAGI.OpenAI.AuditLogActorUser? user, + string? ipAddress) { - this.IpAddress = ipAddress; this.User = user; + this.IpAddress = ipAddress; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorUser.g.cs index 57984a8f..87a47f64 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogActorUser.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogActorUser { - /// - /// The user email. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - public string? Email { get; set; } - /// /// The user id. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The user email. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("email")] + public string? Email { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogActorUser /// /// Initializes a new instance of the class. /// - /// - /// The user email. - /// /// /// The user id. /// + /// + /// The user email. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogActorUser( - string? email, - string? id) + string? id, + string? email) { - this.Email = email; this.Id = id; + this.Email = email; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyCreated.g.cs index a6adb585..04c8dec7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyCreated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogApiKeyCreated { - /// - /// The payload used to create the API key. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? Data { get; set; } - /// /// The tracking ID of the API key. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to create the API key. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogApiKeyCreated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to create the API key. - /// /// /// The tracking ID of the API key. /// + /// + /// The payload used to create the API key. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogApiKeyCreated( - global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogApiKeyCreatedData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyUpdated.g.cs index 936c8d69..14afbb87 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogApiKeyUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogApiKeyUpdated { - /// - /// The payload used to update the API key. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The tracking ID of the API key. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to update the API key. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogApiKeyUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to update the API key. - /// /// /// The tracking ID of the API key. /// + /// + /// The payload used to update the API key. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogApiKeyUpdated( - global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogApiKeyUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCertificateDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCertificateDeleted.g.cs index 7827eaf9..a083ec93 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCertificateDeleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCertificateDeleted.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogCertificateDeleted { - /// - /// The certificate content in PEM format. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificate")] - public string? Certificate { get; set; } - /// /// The certificate ID. /// @@ -26,6 +20,12 @@ public sealed partial class AuditLogCertificateDeleted [global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } + /// + /// The certificate content in PEM format. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificate")] + public string? Certificate { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -35,26 +35,26 @@ public sealed partial class AuditLogCertificateDeleted /// /// Initializes a new instance of the class. /// - /// - /// The certificate content in PEM format. - /// /// /// The certificate ID. /// /// /// The name of the certificate. /// + /// + /// The certificate content in PEM format. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogCertificateDeleted( - string? certificate, string? id, - string? name) + string? name, + string? certificate) { - this.Certificate = certificate; this.Id = id; this.Name = name; + this.Certificate = certificate; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreated.g.cs index 742743c9..746a0b6d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogCheckpointPermissionCreated { - /// - /// The payload used to create the checkpoint permission. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? Data { get; set; } - /// /// The ID of the checkpoint permission. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to create the checkpoint permission. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogCheckpointPermissionCreated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to create the checkpoint permission. - /// /// /// The ID of the checkpoint permission. /// + /// + /// The payload used to create the checkpoint permission. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogCheckpointPermissionCreated( - global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogCheckpointPermissionCreatedData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreatedData.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreatedData.g.cs index d44b5c74..db085857 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreatedData.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogCheckpointPermissionCreatedData.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogCheckpointPermissionCreatedData { - /// - /// The ID of the fine-tuned model checkpoint. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fine_tuned_model_checkpoint")] - public string? FineTunedModelCheckpoint { get; set; } - /// /// The ID of the project that the checkpoint permission was created for. /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } + /// + /// The ID of the fine-tuned model checkpoint. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fine_tuned_model_checkpoint")] + public string? FineTunedModelCheckpoint { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogCheckpointPermissionCreatedData /// /// Initializes a new instance of the class. /// - /// - /// The ID of the fine-tuned model checkpoint. - /// /// /// The ID of the project that the checkpoint permission was created for. /// + /// + /// The ID of the fine-tuned model checkpoint. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogCheckpointPermissionCreatedData( - string? fineTunedModelCheckpoint, - string? projectId) + string? projectId, + string? fineTunedModelCheckpoint) { - this.FineTunedModelCheckpoint = fineTunedModelCheckpoint; this.ProjectId = projectId; + this.FineTunedModelCheckpoint = fineTunedModelCheckpoint; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogEventType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogEventType.g.cs index d8d6995c..db3cda75 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogEventType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogEventType.g.cs @@ -23,6 +23,26 @@ public enum AuditLogEventType /// /// /// + CertificateCreated, + /// + /// + /// + CertificateUpdated, + /// + /// + /// + CertificateDeleted, + /// + /// + /// + CertificatesActivated, + /// + /// + /// + CertificatesDeactivated, + /// + /// + /// CheckpointPermissionCreated, /// /// @@ -31,6 +51,26 @@ public enum AuditLogEventType /// /// /// + ExternalKeyRegistered, + /// + /// + /// + ExternalKeyRemoved, + /// + /// + /// + GroupCreated, + /// + /// + /// + GroupUpdated, + /// + /// + /// + GroupDeleted, + /// + /// + /// InviteSent, /// /// @@ -43,6 +83,26 @@ public enum AuditLogEventType /// /// /// + IpAllowlistCreated, + /// + /// + /// + IpAllowlistUpdated, + /// + /// + /// + IpAllowlistDeleted, + /// + /// + /// + IpAllowlistConfigActivated, + /// + /// + /// + IpAllowlistConfigDeactivated, + /// + /// + /// LoginSucceeded, /// /// @@ -75,23 +135,71 @@ public enum AuditLogEventType /// /// /// - ServiceAccountCreated, + ProjectDeleted, /// /// /// - ServiceAccountUpdated, + RateLimitUpdated, /// /// /// - ServiceAccountDeleted, + RateLimitDeleted, /// /// /// - RateLimitUpdated, + ResourceDeleted, /// /// /// - RateLimitDeleted, + TunnelCreated, + /// + /// + /// + TunnelUpdated, + /// + /// + /// + TunnelDeleted, + /// + /// + /// + RoleCreated, + /// + /// + /// + RoleUpdated, + /// + /// + /// + RoleDeleted, + /// + /// + /// + RoleAssignmentCreated, + /// + /// + /// + RoleAssignmentDeleted, + /// + /// + /// + ScimEnabled, + /// + /// + /// + ScimDisabled, + /// + /// + /// + ServiceAccountCreated, + /// + /// + /// + ServiceAccountUpdated, + /// + /// + /// + ServiceAccountDeleted, /// /// /// @@ -121,11 +229,26 @@ public static string ToValueString(this AuditLogEventType value) AuditLogEventType.ApiKeyCreated => "api_key.created", AuditLogEventType.ApiKeyUpdated => "api_key.updated", AuditLogEventType.ApiKeyDeleted => "api_key.deleted", - AuditLogEventType.CheckpointPermissionCreated => "checkpoint_permission.created", - AuditLogEventType.CheckpointPermissionDeleted => "checkpoint_permission.deleted", + AuditLogEventType.CertificateCreated => "certificate.created", + AuditLogEventType.CertificateUpdated => "certificate.updated", + AuditLogEventType.CertificateDeleted => "certificate.deleted", + AuditLogEventType.CertificatesActivated => "certificates.activated", + AuditLogEventType.CertificatesDeactivated => "certificates.deactivated", + AuditLogEventType.CheckpointPermissionCreated => "checkpoint.permission.created", + AuditLogEventType.CheckpointPermissionDeleted => "checkpoint.permission.deleted", + AuditLogEventType.ExternalKeyRegistered => "external_key.registered", + AuditLogEventType.ExternalKeyRemoved => "external_key.removed", + AuditLogEventType.GroupCreated => "group.created", + AuditLogEventType.GroupUpdated => "group.updated", + AuditLogEventType.GroupDeleted => "group.deleted", AuditLogEventType.InviteSent => "invite.sent", AuditLogEventType.InviteAccepted => "invite.accepted", AuditLogEventType.InviteDeleted => "invite.deleted", + AuditLogEventType.IpAllowlistCreated => "ip_allowlist.created", + AuditLogEventType.IpAllowlistUpdated => "ip_allowlist.updated", + AuditLogEventType.IpAllowlistDeleted => "ip_allowlist.deleted", + AuditLogEventType.IpAllowlistConfigActivated => "ip_allowlist.config.activated", + AuditLogEventType.IpAllowlistConfigDeactivated => "ip_allowlist.config.deactivated", AuditLogEventType.LoginSucceeded => "login.succeeded", AuditLogEventType.LoginFailed => "login.failed", AuditLogEventType.LogoutSucceeded => "logout.succeeded", @@ -134,11 +257,23 @@ public static string ToValueString(this AuditLogEventType value) AuditLogEventType.ProjectCreated => "project.created", AuditLogEventType.ProjectUpdated => "project.updated", AuditLogEventType.ProjectArchived => "project.archived", + AuditLogEventType.ProjectDeleted => "project.deleted", + AuditLogEventType.RateLimitUpdated => "rate_limit.updated", + AuditLogEventType.RateLimitDeleted => "rate_limit.deleted", + AuditLogEventType.ResourceDeleted => "resource.deleted", + AuditLogEventType.TunnelCreated => "tunnel.created", + AuditLogEventType.TunnelUpdated => "tunnel.updated", + AuditLogEventType.TunnelDeleted => "tunnel.deleted", + AuditLogEventType.RoleCreated => "role.created", + AuditLogEventType.RoleUpdated => "role.updated", + AuditLogEventType.RoleDeleted => "role.deleted", + AuditLogEventType.RoleAssignmentCreated => "role.assignment.created", + AuditLogEventType.RoleAssignmentDeleted => "role.assignment.deleted", + AuditLogEventType.ScimEnabled => "scim.enabled", + AuditLogEventType.ScimDisabled => "scim.disabled", AuditLogEventType.ServiceAccountCreated => "service_account.created", AuditLogEventType.ServiceAccountUpdated => "service_account.updated", AuditLogEventType.ServiceAccountDeleted => "service_account.deleted", - AuditLogEventType.RateLimitUpdated => "rate_limit.updated", - AuditLogEventType.RateLimitDeleted => "rate_limit.deleted", AuditLogEventType.UserAdded => "user.added", AuditLogEventType.UserUpdated => "user.updated", AuditLogEventType.UserDeleted => "user.deleted", @@ -155,11 +290,26 @@ public static string ToValueString(this AuditLogEventType value) "api_key.created" => AuditLogEventType.ApiKeyCreated, "api_key.updated" => AuditLogEventType.ApiKeyUpdated, "api_key.deleted" => AuditLogEventType.ApiKeyDeleted, - "checkpoint_permission.created" => AuditLogEventType.CheckpointPermissionCreated, - "checkpoint_permission.deleted" => AuditLogEventType.CheckpointPermissionDeleted, + "certificate.created" => AuditLogEventType.CertificateCreated, + "certificate.updated" => AuditLogEventType.CertificateUpdated, + "certificate.deleted" => AuditLogEventType.CertificateDeleted, + "certificates.activated" => AuditLogEventType.CertificatesActivated, + "certificates.deactivated" => AuditLogEventType.CertificatesDeactivated, + "checkpoint.permission.created" => AuditLogEventType.CheckpointPermissionCreated, + "checkpoint.permission.deleted" => AuditLogEventType.CheckpointPermissionDeleted, + "external_key.registered" => AuditLogEventType.ExternalKeyRegistered, + "external_key.removed" => AuditLogEventType.ExternalKeyRemoved, + "group.created" => AuditLogEventType.GroupCreated, + "group.updated" => AuditLogEventType.GroupUpdated, + "group.deleted" => AuditLogEventType.GroupDeleted, "invite.sent" => AuditLogEventType.InviteSent, "invite.accepted" => AuditLogEventType.InviteAccepted, "invite.deleted" => AuditLogEventType.InviteDeleted, + "ip_allowlist.created" => AuditLogEventType.IpAllowlistCreated, + "ip_allowlist.updated" => AuditLogEventType.IpAllowlistUpdated, + "ip_allowlist.deleted" => AuditLogEventType.IpAllowlistDeleted, + "ip_allowlist.config.activated" => AuditLogEventType.IpAllowlistConfigActivated, + "ip_allowlist.config.deactivated" => AuditLogEventType.IpAllowlistConfigDeactivated, "login.succeeded" => AuditLogEventType.LoginSucceeded, "login.failed" => AuditLogEventType.LoginFailed, "logout.succeeded" => AuditLogEventType.LogoutSucceeded, @@ -168,11 +318,23 @@ public static string ToValueString(this AuditLogEventType value) "project.created" => AuditLogEventType.ProjectCreated, "project.updated" => AuditLogEventType.ProjectUpdated, "project.archived" => AuditLogEventType.ProjectArchived, + "project.deleted" => AuditLogEventType.ProjectDeleted, + "rate_limit.updated" => AuditLogEventType.RateLimitUpdated, + "rate_limit.deleted" => AuditLogEventType.RateLimitDeleted, + "resource.deleted" => AuditLogEventType.ResourceDeleted, + "tunnel.created" => AuditLogEventType.TunnelCreated, + "tunnel.updated" => AuditLogEventType.TunnelUpdated, + "tunnel.deleted" => AuditLogEventType.TunnelDeleted, + "role.created" => AuditLogEventType.RoleCreated, + "role.updated" => AuditLogEventType.RoleUpdated, + "role.deleted" => AuditLogEventType.RoleDeleted, + "role.assignment.created" => AuditLogEventType.RoleAssignmentCreated, + "role.assignment.deleted" => AuditLogEventType.RoleAssignmentDeleted, + "scim.enabled" => AuditLogEventType.ScimEnabled, + "scim.disabled" => AuditLogEventType.ScimDisabled, "service_account.created" => AuditLogEventType.ServiceAccountCreated, "service_account.updated" => AuditLogEventType.ServiceAccountUpdated, "service_account.deleted" => AuditLogEventType.ServiceAccountDeleted, - "rate_limit.updated" => AuditLogEventType.RateLimitUpdated, - "rate_limit.deleted" => AuditLogEventType.RateLimitDeleted, "user.added" => AuditLogEventType.UserAdded, "user.updated" => AuditLogEventType.UserUpdated, "user.deleted" => AuditLogEventType.UserDeleted, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.Json.g.cs new file mode 100644 index 00000000..10c629bd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogExternalKeyRegistered + { + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRegistered? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRegistered), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogExternalKeyRegistered; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRegistered? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRegistered), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogExternalKeyRegistered; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.g.cs new file mode 100644 index 00000000..41a27756 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegistered.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogExternalKeyRegistered + { + /// + /// The ID of the external key configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The configuration for the external key. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public object? Data { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the external key configuration. + /// + /// + /// The configuration for the external key. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogExternalKeyRegistered( + string? id, + object? data) + { + this.Id = id; + this.Data = data; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogExternalKeyRegistered() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.Json.g.cs new file mode 100644 index 00000000..048e3026 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogExternalKeyRegisteredData + { + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogExternalKeyRegisteredData; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.g.cs new file mode 100644 index 00000000..5b24bc55 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRegisteredData.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The configuration for the external key. + /// + public sealed partial class AuditLogExternalKeyRegisteredData + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.Json.g.cs new file mode 100644 index 00000000..077fde49 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogExternalKeyRemoved + { + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRemoved? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRemoved), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogExternalKeyRemoved; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogExternalKeyRemoved? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogExternalKeyRemoved), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogExternalKeyRemoved; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.g.cs new file mode 100644 index 00000000..f8275a7d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogExternalKeyRemoved.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogExternalKeyRemoved + { + /// + /// The ID of the external key configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the external key configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogExternalKeyRemoved( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogExternalKeyRemoved() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.Json.g.cs new file mode 100644 index 00000000..cb2784b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogGroupCreated + { + /// + /// 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::tryAGI.OpenAI.AuditLogGroupCreated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogGroupCreated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogGroupCreated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogGroupCreated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogGroupCreated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogGroupCreated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.g.cs new file mode 100644 index 00000000..11d7be93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreated.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogGroupCreated + { + /// + /// The ID of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// Information about the created group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogGroupCreatedData? Data { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the group. + /// + /// + /// Information about the created group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogGroupCreated( + string? id, + global::tryAGI.OpenAI.AuditLogGroupCreatedData? data) + { + this.Id = id; + this.Data = data; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogGroupCreated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.Json.g.cs new file mode 100644 index 00000000..9030fb0a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogGroupCreatedData + { + /// + /// 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::tryAGI.OpenAI.AuditLogGroupCreatedData? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogGroupCreatedData), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogGroupCreatedData; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogGroupCreatedData? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogGroupCreatedData), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogGroupCreatedData; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.g.cs new file mode 100644 index 00000000..64e9f797 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupCreatedData.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Information about the created group. + /// + public sealed partial class AuditLogGroupCreatedData + { + /// + /// The group name. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_name")] + public string? GroupName { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The group name. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogGroupCreatedData( + string? groupName) + { + this.GroupName = groupName; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogGroupCreatedData() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.Json.g.cs new file mode 100644 index 00000000..4bafb2b0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogGroupDeleted + { + /// + /// 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::tryAGI.OpenAI.AuditLogGroupDeleted? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogGroupDeleted), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogGroupDeleted; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogGroupDeleted? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogGroupDeleted), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogGroupDeleted; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.g.cs new file mode 100644 index 00000000..a61bd857 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupDeleted.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogGroupDeleted + { + /// + /// The ID of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogGroupDeleted( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogGroupDeleted() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.Json.g.cs new file mode 100644 index 00000000..30ff609e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogGroupUpdated + { + /// + /// 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::tryAGI.OpenAI.AuditLogGroupUpdated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogGroupUpdated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogGroupUpdated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogGroupUpdated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogGroupUpdated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogGroupUpdated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.g.cs new file mode 100644 index 00000000..c4a4192f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdated.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogGroupUpdated + { + /// + /// The ID of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The payload used to update the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested? ChangesRequested { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the group. + /// + /// + /// The payload used to update the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogGroupUpdated( + string? id, + global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested? changesRequested) + { + this.Id = id; + this.ChangesRequested = changesRequested; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogGroupUpdated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.Json.g.cs new file mode 100644 index 00000000..9ad83e74 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogGroupUpdatedChangesRequested + { + /// + /// 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::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogGroupUpdatedChangesRequested; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.g.cs new file mode 100644 index 00000000..5c0f4f28 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogGroupUpdatedChangesRequested.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The payload used to update the group. + /// + public sealed partial class AuditLogGroupUpdatedChangesRequested + { + /// + /// The updated group name. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_name")] + public string? GroupName { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The updated group name. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogGroupUpdatedChangesRequested( + string? groupName) + { + this.GroupName = groupName; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogGroupUpdatedChangesRequested() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogInviteSent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogInviteSent.g.cs index c25e8373..38bbea5f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogInviteSent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogInviteSent.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogInviteSent { - /// - /// The payload used to create the invite. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogInviteSentData? Data { get; set; } - /// /// The ID of the invite. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to create the invite. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogInviteSentData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogInviteSent /// /// Initializes a new instance of the class. /// - /// - /// The payload used to create the invite. - /// /// /// The ID of the invite. /// + /// + /// The payload used to create the invite. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogInviteSent( - global::tryAGI.OpenAI.AuditLogInviteSentData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogInviteSentData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.Json.g.cs new file mode 100644 index 00000000..e4c568f6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistConfigActivated + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.g.cs new file mode 100644 index 00000000..5f0883fa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivated.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogIpAllowlistConfigActivated + { + /// + /// The configurations that were activated. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("configs")] + public global::System.Collections.Generic.IList? Configs { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The configurations that were activated. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistConfigActivated( + global::System.Collections.Generic.IList? configs) + { + this.Configs = configs; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistConfigActivated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.Json.g.cs new file mode 100644 index 00000000..e005c1a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistConfigActivatedConfig + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigActivatedConfig; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.g.cs new file mode 100644 index 00000000..de9d9e4f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigActivatedConfig.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AuditLogIpAllowlistConfigActivatedConfig + { + /// + /// The ID of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The name of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the IP allowlist configuration. + /// + /// + /// The name of the IP allowlist configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistConfigActivatedConfig( + string? id, + string? name) + { + this.Id = id; + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistConfigActivatedConfig() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.Json.g.cs new file mode 100644 index 00000000..ea0edc50 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistConfigDeactivated + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.g.cs new file mode 100644 index 00000000..14c385a5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivated.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogIpAllowlistConfigDeactivated + { + /// + /// The configurations that were deactivated. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("configs")] + public global::System.Collections.Generic.IList? Configs { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The configurations that were deactivated. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistConfigDeactivated( + global::System.Collections.Generic.IList? configs) + { + this.Configs = configs; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistConfigDeactivated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.Json.g.cs new file mode 100644 index 00000000..4a6274ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistConfigDeactivatedConfig + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistConfigDeactivatedConfig; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.g.cs new file mode 100644 index 00000000..53826e33 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistConfigDeactivatedConfig.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AuditLogIpAllowlistConfigDeactivatedConfig + { + /// + /// The ID of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The name of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the IP allowlist configuration. + /// + /// + /// The name of the IP allowlist configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistConfigDeactivatedConfig( + string? id, + string? name) + { + this.Id = id; + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistConfigDeactivatedConfig() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.Json.g.cs new file mode 100644 index 00000000..bff45c75 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistCreated + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistCreated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistCreated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistCreated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistCreated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistCreated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistCreated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.g.cs new file mode 100644 index 00000000..70143e12 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistCreated.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogIpAllowlistCreated + { + /// + /// The ID of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The name of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The IP addresses or CIDR ranges included in the configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_ips")] + public global::System.Collections.Generic.IList? AllowedIps { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the IP allowlist configuration. + /// + /// + /// The name of the IP allowlist configuration. + /// + /// + /// The IP addresses or CIDR ranges included in the configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistCreated( + string? id, + string? name, + global::System.Collections.Generic.IList? allowedIps) + { + this.Id = id; + this.Name = name; + this.AllowedIps = allowedIps; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistCreated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.Json.g.cs new file mode 100644 index 00000000..4455c70b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistDeleted + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistDeleted? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistDeleted? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistDeleted; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.g.cs new file mode 100644 index 00000000..583b8c6c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistDeleted.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogIpAllowlistDeleted + { + /// + /// The ID of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The name of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The IP addresses or CIDR ranges that were in the configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_ips")] + public global::System.Collections.Generic.IList? AllowedIps { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the IP allowlist configuration. + /// + /// + /// The name of the IP allowlist configuration. + /// + /// + /// The IP addresses or CIDR ranges that were in the configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistDeleted( + string? id, + string? name, + global::System.Collections.Generic.IList? allowedIps) + { + this.Id = id; + this.Name = name; + this.AllowedIps = allowedIps; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistDeleted() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.Json.g.cs new file mode 100644 index 00000000..afddb055 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogIpAllowlistUpdated + { + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistUpdated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogIpAllowlistUpdated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogIpAllowlistUpdated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.g.cs new file mode 100644 index 00000000..037bf58c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogIpAllowlistUpdated.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogIpAllowlistUpdated + { + /// + /// The ID of the IP allowlist configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The updated set of IP addresses or CIDR ranges in the configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_ips")] + public global::System.Collections.Generic.IList? AllowedIps { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the IP allowlist configuration. + /// + /// + /// The updated set of IP addresses or CIDR ranges in the configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogIpAllowlistUpdated( + string? id, + global::System.Collections.Generic.IList? allowedIps) + { + this.Id = id; + this.AllowedIps = allowedIps; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogIpAllowlistUpdated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.Json.g.cs new file mode 100644 index 00000000..e83c978d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogLoginSucceeded + { + /// + /// 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::tryAGI.OpenAI.AuditLogLoginSucceeded? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogLoginSucceeded), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogLoginSucceeded; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogLoginSucceeded? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogLoginSucceeded), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogLoginSucceeded; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.g.cs new file mode 100644 index 00000000..aea79eb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLoginSucceeded.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// + public sealed partial class AuditLogLoginSucceeded + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.Json.g.cs new file mode 100644 index 00000000..6e0f6280 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogLogoutSucceeded + { + /// + /// 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::tryAGI.OpenAI.AuditLogLogoutSucceeded? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogLogoutSucceeded), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogLogoutSucceeded; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogLogoutSucceeded? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogLogoutSucceeded), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogLogoutSucceeded; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.g.cs new file mode 100644 index 00000000..05f948e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogLogoutSucceeded.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// This event has no additional fields beyond the standard audit log attributes. + /// + public sealed partial class AuditLogLogoutSucceeded + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdated.g.cs index 0c23c90e..9976f490 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogOrganizationUpdated { - /// - /// The payload used to update the organization settings. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The organization ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to update the organization settings. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogOrganizationUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to update the organization settings. - /// /// /// The organization ID. /// + /// + /// The payload used to update the organization settings. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogOrganizationUpdated( - global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogOrganizationUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdatedChangesRequested.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdatedChangesRequested.g.cs index a14915aa..aba844e1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdatedChangesRequested.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogOrganizationUpdatedChangesRequested.g.cs @@ -9,16 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class AuditLogOrganizationUpdatedChangesRequested { /// - /// How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` - /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_call_logging")] - public string? ApiCallLogging { get; set; } - - /// - /// The list of project ids if api_call_logging is set to `enabled_for_selected_projects` + /// The organization title. /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_call_logging_project_ids")] - public string? ApiCallLoggingProjectIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } /// /// The organization description. @@ -38,18 +32,24 @@ public sealed partial class AuditLogOrganizationUpdatedChangesRequested [global::System.Text.Json.Serialization.JsonPropertyName("threads_ui_visibility")] public string? ThreadsUiVisibility { get; set; } - /// - /// The organization title. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("title")] - public string? Title { get; set; } - /// /// Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage_dashboard_visibility")] public string? UsageDashboardVisibility { get; set; } + /// + /// How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_call_logging")] + public string? ApiCallLogging { get; set; } + + /// + /// The list of project ids if api_call_logging is set to `enabled_for_selected_projects` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_call_logging_project_ids")] + public string? ApiCallLoggingProjectIds { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,11 +59,8 @@ public sealed partial class AuditLogOrganizationUpdatedChangesRequested /// /// Initializes a new instance of the class. /// - /// - /// How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` - /// - /// - /// The list of project ids if api_call_logging is set to `enabled_for_selected_projects` + /// + /// The organization title. /// /// /// The organization description. @@ -74,31 +71,34 @@ public sealed partial class AuditLogOrganizationUpdatedChangesRequested /// /// Visibility of the threads page which shows messages created with the Assistants API and Playground. One of `ANY_ROLE`, `OWNERS`, or `NONE`. /// - /// - /// The organization title. - /// /// /// Visibility of the usage dashboard which shows activity and costs for your organization. One of `ANY_ROLE` or `OWNERS`. /// + /// + /// How your organization logs data from supported API calls. One of `disabled`, `enabled_per_call`, `enabled_for_all_projects`, or `enabled_for_selected_projects` + /// + /// + /// The list of project ids if api_call_logging is set to `enabled_for_selected_projects` + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogOrganizationUpdatedChangesRequested( - string? apiCallLogging, - string? apiCallLoggingProjectIds, + string? title, string? description, string? name, string? threadsUiVisibility, - string? title, - string? usageDashboardVisibility) + string? usageDashboardVisibility, + string? apiCallLogging, + string? apiCallLoggingProjectIds) { - this.ApiCallLogging = apiCallLogging; - this.ApiCallLoggingProjectIds = apiCallLoggingProjectIds; + this.Title = title; this.Description = description; this.Name = name; this.ThreadsUiVisibility = threadsUiVisibility; - this.Title = title; this.UsageDashboardVisibility = usageDashboardVisibility; + this.ApiCallLogging = apiCallLogging; + this.ApiCallLoggingProjectIds = apiCallLoggingProjectIds; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectCreated.g.cs index fbb329bd..60d1377d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectCreated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogProjectCreated { - /// - /// The payload used to create the project. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogProjectCreatedData? Data { get; set; } - /// /// The project ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to create the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogProjectCreatedData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogProjectCreated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to create the project. - /// /// /// The project ID. /// + /// + /// The payload used to create the project. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogProjectCreated( - global::tryAGI.OpenAI.AuditLogProjectCreatedData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogProjectCreatedData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.Json.g.cs new file mode 100644 index 00000000..cdedb76f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogProjectDeleted + { + /// + /// 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::tryAGI.OpenAI.AuditLogProjectDeleted? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogProjectDeleted), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogProjectDeleted; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogProjectDeleted? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogProjectDeleted), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogProjectDeleted; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.g.cs new file mode 100644 index 00000000..2d942c2e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectDeleted.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogProjectDeleted + { + /// + /// The project ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The project ID. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogProjectDeleted( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogProjectDeleted() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectUpdated.g.cs index fc8fcc99..4557900f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogProjectUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogProjectUpdated { - /// - /// The payload used to update the project. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The project ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to update the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogProjectUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to update the project. - /// /// /// The project ID. /// + /// + /// The payload used to update the project. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogProjectUpdated( - global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogProjectUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdated.g.cs index b5fad3bc..263f39b0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogRateLimitUpdated { - /// - /// The payload used to update the rate limits. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The rate limit ID /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to update the rate limits. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogRateLimitUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to update the rate limits. - /// /// /// The rate limit ID /// + /// + /// The payload used to update the rate limits. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogRateLimitUpdated( - global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogRateLimitUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdatedChangesRequested.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdatedChangesRequested.g.cs index b3f79248..5b95159e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdatedChangesRequested.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRateLimitUpdatedChangesRequested.g.cs @@ -9,16 +9,16 @@ namespace tryAGI.OpenAI public sealed partial class AuditLogRateLimitUpdatedChangesRequested { /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// The maximum requests per minute. /// - [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] - public int? Batch1DayMaxInputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] + public int? MaxRequestsPer1Minute { get; set; } /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// The maximum tokens per minute. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] - public int? MaxAudioMegabytesPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens_per_1_minute")] + public int? MaxTokensPer1Minute { get; set; } /// /// The maximum images per minute. Only relevant for certain models. @@ -27,22 +27,22 @@ public sealed partial class AuditLogRateLimitUpdatedChangesRequested public int? MaxImagesPer1Minute { get; set; } /// - /// The maximum requests per day. Only relevant for certain models. + /// The maximum audio megabytes per minute. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] - public int? MaxRequestsPer1Day { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] + public int? MaxAudioMegabytesPer1Minute { get; set; } /// - /// The maximum requests per minute. + /// The maximum requests per day. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] - public int? MaxRequestsPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] + public int? MaxRequestsPer1Day { get; set; } /// - /// The maximum tokens per minute. + /// The maximum batch input tokens per day. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens_per_1_minute")] - public int? MaxTokensPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] + public int? Batch1DayMaxInputTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,41 +53,41 @@ public sealed partial class AuditLogRateLimitUpdatedChangesRequested /// /// Initializes a new instance of the class. /// - /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// + /// The maximum requests per minute. /// - /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// + /// The maximum tokens per minute. /// /// /// The maximum images per minute. Only relevant for certain models. /// + /// + /// The maximum audio megabytes per minute. Only relevant for certain models. + /// /// /// The maximum requests per day. Only relevant for certain models. /// - /// - /// The maximum requests per minute. - /// - /// - /// The maximum tokens per minute. + /// + /// The maximum batch input tokens per day. Only relevant for certain models. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogRateLimitUpdatedChangesRequested( - int? batch1DayMaxInputTokens, - int? maxAudioMegabytesPer1Minute, + int? maxRequestsPer1Minute, + int? maxTokensPer1Minute, int? maxImagesPer1Minute, + int? maxAudioMegabytesPer1Minute, int? maxRequestsPer1Day, - int? maxRequestsPer1Minute, - int? maxTokensPer1Minute) + int? batch1DayMaxInputTokens) { - this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; - this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; - this.MaxImagesPer1Minute = maxImagesPer1Minute; - this.MaxRequestsPer1Day = maxRequestsPer1Day; this.MaxRequestsPer1Minute = maxRequestsPer1Minute; this.MaxTokensPer1Minute = maxTokensPer1Minute; + this.MaxImagesPer1Minute = maxImagesPer1Minute; + this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; + this.MaxRequestsPer1Day = maxRequestsPer1Day; + this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.Json.g.cs new file mode 100644 index 00000000..dcf8fc88 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleAssignmentCreated + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleAssignmentCreated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleAssignmentCreated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleAssignmentCreated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.g.cs new file mode 100644 index 00000000..bd8383a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentCreated.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogRoleAssignmentCreated + { + /// + /// The identifier of the role assignment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The principal (user or group) that received the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("principal_id")] + public string? PrincipalId { get; set; } + + /// + /// The type of principal (user or group) that received the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("principal_type")] + public string? PrincipalType { get; set; } + + /// + /// The resource the role assignment is scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_id")] + public string? ResourceId { get; set; } + + /// + /// The type of resource the role assignment is scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + public string? ResourceType { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The identifier of the role assignment. + /// + /// + /// The principal (user or group) that received the role. + /// + /// + /// The type of principal (user or group) that received the role. + /// + /// + /// The resource the role assignment is scoped to. + /// + /// + /// The type of resource the role assignment is scoped to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleAssignmentCreated( + string? id, + string? principalId, + string? principalType, + string? resourceId, + string? resourceType) + { + this.Id = id; + this.PrincipalId = principalId; + this.PrincipalType = principalType; + this.ResourceId = resourceId; + this.ResourceType = resourceType; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleAssignmentCreated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.Json.g.cs new file mode 100644 index 00000000..01cae04c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleAssignmentDeleted + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleAssignmentDeleted; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.g.cs new file mode 100644 index 00000000..8d177506 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleAssignmentDeleted.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogRoleAssignmentDeleted + { + /// + /// The identifier of the role assignment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The principal (user or group) that had the role removed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("principal_id")] + public string? PrincipalId { get; set; } + + /// + /// The type of principal (user or group) that had the role removed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("principal_type")] + public string? PrincipalType { get; set; } + + /// + /// The resource the role assignment was scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_id")] + public string? ResourceId { get; set; } + + /// + /// The type of resource the role assignment was scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + public string? ResourceType { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The identifier of the role assignment. + /// + /// + /// The principal (user or group) that had the role removed. + /// + /// + /// The type of principal (user or group) that had the role removed. + /// + /// + /// The resource the role assignment was scoped to. + /// + /// + /// The type of resource the role assignment was scoped to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleAssignmentDeleted( + string? id, + string? principalId, + string? principalType, + string? resourceId, + string? resourceType) + { + this.Id = id; + this.PrincipalId = principalId; + this.PrincipalType = principalType; + this.ResourceId = resourceId; + this.ResourceType = resourceType; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleAssignmentDeleted() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.Json.g.cs new file mode 100644 index 00000000..a4ec9c87 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleCreated + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleCreated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleCreated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleCreated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleCreated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleCreated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleCreated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.g.cs new file mode 100644 index 00000000..da820686 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleCreated.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogRoleCreated + { + /// + /// The role ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The name of the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role_name")] + public string? RoleName { get; set; } + + /// + /// The permissions granted by the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions")] + public global::System.Collections.Generic.IList? Permissions { get; set; } + + /// + /// The type of resource the role belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + public string? ResourceType { get; set; } + + /// + /// The resource the role is scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_id")] + public string? ResourceId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The role ID. + /// + /// + /// The name of the role. + /// + /// + /// The permissions granted by the role. + /// + /// + /// The type of resource the role belongs to. + /// + /// + /// The resource the role is scoped to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleCreated( + string? id, + string? roleName, + global::System.Collections.Generic.IList? permissions, + string? resourceType, + string? resourceId) + { + this.Id = id; + this.RoleName = roleName; + this.Permissions = permissions; + this.ResourceType = resourceType; + this.ResourceId = resourceId; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleCreated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.Json.g.cs new file mode 100644 index 00000000..db4d0b28 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleDeleted + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleDeleted? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleDeleted), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleDeleted; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleDeleted? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleDeleted), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleDeleted; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.g.cs new file mode 100644 index 00000000..61e358be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleDeleted.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogRoleDeleted + { + /// + /// The role ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The role ID. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleDeleted( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleDeleted() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.Json.g.cs new file mode 100644 index 00000000..8d0a4423 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleUpdated + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdated? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdated), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleUpdated; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdated? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdated), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleUpdated; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.g.cs new file mode 100644 index 00000000..b10c7e84 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdated.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogRoleUpdated + { + /// + /// The role ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The payload used to update the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested? ChangesRequested { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The role ID. + /// + /// + /// The payload used to update the role. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleUpdated( + string? id, + global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested? changesRequested) + { + this.Id = id; + this.ChangesRequested = changesRequested; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleUpdated() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.Json.g.cs new file mode 100644 index 00000000..1fd425ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleUpdatedChangesRequested + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequested; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.g.cs new file mode 100644 index 00000000..2ce06eaf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequested.g.cs @@ -0,0 +1,111 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The payload used to update the role. + /// + public sealed partial class AuditLogRoleUpdatedChangesRequested + { + /// + /// The updated role name, when provided. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role_name")] + public string? RoleName { get; set; } + + /// + /// The resource the role is scoped to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_id")] + public string? ResourceId { get; set; } + + /// + /// The type of resource the role belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + public string? ResourceType { get; set; } + + /// + /// The permissions added to the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions_added")] + public global::System.Collections.Generic.IList? PermissionsAdded { get; set; } + + /// + /// The permissions removed from the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions_removed")] + public global::System.Collections.Generic.IList? PermissionsRemoved { get; set; } + + /// + /// The updated role description, when provided. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// Additional metadata stored on the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The updated role name, when provided. + /// + /// + /// The resource the role is scoped to. + /// + /// + /// The type of resource the role belongs to. + /// + /// + /// The permissions added to the role. + /// + /// + /// The permissions removed from the role. + /// + /// + /// The updated role description, when provided. + /// + /// + /// Additional metadata stored on the role. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogRoleUpdatedChangesRequested( + string? roleName, + string? resourceId, + string? resourceType, + global::System.Collections.Generic.IList? permissionsAdded, + global::System.Collections.Generic.IList? permissionsRemoved, + string? description, + object? metadata) + { + this.RoleName = roleName; + this.ResourceId = resourceId; + this.ResourceType = resourceType; + this.PermissionsAdded = permissionsAdded; + this.PermissionsRemoved = permissionsRemoved; + this.Description = description; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogRoleUpdatedChangesRequested() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.Json.g.cs new file mode 100644 index 00000000..7e660e68 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogRoleUpdatedChangesRequestedMetadata + { + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogRoleUpdatedChangesRequestedMetadata; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.g.cs new file mode 100644 index 00000000..f71121f9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogRoleUpdatedChangesRequestedMetadata.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Additional metadata stored on the role. + /// + public sealed partial class AuditLogRoleUpdatedChangesRequestedMetadata + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.Json.g.cs new file mode 100644 index 00000000..848068fd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogScimDisabled + { + /// + /// 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::tryAGI.OpenAI.AuditLogScimDisabled? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogScimDisabled), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogScimDisabled; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogScimDisabled? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogScimDisabled), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogScimDisabled; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.g.cs new file mode 100644 index 00000000..c7bcfd89 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimDisabled.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogScimDisabled + { + /// + /// The ID of the SCIM was disabled for. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the SCIM was disabled for. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogScimDisabled( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogScimDisabled() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.Json.g.cs new file mode 100644 index 00000000..cddc8560 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AuditLogScimEnabled + { + /// + /// 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::tryAGI.OpenAI.AuditLogScimEnabled? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AuditLogScimEnabled), + jsonSerializerContext) as global::tryAGI.OpenAI.AuditLogScimEnabled; + } + + /// + /// 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::tryAGI.OpenAI.AuditLogScimEnabled? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AuditLogScimEnabled), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AuditLogScimEnabled; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.g.cs new file mode 100644 index 00000000..93282cfb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogScimEnabled.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The details for events with this `type`. + /// + public sealed partial class AuditLogScimEnabled + { + /// + /// The ID of the SCIM was enabled for. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the SCIM was enabled for. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AuditLogScimEnabled( + string? id) + { + this.Id = id; + } + + /// + /// Initializes a new instance of the class. + /// + public AuditLogScimEnabled() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountCreated.g.cs index 90a03fd6..12d9a8bd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountCreated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogServiceAccountCreated { - /// - /// The payload used to create the service account. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? Data { get; set; } - /// /// The service account ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to create the service account. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogServiceAccountCreated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to create the service account. - /// /// /// The service account ID. /// + /// + /// The payload used to create the service account. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogServiceAccountCreated( - global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogServiceAccountCreatedData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountUpdated.g.cs index 921ae3b9..be6f848f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogServiceAccountUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogServiceAccountUpdated { - /// - /// The payload used to updated the service account. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The service account ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to updated the service account. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogServiceAccountUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to updated the service account. - /// /// /// The service account ID. /// + /// + /// The payload used to updated the service account. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogServiceAccountUpdated( - global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogServiceAccountUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserAdded.g.cs index 041882a2..c253155d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserAdded.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogUserAdded { - /// - /// The payload used to add the user to the project. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::tryAGI.OpenAI.AuditLogUserAddedData? Data { get; set; } - /// /// The user ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to add the user to the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::tryAGI.OpenAI.AuditLogUserAddedData? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogUserAdded /// /// Initializes a new instance of the class. /// - /// - /// The payload used to add the user to the project. - /// /// /// The user ID. /// + /// + /// The payload used to add the user to the project. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogUserAdded( - global::tryAGI.OpenAI.AuditLogUserAddedData? data, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogUserAddedData? data) { - this.Data = data; this.Id = id; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserUpdated.g.cs index c2cfb43d..4cb22df7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AuditLogUserUpdated.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class AuditLogUserUpdated { - /// - /// The payload used to update the user. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] - public global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? ChangesRequested { get; set; } - /// /// The project ID. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } + /// + /// The payload used to update the user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("changes_requested")] + public global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? ChangesRequested { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class AuditLogUserUpdated /// /// Initializes a new instance of the class. /// - /// - /// The payload used to update the user. - /// /// /// The project ID. /// + /// + /// The payload used to update the user. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public AuditLogUserUpdated( - global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? changesRequested, - string? id) + string? id, + global::tryAGI.OpenAI.AuditLogUserUpdatedChangesRequested? changesRequested) { - this.ChangesRequested = changesRequested; this.Id = id; + this.ChangesRequested = changesRequested; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.Json.g.cs new file mode 100644 index 00000000..ad50e2be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AutoCodeInterpreterToolParam + { + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParam; + } + + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.g.cs new file mode 100644 index 00000000..e3eb2342 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParam.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + /// + public sealed partial class AutoCodeInterpreterToolParam + { + /// + /// Always `auto`.
+ /// Default Value: auto + ///
+ /// global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType.Auto + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AutoCodeInterpreterToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType Type { get; set; } = global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType.Auto; + + /// + /// An optional list of uploaded files to make available to your code. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("memory_limit")] + public global::tryAGI.OpenAI.ContainerMemoryLimit? MemoryLimit { get; set; } + + /// + /// Network access policy for the container. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("network_policy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicy2JsonConverter))] + public global::tryAGI.OpenAI.NetworkPolicy2? NetworkPolicy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `auto`.
+ /// Default Value: auto + /// + /// + /// An optional list of uploaded files to make available to your code. + /// + /// + /// + /// Network access policy for the container. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AutoCodeInterpreterToolParam( + global::System.Collections.Generic.IList? fileIds, + global::tryAGI.OpenAI.ContainerMemoryLimit? memoryLimit, + global::tryAGI.OpenAI.NetworkPolicy2? networkPolicy, + global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType type = global::tryAGI.OpenAI.AutoCodeInterpreterToolParamType.Auto) + { + this.Type = type; + this.FileIds = fileIds; + this.MemoryLimit = memoryLimit; + this.NetworkPolicy = networkPolicy; + } + + /// + /// Initializes a new instance of the class. + /// + public AutoCodeInterpreterToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.Json.g.cs new file mode 100644 index 00000000..bfae2631 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AutoCodeInterpreterToolParamMemoryLimit + { + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit), + jsonSerializerContext) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit; + } + + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParamMemoryLimit; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.g.cs new file mode 100644 index 00000000..28ca8301 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamMemoryLimit.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AutoCodeInterpreterToolParamMemoryLimit + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.Json.g.cs new file mode 100644 index 00000000..84e2db17 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AutoCodeInterpreterToolParamNetworkPolicyDiscriminator + { + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.g.cs new file mode 100644 index 00000000..3c8456ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamNetworkPolicyDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class AutoCodeInterpreterToolParamNetworkPolicyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AutoCodeInterpreterToolParamNetworkPolicyDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public AutoCodeInterpreterToolParamNetworkPolicyDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamType.g.cs new file mode 100644 index 00000000..50b91901 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutoCodeInterpreterToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `auto`.
+ /// Default Value: auto + ///
+ public enum AutoCodeInterpreterToolParamType + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AutoCodeInterpreterToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AutoCodeInterpreterToolParamType value) + { + return value switch + { + AutoCodeInterpreterToolParamType.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AutoCodeInterpreterToolParamType? ToEnum(string value) + { + return value switch + { + "auto" => AutoCodeInterpreterToolParamType.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.Json.g.cs new file mode 100644 index 00000000..faad73a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class AutomaticThreadTitlingParam + { + /// + /// 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::tryAGI.OpenAI.AutomaticThreadTitlingParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.AutomaticThreadTitlingParam), + jsonSerializerContext) as global::tryAGI.OpenAI.AutomaticThreadTitlingParam; + } + + /// + /// 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::tryAGI.OpenAI.AutomaticThreadTitlingParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.AutomaticThreadTitlingParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AutomaticThreadTitlingParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.g.cs new file mode 100644 index 00000000..48fb3397 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.AutomaticThreadTitlingParam.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls whether ChatKit automatically generates thread titles. + /// + public sealed partial class AutomaticThreadTitlingParam + { + /// + /// Enable automatic thread title generation. Defaults to true. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Enable automatic thread title generation. Defaults to true. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AutomaticThreadTitlingParam( + bool? enabled) + { + this.Enabled = enabled; + } + + /// + /// Initializes a new instance of the class. + /// + public AutomaticThreadTitlingParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Batch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Batch.g.cs index acc32840..008c8d72 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Batch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Batch.g.cs @@ -9,25 +9,47 @@ namespace tryAGI.OpenAI public sealed partial class Batch { /// - /// The Unix timestamp (in seconds) for when the batch was cancelled. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CancelledAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } /// - /// The Unix timestamp (in seconds) for when the batch started cancelling. + /// The object type, which is always `batch`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelling_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CancellingAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.BatchObjectJsonConverter))] + public global::tryAGI.OpenAI.BatchObject Object { get; set; } /// - /// The Unix timestamp (in seconds) for when the batch was completed. + /// The OpenAI API endpoint used by the batch. /// - [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CompletedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("endpoint")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Endpoint { get; set; } + + /// + /// Model ID used to process the batch, like `gpt-5-2025-08-07`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model
+ /// guide](/docs/models) to browse and compare available models. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("errors")] + public global::tryAGI.OpenAI.BatchErrors? Errors { get; set; } + + /// + /// The ID of the input file for the batch. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string InputFileId { get; set; } /// /// The time frame within which the batch should be processed. @@ -37,19 +59,18 @@ public sealed partial class Batch public required string CompletionWindow { get; set; } /// - /// The Unix timestamp (in seconds) for when the batch was created. + /// The current status of the batch. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.BatchStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required global::tryAGI.OpenAI.BatchStatus Status { get; set; } /// - /// The OpenAI API endpoint used by the batch. + /// The ID of the file containing the outputs of successfully executed requests. /// - [global::System.Text.Json.Serialization.JsonPropertyName("endpoint")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Endpoint { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_file_id")] + public string? OutputFileId { get; set; } /// /// The ID of the file containing the outputs of requests with errors. @@ -58,17 +79,19 @@ public sealed partial class Batch public string? ErrorFileId { get; set; } /// - /// + /// The Unix timestamp (in seconds) for when the batch was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("errors")] - public global::tryAGI.OpenAI.BatchErrors? Errors { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The Unix timestamp (in seconds) for when the batch expired. + /// The Unix timestamp (in seconds) for when the batch started processing. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expired_at")] + [global::System.Text.Json.Serialization.JsonPropertyName("in_progress_at")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? ExpiredAt { get; set; } + public global::System.DateTimeOffset? InProgressAt { get; set; } /// /// The Unix timestamp (in seconds) for when the batch will expire. @@ -77,13 +100,6 @@ public sealed partial class Batch [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] public global::System.DateTimeOffset? ExpiresAt { get; set; } - /// - /// The Unix timestamp (in seconds) for when the batch failed. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? FailedAt { get; set; } - /// /// The Unix timestamp (in seconds) for when the batch started finalizing. /// @@ -92,48 +108,39 @@ public sealed partial class Batch public global::System.DateTimeOffset? FinalizingAt { get; set; } /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// The Unix timestamp (in seconds) for when the batch started processing. + /// The Unix timestamp (in seconds) for when the batch was completed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("in_progress_at")] + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? InProgressAt { get; set; } + public global::System.DateTimeOffset? CompletedAt { get; set; } /// - /// The ID of the input file for the batch. + /// The Unix timestamp (in seconds) for when the batch failed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string InputFileId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? FailedAt { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The Unix timestamp (in seconds) for when the batch expired. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expired_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? ExpiredAt { get; set; } /// - /// The object type, which is always `batch`. + /// The Unix timestamp (in seconds) for when the batch started cancelling. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.BatchObjectJsonConverter))] - public global::tryAGI.OpenAI.BatchObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("cancelling_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? CancellingAt { get; set; } /// - /// The ID of the file containing the outputs of successfully executed requests. + /// The Unix timestamp (in seconds) for when the batch was cancelled. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_file_id")] - public string? OutputFileId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? CancelledAt { get; set; } /// /// The request counts for different statuses within the batch. @@ -142,12 +149,18 @@ public sealed partial class Batch public global::tryAGI.OpenAI.BatchRequestCounts? RequestCounts { get; set; } /// - /// The current status of the batch. + /// Represents token usage details including input tokens, output tokens, a
+ /// breakdown of output tokens, and the total tokens used. Only populated on
+ /// batches created after September 7, 2025. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.BatchStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.BatchStatus Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::tryAGI.OpenAI.BatchUsage? Usage { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -158,111 +171,120 @@ public sealed partial class Batch /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the batch was cancelled. + /// + /// + /// The object type, which is always `batch`. /// - /// - /// The Unix timestamp (in seconds) for when the batch started cancelling. + /// + /// The OpenAI API endpoint used by the batch. /// - /// - /// The Unix timestamp (in seconds) for when the batch was completed. + /// + /// Model ID used to process the batch, like `gpt-5-2025-08-07`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model
+ /// guide](/docs/models) to browse and compare available models. + /// + /// + /// + /// The ID of the input file for the batch. /// /// /// The time frame within which the batch should be processed. /// - /// - /// The Unix timestamp (in seconds) for when the batch was created. + /// + /// The current status of the batch. /// - /// - /// The OpenAI API endpoint used by the batch. + /// + /// The ID of the file containing the outputs of successfully executed requests. /// /// /// The ID of the file containing the outputs of requests with errors. /// - /// - /// - /// The Unix timestamp (in seconds) for when the batch expired. + /// + /// The Unix timestamp (in seconds) for when the batch was created. + /// + /// + /// The Unix timestamp (in seconds) for when the batch started processing. /// /// /// The Unix timestamp (in seconds) for when the batch will expire. /// - /// - /// The Unix timestamp (in seconds) for when the batch failed. - /// /// /// The Unix timestamp (in seconds) for when the batch started finalizing. /// - /// - /// - /// The Unix timestamp (in seconds) for when the batch started processing. + /// + /// The Unix timestamp (in seconds) for when the batch was completed. /// - /// - /// The ID of the input file for the batch. + /// + /// The Unix timestamp (in seconds) for when the batch failed. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The Unix timestamp (in seconds) for when the batch expired. /// - /// - /// The object type, which is always `batch`. + /// + /// The Unix timestamp (in seconds) for when the batch started cancelling. /// - /// - /// The ID of the file containing the outputs of successfully executed requests. + /// + /// The Unix timestamp (in seconds) for when the batch was cancelled. /// /// /// The request counts for different statuses within the batch. /// - /// - /// The current status of the batch. + /// + /// Represents token usage details including input tokens, output tokens, a
+ /// breakdown of output tokens, and the total tokens used. Only populated on
+ /// batches created after September 7, 2025. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Batch( - string completionWindow, - global::System.DateTimeOffset createdAt, - string endpoint, string id, + string endpoint, string inputFileId, + string completionWindow, global::tryAGI.OpenAI.BatchStatus status, - global::System.DateTimeOffset? cancelledAt, - global::System.DateTimeOffset? cancellingAt, - global::System.DateTimeOffset? completedAt, - string? errorFileId, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.BatchObject @object, + string? model, global::tryAGI.OpenAI.BatchErrors? errors, - global::System.DateTimeOffset? expiredAt, + string? outputFileId, + string? errorFileId, + global::System.DateTimeOffset? inProgressAt, global::System.DateTimeOffset? expiresAt, - global::System.DateTimeOffset? failedAt, global::System.DateTimeOffset? finalizingAt, - global::System.DateTimeOffset? inProgressAt, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.BatchObject @object, - string? outputFileId, - global::tryAGI.OpenAI.BatchRequestCounts? requestCounts) + global::System.DateTimeOffset? completedAt, + global::System.DateTimeOffset? failedAt, + global::System.DateTimeOffset? expiredAt, + global::System.DateTimeOffset? cancellingAt, + global::System.DateTimeOffset? cancelledAt, + global::tryAGI.OpenAI.BatchRequestCounts? requestCounts, + global::tryAGI.OpenAI.BatchUsage? usage, + global::System.Collections.Generic.Dictionary? metadata) { - this.CompletionWindow = completionWindow ?? throw new global::System.ArgumentNullException(nameof(completionWindow)); - this.CreatedAt = createdAt; - this.Endpoint = endpoint ?? throw new global::System.ArgumentNullException(nameof(endpoint)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Endpoint = endpoint ?? throw new global::System.ArgumentNullException(nameof(endpoint)); this.InputFileId = inputFileId ?? throw new global::System.ArgumentNullException(nameof(inputFileId)); + this.CompletionWindow = completionWindow ?? throw new global::System.ArgumentNullException(nameof(completionWindow)); this.Status = status; - this.CancelledAt = cancelledAt; - this.CancellingAt = cancellingAt; - this.CompletedAt = completedAt; - this.ErrorFileId = errorFileId; + this.CreatedAt = createdAt; + this.Object = @object; + this.Model = model; this.Errors = errors; - this.ExpiredAt = expiredAt; + this.OutputFileId = outputFileId; + this.ErrorFileId = errorFileId; + this.InProgressAt = inProgressAt; this.ExpiresAt = expiresAt; - this.FailedAt = failedAt; this.FinalizingAt = finalizingAt; - this.InProgressAt = inProgressAt; - this.Metadata = metadata; - this.Object = @object; - this.OutputFileId = outputFileId; + this.CompletedAt = completedAt; + this.FailedAt = failedAt; + this.ExpiredAt = expiredAt; + this.CancellingAt = cancellingAt; + this.CancelledAt = cancelledAt; this.RequestCounts = requestCounts; + this.Usage = usage; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.Json.g.cs deleted file mode 100644 index 2980c24d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchError - { - /// - /// 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::tryAGI.OpenAI.BatchError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchError), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchError; - } - - /// - /// 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::tryAGI.OpenAI.BatchError? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchError), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchError; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.g.cs deleted file mode 100644 index ca655f17..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchError.g.cs +++ /dev/null @@ -1,78 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class BatchError - { - /// - /// An error code identifying the error type. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } - - /// - /// The line number of the input file where the error occurred, if applicable. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("line")] - public int? Line { get; set; } - - /// - /// A human-readable message providing more details about the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - public string? Message { get; set; } - - /// - /// The name of the parameter that caused the error, if applicable. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("param")] - public string? Param { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An error code identifying the error type. - /// - /// - /// The line number of the input file where the error occurred, if applicable. - /// - /// - /// A human-readable message providing more details about the error. - /// - /// - /// The name of the parameter that caused the error, if applicable. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public BatchError( - string? code, - int? line, - string? message, - string? param) - { - this.Code = code; - this.Line = line; - this.Message = message; - this.Param = param; - } - - /// - /// Initializes a new instance of the class. - /// - public BatchError() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrors.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrors.g.cs index a33b39ce..315eb377 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrors.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrors.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class BatchErrors { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public global::System.Collections.Generic.IList? Data { get; set; } - /// /// The object type, which is always `list`. /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] public string? Object { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public global::System.Collections.Generic.IList? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,19 +29,19 @@ public sealed partial class BatchErrors /// /// Initializes a new instance of the class. /// - /// /// /// The object type, which is always `list`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public BatchErrors( - global::System.Collections.Generic.IList? data, - string? @object) + string? @object, + global::System.Collections.Generic.IList? data) { - this.Data = data; this.Object = @object; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.Json.g.cs new file mode 100644 index 00000000..6b1b8a2a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchErrorsDataItem + { + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItem), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchErrorsDataItem; + } + + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchErrorsDataItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.g.cs new file mode 100644 index 00000000..06b3b2e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItem.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class BatchErrorsDataItem + { + /// + /// An error code identifying the error type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// A human-readable message providing more details about the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("param")] + public string? Param { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("line")] + public int? Line { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// An error code identifying the error type. + /// + /// + /// A human-readable message providing more details about the error. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BatchErrorsDataItem( + string? code, + string? message, + string? param, + int? line) + { + this.Code = code; + this.Message = message; + this.Param = param; + this.Line = line; + } + + /// + /// Initializes a new instance of the class. + /// + public BatchErrorsDataItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.Json.g.cs new file mode 100644 index 00000000..145f5bca --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchErrorsDataItemLine + { + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItemLine? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItemLine), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchErrorsDataItemLine; + } + + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItemLine? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItemLine), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchErrorsDataItemLine; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.g.cs new file mode 100644 index 00000000..dd280c24 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemLine.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class BatchErrorsDataItemLine + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.Json.g.cs new file mode 100644 index 00000000..ff133d37 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchErrorsDataItemParam + { + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchErrorsDataItemParam; + } + + /// + /// 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::tryAGI.OpenAI.BatchErrorsDataItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchErrorsDataItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchErrorsDataItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.g.cs new file mode 100644 index 00000000..1baa5718 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchErrorsDataItemParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class BatchErrorsDataItemParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestCounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestCounts.g.cs index 362c9027..8f4eefb4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestCounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestCounts.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class BatchRequestCounts { + /// + /// Total number of requests in the batch. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Total { get; set; } + /// /// Number of requests that have been completed successfully. /// @@ -22,13 +29,6 @@ public sealed partial class BatchRequestCounts [global::System.Text.Json.Serialization.JsonRequired] public required int Failed { get; set; } - /// - /// Total number of requests in the batch. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("total")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Total { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,26 +38,26 @@ public sealed partial class BatchRequestCounts /// /// Initializes a new instance of the class. /// + /// + /// Total number of requests in the batch. + /// /// /// Number of requests that have been completed successfully. /// /// /// Number of requests that have failed. /// - /// - /// Total number of requests in the batch. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public BatchRequestCounts( + int total, int completed, - int failed, - int total) + int failed) { + this.Total = total; this.Completed = completed; this.Failed = failed; - this.Total = total; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.Json.g.cs deleted file mode 100644 index 48bab763..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchRequestInput - { - /// - /// 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::tryAGI.OpenAI.BatchRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchRequestInput), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchRequestInput; - } - - /// - /// 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::tryAGI.OpenAI.BatchRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchRequestInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.g.cs deleted file mode 100644 index a560025c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInput.g.cs +++ /dev/null @@ -1,68 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The per-line object of the batch input file - /// - public sealed partial class BatchRequestInput - { - /// - /// A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("custom_id")] - public string? CustomId { get; set; } - - /// - /// The HTTP method to be used for the request. Currently only `POST` is supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("method")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.BatchRequestInputMethodJsonConverter))] - public global::tryAGI.OpenAI.BatchRequestInputMethod? Method { get; set; } - - /// - /// The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch. - /// - /// - /// The HTTP method to be used for the request. Currently only `POST` is supported. - /// - /// - /// The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public BatchRequestInput( - string? customId, - global::tryAGI.OpenAI.BatchRequestInputMethod? method, - string? url) - { - this.CustomId = customId; - this.Method = method; - this.Url = url; - } - - /// - /// Initializes a new instance of the class. - /// - public BatchRequestInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInputMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInputMethod.g.cs deleted file mode 100644 index 67c9ed8d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestInputMethod.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The HTTP method to be used for the request. Currently only `POST` is supported. - /// - public enum BatchRequestInputMethod - { - /// - /// - /// - POST, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class BatchRequestInputMethodExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this BatchRequestInputMethod value) - { - return value switch - { - BatchRequestInputMethod.POST => "POST", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static BatchRequestInputMethod? ToEnum(string value) - { - return value switch - { - "POST" => BatchRequestInputMethod.POST, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.Json.g.cs deleted file mode 100644 index 9bac9609..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchRequestOutput - { - /// - /// 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::tryAGI.OpenAI.BatchRequestOutput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchRequestOutput), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchRequestOutput; - } - - /// - /// 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::tryAGI.OpenAI.BatchRequestOutput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchRequestOutput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchRequestOutput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.g.cs deleted file mode 100644 index 0e85506f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutput.g.cs +++ /dev/null @@ -1,74 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The per-line object of the batch output and error files - /// - public sealed partial class BatchRequestOutput - { - /// - /// A developer-provided per-request id that will be used to match outputs to inputs. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("custom_id")] - public string? CustomId { get; set; } - - /// - /// For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public global::tryAGI.OpenAI.BatchRequestOutputError? Error { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - public global::tryAGI.OpenAI.BatchRequestOutputResponse? Response { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A developer-provided per-request id that will be used to match outputs to inputs. - /// - /// - /// For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public BatchRequestOutput( - string? customId, - global::tryAGI.OpenAI.BatchRequestOutputError? error, - string? id, - global::tryAGI.OpenAI.BatchRequestOutputResponse? response) - { - this.CustomId = customId; - this.Error = error; - this.Id = id; - this.Response = response; - } - - /// - /// Initializes a new instance of the class. - /// - public BatchRequestOutput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.Json.g.cs deleted file mode 100644 index 010cd11e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchRequestOutputError - { - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchRequestOutputError), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchRequestOutputError; - } - - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputError? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchRequestOutputError), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchRequestOutputError; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.g.cs deleted file mode 100644 index 3f715b09..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputError.g.cs +++ /dev/null @@ -1,56 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// For requests that failed with a non-HTTP error, this will contain more information on the cause of the failure. - /// - public sealed partial class BatchRequestOutputError - { - /// - /// A machine-readable error code. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } - - /// - /// A human-readable error message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - public string? Message { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A machine-readable error code. - /// - /// - /// A human-readable error message. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public BatchRequestOutputError( - string? code, - string? message) - { - this.Code = code; - this.Message = message; - } - - /// - /// Initializes a new instance of the class. - /// - public BatchRequestOutputError() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.Json.g.cs deleted file mode 100644 index aa11b339..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchRequestOutputResponse - { - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchRequestOutputResponse), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchRequestOutputResponse; - } - - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchRequestOutputResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchRequestOutputResponse; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.g.cs deleted file mode 100644 index e51d0bd2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponse.g.cs +++ /dev/null @@ -1,67 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class BatchRequestOutputResponse - { - /// - /// The JSON body of the response - /// - [global::System.Text.Json.Serialization.JsonPropertyName("body")] - public object? Body { get; set; } - - /// - /// An unique identifier for the OpenAI API request. Please include this request ID when contacting support. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] - public string? RequestId { get; set; } - - /// - /// The HTTP status code of the response - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status_code")] - public int? StatusCode { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The JSON body of the response - /// - /// - /// An unique identifier for the OpenAI API request. Please include this request ID when contacting support. - /// - /// - /// The HTTP status code of the response - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public BatchRequestOutputResponse( - object? body, - string? requestId, - int? statusCode) - { - this.Body = body; - this.RequestId = requestId; - this.StatusCode = statusCode; - } - - /// - /// Initializes a new instance of the class. - /// - public BatchRequestOutputResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.Json.g.cs deleted file mode 100644 index cc9a36b3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class BatchRequestOutputResponseBody - { - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputResponseBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.BatchRequestOutputResponseBody), - jsonSerializerContext) as global::tryAGI.OpenAI.BatchRequestOutputResponseBody; - } - - /// - /// 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::tryAGI.OpenAI.BatchRequestOutputResponseBody? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.BatchRequestOutputResponseBody), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchRequestOutputResponseBody; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.g.cs deleted file mode 100644 index 473a44bf..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchRequestOutputResponseBody.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The JSON body of the response - /// - public sealed partial class BatchRequestOutputResponseBody - { - - /// - /// 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(); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.Json.g.cs new file mode 100644 index 00000000..4f421d4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchUsage + { + /// + /// 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::tryAGI.OpenAI.BatchUsage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchUsage), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchUsage; + } + + /// + /// 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::tryAGI.OpenAI.BatchUsage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchUsage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchUsage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.g.cs new file mode 100644 index 00000000..3083deb9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsage.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents token usage details including input tokens, output tokens, a
+ /// breakdown of output tokens, and the total tokens used. Only populated on
+ /// batches created after September 7, 2025. + ///
+ public sealed partial class BatchUsage + { + /// + /// The number of input tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { get; set; } + + /// + /// A detailed breakdown of the input tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens_details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.BatchUsageInputTokensDetails InputTokensDetails { get; set; } + + /// + /// The number of output tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int OutputTokens { get; set; } + + /// + /// A detailed breakdown of the output tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens_details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.BatchUsageOutputTokensDetails OutputTokensDetails { get; set; } + + /// + /// The total number of tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TotalTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The number of input tokens. + /// + /// + /// A detailed breakdown of the input tokens. + /// + /// + /// The number of output tokens. + /// + /// + /// A detailed breakdown of the output tokens. + /// + /// + /// The total number of tokens used. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BatchUsage( + int inputTokens, + global::tryAGI.OpenAI.BatchUsageInputTokensDetails inputTokensDetails, + int outputTokens, + global::tryAGI.OpenAI.BatchUsageOutputTokensDetails outputTokensDetails, + int totalTokens) + { + this.InputTokens = inputTokens; + this.InputTokensDetails = inputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(inputTokensDetails)); + this.OutputTokens = outputTokens; + this.OutputTokensDetails = outputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(outputTokensDetails)); + this.TotalTokens = totalTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public BatchUsage() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.Json.g.cs new file mode 100644 index 00000000..50f3e172 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchUsageInputTokensDetails + { + /// + /// 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::tryAGI.OpenAI.BatchUsageInputTokensDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchUsageInputTokensDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchUsageInputTokensDetails; + } + + /// + /// 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::tryAGI.OpenAI.BatchUsageInputTokensDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchUsageInputTokensDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchUsageInputTokensDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.g.cs new file mode 100644 index 00000000..c81ecc70 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageInputTokensDetails.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A detailed breakdown of the input tokens. + /// + public sealed partial class BatchUsageInputTokensDetails + { + /// + /// The number of tokens that were retrieved from the cache. [More on
+ /// prompt caching](/docs/guides/prompt-caching). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CachedTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The number of tokens that were retrieved from the cache. [More on
+ /// prompt caching](/docs/guides/prompt-caching). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BatchUsageInputTokensDetails( + int cachedTokens) + { + this.CachedTokens = cachedTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public BatchUsageInputTokensDetails() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.Json.g.cs new file mode 100644 index 00000000..b65fa5eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class BatchUsageOutputTokensDetails + { + /// + /// 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::tryAGI.OpenAI.BatchUsageOutputTokensDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.BatchUsageOutputTokensDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.BatchUsageOutputTokensDetails; + } + + /// + /// 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::tryAGI.OpenAI.BatchUsageOutputTokensDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.BatchUsageOutputTokensDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.BatchUsageOutputTokensDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.g.cs new file mode 100644 index 00000000..7ff18cf3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.BatchUsageOutputTokensDetails.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A detailed breakdown of the output tokens. + /// + public sealed partial class BatchUsageOutputTokensDetails + { + /// + /// The number of reasoning tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ReasoningTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The number of reasoning tokens. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BatchUsageOutputTokensDetails( + int reasoningTokens) + { + this.ReasoningTokens = reasoningTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public BatchUsageOutputTokensDetails() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Certificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Certificate.g.cs index 65c1bd9c..0c55acbf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Certificate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Certificate.g.cs @@ -9,25 +9,15 @@ namespace tryAGI.OpenAI public sealed partial class Certificate { /// - /// Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("active")] - public bool? Active { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("certificate_details")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CertificateCertificateDetails CertificateDetails { get; set; } - - /// - /// The Unix timestamp (in seconds) of when the certificate was uploaded. + /// The object type.
+ /// - If creating, updating, or getting a specific certificate, the object type is `certificate`.
+ /// - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.
+ /// - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CertificateObjectJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required global::tryAGI.OpenAI.CertificateObject Object { get; set; } /// /// The identifier, which can be referenced in API endpoints @@ -44,15 +34,25 @@ public sealed partial class Certificate public required string Name { get; set; } /// - /// The object type.
- /// - If creating, updating, or getting a specific certificate, the object type is `certificate`.
- /// - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.
- /// - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. + /// The Unix timestamp (in seconds) of when the certificate was uploaded. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CertificateObjectJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CertificateObject Object { get; set; } + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("certificate_details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CertificateCertificateDetails CertificateDetails { get; set; } + + /// + /// Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("active")] + public bool? Active { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -63,12 +63,11 @@ public sealed partial class Certificate /// /// Initializes a new instance of the class. /// - /// - /// Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. - /// - /// - /// - /// The Unix timestamp (in seconds) of when the certificate was uploaded. + /// + /// The object type.
+ /// - If creating, updating, or getting a specific certificate, the object type is `certificate`.
+ /// - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.
+ /// - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. /// /// /// The identifier, which can be referenced in API endpoints @@ -76,28 +75,29 @@ public sealed partial class Certificate /// /// The name of the certificate. /// - /// - /// The object type.
- /// - If creating, updating, or getting a specific certificate, the object type is `certificate`.
- /// - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`.
- /// - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`. + /// + /// The Unix timestamp (in seconds) of when the certificate was uploaded. + /// + /// + /// + /// Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Certificate( - global::tryAGI.OpenAI.CertificateCertificateDetails certificateDetails, - global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.CertificateObject @object, string id, string name, - global::tryAGI.OpenAI.CertificateObject @object, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.CertificateCertificateDetails certificateDetails, bool? active) { - this.CertificateDetails = certificateDetails ?? throw new global::System.ArgumentNullException(nameof(certificateDetails)); - this.CreatedAt = createdAt; + this.Object = @object; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Object = @object; + this.CreatedAt = createdAt; + this.CertificateDetails = certificateDetails ?? throw new global::System.ArgumentNullException(nameof(certificateDetails)); this.Active = active; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CertificateCertificateDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CertificateCertificateDetails.g.cs index 175f0f4c..b4d16b3f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CertificateCertificateDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CertificateCertificateDetails.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class CertificateCertificateDetails { /// - /// The content of the certificate in PEM format. + /// The Unix timestamp (in seconds) of when the certificate becomes valid. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public string? Content { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("valid_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? ValidAt { get; set; } /// /// The Unix timestamp (in seconds) of when the certificate expires. @@ -22,11 +23,10 @@ public sealed partial class CertificateCertificateDetails public global::System.DateTimeOffset? ExpiresAt { get; set; } /// - /// The Unix timestamp (in seconds) of when the certificate becomes valid. + /// The content of the certificate in PEM format. /// - [global::System.Text.Json.Serialization.JsonPropertyName("valid_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? ValidAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public string? Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,26 +37,26 @@ public sealed partial class CertificateCertificateDetails /// /// Initializes a new instance of the class. /// - /// - /// The content of the certificate in PEM format. + /// + /// The Unix timestamp (in seconds) of when the certificate becomes valid. /// /// /// The Unix timestamp (in seconds) of when the certificate expires. /// - /// - /// The Unix timestamp (in seconds) of when the certificate becomes valid. + /// + /// The content of the certificate in PEM format. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CertificateCertificateDetails( - string? content, + global::System.DateTimeOffset? validAt, global::System.DateTimeOffset? expiresAt, - global::System.DateTimeOffset? validAt) + string? content) { - this.Content = content; - this.ExpiresAt = expiresAt; this.ValidAt = validAt; + this.ExpiresAt = expiresAt; + this.Content = content; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionAllowedToolsChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionAllowedToolsChoice.g.cs index e677d49f..6ceb432b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionAllowedToolsChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionAllowedToolsChoice.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionAllowedToolsChoice { - /// - /// Constrains the tools available to the model to a pre-defined set. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("allowed_tools")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionAllowedTools AllowedTools { get; set; } - /// /// Allowed tool configuration type. Always `allowed_tools`. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionAllowedToolsChoice [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionAllowedToolsChoiceTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoiceType Type { get; set; } + /// + /// Constrains the tools available to the model to a pre-defined set. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_tools")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionAllowedTools AllowedTools { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ChatCompletionAllowedToolsChoice /// /// Initializes a new instance of the class. /// - /// - /// Constrains the tools available to the model to a pre-defined set. - /// /// /// Allowed tool configuration type. Always `allowed_tools`. /// + /// + /// Constrains the tools available to the model to a pre-defined set. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionDeleted.g.cs index 03880e10..4951b882 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionDeleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionDeleted.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionDeleted { /// - /// Whether the chat completion was deleted. + /// The type of object being deleted. /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionDeletedObjectJsonConverter))] + public global::tryAGI.OpenAI.ChatCompletionDeletedObject Object { get; set; } /// /// The ID of the chat completion that was deleted. @@ -23,11 +23,11 @@ public sealed partial class ChatCompletionDeleted public required string Id { get; set; } /// - /// The type of object being deleted. + /// Whether the chat completion was deleted. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionDeletedObjectJsonConverter))] - public global::tryAGI.OpenAI.ChatCompletionDeletedObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,25 +38,25 @@ public sealed partial class ChatCompletionDeleted /// /// Initializes a new instance of the class. /// - /// - /// Whether the chat completion was deleted. + /// + /// The type of object being deleted. /// /// /// The ID of the chat completion that was deleted. /// - /// - /// The type of object being deleted. + /// + /// Whether the chat completion was deleted. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionDeleted( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.ChatCompletionDeletedObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionFunctions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionFunctions.g.cs index e9dd2d41..0b94b623 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionFunctions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionFunctions.g.cs @@ -25,7 +25,7 @@ public sealed partial class ChatCompletionFunctions public required string Name { get; set; } /// - /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
+ /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
/// Omitting `parameters` defines a function with an empty parameter list. ///
[global::System.Text.Json.Serialization.JsonPropertyName("parameters")] @@ -48,7 +48,7 @@ public sealed partial class ChatCompletionFunctions /// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. /// /// - /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
+ /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
/// Omitting `parameters` defines a function with an empty parameter list. /// #if NET7_0_OR_GREATER diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionList.g.cs index 719bfb81..44d4d129 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionList.g.cs @@ -8,6 +8,15 @@ namespace tryAGI.OpenAI ///
public sealed partial class ChatCompletionList { + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.ChatCompletionListObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectJsonConverter))] + public global::tryAGI.OpenAI.ChatCompletionListObject Object { get; set; } = global::tryAGI.OpenAI.ChatCompletionListObject.List; + /// /// An array of chat completion objects. /// @@ -22,13 +31,6 @@ public sealed partial class ChatCompletionList [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Indicates whether there are more Chat Completions available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The identifier of the last chat completion in the data array. /// @@ -37,13 +39,11 @@ public sealed partial class ChatCompletionList public required string LastId { get; set; } /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// Indicates whether there are more Chat Completions available. ///
- /// global::tryAGI.OpenAI.ChatCompletionListObject.List - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionListObjectJsonConverter))] - public global::tryAGI.OpenAI.ChatCompletionListObject Object { get; set; } = global::tryAGI.OpenAI.ChatCompletionListObject.List; + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,21 +54,21 @@ public sealed partial class ChatCompletionList /// /// Initializes a new instance of the class. /// + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + /// /// /// An array of chat completion objects. /// /// /// The identifier of the first chat completion in the data array. /// - /// - /// Indicates whether there are more Chat Completions available. - /// /// /// The identifier of the last chat completion in the data array. /// - /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// + /// Indicates whether there are more Chat Completions available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -76,14 +76,14 @@ public sealed partial class ChatCompletionList public ChatCompletionList( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ChatCompletionListObject @object = global::tryAGI.OpenAI.ChatCompletionListObject.List) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCall.g.cs index e1ac6e0c..7926c601 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCall.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ChatCompletionMessageCustomToolCall { - /// - /// The custom tool that the model called. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("custom")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom Custom { get; set; } - /// /// The ID of the tool call. /// @@ -29,6 +22,13 @@ public sealed partial class ChatCompletionMessageCustomToolCall [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageCustomToolCallTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallType Type { get; set; } + /// + /// The custom tool that the model called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("custom")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom Custom { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class ChatCompletionMessageCustomToolCall /// /// Initializes a new instance of the class. /// - /// - /// The custom tool that the model called. - /// /// /// The ID of the tool call. /// /// /// The type of the tool. Always `custom`. /// + /// + /// The custom tool that the model called. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageCustomToolCall( - global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom custom, string id, + global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallCustom custom, global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCallType type) { - this.Custom = custom ?? throw new global::System.ArgumentNullException(nameof(custom)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Custom = custom ?? throw new global::System.ArgumentNullException(nameof(custom)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCallCustom.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCallCustom.g.cs index 6bcbb17d..e7e17856 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCallCustom.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageCustomToolCallCustom.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionMessageCustomToolCallCustom { /// - /// The input for the custom tool call generated by the model. + /// The name of the custom tool to call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { get; set; } + public required string Name { get; set; } /// - /// The name of the custom tool to call. + /// The input for the custom tool call generated by the model. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string Input { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class ChatCompletionMessageCustomToolCallCustom /// /// Initializes a new instance of the class. /// - /// - /// The input for the custom tool call generated by the model. - /// /// /// The name of the custom tool to call. /// + /// + /// The input for the custom tool call generated by the model. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageCustomToolCallCustom( - string input, - string name) + string name, + string input) { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageList.g.cs index 7babb9f9..a591a3b8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageList.g.cs @@ -10,6 +10,15 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionMessageList { + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.ChatCompletionMessageListObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectJsonConverter))] + public global::tryAGI.OpenAI.ChatCompletionMessageListObject Object { get; set; } = global::tryAGI.OpenAI.ChatCompletionMessageListObject.List; + /// /// An array of chat completion message objects. /// @@ -24,13 +33,6 @@ public sealed partial class ChatCompletionMessageList [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Indicates whether there are more chat messages available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The identifier of the last chat message in the data array. /// @@ -39,13 +41,11 @@ public sealed partial class ChatCompletionMessageList public required string LastId { get; set; } /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// Indicates whether there are more chat messages available. ///
- /// global::tryAGI.OpenAI.ChatCompletionMessageListObject.List - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageListObjectJsonConverter))] - public global::tryAGI.OpenAI.ChatCompletionMessageListObject Object { get; set; } = global::tryAGI.OpenAI.ChatCompletionMessageListObject.List; + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,21 +56,21 @@ public sealed partial class ChatCompletionMessageList /// /// Initializes a new instance of the class. /// + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + /// /// /// An array of chat completion message objects. /// /// /// The identifier of the first chat message in the data array. /// - /// - /// Indicates whether there are more chat messages available. - /// /// /// The identifier of the last chat message in the data array. /// - /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// + /// Indicates whether there are more chat messages available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -78,14 +78,14 @@ public sealed partial class ChatCompletionMessageList public ChatCompletionMessageList( global::System.Collections.Generic.IList> data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ChatCompletionMessageListObject @object = global::tryAGI.OpenAI.ChatCompletionMessageListObject.List) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItem.g.cs index 59eb083d..299f95d0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItem.g.cs @@ -10,13 +10,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ChatCompletionMessageListDataItem { - /// - /// If a content parts array was provided, this is an array of `text` and `image_url` parts.
- /// Otherwise, null. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("content_parts")] - public global::System.Collections.Generic.IList>? ContentParts { get; set; } - /// /// The identifier of the chat message. /// @@ -24,6 +17,12 @@ public sealed partial class ChatCompletionMessageListDataItem [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_parts")] + public global::System.Collections.Generic.IList>? ContentParts { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,19 +32,16 @@ public sealed partial class ChatCompletionMessageListDataItem /// /// Initializes a new instance of the class. /// - /// - /// If a content parts array was provided, this is an array of `text` and `image_url` parts.
- /// Otherwise, null. - /// /// /// The identifier of the chat message. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageListDataItem( string id, - global::System.Collections.Generic.IList>? contentParts) + global::System.Collections.Generic.IList>? contentParts) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ContentParts = contentParts; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.Json.g.cs new file mode 100644 index 00000000..26272ea2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionMessageListDataItemContentParts + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionMessageListDataItemContentParts; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.g.cs new file mode 100644 index 00000000..40f11868 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageListDataItemContentParts.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionMessageListDataItemContentParts + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCall.g.cs index 20913c76..0b7413e1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCall.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ChatCompletionMessageToolCall { - /// - /// The function that the model called. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction Function { get; set; } - /// /// The ID of the tool call. /// @@ -29,6 +22,13 @@ public sealed partial class ChatCompletionMessageToolCall [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionMessageToolCallType Type { get; set; } + /// + /// The function that the model called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class ChatCompletionMessageToolCall /// /// Initializes a new instance of the class. /// - /// - /// The function that the model called. - /// /// /// The ID of the tool call. /// /// /// The type of the tool. Currently, only `function` is supported. /// + /// + /// The function that the model called. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageToolCall( - global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction function, string id, + global::tryAGI.OpenAI.ChatCompletionMessageToolCallFunction function, global::tryAGI.OpenAI.ChatCompletionMessageToolCallType type) { - this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunk.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunk.g.cs index 78195013..a1b28ddc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunk.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunk.g.cs @@ -11,8 +11,9 @@ public sealed partial class ChatCompletionMessageToolCallChunk /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? Function { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } /// /// The ID of the tool call. @@ -20,13 +21,6 @@ public sealed partial class ChatCompletionMessageToolCallChunk [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Index { get; set; } - /// /// The type of the tool. Currently, only `function` is supported. /// @@ -34,6 +28,12 @@ public sealed partial class ChatCompletionMessageToolCallChunk [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallChunkTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkType? Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,27 +43,27 @@ public sealed partial class ChatCompletionMessageToolCallChunk /// /// Initializes a new instance of the class. /// - /// + /// /// /// The ID of the tool call. /// - /// /// /// The type of the tool. Currently, only `function` is supported. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageToolCallChunk( int index, - global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? function, string? id, - global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkType? type) + global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkType? type, + global::tryAGI.OpenAI.ChatCompletionMessageToolCallChunkFunction? function) { this.Index = index; - this.Function = function; this.Id = id; this.Type = type; + this.Function = function; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunkFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunkFunction.g.cs index 2a1aae84..ad567375 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunkFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallChunkFunction.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionMessageToolCallChunkFunction { - /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - public string? Arguments { get; set; } - /// /// The name of the function to call. /// [global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } + /// + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class ChatCompletionMessageToolCallChunkFunction /// /// Initializes a new instance of the class. /// - /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - /// /// /// The name of the function to call. /// + /// + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageToolCallChunkFunction( - string? arguments, - string? name) + string? name, + string? arguments) { - this.Arguments = arguments; this.Name = name; + this.Arguments = arguments; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallFunction.g.cs index e747aa84..a6108cbd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallFunction.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionMessageToolCallFunction { /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// The name of the function to call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string Name { get; set; } /// - /// The name of the function to call. + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class ChatCompletionMessageToolCallFunction /// /// Initializes a new instance of the class. /// - /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - /// /// /// The name of the function to call. /// + /// + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionMessageToolCallFunction( - string arguments, - string name) + string name, + string arguments) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallsItem.g.cs index cdb0e5b0..d3b1d49f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallsItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionMessageToolCallsItem.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// A call to a function tool created by the model. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Call { get; init; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Function { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Call { get; } + public global::tryAGI.OpenAI.ChatCompletionMessageToolCall? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Call))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsCall => Call != null; + public bool IsFunction => Function != null; /// - /// + /// A call to a custom tool created by the model. /// - public static implicit operator ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMessageToolCall value) => new ChatCompletionMessageToolCallsItem((global::tryAGI.OpenAI.ChatCompletionMessageToolCall?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? Custom { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? Custom { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionMessageToolCall?(ChatCompletionMessageToolCallsItem @this) => @this.Call; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] +#endif + public bool IsCustom => Custom != null; /// /// /// - public ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMessageToolCall? value) - { - Call = value; - } + public static implicit operator ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMessageToolCall value) => new ChatCompletionMessageToolCallsItem((global::tryAGI.OpenAI.ChatCompletionMessageToolCall?)value); /// - /// A call to a custom tool created by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? CustomCall { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? CustomCall { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ChatCompletionMessageToolCall?(ChatCompletionMessageToolCallsItem @this) => @this.Function; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomCall))] -#endif - public bool IsCustomCall => CustomCall != null; + public ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMessageToolCall? value) + { + Function = value; + } /// /// @@ -69,42 +68,42 @@ public ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMe /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall?(ChatCompletionMessageToolCallsItem @this) => @this.CustomCall; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall?(ChatCompletionMessageToolCallsItem @this) => @this.Custom; /// /// /// public ChatCompletionMessageToolCallsItem(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? value) { - CustomCall = value; + Custom = value; } /// /// /// public ChatCompletionMessageToolCallsItem( - global::tryAGI.OpenAI.ChatCompletionMessageToolCall? call, - global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? customCall + global::tryAGI.OpenAI.ChatCompletionMessageToolCall? function, + global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall? custom ) { - Call = call; - CustomCall = customCall; + Function = function; + Custom = custom; } /// /// /// public object? Object => - CustomCall as object ?? - Call as object + Custom as object ?? + Function as object ; /// /// /// public override string? ToString() => - Call?.ToString() ?? - CustomCall?.ToString() + Function?.ToString() ?? + Custom?.ToString() ; /// @@ -112,15 +111,15 @@ Call as object /// public bool Validate() { - return IsCall || IsCustomCall; + return IsFunction && !IsCustom || !IsFunction && IsCustom; } /// /// /// public TResult? Match( - global::System.Func? call = null, - global::System.Func? customCall = null, + global::System.Func? function = null, + global::System.Func? custom = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsCall && call != null) + if (IsFunction && function != null) { - return call(Call!); + return function(Function!); } - else if (IsCustomCall && customCall != null) + else if (IsCustom && custom != null) { - return customCall(CustomCall!); + return custom(Custom!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? call = null, - global::System.Action? customCall = null, + global::System.Action? function = null, + global::System.Action? custom = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsCall) + if (IsFunction) { - call?.Invoke(Call!); + function?.Invoke(Function!); } - else if (IsCustomCall) + else if (IsCustom) { - customCall?.Invoke(CustomCall!); + custom?.Invoke(Custom!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Call, + Function, typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), - CustomCall, + Custom, typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatCompletionMessageToolCallsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Call, other.Call) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomCall, other.CustomCall) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitie.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitie.g.cs deleted file mode 100644 index 43378d46..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitie.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public enum ChatCompletionModalitie - { - /// - /// - /// - Text, - /// - /// - /// - Audio, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ChatCompletionModalitieExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ChatCompletionModalitie value) - { - return value switch - { - ChatCompletionModalitie.Text => "text", - ChatCompletionModalitie.Audio => "audio", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ChatCompletionModalitie? ToEnum(string value) - { - return value switch - { - "text" => ChatCompletionModalitie.Text, - "audio" => ChatCompletionModalitie.Audio, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.Json.g.cs new file mode 100644 index 00000000..6cebf71e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionModalities + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionModalities? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionModalities), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionModalities; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionModalities? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionModalities), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionModalities; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.g.cs new file mode 100644 index 00000000..b7ff9e4f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalities.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionModalities + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitiesVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitiesVariant1Item.g.cs new file mode 100644 index 00000000..e0f07f08 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionModalitiesVariant1Item.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ChatCompletionModalitiesVariant1Item + { + /// + /// + /// + Text, + /// + /// + /// + Audio, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatCompletionModalitiesVariant1ItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatCompletionModalitiesVariant1Item value) + { + return value switch + { + ChatCompletionModalitiesVariant1Item.Text => "text", + ChatCompletionModalitiesVariant1Item.Audio => "audio", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatCompletionModalitiesVariant1Item? ToEnum(string value) + { + return value switch + { + "text" => ChatCompletionModalitiesVariant1Item.Text, + "audio" => ChatCompletionModalitiesVariant1Item.Audio, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoice.g.cs index bb7b3336..5d3699f5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoice.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionNamedToolChoice { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceFunction Function { get; set; } - /// /// For function calling, the type is always `function`. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionNamedToolChoice [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceFunction Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionNamedToolChoice /// /// Initializes a new instance of the class. /// - /// /// /// For function calling, the type is always `function`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoiceCustom.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoiceCustom.g.cs index 832b894c..a1920238 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoiceCustom.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionNamedToolChoiceCustom.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionNamedToolChoiceCustom { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("custom")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomCustom Custom { get; set; } - /// /// For custom tool calling, the type is always `custom`. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionNamedToolChoiceCustom [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionNamedToolChoiceCustomTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("custom")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustomCustom Custom { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionNamedToolChoiceCustom /// /// Initializes a new instance of the class. /// - /// /// /// For custom tool calling, the type is always `custom`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs index 0c29c3a7..ee4a4359 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessage.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,24 +11,23 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionRequestAssistantMessage { /// - /// Data about a previous audio response from the model.
- /// [Learn more](https://platform.openai.com/docs/guides/audio). + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::tryAGI.OpenAI.OneOf>? Content { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public object? Content { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + public string? Refusal { get; set; } /// - /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. + /// The role of the messages author, in this case `assistant`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall? FunctionCall { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleJsonConverter))] + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRole Role { get; set; } /// /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. @@ -35,17 +36,10 @@ public sealed partial class ChatCompletionRequestAssistantMessage public string? Name { get; set; } /// - /// The refusal message by the assistant. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - public string? Refusal { get; set; } - - /// - /// The role of the messages author, in this case `assistant`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageRoleJsonConverter))] - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2? Audio { get; set; } /// /// The tool calls generated by the model, such as function calls. @@ -53,6 +47,12 @@ public sealed partial class ChatCompletionRequestAssistantMessage [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] public global::System.Collections.Generic.IList? ToolCalls { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2? FunctionCall { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -62,40 +62,38 @@ public sealed partial class ChatCompletionRequestAssistantMessage /// /// Initializes a new instance of the class. /// - /// - /// Data about a previous audio response from the model.
- /// [Learn more](https://platform.openai.com/docs/guides/audio). - /// /// - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// - /// - /// The refusal message by the assistant. - /// + /// /// /// The role of the messages author, in this case `assistant`. /// + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// + /// /// /// The tool calls generated by the model, such as function calls. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestAssistantMessage( - global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio? audio, - object? content, - string? name, + global::tryAGI.OpenAI.OneOf>? content, string? refusal, global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRole role, - global::System.Collections.Generic.IList? toolCalls) + string? name, + global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2? audio, + global::System.Collections.Generic.IList? toolCalls, + global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2? functionCall) { - this.Audio = audio; this.Content = content; - this.Name = name; this.Refusal = refusal; this.Role = role; + this.Name = name; + this.Audio = audio; this.ToolCalls = toolCalls; + this.FunctionCall = functionCall; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio.g.cs index 4ada3126..8c9f516a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio.g.cs @@ -4,44 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Data about a previous audio response from the model.
- /// [Learn more](https://platform.openai.com/docs/guides/audio). + /// ///
public sealed partial class ChatCompletionRequestAssistantMessageAudio { - /// - /// Unique identifier for a previous audio response from the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Unique identifier for a previous audio response from the model. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChatCompletionRequestAssistantMessageAudio( - string id) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatCompletionRequestAssistantMessageAudio() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.Json.g.cs new file mode 100644 index 00000000..6948462f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionRequestAssistantMessageAudio2 + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageAudio2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.g.cs new file mode 100644 index 00000000..bbf73a64 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageAudio2.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Data about a previous audio response from the model.
+ /// [Learn more](/docs/guides/audio). + ///
+ public sealed partial class ChatCompletionRequestAssistantMessageAudio2 + { + /// + /// Unique identifier for a previous audio response from the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for a previous audio response from the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatCompletionRequestAssistantMessageAudio2( + string id) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatCompletionRequestAssistantMessageAudio2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.Json.g.cs new file mode 100644 index 00000000..e318d578 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionRequestAssistantMessageContent + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.g.cs new file mode 100644 index 00000000..df2c9d0b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestAssistantMessageContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs index 0861038e..bb46d7ba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageContentPart.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct ChatCompletionRequestAssistantMessageContentPart : global::System.IEquatable { /// - /// Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + /// Learn about [text inputs](/docs/guides/text-generation). /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; init; } @@ -29,37 +29,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator ChatCompletionRequestAssistantMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText value) => new ChatCompletionRequestAssistantMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Refusal { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Refusal { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestAssistantMessageContentPart @this) => @this.Text; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] +#endif + public bool IsRefusal => Refusal != null; /// /// /// - public ChatCompletionRequestAssistantMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) - { - Text = value; - } + public static implicit operator ChatCompletionRequestAssistantMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText value) => new ChatCompletionRequestAssistantMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Refusal { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal? Refusal { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestAssistantMessageContentPart @this) => @this.Text; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] -#endif - public bool IsRefusal => Refusal != null; + public ChatCompletionRequestAssistantMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) + { + Text = value; + } /// /// @@ -112,7 +111,7 @@ Text as object /// public bool Validate() { - return IsText || IsRefusal; + return IsText && !IsRefusal || !IsText && IsRefusal; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall.g.cs index 7343dccb..dbbff2e9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall.g.cs @@ -4,58 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. + /// /// - [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class ChatCompletionRequestAssistantMessageFunctionCall { - /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - [global::System.Obsolete("This property marked as deprecated.")] - public required string Arguments { get; set; } - - /// - /// The name of the function to call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - [global::System.Obsolete("This property marked as deprecated.")] - public required string Name { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. - /// - /// - /// The name of the function to call. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChatCompletionRequestAssistantMessageFunctionCall( - string arguments, - string name) - { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatCompletionRequestAssistantMessageFunctionCall() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.Json.g.cs new file mode 100644 index 00000000..dd90cf2c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionRequestAssistantMessageFunctionCall2 + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageFunctionCall2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.g.cs new file mode 100644 index 00000000..f51a4196 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageFunctionCall2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. + /// + [global::System.Obsolete("This model marked as deprecated.")] + public sealed partial class ChatCompletionRequestAssistantMessageFunctionCall2 + { + /// + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] + public required string Arguments { get; set; } + + /// + /// The name of the function to call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + [global::System.Obsolete("This property marked as deprecated.")] + public required string Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + /// + /// + /// The name of the function to call. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatCompletionRequestAssistantMessageFunctionCall2( + string arguments, + string name) + { + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatCompletionRequestAssistantMessageFunctionCall2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.Json.g.cs new file mode 100644 index 00000000..faf84f96 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionRequestAssistantMessageRefusal + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageRefusal; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.g.cs new file mode 100644 index 00000000..bd1f66d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestAssistantMessageRefusal.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestAssistantMessageRefusal + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestDeveloperMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestDeveloperMessage.g.cs index c7f12bb2..8c03ae0a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestDeveloperMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestDeveloperMessage.g.cs @@ -16,15 +16,9 @@ public sealed partial class ChatCompletionRequestDeveloperMessage /// The contents of the developer message. /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } - - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } /// /// The role of the messages author, in this case `developer`. @@ -33,6 +27,12 @@ public sealed partial class ChatCompletionRequestDeveloperMessage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestDeveloperMessageRoleJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessageRole Role { get; set; } + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,23 +45,23 @@ public sealed partial class ChatCompletionRequestDeveloperMessage /// /// The contents of the developer message. /// - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// /// /// The role of the messages author, in this case `developer`. /// + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestDeveloperMessage( - global::tryAGI.OpenAI.AnyOf> content, - string? name, - global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessageRole role) + global::tryAGI.OpenAI.OneOf> content, + global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessageRole role, + string? name) { this.Content = content; - this.Name = name; this.Role = role; + this.Name = name; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessage.g.cs index c6f737f8..3fdd8b88 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessage.g.cs @@ -10,7 +10,15 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionRequestFunctionMessage { /// - /// The contents of the function message. + /// The role of the messages author, in this case `function`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestFunctionMessageRoleJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageRole Role { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] [global::System.Text.Json.Serialization.JsonRequired] @@ -25,14 +33,6 @@ public sealed partial class ChatCompletionRequestFunctionMessage [global::System.Obsolete("This property marked as deprecated.")] public required string Name { get; set; } - /// - /// The role of the messages author, in this case `function`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestFunctionMessageRoleJsonConverter))] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageRole Role { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,15 +42,13 @@ public sealed partial class ChatCompletionRequestFunctionMessage /// /// Initializes a new instance of the class. /// - /// - /// The contents of the function message. + /// + /// The role of the messages author, in this case `function`. /// + /// /// /// The name of the function to call. /// - /// - /// The role of the messages author, in this case `function`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.Json.g.cs new file mode 100644 index 00000000..5d672fb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionRequestFunctionMessageContent + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessageContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.g.cs new file mode 100644 index 00000000..ebe9df92 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestFunctionMessageContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionRequestFunctionMessageContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessage.g.cs index dfe99e15..fd57fcfc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessage.g.cs @@ -28,24 +28,6 @@ namespace tryAGI.OpenAI #endif public bool IsDeveloper => Developer != null; - /// - /// - /// - public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage?(ChatCompletionRequestMessage @this) => @this.Developer; - - /// - /// - /// - public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage? value) - { - Developer = value; - } - /// /// Developer-provided instructions that the model should follow, regardless of
/// messages sent by the user. With o1 models and newer, use `developer` messages
@@ -65,24 +47,6 @@ public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestD #endif public bool IsSystem => System != null; - /// - /// - /// - public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage?(ChatCompletionRequestMessage @this) => @this.System; - - /// - /// - /// - public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage? value) - { - System = value; - } - /// /// Messages sent by an end user, containing prompts or additional context
/// information. @@ -101,110 +65,145 @@ public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestS #endif public bool IsUser => User != null; + /// + /// Messages sent by the model in response to user messages. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Assistant { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Assistant { get; } +#endif + /// /// /// - public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestUserMessage?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] +#endif + public bool IsAssistant => Assistant != null; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestUserMessage?(ChatCompletionRequestMessage @this) => @this.User; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Tool { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Tool { get; } +#endif /// /// /// - public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage? value) - { - User = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; /// - /// Messages sent by the model in response to user messages. + /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Assistant { get; init; } + public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Function { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Assistant { get; } + public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistant => Assistant != null; + public bool IsFunction => Function != null; + /// + /// + /// + public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage?)value); /// /// /// - public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?)value); + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage?(ChatCompletionRequestMessage @this) => @this.Developer; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?(ChatCompletionRequestMessage @this) => @this.Assistant; + public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage? value) + { + Developer = value; + } /// /// /// - public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? value) + public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage?(ChatCompletionRequestMessage @this) => @this.System; + + /// + /// + /// + public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage? value) { - Assistant = value; + System = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Tool { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? Tool { get; } -#endif + public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestUserMessage?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] -#endif - public bool IsTool => Tool != null; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestUserMessage?(ChatCompletionRequestMessage @this) => @this.User; /// /// /// - public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestToolMessage?)value); + public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage? value) + { + User = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestToolMessage?(ChatCompletionRequestMessage @this) => @this.Tool; + public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?)value); /// /// /// - public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? value) + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?(ChatCompletionRequestMessage @this) => @this.Assistant; + + /// + /// + /// + public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? value) { - Tool = value; + Assistant = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Function { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage? Function { get; } -#endif + public static implicit operator ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage value) => new ChatCompletionRequestMessage((global::tryAGI.OpenAI.ChatCompletionRequestToolMessage?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] -#endif - public bool IsFunction => Function != null; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestToolMessage?(ChatCompletionRequestMessage @this) => @this.Tool; + + /// + /// + /// + public ChatCompletionRequestMessage(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage? value) + { + Tool = value; + } /// /// @@ -273,7 +272,7 @@ Developer as object /// public bool Validate() { - return IsDeveloper || IsSystem || IsUser || IsAssistant || IsTool || IsFunction; + return IsDeveloper && !IsSystem && !IsUser && !IsAssistant && !IsTool && !IsFunction || !IsDeveloper && IsSystem && !IsUser && !IsAssistant && !IsTool && !IsFunction || !IsDeveloper && !IsSystem && IsUser && !IsAssistant && !IsTool && !IsFunction || !IsDeveloper && !IsSystem && !IsUser && IsAssistant && !IsTool && !IsFunction || !IsDeveloper && !IsSystem && !IsUser && !IsAssistant && IsTool && !IsFunction || !IsDeveloper && !IsSystem && !IsUser && !IsAssistant && !IsTool && IsFunction; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartAudio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartAudio.g.cs index ab5bf3af..4d558cc3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartAudio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartAudio.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). + /// Learn about [audio inputs](/docs/guides/audio). /// public sealed partial class ChatCompletionRequestMessageContentPartAudio { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_audio")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio InputAudio { get; set; } - /// /// The type of the content part. Always `input_audio`. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartAudio [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartAudioTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_audio")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudioInputAudio InputAudio { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionRequestMessageContentPartAudio /// /// Initializes a new instance of the class. /// - /// /// /// The type of the content part. Always `input_audio`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFile.g.cs index 4c697b5a..89ac4b57 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFile.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + /// Learn about [file inputs](/docs/guides/text) for text generation. /// public sealed partial class ChatCompletionRequestMessageContentPartFile { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileFile File { get; set; } - /// /// The type of the content part. Always `file`. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartFile [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartFileTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFileFile File { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionRequestMessageContentPartFile /// /// Initializes a new instance of the class. /// - /// /// /// The type of the content part. Always `file`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFileFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFileFile.g.cs index 73bd414f..4ddaa583 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFileFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartFileFile.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionRequestMessageContentPartFileFile { + /// + /// The name of the file, used when passing the file to the model as a
+ /// string. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + public string? Filename { get; set; } + /// /// The base64 encoded file data, used when passing the file to the model
/// as a string. @@ -21,13 +28,6 @@ public sealed partial class ChatCompletionRequestMessageContentPartFileFile [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] public string? FileId { get; set; } - /// - /// The name of the file, used when passing the file to the model as a
- /// string. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("filename")] - public string? Filename { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,6 +37,10 @@ public sealed partial class ChatCompletionRequestMessageContentPartFileFile /// /// Initializes a new instance of the class. /// + /// + /// The name of the file, used when passing the file to the model as a
+ /// string. + /// /// /// The base64 encoded file data, used when passing the file to the model
/// as a string. @@ -44,21 +48,17 @@ public sealed partial class ChatCompletionRequestMessageContentPartFileFile /// /// The ID of an uploaded file to use as input. /// - /// - /// The name of the file, used when passing the file to the model as a
- /// string. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestMessageContentPartFileFile( + string? filename, string? fileData, - string? fileId, - string? filename) + string? fileId) { + this.Filename = filename; this.FileData = fileData; this.FileId = fileId; - this.Filename = filename; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImage.g.cs index 94c118b1..ad3b2b50 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImage.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + /// Learn about [image inputs](/docs/guides/vision). /// public sealed partial class ChatCompletionRequestMessageContentPartImage { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; set; } - /// /// The type of the content part. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartImage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrl ImageUrl { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionRequestMessageContentPartImage /// /// Initializes a new instance of the class. /// - /// /// /// The type of the content part. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrl.g.cs index dfae1a8a..5d5b8503 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrl.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrl.g.cs @@ -8,14 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionRequestMessageContentPartImageImageUrl { - /// - /// Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
- /// Default Value: auto - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("detail")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailJsonConverter))] - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Detail { get; set; } - /// /// Either a URL of the image or the base64 encoded image data. /// @@ -23,6 +15,14 @@ public sealed partial class ChatCompletionRequestMessageContentPartImageImageUrl [global::System.Text.Json.Serialization.JsonRequired] public required string Url { get; set; } + /// + /// Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).
+ /// Default Value: auto + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartImageImageUrlDetailJsonConverter))] + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImageImageUrlDetail? Detail { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,13 +32,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartImageImageUrl /// /// Initializes a new instance of the class. /// - /// - /// Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
- /// Default Value: auto - /// /// /// Either a URL of the image or the base64 encoded image data. /// + /// + /// Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).
+ /// Default Value: auto + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrlDetail.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrlDetail.g.cs index c562895b..dc6bb537 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrlDetail.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartImageImageUrlDetail.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Specifies the detail level of the image. Learn more in the [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
+ /// Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).
/// Default Value: auto ///
public enum ChatCompletionRequestMessageContentPartImageImageUrlDetail @@ -14,11 +14,11 @@ public enum ChatCompletionRequestMessageContentPartImageImageUrlDetail ///
Auto, /// - /// //platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + /// /// Low, /// - /// //platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding). + /// /// High, } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartRefusal.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartRefusal.g.cs index fab0a5c4..dd0edb51 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartRefusal.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartRefusal.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ChatCompletionRequestMessageContentPartRefusal { - /// - /// The refusal message generated by the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Refusal { get; set; } - /// /// The type of the content part. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartRefusal [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartRefusalTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusalType Type { get; set; } + /// + /// The refusal message generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Refusal { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ChatCompletionRequestMessageContentPartRefusal /// /// Initializes a new instance of the class. /// - /// - /// The refusal message generated by the model. - /// /// /// The type of the content part. /// + /// + /// The refusal message generated by the model. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartText.g.cs index e0dff830..8e72a5c3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartText.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestMessageContentPartText.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + /// Learn about [text inputs](/docs/guides/text-generation). /// public sealed partial class ChatCompletionRequestMessageContentPartText { - /// - /// The text content. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the content part. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionRequestMessageContentPartText [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessageContentPartTextTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartTextType Type { get; set; } + /// + /// The text content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ChatCompletionRequestMessageContentPartText /// /// Initializes a new instance of the class. /// - /// - /// The text content. - /// /// /// The type of the content part. /// + /// + /// The text content. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs index 30787068..dd101e55 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessage.g.cs @@ -16,15 +16,9 @@ public sealed partial class ChatCompletionRequestSystemMessage /// The contents of the system message. ///
[global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } - - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } /// /// The role of the messages author, in this case `system`. @@ -33,6 +27,12 @@ public sealed partial class ChatCompletionRequestSystemMessage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageRoleJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageRole Role { get; set; } + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,23 +45,23 @@ public sealed partial class ChatCompletionRequestSystemMessage /// /// The contents of the system message. /// - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// /// /// The role of the messages author, in this case `system`. /// + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestSystemMessage( - global::tryAGI.OpenAI.AnyOf> content, - string? name, - global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageRole role) + global::tryAGI.OpenAI.OneOf> content, + global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageRole role, + string? name) { this.Content = content; - this.Name = name; this.Role = role; + this.Name = name; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessageContentPart.g.cs index 7afb152f..1f46ca6e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestSystemMessageContentPart.g.cs @@ -10,22 +10,21 @@ namespace tryAGI.OpenAI public readonly partial struct ChatCompletionRequestSystemMessageContentPart : global::System.IEquatable { /// - /// Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + /// Learn about [text inputs](/docs/guides/text-generation). /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; init; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextContentPart))] #endif - public bool IsText => Text != null; - + public bool IsTextContentPart => TextContentPart != null; /// /// /// @@ -34,28 +33,28 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestSystemMessageContentPart @this) => @this.Text; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestSystemMessageContentPart @this) => @this.TextContentPart; /// /// /// public ChatCompletionRequestSystemMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) { - Text = value; + TextContentPart = value; } /// /// /// public object? Object => - Text as object + TextContentPart as object ; /// /// /// public override string? ToString() => - Text?.ToString() + TextContentPart?.ToString() ; /// @@ -63,14 +62,14 @@ Text as object /// public bool Validate() { - return IsText; + return IsTextContentPart; } /// /// /// public TResult? Match( - global::System.Func? text = null, + global::System.Func? textContentPart = null, bool validate = true) { if (validate) @@ -78,9 +77,9 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsTextContentPart && textContentPart != null) { - return text(Text!); + return textContentPart(TextContentPart!); } return default(TResult); @@ -90,7 +89,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? text = null, + global::System.Action? textContentPart = null, bool validate = true) { if (validate) @@ -98,9 +97,9 @@ public void Match( Validate(); } - if (IsText) + if (IsTextContentPart) { - text?.Invoke(Text!); + textContentPart?.Invoke(TextContentPart!); } } @@ -111,7 +110,7 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + TextContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), }; const int offset = unchecked((int)2166136261); @@ -129,7 +128,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatCompletionRequestSystemMessageContentPart other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextContentPart, other.TextContentPart) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessage.g.cs index 8f3be470..8ab2bf15 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessage.g.cs @@ -10,14 +10,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionRequestToolMessage { - /// - /// The contents of the tool message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } - /// /// The role of the messages author, in this case `tool`. /// @@ -25,6 +17,14 @@ public sealed partial class ChatCompletionRequestToolMessage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageRoleJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestToolMessageRole Role { get; set; } + /// + /// The contents of the tool message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } + /// /// Tool call that this message is responding to. /// @@ -41,12 +41,12 @@ public sealed partial class ChatCompletionRequestToolMessage /// /// Initializes a new instance of the class. /// - /// - /// The contents of the tool message. - /// /// /// The role of the messages author, in this case `tool`. /// + /// + /// The contents of the tool message. + /// /// /// Tool call that this message is responding to. /// @@ -54,7 +54,7 @@ public sealed partial class ChatCompletionRequestToolMessage [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestToolMessage( - global::tryAGI.OpenAI.AnyOf> content, + global::tryAGI.OpenAI.OneOf> content, string toolCallId, global::tryAGI.OpenAI.ChatCompletionRequestToolMessageRole role) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessageContentPart.g.cs index aeb69188..9b5ef7ba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestToolMessageContentPart.g.cs @@ -10,22 +10,21 @@ namespace tryAGI.OpenAI public readonly partial struct ChatCompletionRequestToolMessageContentPart : global::System.IEquatable { /// - /// Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + /// Learn about [text inputs](/docs/guides/text-generation). /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; init; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextContentPart))] #endif - public bool IsText => Text != null; - + public bool IsTextContentPart => TextContentPart != null; /// /// /// @@ -34,28 +33,28 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestToolMessageContentPart @this) => @this.Text; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestToolMessageContentPart @this) => @this.TextContentPart; /// /// /// public ChatCompletionRequestToolMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) { - Text = value; + TextContentPart = value; } /// /// /// public object? Object => - Text as object + TextContentPart as object ; /// /// /// public override string? ToString() => - Text?.ToString() + TextContentPart?.ToString() ; /// @@ -63,14 +62,14 @@ Text as object /// public bool Validate() { - return IsText; + return IsTextContentPart; } /// /// /// public TResult? Match( - global::System.Func? text = null, + global::System.Func? textContentPart = null, bool validate = true) { if (validate) @@ -78,9 +77,9 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsTextContentPart && textContentPart != null) { - return text(Text!); + return textContentPart(TextContentPart!); } return default(TResult); @@ -90,7 +89,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? text = null, + global::System.Action? textContentPart = null, bool validate = true) { if (validate) @@ -98,9 +97,9 @@ public void Match( Validate(); } - if (IsText) + if (IsTextContentPart) { - text?.Invoke(Text!); + textContentPart?.Invoke(TextContentPart!); } } @@ -111,7 +110,7 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + TextContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), }; const int offset = unchecked((int)2166136261); @@ -129,7 +128,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatCompletionRequestToolMessageContentPart other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextContentPart, other.TextContentPart) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessage.g.cs index 46bd421f..370676b2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessage.g.cs @@ -15,15 +15,9 @@ public sealed partial class ChatCompletionRequestUserMessage /// The contents of the user message. ///
[global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } - - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } /// /// The role of the messages author, in this case `user`. @@ -32,6 +26,12 @@ public sealed partial class ChatCompletionRequestUserMessage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageRoleJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionRequestUserMessageRole Role { get; set; } + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,23 +44,23 @@ public sealed partial class ChatCompletionRequestUserMessage /// /// The contents of the user message. /// - /// - /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. - /// /// /// The role of the messages author, in this case `user`. /// + /// + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionRequestUserMessage( - global::tryAGI.OpenAI.AnyOf> content, - string? name, - global::tryAGI.OpenAI.ChatCompletionRequestUserMessageRole role) + global::tryAGI.OpenAI.OneOf> content, + global::tryAGI.OpenAI.ChatCompletionRequestUserMessageRole role, + string? name) { this.Content = content; - this.Name = name; this.Role = role; + this.Name = name; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs index 7b3d630d..7d05e1d6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPart.g.cs @@ -10,126 +10,125 @@ namespace tryAGI.OpenAI public readonly partial struct ChatCompletionRequestUserMessageContentPart : global::System.IEquatable { /// - /// Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). + /// Learn about [text inputs](/docs/guides/text-generation). /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; init; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? Text { get; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? TextContentPart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextContentPart))] #endif - public bool IsText => Text != null; + public bool IsTextContentPart => TextContentPart != null; /// - /// + /// Learn about [image inputs](/docs/guides/vision). /// - public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? ImageContentPart { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? ImageContentPart { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestUserMessageContentPart @this) => @this.Text; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageContentPart))] +#endif + public bool IsImageContentPart => ImageContentPart != null; + + /// + /// Learn about [audio inputs](/docs/guides/audio). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? AudioContentPart { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? AudioContentPart { get; } +#endif /// /// /// - public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) - { - Text = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioContentPart))] +#endif + public bool IsAudioContentPart => AudioContentPart != null; /// - /// Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + /// Learn about [file inputs](/docs/guides/text) for text generation. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? Image { get; init; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? FileContentPart { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? Image { get; } + public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? FileContentPart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileContentPart))] #endif - public bool IsImage => Image != null; - + public bool IsFileContentPart => FileContentPart != null; /// /// /// - public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage?)value); + public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.Image; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText?(ChatCompletionRequestUserMessageContentPart @this) => @this.TextContentPart; /// /// /// - public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? value) + public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? value) { - Image = value; + TextContentPart = value; } - /// - /// Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? Audio { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? Audio { get; } -#endif - /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Audio))] -#endif - public bool IsAudio => Audio != null; + public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage?)value); /// /// /// - public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio?)value); + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.ImageContentPart; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio?(ChatCompletionRequestUserMessageContentPart @this) => @this.Audio; + public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? value) + { + ImageContentPart = value; + } /// /// /// - public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? value) - { - Audio = value; - } + public static implicit operator ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio value) => new ChatCompletionRequestUserMessageContentPart((global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio?)value); /// - /// Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text generation. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? File { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? File { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio?(ChatCompletionRequestUserMessageContentPart @this) => @this.AudioContentPart; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(File))] -#endif - public bool IsFile => File != null; + public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? value) + { + AudioContentPart = value; + } /// /// @@ -139,50 +138,50 @@ public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCom /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile?(ChatCompletionRequestUserMessageContentPart @this) => @this.File; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile?(ChatCompletionRequestUserMessageContentPart @this) => @this.FileContentPart; /// /// /// public ChatCompletionRequestUserMessageContentPart(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? value) { - File = value; + FileContentPart = value; } /// /// /// public ChatCompletionRequestUserMessageContentPart( - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? text, - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? image, - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? audio, - global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? file + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText? textContentPart, + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage? imageContentPart, + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio? audioContentPart, + global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile? fileContentPart ) { - Text = text; - Image = image; - Audio = audio; - File = file; + TextContentPart = textContentPart; + ImageContentPart = imageContentPart; + AudioContentPart = audioContentPart; + FileContentPart = fileContentPart; } /// /// /// public object? Object => - File as object ?? - Audio as object ?? - Image as object ?? - Text as object + FileContentPart as object ?? + AudioContentPart as object ?? + ImageContentPart as object ?? + TextContentPart as object ; /// /// /// public override string? ToString() => - Text?.ToString() ?? - Image?.ToString() ?? - Audio?.ToString() ?? - File?.ToString() + TextContentPart?.ToString() ?? + ImageContentPart?.ToString() ?? + AudioContentPart?.ToString() ?? + FileContentPart?.ToString() ; /// @@ -190,17 +189,17 @@ Text as object /// public bool Validate() { - return IsText || IsImage || IsAudio || IsFile; + return IsTextContentPart && !IsImageContentPart && !IsAudioContentPart && !IsFileContentPart || !IsTextContentPart && IsImageContentPart && !IsAudioContentPart && !IsFileContentPart || !IsTextContentPart && !IsImageContentPart && IsAudioContentPart && !IsFileContentPart || !IsTextContentPart && !IsImageContentPart && !IsAudioContentPart && IsFileContentPart; } /// /// /// public TResult? Match( - global::System.Func? text = null, - global::System.Func? image = null, - global::System.Func? audio = null, - global::System.Func? file = null, + global::System.Func? textContentPart = null, + global::System.Func? imageContentPart = null, + global::System.Func? audioContentPart = null, + global::System.Func? fileContentPart = null, bool validate = true) { if (validate) @@ -208,21 +207,21 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsTextContentPart && textContentPart != null) { - return text(Text!); + return textContentPart(TextContentPart!); } - else if (IsImage && image != null) + else if (IsImageContentPart && imageContentPart != null) { - return image(Image!); + return imageContentPart(ImageContentPart!); } - else if (IsAudio && audio != null) + else if (IsAudioContentPart && audioContentPart != null) { - return audio(Audio!); + return audioContentPart(AudioContentPart!); } - else if (IsFile && file != null) + else if (IsFileContentPart && fileContentPart != null) { - return file(File!); + return fileContentPart(FileContentPart!); } return default(TResult); @@ -232,10 +231,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? text = null, - global::System.Action? image = null, - global::System.Action? audio = null, - global::System.Action? file = null, + global::System.Action? textContentPart = null, + global::System.Action? imageContentPart = null, + global::System.Action? audioContentPart = null, + global::System.Action? fileContentPart = null, bool validate = true) { if (validate) @@ -243,21 +242,21 @@ public void Match( Validate(); } - if (IsText) + if (IsTextContentPart) { - text?.Invoke(Text!); + textContentPart?.Invoke(TextContentPart!); } - else if (IsImage) + else if (IsImageContentPart) { - image?.Invoke(Image!); + imageContentPart?.Invoke(ImageContentPart!); } - else if (IsAudio) + else if (IsAudioContentPart) { - audio?.Invoke(Audio!); + audioContentPart?.Invoke(AudioContentPart!); } - else if (IsFile) + else if (IsFileContentPart) { - file?.Invoke(File!); + fileContentPart?.Invoke(FileContentPart!); } } @@ -268,13 +267,13 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + TextContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), - Image, + ImageContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage), - Audio, + AudioContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio), - File, + FileContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartFile), }; const int offset = unchecked((int)2166136261); @@ -292,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatCompletionRequestUserMessageContentPart other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Audio, other.Audio) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(File, other.File) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextContentPart, other.TextContentPart) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageContentPart, other.ImageContentPart) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioContentPart, other.AudioContentPart) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileContentPart, other.FileContentPart) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.Json.g.cs deleted file mode 100644 index 541ff09f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ChatCompletionRequestUserMessageContentPartDiscriminator - { - /// - /// 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::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionRequestUserMessageContentPartDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs deleted file mode 100644 index fca6e389..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionRequestUserMessageContentPartDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class ChatCompletionRequestUserMessageContentPartDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChatCompletionRequestUserMessageContentPartDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public ChatCompletionRequestUserMessageContentPartDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessage.g.cs index b5a44f27..46cf40ba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessage.g.cs @@ -9,37 +9,29 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionResponseMessage { /// - /// Annotations for the message, when applicable, as when using the
- /// [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] - public global::System.Collections.Generic.IList? Annotations { get; set; } - - /// - /// If the audio output modality is requested, this object contains data
- /// about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public string? Content { get; set; } /// - /// The contents of the message. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public string? Content { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + public string? Refusal { get; set; } /// - /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. + /// The tool calls generated by the model, such as function calls. /// - [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.ChatCompletionResponseMessageFunctionCall? FunctionCall { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } /// - /// The refusal message generated by the model. + /// Annotations for the message, when applicable, as when using the
+ /// [web search tool](/docs/guides/tools-web-search?api-mode=chat). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - public string? Refusal { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + public global::System.Collections.Generic.IList? Annotations { get; set; } /// /// The role of the author of this message. @@ -49,10 +41,17 @@ public sealed partial class ChatCompletionResponseMessage public global::tryAGI.OpenAI.ChatCompletionResponseMessageRole Role { get; set; } /// - /// The tool calls generated by the model, such as function calls. + /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList? ToolCalls { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.ChatCompletionResponseMessageFunctionCall? FunctionCall { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2? Audio { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -63,43 +62,36 @@ public sealed partial class ChatCompletionResponseMessage /// /// Initializes a new instance of the class. /// + /// + /// + /// + /// The tool calls generated by the model, such as function calls. + /// /// /// Annotations for the message, when applicable, as when using the
- /// [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). - /// - /// - /// If the audio output modality is requested, this object contains data
- /// about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). - /// - /// - /// The contents of the message. - /// - /// - /// The refusal message generated by the model. + /// [web search tool](/docs/guides/tools-web-search?api-mode=chat). /// /// /// The role of the author of this message. /// - /// - /// The tool calls generated by the model, such as function calls. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionResponseMessage( - global::System.Collections.Generic.IList? annotations, - global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio? audio, string? content, string? refusal, + global::System.Collections.Generic.IList? toolCalls, + global::System.Collections.Generic.IList? annotations, global::tryAGI.OpenAI.ChatCompletionResponseMessageRole role, - global::System.Collections.Generic.IList? toolCalls) + global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2? audio) { - this.Annotations = annotations; - this.Audio = audio; this.Content = content; this.Refusal = refusal; - this.Role = role; this.ToolCalls = toolCalls; + this.Annotations = annotations; + this.Role = role; + this.Audio = audio; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAnnotationUrlCitation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAnnotationUrlCitation.g.cs index 20e63234..d084c4ca 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAnnotationUrlCitation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAnnotationUrlCitation.g.cs @@ -23,18 +23,18 @@ public sealed partial class ChatCompletionResponseMessageAnnotationUrlCitation public required int StartIndex { get; set; } /// - /// The title of the web resource. + /// The URL of the web resource. /// - [global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonPropertyName("url")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Title { get; set; } + public required string Url { get; set; } /// - /// The URL of the web resource. + /// The title of the web resource. /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonPropertyName("title")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } + public required string Title { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,25 +51,25 @@ public sealed partial class ChatCompletionResponseMessageAnnotationUrlCitation /// /// The index of the first character of the URL citation in the message. /// - /// - /// The title of the web resource. - /// /// /// The URL of the web resource. /// + /// + /// The title of the web resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionResponseMessageAnnotationUrlCitation( int endIndex, int startIndex, - string title, - string url) + string url, + string title) { this.EndIndex = endIndex; this.StartIndex = startIndex; - this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio.g.cs index e7326862..c786d887 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio.g.cs @@ -4,87 +4,15 @@ namespace tryAGI.OpenAI { /// - /// If the audio output modality is requested, this object contains data
- /// about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). + /// ///
public sealed partial class ChatCompletionResponseMessageAudio { - /// - /// Base64 encoded audio bytes generated by the model, in the format
- /// specified in the request. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Data { get; set; } - - /// - /// The Unix timestamp (in seconds) for when this audio response will
- /// no longer be accessible on the server for use in multi-turn
- /// conversations. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset ExpiresAt { get; set; } - - /// - /// Unique identifier for this audio response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Transcript of the audio generated by the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Transcript { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Base64 encoded audio bytes generated by the model, in the format
- /// specified in the request. - /// - /// - /// The Unix timestamp (in seconds) for when this audio response will
- /// no longer be accessible on the server for use in multi-turn
- /// conversations. - /// - /// - /// Unique identifier for this audio response. - /// - /// - /// Transcript of the audio generated by the model. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChatCompletionResponseMessageAudio( - string data, - global::System.DateTimeOffset expiresAt, - string id, - string transcript) - { - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); - this.ExpiresAt = expiresAt; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatCompletionResponseMessageAudio() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.Json.g.cs new file mode 100644 index 00000000..36486b15 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionResponseMessageAudio2 + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionResponseMessageAudio2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.g.cs new file mode 100644 index 00000000..0496b877 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageAudio2.g.cs @@ -0,0 +1,90 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If the audio output modality is requested, this object contains data
+ /// about the audio response from the model. [Learn more](/docs/guides/audio). + ///
+ public sealed partial class ChatCompletionResponseMessageAudio2 + { + /// + /// Unique identifier for this audio response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The Unix timestamp (in seconds) for when this audio response will
+ /// no longer be accessible on the server for use in multi-turn
+ /// conversations. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset ExpiresAt { get; set; } + + /// + /// Base64 encoded audio bytes generated by the model, in the format
+ /// specified in the request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Data { get; set; } + + /// + /// Transcript of the audio generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Transcript { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for this audio response. + /// + /// + /// The Unix timestamp (in seconds) for when this audio response will
+ /// no longer be accessible on the server for use in multi-turn
+ /// conversations. + /// + /// + /// Base64 encoded audio bytes generated by the model, in the format
+ /// specified in the request. + /// + /// + /// Transcript of the audio generated by the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatCompletionResponseMessageAudio2( + string id, + global::System.DateTimeOffset expiresAt, + string data, + string transcript) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.ExpiresAt = expiresAt; + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatCompletionResponseMessageAudio2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.Json.g.cs new file mode 100644 index 00000000..d84f085c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionResponseMessageContent + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageContent), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionResponseMessageContent; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionResponseMessageContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.g.cs new file mode 100644 index 00000000..5626b78d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionResponseMessageContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.Json.g.cs new file mode 100644 index 00000000..36552e89 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionResponseMessageRefusal + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionResponseMessageRefusal; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.g.cs new file mode 100644 index 00000000..b211f06f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionResponseMessageRefusal.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionResponseMessageRefusal + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptions.g.cs index c3450d17..37798bd9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptions.g.cs @@ -4,77 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Options for streaming response. Only set this when you set `stream: true`. + /// /// public sealed partial class ChatCompletionStreamOptions { - /// - /// When true, stream obfuscation will be enabled. Stream obfuscation adds
- /// random characters to an `obfuscation` field on streaming delta events to
- /// normalize payload sizes as a mitigation to certain side-channel attacks.
- /// These obfuscation fields are included by default, but add a small amount
- /// of overhead to the data stream. You can set `include_obfuscation` to
- /// false to optimize for bandwidth if you trust the network links between
- /// your application and the OpenAI API. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include_obfuscation")] - public bool? IncludeObfuscation { get; set; } - - /// - /// If set, an additional chunk will be streamed before the `data: [DONE]`
- /// message. The `usage` field on this chunk shows the token usage statistics
- /// for the entire request, and the `choices` field will always be an empty
- /// array.
- /// All other chunks will also include a `usage` field, but with a null
- /// value. **NOTE:** If the stream is interrupted, you may not receive the
- /// final usage chunk which contains the total token usage for the request. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include_usage")] - public bool? IncludeUsage { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// When true, stream obfuscation will be enabled. Stream obfuscation adds
- /// random characters to an `obfuscation` field on streaming delta events to
- /// normalize payload sizes as a mitigation to certain side-channel attacks.
- /// These obfuscation fields are included by default, but add a small amount
- /// of overhead to the data stream. You can set `include_obfuscation` to
- /// false to optimize for bandwidth if you trust the network links between
- /// your application and the OpenAI API. - /// - /// - /// If set, an additional chunk will be streamed before the `data: [DONE]`
- /// message. The `usage` field on this chunk shows the token usage statistics
- /// for the entire request, and the `choices` field will always be an empty
- /// array.
- /// All other chunks will also include a `usage` field, but with a null
- /// value. **NOTE:** If the stream is interrupted, you may not receive the
- /// final usage chunk which contains the total token usage for the request. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChatCompletionStreamOptions( - bool? includeObfuscation, - bool? includeUsage) - { - this.IncludeObfuscation = includeObfuscation; - this.IncludeUsage = includeUsage; - } - - /// - /// Initializes a new instance of the class. - /// - public ChatCompletionStreamOptions() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.Json.g.cs new file mode 100644 index 00000000..fd7682a6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionStreamOptionsVariant1 + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.g.cs new file mode 100644 index 00000000..5180a07e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamOptionsVariant1.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Options for streaming response. Only set this when you set `stream: true`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class ChatCompletionStreamOptionsVariant1 + { + /// + /// If set, an additional chunk will be streamed before the `data: [DONE]`
+ /// message. The `usage` field on this chunk shows the token usage statistics
+ /// for the entire request, and the `choices` field will always be an empty
+ /// array.
+ /// All other chunks will also include a `usage` field, but with a null
+ /// value. **NOTE:** If the stream is interrupted, you may not receive the
+ /// final usage chunk which contains the total token usage for the request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("include_usage")] + public bool? IncludeUsage { get; set; } + + /// + /// When true, stream obfuscation will be enabled. Stream obfuscation adds
+ /// random characters to an `obfuscation` field on streaming delta events to
+ /// normalize payload sizes as a mitigation to certain side-channel attacks.
+ /// These obfuscation fields are included by default, but add a small amount
+ /// of overhead to the data stream. You can set `include_obfuscation` to
+ /// false to optimize for bandwidth if you trust the network links between
+ /// your application and the OpenAI API. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("include_obfuscation")] + public bool? IncludeObfuscation { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// If set, an additional chunk will be streamed before the `data: [DONE]`
+ /// message. The `usage` field on this chunk shows the token usage statistics
+ /// for the entire request, and the `choices` field will always be an empty
+ /// array.
+ /// All other chunks will also include a `usage` field, but with a null
+ /// value. **NOTE:** If the stream is interrupted, you may not receive the
+ /// final usage chunk which contains the total token usage for the request. + /// + /// + /// When true, stream obfuscation will be enabled. Stream obfuscation adds
+ /// random characters to an `obfuscation` field on streaming delta events to
+ /// normalize payload sizes as a mitigation to certain side-channel attacks.
+ /// These obfuscation fields are included by default, but add a small amount
+ /// of overhead to the data stream. You can set `include_obfuscation` to
+ /// false to optimize for bandwidth if you trust the network links between
+ /// your application and the OpenAI API. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatCompletionStreamOptionsVariant1( + bool? includeUsage, + bool? includeObfuscation) + { + this.IncludeUsage = includeUsage; + this.IncludeObfuscation = includeObfuscation; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatCompletionStreamOptionsVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDelta.g.cs index 67faa528..50e21036 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDelta.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionStreamResponseDelta { /// - /// The contents of the chunk message. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] public string? Content { get; set; } @@ -22,10 +22,10 @@ public sealed partial class ChatCompletionStreamResponseDelta public global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaFunctionCall? FunctionCall { get; set; } /// - /// The refusal message generated by the model. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - public string? Refusal { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } /// /// The role of the author of this message. @@ -37,8 +37,8 @@ public sealed partial class ChatCompletionStreamResponseDelta /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList? ToolCalls { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + public string? Refusal { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,29 +49,25 @@ public sealed partial class ChatCompletionStreamResponseDelta /// /// Initializes a new instance of the class. /// - /// - /// The contents of the chunk message. - /// - /// - /// The refusal message generated by the model. - /// + /// + /// /// /// The role of the author of this message. /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionStreamResponseDelta( string? content, - string? refusal, + global::System.Collections.Generic.IList? toolCalls, global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRole? role, - global::System.Collections.Generic.IList? toolCalls) + string? refusal) { this.Content = content; - this.Refusal = refusal; - this.Role = role; this.ToolCalls = toolCalls; + this.Role = role; + this.Refusal = refusal; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.Json.g.cs new file mode 100644 index 00000000..9a101518 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionStreamResponseDeltaContent + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.g.cs new file mode 100644 index 00000000..abef74fd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionStreamResponseDeltaContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.Json.g.cs new file mode 100644 index 00000000..e1845aed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionStreamResponseDeltaRefusal + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionStreamResponseDeltaRefusal; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.g.cs new file mode 100644 index 00000000..a5c124f4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionStreamResponseDeltaRefusal.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionStreamResponseDeltaRefusal + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs index 35e981ee..c48f6272 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprob.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionTokenLogprob { /// - /// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + /// The token. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Bytes { get; set; } + public required string Token { get; set; } /// /// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. @@ -23,11 +23,11 @@ public sealed partial class ChatCompletionTokenLogprob public required double Logprob { get; set; } /// - /// The token. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required global::System.Collections.Generic.IList? Bytes { get; set; } /// /// List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. @@ -45,15 +45,13 @@ public sealed partial class ChatCompletionTokenLogprob /// /// Initializes a new instance of the class. /// - /// - /// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + /// + /// The token. /// /// /// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. /// - /// - /// The token. - /// + /// /// /// List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. /// @@ -61,14 +59,14 @@ public sealed partial class ChatCompletionTokenLogprob [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionTokenLogprob( - global::System.Collections.Generic.IList? bytes, - double logprob, string token, + double logprob, + global::System.Collections.Generic.IList? bytes, global::System.Collections.Generic.IList topLogprobs) { - this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; + this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); this.TopLogprobs = topLogprobs ?? throw new global::System.ArgumentNullException(nameof(topLogprobs)); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.Json.g.cs new file mode 100644 index 00000000..fc34e740 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionTokenLogprobBytes + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionTokenLogprobBytes; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.g.cs new file mode 100644 index 00000000..86ffaa85 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobBytes.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionTokenLogprobBytes + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprob.g.cs index ebc1be7a..19d57972 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprob.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ChatCompletionTokenLogprobTopLogprob { /// - /// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + /// The token. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Bytes { get; set; } + public required string Token { get; set; } /// /// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. @@ -23,11 +23,11 @@ public sealed partial class ChatCompletionTokenLogprobTopLogprob public required double Logprob { get; set; } /// - /// The token. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required global::System.Collections.Generic.IList? Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +38,24 @@ public sealed partial class ChatCompletionTokenLogprobTopLogprob /// /// Initializes a new instance of the class. /// - /// - /// A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + /// + /// The token. /// /// /// The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. /// - /// - /// The token. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ChatCompletionTokenLogprobTopLogprob( - global::System.Collections.Generic.IList? bytes, + string token, double logprob, - string token) + global::System.Collections.Generic.IList? bytes) { - this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; + this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.Json.g.cs new file mode 100644 index 00000000..4b001237 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatCompletionTokenLogprobTopLogprobBytes + { + /// + /// 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::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes; + } + + /// + /// 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::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatCompletionTokenLogprobTopLogprobBytes; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.g.cs new file mode 100644 index 00000000..180a89cd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTokenLogprobTopLogprobBytes.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatCompletionTokenLogprobTopLogprobBytes + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTool.g.cs index b8b5aa01..2be16192 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionTool.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ChatCompletionTool { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FunctionObject Function { get; set; } - /// /// The type of the tool. Currently, only `function` is supported. /// @@ -22,6 +15,13 @@ public sealed partial class ChatCompletionTool [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatCompletionToolTypeJsonConverter))] public global::tryAGI.OpenAI.ChatCompletionToolType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionObject Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class ChatCompletionTool /// /// Initializes a new instance of the class. /// - /// /// /// The type of the tool. Currently, only `function` is supported. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionToolChoiceOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionToolChoiceOption.g.cs index ec059bdd..18ecb5aa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionToolChoiceOption.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatCompletionToolChoiceOption.g.cs @@ -18,123 +18,122 @@ namespace tryAGI.OpenAI /// `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? Value1 { get; init; } + public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? ToolChoiceMode { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? Value1 { get; } + public global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? ToolChoiceMode { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolChoiceMode))] #endif - public bool IsValue1 => Value1 != null; + public bool IsToolChoiceMode => ToolChoiceMode != null; /// - /// + /// Constrains the tools available to the model to a pre-defined set. /// - public static implicit operator ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? AllowedTools { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? AllowedTools { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum?(ChatCompletionToolChoiceOption @this) => @this.Value1; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AllowedTools))] +#endif + public bool IsAllowedTools => AllowedTools != null; + + /// + /// Specifies a tool the model should use. Use to force the model to call a specific function. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? FunctionToolChoice { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? FunctionToolChoice { get; } +#endif /// /// /// - public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolChoice))] +#endif + public bool IsFunctionToolChoice => FunctionToolChoice != null; /// - /// Constrains the tools available to the model to a pre-defined set. + /// Specifies a tool the model should use. Use to force the model to call a specific custom tool. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? Value2 { get; init; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? CustomToolChoice { get; init; } #else - public global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? Value2 { get; } + public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? CustomToolChoice { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolChoice))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsCustomToolChoice => CustomToolChoice != null; /// /// /// - public static implicit operator ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice?)value); + public static implicit operator ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice?(ChatCompletionToolChoiceOption @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum?(ChatCompletionToolChoiceOption @this) => @this.ToolChoiceMode; /// /// /// - public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? value) + public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? value) { - Value2 = value; + ToolChoiceMode = value; } - /// - /// Specifies a tool the model should use. Use to force the model to call a specific function. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? 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 ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice?)value); /// /// /// - public static implicit operator ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionNamedToolChoice?)value); + public static implicit operator global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice?(ChatCompletionToolChoiceOption @this) => @this.AllowedTools; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionNamedToolChoice?(ChatCompletionToolChoiceOption @this) => @this.Value3; + public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? value) + { + AllowedTools = value; + } /// /// /// - public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? value) - { - Value3 = value; - } + public static implicit operator ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice value) => new ChatCompletionToolChoiceOption((global::tryAGI.OpenAI.ChatCompletionNamedToolChoice?)value); /// - /// Specifies a tool the model should use. Use to force the model to call a specific custom tool. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? Value4 { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? Value4 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ChatCompletionNamedToolChoice?(ChatCompletionToolChoiceOption @this) => @this.FunctionToolChoice; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; + public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? value) + { + FunctionToolChoice = value; + } /// /// @@ -144,50 +143,50 @@ public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedT /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom?(ChatCompletionToolChoiceOption @this) => @this.Value4; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom?(ChatCompletionToolChoiceOption @this) => @this.CustomToolChoice; /// /// /// public ChatCompletionToolChoiceOption(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? value) { - Value4 = value; + CustomToolChoice = value; } /// /// /// public ChatCompletionToolChoiceOption( - global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? value1, - global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? value2, - global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? value3, - global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? value4 + global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum? toolChoiceMode, + global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice? allowedTools, + global::tryAGI.OpenAI.ChatCompletionNamedToolChoice? functionToolChoice, + global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom? customToolChoice ) { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; + ToolChoiceMode = toolChoiceMode; + AllowedTools = allowedTools; + FunctionToolChoice = functionToolChoice; + CustomToolChoice = customToolChoice; } /// /// /// public object? Object => - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object + CustomToolChoice as object ?? + FunctionToolChoice as object ?? + AllowedTools as object ?? + ToolChoiceMode as object ; /// /// /// public override string? ToString() => - Value1?.ToValueString() ?? - Value2?.ToString() ?? - Value3?.ToString() ?? - Value4?.ToString() + ToolChoiceMode?.ToValueString() ?? + AllowedTools?.ToString() ?? + FunctionToolChoice?.ToString() ?? + CustomToolChoice?.ToString() ; /// @@ -195,17 +194,17 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3 || IsValue4; + return IsToolChoiceMode && !IsAllowedTools && !IsFunctionToolChoice && !IsCustomToolChoice || !IsToolChoiceMode && IsAllowedTools && !IsFunctionToolChoice && !IsCustomToolChoice || !IsToolChoiceMode && !IsAllowedTools && IsFunctionToolChoice && !IsCustomToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsFunctionToolChoice && IsCustomToolChoice; } /// /// /// 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? toolChoiceMode = null, + global::System.Func? allowedTools = null, + global::System.Func? functionToolChoice = null, + global::System.Func? customToolChoice = null, bool validate = true) { if (validate) @@ -213,21 +212,21 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsToolChoiceMode && toolChoiceMode != null) { - return value1(Value1!); + return toolChoiceMode(ToolChoiceMode!); } - else if (IsValue2 && value2 != null) + else if (IsAllowedTools && allowedTools != null) { - return value2(Value2!); + return allowedTools(AllowedTools!); } - else if (IsValue3 && value3 != null) + else if (IsFunctionToolChoice && functionToolChoice != null) { - return value3(Value3!); + return functionToolChoice(FunctionToolChoice!); } - else if (IsValue4 && value4 != null) + else if (IsCustomToolChoice && customToolChoice != null) { - return value4(Value4!); + return customToolChoice(CustomToolChoice!); } return default(TResult); @@ -237,10 +236,10 @@ public bool Validate() /// /// 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? toolChoiceMode = null, + global::System.Action? allowedTools = null, + global::System.Action? functionToolChoice = null, + global::System.Action? customToolChoice = null, bool validate = true) { if (validate) @@ -248,21 +247,21 @@ public void Match( Validate(); } - if (IsValue1) + if (IsToolChoiceMode) { - value1?.Invoke(Value1!); + toolChoiceMode?.Invoke(ToolChoiceMode!); } - else if (IsValue2) + else if (IsAllowedTools) { - value2?.Invoke(Value2!); + allowedTools?.Invoke(AllowedTools!); } - else if (IsValue3) + else if (IsFunctionToolChoice) { - value3?.Invoke(Value3!); + functionToolChoice?.Invoke(FunctionToolChoice!); } - else if (IsValue4) + else if (IsCustomToolChoice) { - value4?.Invoke(Value4!); + customToolChoice?.Invoke(CustomToolChoice!); } } @@ -273,13 +272,13 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ToolChoiceMode, typeof(global::tryAGI.OpenAI.ChatCompletionToolChoiceOptionEnum), - Value2, + AllowedTools, typeof(global::tryAGI.OpenAI.ChatCompletionAllowedToolsChoice), - Value3, + FunctionToolChoice, typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoice), - Value4, + CustomToolChoice, typeof(global::tryAGI.OpenAI.ChatCompletionNamedToolChoiceCustom), }; const int offset = unchecked((int)2166136261); @@ -297,10 +296,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatCompletionToolChoiceOption 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(ToolChoiceMode, other.ToolChoiceMode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AllowedTools, other.AllowedTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolChoice, other.FunctionToolChoice) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolChoice, other.CustomToolChoice) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatModel.g.cs deleted file mode 100644 index e6cae2ab..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatModel.g.cs +++ /dev/null @@ -1,411 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public enum ChatModel - { - /// - /// - /// - Gpt5, - /// - /// - /// - Gpt5Mini, - /// - /// - /// - Gpt5Nano, - /// - /// - /// - Gpt520250807, - /// - /// - /// - Gpt5Mini20250807, - /// - /// - /// - Gpt5Nano20250807, - /// - /// - /// - Gpt5ChatLatest, - /// - /// - /// - Gpt41, - /// - /// - /// - Gpt41Mini, - /// - /// - /// - Gpt41Nano, - /// - /// - /// - Gpt4120250414, - /// - /// - /// - Gpt41Mini20250414, - /// - /// - /// - Gpt41Nano20250414, - /// - /// - /// - O4Mini, - /// - /// - /// - O4Mini20250416, - /// - /// - /// - O3, - /// - /// - /// - O320250416, - /// - /// - /// - O3Mini, - /// - /// - /// - O3Mini20250131, - /// - /// - /// - O1, - /// - /// - /// - O120241217, - /// - /// - /// - O1Preview, - /// - /// - /// - O1Preview20240912, - /// - /// - /// - O1Mini, - /// - /// - /// - O1Mini20240912, - /// - /// - /// - Gpt4o, - /// - /// - /// - Gpt4o20241120, - /// - /// - /// - Gpt4o20240806, - /// - /// - /// - Gpt4o20240513, - /// - /// - /// - Gpt4oAudioPreview, - /// - /// - /// - Gpt4oAudioPreview20241001, - /// - /// - /// - Gpt4oAudioPreview20241217, - /// - /// - /// - Gpt4oAudioPreview20250603, - /// - /// - /// - Gpt4oMiniAudioPreview, - /// - /// - /// - Gpt4oMiniAudioPreview20241217, - /// - /// - /// - Gpt4oSearchPreview, - /// - /// - /// - Gpt4oMiniSearchPreview, - /// - /// - /// - Gpt4oSearchPreview20250311, - /// - /// - /// - Gpt4oMiniSearchPreview20250311, - /// - /// - /// - Chatgpt4oLatest, - /// - /// - /// - CodexMiniLatest, - /// - /// - /// - Gpt4oMini, - /// - /// - /// - Gpt4oMini20240718, - /// - /// - /// - Gpt4Turbo, - /// - /// - /// - Gpt4Turbo20240409, - /// - /// - /// - Gpt40125Preview, - /// - /// - /// - Gpt4TurboPreview, - /// - /// - /// - Gpt41106Preview, - /// - /// - /// - Gpt4VisionPreview, - /// - /// - /// - Gpt4, - /// - /// - /// - Gpt40314, - /// - /// - /// - Gpt40613, - /// - /// - /// - Gpt432k, - /// - /// - /// - Gpt432k0314, - /// - /// - /// - Gpt432k0613, - /// - /// - /// - Gpt35Turbo, - /// - /// - /// - Gpt35Turbo16k, - /// - /// - /// - Gpt35Turbo0301, - /// - /// - /// - Gpt35Turbo0613, - /// - /// - /// - Gpt35Turbo1106, - /// - /// - /// - Gpt35Turbo0125, - /// - /// - /// - Gpt35Turbo16k0613, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ChatModelExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ChatModel value) - { - return value switch - { - ChatModel.Gpt5 => "gpt-5", - ChatModel.Gpt5Mini => "gpt-5-mini", - ChatModel.Gpt5Nano => "gpt-5-nano", - ChatModel.Gpt520250807 => "gpt-5-2025-08-07", - ChatModel.Gpt5Mini20250807 => "gpt-5-mini-2025-08-07", - ChatModel.Gpt5Nano20250807 => "gpt-5-nano-2025-08-07", - ChatModel.Gpt5ChatLatest => "gpt-5-chat-latest", - ChatModel.Gpt41 => "gpt-4.1", - ChatModel.Gpt41Mini => "gpt-4.1-mini", - ChatModel.Gpt41Nano => "gpt-4.1-nano", - ChatModel.Gpt4120250414 => "gpt-4.1-2025-04-14", - ChatModel.Gpt41Mini20250414 => "gpt-4.1-mini-2025-04-14", - ChatModel.Gpt41Nano20250414 => "gpt-4.1-nano-2025-04-14", - ChatModel.O4Mini => "o4-mini", - ChatModel.O4Mini20250416 => "o4-mini-2025-04-16", - ChatModel.O3 => "o3", - ChatModel.O320250416 => "o3-2025-04-16", - ChatModel.O3Mini => "o3-mini", - ChatModel.O3Mini20250131 => "o3-mini-2025-01-31", - ChatModel.O1 => "o1", - ChatModel.O120241217 => "o1-2024-12-17", - ChatModel.O1Preview => "o1-preview", - ChatModel.O1Preview20240912 => "o1-preview-2024-09-12", - ChatModel.O1Mini => "o1-mini", - ChatModel.O1Mini20240912 => "o1-mini-2024-09-12", - ChatModel.Gpt4o => "gpt-4o", - ChatModel.Gpt4o20241120 => "gpt-4o-2024-11-20", - ChatModel.Gpt4o20240806 => "gpt-4o-2024-08-06", - ChatModel.Gpt4o20240513 => "gpt-4o-2024-05-13", - ChatModel.Gpt4oAudioPreview => "gpt-4o-audio-preview", - ChatModel.Gpt4oAudioPreview20241001 => "gpt-4o-audio-preview-2024-10-01", - ChatModel.Gpt4oAudioPreview20241217 => "gpt-4o-audio-preview-2024-12-17", - ChatModel.Gpt4oAudioPreview20250603 => "gpt-4o-audio-preview-2025-06-03", - ChatModel.Gpt4oMiniAudioPreview => "gpt-4o-mini-audio-preview", - ChatModel.Gpt4oMiniAudioPreview20241217 => "gpt-4o-mini-audio-preview-2024-12-17", - ChatModel.Gpt4oSearchPreview => "gpt-4o-search-preview", - ChatModel.Gpt4oMiniSearchPreview => "gpt-4o-mini-search-preview", - ChatModel.Gpt4oSearchPreview20250311 => "gpt-4o-search-preview-2025-03-11", - ChatModel.Gpt4oMiniSearchPreview20250311 => "gpt-4o-mini-search-preview-2025-03-11", - ChatModel.Chatgpt4oLatest => "chatgpt-4o-latest", - ChatModel.CodexMiniLatest => "codex-mini-latest", - ChatModel.Gpt4oMini => "gpt-4o-mini", - ChatModel.Gpt4oMini20240718 => "gpt-4o-mini-2024-07-18", - ChatModel.Gpt4Turbo => "gpt-4-turbo", - ChatModel.Gpt4Turbo20240409 => "gpt-4-turbo-2024-04-09", - ChatModel.Gpt40125Preview => "gpt-4-0125-preview", - ChatModel.Gpt4TurboPreview => "gpt-4-turbo-preview", - ChatModel.Gpt41106Preview => "gpt-4-1106-preview", - ChatModel.Gpt4VisionPreview => "gpt-4-vision-preview", - ChatModel.Gpt4 => "gpt-4", - ChatModel.Gpt40314 => "gpt-4-0314", - ChatModel.Gpt40613 => "gpt-4-0613", - ChatModel.Gpt432k => "gpt-4-32k", - ChatModel.Gpt432k0314 => "gpt-4-32k-0314", - ChatModel.Gpt432k0613 => "gpt-4-32k-0613", - ChatModel.Gpt35Turbo => "gpt-3.5-turbo", - ChatModel.Gpt35Turbo16k => "gpt-3.5-turbo-16k", - ChatModel.Gpt35Turbo0301 => "gpt-3.5-turbo-0301", - ChatModel.Gpt35Turbo0613 => "gpt-3.5-turbo-0613", - ChatModel.Gpt35Turbo1106 => "gpt-3.5-turbo-1106", - ChatModel.Gpt35Turbo0125 => "gpt-3.5-turbo-0125", - ChatModel.Gpt35Turbo16k0613 => "gpt-3.5-turbo-16k-0613", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ChatModel? ToEnum(string value) - { - return value switch - { - "gpt-5" => ChatModel.Gpt5, - "gpt-5-mini" => ChatModel.Gpt5Mini, - "gpt-5-nano" => ChatModel.Gpt5Nano, - "gpt-5-2025-08-07" => ChatModel.Gpt520250807, - "gpt-5-mini-2025-08-07" => ChatModel.Gpt5Mini20250807, - "gpt-5-nano-2025-08-07" => ChatModel.Gpt5Nano20250807, - "gpt-5-chat-latest" => ChatModel.Gpt5ChatLatest, - "gpt-4.1" => ChatModel.Gpt41, - "gpt-4.1-mini" => ChatModel.Gpt41Mini, - "gpt-4.1-nano" => ChatModel.Gpt41Nano, - "gpt-4.1-2025-04-14" => ChatModel.Gpt4120250414, - "gpt-4.1-mini-2025-04-14" => ChatModel.Gpt41Mini20250414, - "gpt-4.1-nano-2025-04-14" => ChatModel.Gpt41Nano20250414, - "o4-mini" => ChatModel.O4Mini, - "o4-mini-2025-04-16" => ChatModel.O4Mini20250416, - "o3" => ChatModel.O3, - "o3-2025-04-16" => ChatModel.O320250416, - "o3-mini" => ChatModel.O3Mini, - "o3-mini-2025-01-31" => ChatModel.O3Mini20250131, - "o1" => ChatModel.O1, - "o1-2024-12-17" => ChatModel.O120241217, - "o1-preview" => ChatModel.O1Preview, - "o1-preview-2024-09-12" => ChatModel.O1Preview20240912, - "o1-mini" => ChatModel.O1Mini, - "o1-mini-2024-09-12" => ChatModel.O1Mini20240912, - "gpt-4o" => ChatModel.Gpt4o, - "gpt-4o-2024-11-20" => ChatModel.Gpt4o20241120, - "gpt-4o-2024-08-06" => ChatModel.Gpt4o20240806, - "gpt-4o-2024-05-13" => ChatModel.Gpt4o20240513, - "gpt-4o-audio-preview" => ChatModel.Gpt4oAudioPreview, - "gpt-4o-audio-preview-2024-10-01" => ChatModel.Gpt4oAudioPreview20241001, - "gpt-4o-audio-preview-2024-12-17" => ChatModel.Gpt4oAudioPreview20241217, - "gpt-4o-audio-preview-2025-06-03" => ChatModel.Gpt4oAudioPreview20250603, - "gpt-4o-mini-audio-preview" => ChatModel.Gpt4oMiniAudioPreview, - "gpt-4o-mini-audio-preview-2024-12-17" => ChatModel.Gpt4oMiniAudioPreview20241217, - "gpt-4o-search-preview" => ChatModel.Gpt4oSearchPreview, - "gpt-4o-mini-search-preview" => ChatModel.Gpt4oMiniSearchPreview, - "gpt-4o-search-preview-2025-03-11" => ChatModel.Gpt4oSearchPreview20250311, - "gpt-4o-mini-search-preview-2025-03-11" => ChatModel.Gpt4oMiniSearchPreview20250311, - "chatgpt-4o-latest" => ChatModel.Chatgpt4oLatest, - "codex-mini-latest" => ChatModel.CodexMiniLatest, - "gpt-4o-mini" => ChatModel.Gpt4oMini, - "gpt-4o-mini-2024-07-18" => ChatModel.Gpt4oMini20240718, - "gpt-4-turbo" => ChatModel.Gpt4Turbo, - "gpt-4-turbo-2024-04-09" => ChatModel.Gpt4Turbo20240409, - "gpt-4-0125-preview" => ChatModel.Gpt40125Preview, - "gpt-4-turbo-preview" => ChatModel.Gpt4TurboPreview, - "gpt-4-1106-preview" => ChatModel.Gpt41106Preview, - "gpt-4-vision-preview" => ChatModel.Gpt4VisionPreview, - "gpt-4" => ChatModel.Gpt4, - "gpt-4-0314" => ChatModel.Gpt40314, - "gpt-4-0613" => ChatModel.Gpt40613, - "gpt-4-32k" => ChatModel.Gpt432k, - "gpt-4-32k-0314" => ChatModel.Gpt432k0314, - "gpt-4-32k-0613" => ChatModel.Gpt432k0613, - "gpt-3.5-turbo" => ChatModel.Gpt35Turbo, - "gpt-3.5-turbo-16k" => ChatModel.Gpt35Turbo16k, - "gpt-3.5-turbo-0301" => ChatModel.Gpt35Turbo0301, - "gpt-3.5-turbo-0613" => ChatModel.Gpt35Turbo0613, - "gpt-3.5-turbo-1106" => ChatModel.Gpt35Turbo1106, - "gpt-3.5-turbo-0125" => ChatModel.Gpt35Turbo0125, - "gpt-3.5-turbo-16k-0613" => ChatModel.Gpt35Turbo16k0613, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.Json.g.cs new file mode 100644 index 00000000..406b39bb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionAutomaticThreadTitling + { + /// + /// 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::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.g.cs new file mode 100644 index 00000000..709df5ea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionAutomaticThreadTitling.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Automatic thread title preferences for the session. + /// + public sealed partial class ChatSessionAutomaticThreadTitling + { + /// + /// Whether automatic thread titling is enabled. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Whether automatic thread titling is enabled. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionAutomaticThreadTitling( + bool enabled) + { + this.Enabled = enabled; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionAutomaticThreadTitling() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.Json.g.cs new file mode 100644 index 00000000..6d919f2f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionChatkitConfiguration + { + /// + /// 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::tryAGI.OpenAI.ChatSessionChatkitConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionChatkitConfiguration), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionChatkitConfiguration; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionChatkitConfiguration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionChatkitConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionChatkitConfiguration; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.g.cs new file mode 100644 index 00000000..5627ed94 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionChatkitConfiguration.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// ChatKit configuration for the session. + /// + public sealed partial class ChatSessionChatkitConfiguration + { + /// + /// Automatic thread titling preferences. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("automatic_thread_titling")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling AutomaticThreadTitling { get; set; } + + /// + /// Upload settings for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_upload")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionFileUpload FileUpload { get; set; } + + /// + /// History retention configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("history")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionHistory History { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Automatic thread titling preferences. + /// + /// + /// Upload settings for the session. + /// + /// + /// History retention configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionChatkitConfiguration( + global::tryAGI.OpenAI.ChatSessionAutomaticThreadTitling automaticThreadTitling, + global::tryAGI.OpenAI.ChatSessionFileUpload fileUpload, + global::tryAGI.OpenAI.ChatSessionHistory history) + { + this.AutomaticThreadTitling = automaticThreadTitling ?? throw new global::System.ArgumentNullException(nameof(automaticThreadTitling)); + this.FileUpload = fileUpload ?? throw new global::System.ArgumentNullException(nameof(fileUpload)); + this.History = history ?? throw new global::System.ArgumentNullException(nameof(history)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionChatkitConfiguration() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.Json.g.cs new file mode 100644 index 00000000..25590c93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionFileUpload + { + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUpload? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionFileUpload), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionFileUpload; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUpload? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionFileUpload), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionFileUpload; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.g.cs new file mode 100644 index 00000000..6fd9cf6b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUpload.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Upload permissions and limits applied to the session. + /// + public sealed partial class ChatSessionFileUpload + { + /// + /// Indicates if uploads are enabled for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_file_size")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? MaxFileSize { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_files")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? MaxFiles { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Indicates if uploads are enabled for the session. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionFileUpload( + bool enabled, + int? maxFileSize, + int? maxFiles) + { + this.Enabled = enabled; + this.MaxFileSize = maxFileSize ?? throw new global::System.ArgumentNullException(nameof(maxFileSize)); + this.MaxFiles = maxFiles ?? throw new global::System.ArgumentNullException(nameof(maxFiles)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionFileUpload() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.Json.g.cs new file mode 100644 index 00000000..cbae373e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionFileUploadMaxFileSize + { + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionFileUploadMaxFileSize; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.g.cs new file mode 100644 index 00000000..96f45194 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFileSize.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatSessionFileUploadMaxFileSize + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.Json.g.cs new file mode 100644 index 00000000..33c9620c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionFileUploadMaxFiles + { + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionFileUploadMaxFiles; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.g.cs new file mode 100644 index 00000000..4f425b4b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionFileUploadMaxFiles.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatSessionFileUploadMaxFiles + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.Json.g.cs new file mode 100644 index 00000000..84d1f783 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionHistory + { + /// + /// 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::tryAGI.OpenAI.ChatSessionHistory? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionHistory), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionHistory; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionHistory? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionHistory), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionHistory; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.g.cs new file mode 100644 index 00000000..21b106d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistory.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// History retention preferences returned for the session. + /// + public sealed partial class ChatSessionHistory + { + /// + /// Indicates if chat history is persisted for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recent_threads")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? RecentThreads { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Indicates if chat history is persisted for the session. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionHistory( + bool enabled, + int? recentThreads) + { + this.Enabled = enabled; + this.RecentThreads = recentThreads ?? throw new global::System.ArgumentNullException(nameof(recentThreads)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionHistory() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.Json.g.cs new file mode 100644 index 00000000..70b5231f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionHistoryRecentThreads + { + /// + /// 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::tryAGI.OpenAI.ChatSessionHistoryRecentThreads? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionHistoryRecentThreads), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionHistoryRecentThreads; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionHistoryRecentThreads? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionHistoryRecentThreads), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionHistoryRecentThreads; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.g.cs new file mode 100644 index 00000000..4460dec1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionHistoryRecentThreads.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatSessionHistoryRecentThreads + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.Json.g.cs new file mode 100644 index 00000000..fd16e2a5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionRateLimits + { + /// + /// 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::tryAGI.OpenAI.ChatSessionRateLimits? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionRateLimits), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionRateLimits; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionRateLimits? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionRateLimits), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionRateLimits; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.g.cs new file mode 100644 index 00000000..158e24a6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionRateLimits.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Active per-minute request limit for the session. + /// + public sealed partial class ChatSessionRateLimits + { + /// + /// Maximum allowed requests per one-minute window. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxRequestsPer1Minute { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Maximum allowed requests per one-minute window. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionRateLimits( + int maxRequestsPer1Minute) + { + this.MaxRequestsPer1Minute = maxRequestsPer1Minute; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionRateLimits() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.Json.g.cs new file mode 100644 index 00000000..60bb7ff3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatSessionResource + { + /// + /// 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::tryAGI.OpenAI.ChatSessionResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatSessionResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatSessionResource; + } + + /// + /// 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::tryAGI.OpenAI.ChatSessionResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatSessionResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatSessionResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.g.cs new file mode 100644 index 00000000..dcbcdc1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResource.g.cs @@ -0,0 +1,160 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents a ChatKit session and its resolved configuration.
+ /// Example: {"id":"cksess_123","object":"chatkit.session","client_secret":"ek_token_123","expires_at":1712349876,"workflow":{"id":"workflow_alpha","version":"2024-10-01T00:00:00.000Z"},"user":"user_789","rate_limits":{"max_requests_per_1_minute":60},"max_requests_per_1_minute":60,"status":"cancelled","chatkit_configuration":{"automatic_thread_titling":{"enabled":true},"file_upload":{"enabled":true,"max_file_size":16,"max_files":20},"history":{"enabled":true,"recent_threads":10}}} + ///
+ public sealed partial class ChatSessionResource + { + /// + /// Identifier for the ChatKit session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.session`.
+ /// Default Value: chatkit.session + ///
+ /// global::tryAGI.OpenAI.ChatSessionResourceObject.ChatkitSession + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ChatSessionResourceObject Object { get; set; } = global::tryAGI.OpenAI.ChatSessionResourceObject.ChatkitSession; + + /// + /// Unix timestamp (in seconds) for when the session expires. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset ExpiresAt { get; set; } + + /// + /// Ephemeral client secret that authenticates session requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientSecret { get; set; } + + /// + /// Workflow metadata for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workflow")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatkitWorkflow Workflow { get; set; } + + /// + /// User identifier associated with the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string User { get; set; } + + /// + /// Resolved rate limit values. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionRateLimits RateLimits { get; set; } + + /// + /// Convenience copy of the per-minute request limit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxRequestsPer1Minute { get; set; } + + /// + /// Current lifecycle state of the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChatSessionStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionStatus Status { get; set; } + + /// + /// Resolved ChatKit feature configuration for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("chatkit_configuration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatSessionChatkitConfiguration ChatkitConfiguration { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the ChatKit session. + /// + /// + /// Type discriminator that is always `chatkit.session`.
+ /// Default Value: chatkit.session + /// + /// + /// Unix timestamp (in seconds) for when the session expires. + /// + /// + /// Ephemeral client secret that authenticates session requests. + /// + /// + /// Workflow metadata for the session. + /// + /// + /// User identifier associated with the session. + /// + /// + /// Resolved rate limit values. + /// + /// + /// Convenience copy of the per-minute request limit. + /// + /// + /// Current lifecycle state of the session. + /// + /// + /// Resolved ChatKit feature configuration for the session. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatSessionResource( + string id, + global::System.DateTimeOffset expiresAt, + string clientSecret, + global::tryAGI.OpenAI.ChatkitWorkflow workflow, + string user, + global::tryAGI.OpenAI.ChatSessionRateLimits rateLimits, + int maxRequestsPer1Minute, + global::tryAGI.OpenAI.ChatSessionStatus status, + global::tryAGI.OpenAI.ChatSessionChatkitConfiguration chatkitConfiguration, + global::tryAGI.OpenAI.ChatSessionResourceObject @object = global::tryAGI.OpenAI.ChatSessionResourceObject.ChatkitSession) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.ExpiresAt = expiresAt; + this.ClientSecret = clientSecret ?? throw new global::System.ArgumentNullException(nameof(clientSecret)); + this.Workflow = workflow ?? throw new global::System.ArgumentNullException(nameof(workflow)); + this.User = user ?? throw new global::System.ArgumentNullException(nameof(user)); + this.RateLimits = rateLimits ?? throw new global::System.ArgumentNullException(nameof(rateLimits)); + this.MaxRequestsPer1Minute = maxRequestsPer1Minute; + this.Status = status; + this.ChatkitConfiguration = chatkitConfiguration ?? throw new global::System.ArgumentNullException(nameof(chatkitConfiguration)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatSessionResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResourceObject.g.cs new file mode 100644 index 00000000..1c49fad4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.session`.
+ /// Default Value: chatkit.session + ///
+ public enum ChatSessionResourceObject + { + /// + /// + /// + ChatkitSession, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatSessionResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatSessionResourceObject value) + { + return value switch + { + ChatSessionResourceObject.ChatkitSession => "chatkit.session", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatSessionResourceObject? ToEnum(string value) + { + return value switch + { + "chatkit.session" => ChatSessionResourceObject.ChatkitSession, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionStatus.g.cs new file mode 100644 index 00000000..889f79f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatSessionStatus.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ChatSessionStatus + { + /// + /// + /// + Active, + /// + /// + /// + Expired, + /// + /// + /// + Cancelled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatSessionStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatSessionStatus value) + { + return value switch + { + ChatSessionStatus.Active => "active", + ChatSessionStatus.Expired => "expired", + ChatSessionStatus.Cancelled => "cancelled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatSessionStatus? ToEnum(string value) + { + return value switch + { + "active" => ChatSessionStatus.Active, + "expired" => ChatSessionStatus.Expired, + "cancelled" => ChatSessionStatus.Cancelled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.Json.g.cs new file mode 100644 index 00000000..2fa8e488 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitConfigurationParam + { + /// + /// 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::tryAGI.OpenAI.ChatkitConfigurationParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitConfigurationParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitConfigurationParam; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitConfigurationParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitConfigurationParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitConfigurationParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.g.cs new file mode 100644 index 00000000..0faca7b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitConfigurationParam.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional per-session configuration settings for ChatKit behavior. + /// + public sealed partial class ChatkitConfigurationParam + { + /// + /// Configuration for automatic thread titling. When omitted, automatic thread titling is enabled by default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("automatic_thread_titling")] + public global::tryAGI.OpenAI.AutomaticThreadTitlingParam? AutomaticThreadTitling { get; set; } + + /// + /// Configuration for upload enablement and limits. When omitted, uploads are disabled by default (max_files 10, max_file_size 512 MB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_upload")] + public global::tryAGI.OpenAI.FileUploadParam? FileUpload { get; set; } + + /// + /// Configuration for chat history retention. When omitted, history is enabled by default with no limit on recent_threads (null). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("history")] + public global::tryAGI.OpenAI.HistoryParam? History { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Configuration for automatic thread titling. When omitted, automatic thread titling is enabled by default. + /// + /// + /// Configuration for upload enablement and limits. When omitted, uploads are disabled by default (max_files 10, max_file_size 512 MB). + /// + /// + /// Configuration for chat history retention. When omitted, history is enabled by default with no limit on recent_threads (null). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatkitConfigurationParam( + global::tryAGI.OpenAI.AutomaticThreadTitlingParam? automaticThreadTitling, + global::tryAGI.OpenAI.FileUploadParam? fileUpload, + global::tryAGI.OpenAI.HistoryParam? history) + { + this.AutomaticThreadTitling = automaticThreadTitling; + this.FileUpload = fileUpload; + this.History = history; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatkitConfigurationParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.Json.g.cs new file mode 100644 index 00000000..fdbadc44 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitWorkflow + { + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflow? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitWorkflow), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitWorkflow; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflow? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitWorkflow), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitWorkflow; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.g.cs new file mode 100644 index 00000000..64c848b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflow.g.cs @@ -0,0 +1,78 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Workflow metadata and state returned for the session. + /// + public sealed partial class ChatkitWorkflow + { + /// + /// Identifier of the workflow backing the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Version { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("state_variables")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object? StateVariables { get; set; } + + /// + /// Tracing settings applied to the workflow. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ChatkitWorkflowTracing Tracing { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the workflow backing the session. + /// + /// + /// + /// + /// Tracing settings applied to the workflow. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatkitWorkflow( + string id, + string? version, + object? stateVariables, + global::tryAGI.OpenAI.ChatkitWorkflowTracing tracing) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.StateVariables = stateVariables ?? throw new global::System.ArgumentNullException(nameof(stateVariables)); + this.Tracing = tracing ?? throw new global::System.ArgumentNullException(nameof(tracing)); + } + + /// + /// Initializes a new instance of the class. + /// + public ChatkitWorkflow() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.Json.g.cs new file mode 100644 index 00000000..56ba8e05 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitWorkflowStateVariables + { + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowStateVariables? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowStateVariables), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitWorkflowStateVariables; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowStateVariables? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowStateVariables), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitWorkflowStateVariables; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.g.cs new file mode 100644 index 00000000..eb1ed73f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatkitWorkflowStateVariables + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.Json.g.cs new file mode 100644 index 00000000..1e787eb9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitWorkflowStateVariables2 + { + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowStateVariables2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowStateVariables2), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitWorkflowStateVariables2; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowStateVariables2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowStateVariables2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitWorkflowStateVariables2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.g.cs new file mode 100644 index 00000000..193d7be2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowStateVariables2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// State variable key-value pairs applied when invoking the workflow. Defaults to null when no overrides were provided. + /// + public sealed partial class ChatkitWorkflowStateVariables2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.Json.g.cs new file mode 100644 index 00000000..17b7dc14 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitWorkflowTracing + { + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowTracing? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowTracing), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitWorkflowTracing; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowTracing? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowTracing), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitWorkflowTracing; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.g.cs new file mode 100644 index 00000000..129393f9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowTracing.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls diagnostic tracing during the session. + /// + public sealed partial class ChatkitWorkflowTracing + { + /// + /// Indicates whether tracing is enabled. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Indicates whether tracing is enabled. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ChatkitWorkflowTracing( + bool enabled) + { + this.Enabled = enabled; + } + + /// + /// Initializes a new instance of the class. + /// + public ChatkitWorkflowTracing() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.Json.g.cs new file mode 100644 index 00000000..c1ebe8ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ChatkitWorkflowVersion + { + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowVersion? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowVersion), + jsonSerializerContext) as global::tryAGI.OpenAI.ChatkitWorkflowVersion; + } + + /// + /// 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::tryAGI.OpenAI.ChatkitWorkflowVersion? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ChatkitWorkflowVersion), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChatkitWorkflowVersion; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.g.cs new file mode 100644 index 00000000..a00de7e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChatkitWorkflowVersion.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ChatkitWorkflowVersion + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyRequestParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyRequestParam.g.cs index 7f77602e..8e17a112 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyRequestParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyRequestParam.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.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. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// public readonly partial struct ChunkingStrategyRequestParam : global::System.IEquatable { @@ -26,6 +26,22 @@ namespace tryAGI.OpenAI #endif public bool IsAuto => Auto != null; + /// + /// Customize your own chunking strategy by setting chunk size and chunk overlap. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Static { get; init; } +#else + public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Static { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] +#endif + public bool IsStatic => Static != null; /// /// /// @@ -44,23 +60,6 @@ public ChunkingStrategyRequestParam(global::tryAGI.OpenAI.AutoChunkingStrategyRe Auto = value; } - /// - /// Customize your own chunking strategy by setting chunk size and chunk overlap. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Static { get; init; } -#else - public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParam? Static { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] -#endif - public bool IsStatic => Static != null; - /// /// /// @@ -112,7 +111,7 @@ Auto as object ///
public bool Validate() { - return IsAuto || IsStatic; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.Json.g.cs deleted file mode 100644 index 8ab8b506..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ChunkingStrategyResponse - { - /// - /// 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::tryAGI.OpenAI.ChunkingStrategyResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ChunkingStrategyResponse), - jsonSerializerContext) as global::tryAGI.OpenAI.ChunkingStrategyResponse?; - } - - /// - /// 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::tryAGI.OpenAI.ChunkingStrategyResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ChunkingStrategyResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChunkingStrategyResponse?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.g.cs deleted file mode 100644 index aa799aa8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponse.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The strategy used to chunk the file. - /// - public readonly partial struct ChunkingStrategyResponse : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? StaticParam { get; init; } -#else - public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? 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 ChunkingStrategyResponse(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam value) => new ChunkingStrategyResponse((global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam?(ChunkingStrategyResponse @this) => @this.StaticParam; - - /// - /// - /// - public ChunkingStrategyResponse(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? value) - { - StaticParam = 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::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? OtherParam { get; init; } -#else - public global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? OtherParam { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OtherParam))] -#endif - public bool IsOtherParam => OtherParam != null; - - /// - /// - /// - public static implicit operator ChunkingStrategyResponse(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam value) => new ChunkingStrategyResponse((global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam?(ChunkingStrategyResponse @this) => @this.OtherParam; - - /// - /// - /// - public ChunkingStrategyResponse(global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? value) - { - OtherParam = value; - } - - /// - /// - /// - public ChunkingStrategyResponse( - global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam? staticParam, - global::tryAGI.OpenAI.OtherChunkingStrategyResponseParam? otherParam - ) - { - StaticParam = staticParam; - OtherParam = otherParam; - } - - /// - /// - /// - public object? Object => - OtherParam as object ?? - StaticParam as object - ; - - /// - /// - /// - public override string? ToString() => - StaticParam?.ToString() ?? - OtherParam?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsStaticParam || IsOtherParam; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? staticParam = null, - global::System.Func? otherParam = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsStaticParam && staticParam != null) - { - return staticParam(StaticParam!); - } - else if (IsOtherParam && otherParam != null) - { - return otherParam(OtherParam!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? staticParam = null, - global::System.Action? otherParam = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsStaticParam) - { - staticParam?.Invoke(StaticParam!); - } - else if (IsOtherParam) - { - otherParam?.Invoke(OtherParam!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - StaticParam, - typeof(global::tryAGI.OpenAI.StaticChunkingStrategyResponseParam), - OtherParam, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ChunkingStrategyResponse other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticParam, other.StaticParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OtherParam, other.OtherParam) - ; - } - - /// - /// - /// - public static bool operator ==(ChunkingStrategyResponse obj1, ChunkingStrategyResponse obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(ChunkingStrategyResponse obj1, ChunkingStrategyResponse obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is ChunkingStrategyResponse o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.Json.g.cs deleted file mode 100644 index 123da0fb..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ChunkingStrategyResponseDiscriminator - { - /// - /// 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::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ChunkingStrategyResponseDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.g.cs deleted file mode 100644 index be8c3b0a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ChunkingStrategyResponseDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class ChunkingStrategyResponseDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ChunkingStrategyResponseDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public ChunkingStrategyResponseDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.Json.g.cs deleted file mode 100644 index a127948d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Click - { - /// - /// 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::tryAGI.OpenAI.Click? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Click), - jsonSerializerContext) as global::tryAGI.OpenAI.Click; - } - - /// - /// 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::tryAGI.OpenAI.Click? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Click), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Click; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.g.cs deleted file mode 100644 index 984ad54c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Click.g.cs +++ /dev/null @@ -1,88 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A click action. - /// - public sealed partial class Click - { - /// - /// Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("button")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ClickButton Button { get; set; } - - /// - /// Specifies the event type. For a click action, this property is
- /// always set to `click`.
- /// Default Value: click - ///
- /// global::tryAGI.OpenAI.ClickType.Click - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClickTypeJsonConverter))] - public global::tryAGI.OpenAI.ClickType Type { get; set; } = global::tryAGI.OpenAI.ClickType.Click; - - /// - /// The x-coordinate where the click occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int X { get; set; } - - /// - /// The y-coordinate where the click occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Y { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. - /// - /// - /// Specifies the event type. For a click action, this property is
- /// always set to `click`.
- /// Default Value: click - /// - /// - /// The x-coordinate where the click occurred. - /// - /// - /// The y-coordinate where the click occurred. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Click( - global::tryAGI.OpenAI.ClickButton button, - int x, - int y, - global::tryAGI.OpenAI.ClickType type = global::tryAGI.OpenAI.ClickType.Click) - { - this.Button = button; - this.X = x; - this.Y = y; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Click() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButton.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButton.g.cs deleted file mode 100644 index c9d4fe3b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButton.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. - /// - public enum ClickButton - { - /// - /// - /// - Left, - /// - /// - /// - Right, - /// - /// - /// - Wheel, - /// - /// - /// - Back, - /// - /// - /// - Forward, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ClickButtonExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ClickButton value) - { - return value switch - { - ClickButton.Left => "left", - ClickButton.Right => "right", - ClickButton.Wheel => "wheel", - ClickButton.Back => "back", - ClickButton.Forward => "forward", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ClickButton? ToEnum(string value) - { - return value switch - { - "left" => ClickButton.Left, - "right" => ClickButton.Right, - "wheel" => ClickButton.Wheel, - "back" => ClickButton.Back, - "forward" => ClickButton.Forward, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButtonType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButtonType.g.cs new file mode 100644 index 00000000..e0671dd8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickButtonType.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ClickButtonType + { + /// + /// + /// + Left, + /// + /// + /// + Right, + /// + /// + /// + Wheel, + /// + /// + /// + Back, + /// + /// + /// + Forward, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClickButtonTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClickButtonType value) + { + return value switch + { + ClickButtonType.Left => "left", + ClickButtonType.Right => "right", + ClickButtonType.Wheel => "wheel", + ClickButtonType.Back => "back", + ClickButtonType.Forward => "forward", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClickButtonType? ToEnum(string value) + { + return value switch + { + "left" => ClickButtonType.Left, + "right" => ClickButtonType.Right, + "wheel" => ClickButtonType.Wheel, + "back" => ClickButtonType.Back, + "forward" => ClickButtonType.Forward, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.Json.g.cs new file mode 100644 index 00000000..049fadcd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ClickParam + { + /// + /// 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::tryAGI.OpenAI.ClickParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ClickParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ClickParam; + } + + /// + /// 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::tryAGI.OpenAI.ClickParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ClickParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClickParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.g.cs new file mode 100644 index 00000000..960d8374 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParam.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A click action. + /// + public sealed partial class ClickParam + { + /// + /// Specifies the event type. For a click action, this property is always `click`.
+ /// Default Value: click + ///
+ /// global::tryAGI.OpenAI.ClickParamType.Click + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClickParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ClickParamType Type { get; set; } = global::tryAGI.OpenAI.ClickParamType.Click; + + /// + /// Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("button")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClickButtonTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ClickButtonType Button { get; set; } + + /// + /// The x-coordinate where the click occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate where the click occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a click action, this property is always `click`.
+ /// Default Value: click + /// + /// + /// Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + /// + /// + /// The x-coordinate where the click occurred. + /// + /// + /// The y-coordinate where the click occurred. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ClickParam( + global::tryAGI.OpenAI.ClickButtonType button, + int x, + int y, + global::tryAGI.OpenAI.ClickParamType type = global::tryAGI.OpenAI.ClickParamType.Click) + { + this.Button = button; + this.X = x; + this.Y = y; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ClickParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParamType.g.cs new file mode 100644 index 00000000..00c8a9bc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a click action, this property is always `click`.
+ /// Default Value: click + ///
+ public enum ClickParamType + { + /// + /// + /// + Click, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClickParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClickParamType value) + { + return value switch + { + ClickParamType.Click => "click", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClickParamType? ToEnum(string value) + { + return value switch + { + "click" => ClickParamType.Click, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickType.g.cs deleted file mode 100644 index bd569f91..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClickType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a click action, this property is
- /// always set to `click`.
- /// Default Value: click - ///
- public enum ClickType - { - /// - /// - /// - Click, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ClickTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ClickType value) - { - return value switch - { - ClickType.Click => "click", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ClickType? ToEnum(string value) - { - return value switch - { - "click" => ClickType.Click, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.Json.g.cs new file mode 100644 index 00000000..5e02cdd9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ClientToolCallItem + { + /// + /// 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::tryAGI.OpenAI.ClientToolCallItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ClientToolCallItem), + jsonSerializerContext) as global::tryAGI.OpenAI.ClientToolCallItem; + } + + /// + /// 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::tryAGI.OpenAI.ClientToolCallItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ClientToolCallItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClientToolCallItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.g.cs new file mode 100644 index 00000000..e56c3ea2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItem.g.cs @@ -0,0 +1,160 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Record of a client side tool invocation initiated by the assistant. + /// + public sealed partial class ClientToolCallItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.ClientToolCallItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemObjectJsonConverter))] + public global::tryAGI.OpenAI.ClientToolCallItemObject Object { get; set; } = global::tryAGI.OpenAI.ClientToolCallItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Type discriminator that is always `chatkit.client_tool_call`.
+ /// Default Value: chatkit.client_tool_call + ///
+ /// global::tryAGI.OpenAI.ClientToolCallItemType.ChatkitClientToolCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallItemTypeJsonConverter))] + public global::tryAGI.OpenAI.ClientToolCallItemType Type { get; set; } = global::tryAGI.OpenAI.ClientToolCallItemType.ChatkitClientToolCall; + + /// + /// Execution status for the tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClientToolCallStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ClientToolCallStatus Status { get; set; } + + /// + /// Identifier for the client tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// Tool name that was invoked. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// JSON-encoded arguments that were sent to the tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Output { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Type discriminator that is always `chatkit.client_tool_call`.
+ /// Default Value: chatkit.client_tool_call + /// + /// + /// Execution status for the tool call. + /// + /// + /// Identifier for the client tool call. + /// + /// + /// Tool name that was invoked. + /// + /// + /// JSON-encoded arguments that were sent to the tool. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ClientToolCallItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + global::tryAGI.OpenAI.ClientToolCallStatus status, + string callId, + string name, + string arguments, + string? output, + global::tryAGI.OpenAI.ClientToolCallItemObject @object = global::tryAGI.OpenAI.ClientToolCallItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.ClientToolCallItemType type = global::tryAGI.OpenAI.ClientToolCallItemType.ChatkitClientToolCall) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.Status = status; + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ClientToolCallItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemObject.g.cs new file mode 100644 index 00000000..58e184d4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum ClientToolCallItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClientToolCallItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClientToolCallItemObject value) + { + return value switch + { + ClientToolCallItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClientToolCallItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => ClientToolCallItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.Json.g.cs new file mode 100644 index 00000000..809eee18 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ClientToolCallItemOutput + { + /// + /// 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::tryAGI.OpenAI.ClientToolCallItemOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ClientToolCallItemOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.ClientToolCallItemOutput; + } + + /// + /// 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::tryAGI.OpenAI.ClientToolCallItemOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ClientToolCallItemOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClientToolCallItemOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.g.cs new file mode 100644 index 00000000..b224489c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ClientToolCallItemOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemType.g.cs new file mode 100644 index 00000000..85d2ff02 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallItemType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.client_tool_call`.
+ /// Default Value: chatkit.client_tool_call + ///
+ public enum ClientToolCallItemType + { + /// + /// + /// + ChatkitClientToolCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClientToolCallItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClientToolCallItemType value) + { + return value switch + { + ClientToolCallItemType.ChatkitClientToolCall => "chatkit.client_tool_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClientToolCallItemType? ToEnum(string value) + { + return value switch + { + "chatkit.client_tool_call" => ClientToolCallItemType.ChatkitClientToolCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallStatus.g.cs new file mode 100644 index 00000000..296934cc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClientToolCallStatus.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ClientToolCallStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClientToolCallStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClientToolCallStatus value) + { + return value switch + { + ClientToolCallStatus.InProgress => "in_progress", + ClientToolCallStatus.Completed => "completed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClientToolCallStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => ClientToolCallStatus.InProgress, + "completed" => ClientToolCallStatus.Completed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.Json.g.cs new file mode 100644 index 00000000..4505c5aa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ClosedStatus + { + /// + /// 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::tryAGI.OpenAI.ClosedStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ClosedStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.ClosedStatus; + } + + /// + /// 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::tryAGI.OpenAI.ClosedStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ClosedStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClosedStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.g.cs new file mode 100644 index 00000000..2b8aa211 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatus.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that a thread has been closed. + /// + public sealed partial class ClosedStatus + { + /// + /// Status discriminator that is always `closed`.
+ /// Default Value: closed + ///
+ /// global::tryAGI.OpenAI.ClosedStatusType.Closed + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ClosedStatusTypeJsonConverter))] + public global::tryAGI.OpenAI.ClosedStatusType Type { get; set; } = global::tryAGI.OpenAI.ClosedStatusType.Closed; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Reason { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Status discriminator that is always `closed`.
+ /// Default Value: closed + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ClosedStatus( + string? reason, + global::tryAGI.OpenAI.ClosedStatusType type = global::tryAGI.OpenAI.ClosedStatusType.Closed) + { + this.Reason = reason ?? throw new global::System.ArgumentNullException(nameof(reason)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ClosedStatus() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.Json.g.cs new file mode 100644 index 00000000..65cfd9f6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ClosedStatusReason + { + /// + /// 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::tryAGI.OpenAI.ClosedStatusReason? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ClosedStatusReason), + jsonSerializerContext) as global::tryAGI.OpenAI.ClosedStatusReason; + } + + /// + /// 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::tryAGI.OpenAI.ClosedStatusReason? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ClosedStatusReason), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ClosedStatusReason; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.g.cs new file mode 100644 index 00000000..bfd76937 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusReason.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ClosedStatusReason + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusType.g.cs new file mode 100644 index 00000000..12d5021d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ClosedStatusType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Status discriminator that is always `closed`.
+ /// Default Value: closed + ///
+ public enum ClosedStatusType + { + /// + /// + /// + Closed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClosedStatusTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClosedStatusType value) + { + return value switch + { + ClosedStatusType.Closed => "closed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClosedStatusType? ToEnum(string value) + { + return value switch + { + "closed" => ClosedStatusType.Closed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutput.g.cs index 09a31d88..44e174a1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutput.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CodeInterpreterFileOutput { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("files")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Files { get; set; } - /// /// The type of the code interpreter file output. Always `files`. /// @@ -22,6 +15,13 @@ public sealed partial class CodeInterpreterFileOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterFileOutputTypeJsonConverter))] public global::tryAGI.OpenAI.CodeInterpreterFileOutputType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("files")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Files { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class CodeInterpreterFileOutput /// /// Initializes a new instance of the class. /// - /// /// /// The type of the code interpreter file output. Always `files`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutputFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutputFile.g.cs index b0604c2c..36208727 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutputFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterFileOutputFile.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class CodeInterpreterFileOutputFile { /// - /// The ID of the file. + /// The MIME type of the file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("mime_type")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } + public required string MimeType { get; set; } /// - /// The MIME type of the file. + /// The ID of the file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("mime_type")] + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string MimeType { get; set; } + public required string FileId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class CodeInterpreterFileOutputFile /// /// Initializes a new instance of the class. /// - /// - /// The ID of the file. - /// /// /// The MIME type of the file. /// + /// + /// The ID of the file. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CodeInterpreterFileOutputFile( - string fileId, - string mimeType) + string mimeType, + string fileId) { - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); + this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImage.g.cs index 817c50a9..b67cd9b9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImage.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class CodeInterpreterOutputImage { /// - /// The type of the output. Always 'image'.
+ /// The type of the output. Always `image`.
/// Default Value: image ///
/// global::tryAGI.OpenAI.CodeInterpreterOutputImageType.Image @@ -34,7 +34,7 @@ public sealed partial class CodeInterpreterOutputImage /// Initializes a new instance of the class. ///
/// - /// The type of the output. Always 'image'.
+ /// The type of the output. Always `image`.
/// Default Value: image /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImageType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImageType.g.cs index ccbca072..6429be9e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImageType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputImageType.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The type of the output. Always 'image'.
+ /// The type of the output. Always `image`.
/// Default Value: image ///
public enum CodeInterpreterOutputImageType diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogs.g.cs index b2333a81..512c8b3b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogs.g.cs @@ -9,14 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class CodeInterpreterOutputLogs { /// - /// The logs output from the code interpreter. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Logs { get; set; } - - /// - /// The type of the output. Always 'logs'.
+ /// The type of the output. Always `logs`.
/// Default Value: logs ///
/// global::tryAGI.OpenAI.CodeInterpreterOutputLogsType.Logs @@ -24,6 +17,13 @@ public sealed partial class CodeInterpreterOutputLogs [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterOutputLogsTypeJsonConverter))] public global::tryAGI.OpenAI.CodeInterpreterOutputLogsType Type { get; set; } = global::tryAGI.OpenAI.CodeInterpreterOutputLogsType.Logs; + /// + /// The logs output from the code interpreter. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Logs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class CodeInterpreterOutputLogs /// /// Initializes a new instance of the class. /// - /// - /// The logs output from the code interpreter. - /// /// - /// The type of the output. Always 'logs'.
+ /// The type of the output. Always `logs`.
/// Default Value: logs /// + /// + /// The logs output from the code interpreter. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogsType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogsType.g.cs index f5b57c8e..d645e44c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogsType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterOutputLogsType.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The type of the output. Always 'logs'.
+ /// The type of the output. Always `logs`.
/// Default Value: logs ///
public enum CodeInterpreterOutputLogsType diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTextOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTextOutput.g.cs index 9bdd7582..31f2bdf1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTextOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTextOutput.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CodeInterpreterTextOutput { - /// - /// The logs of the code interpreter tool call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Logs { get; set; } - /// /// The type of the code interpreter text output. Always `logs`. /// @@ -22,6 +15,13 @@ public sealed partial class CodeInterpreterTextOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterTextOutputTypeJsonConverter))] public global::tryAGI.OpenAI.CodeInterpreterTextOutputType Type { get; set; } + /// + /// The logs of the code interpreter tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Logs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class CodeInterpreterTextOutput /// /// Initializes a new instance of the class. /// - /// - /// The logs of the code interpreter tool call. - /// /// /// The type of the code interpreter text output. Always `logs`. /// + /// + /// The logs of the code interpreter tool call. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTool.g.cs index dcf02cfd..79235564 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterTool.g.cs @@ -10,15 +10,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CodeInterpreterTool { - /// - /// The code interpreter container. Can be a container ID or an object that
- /// specifies uploaded file IDs to make available to your code. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("container")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Container { get; set; } - /// /// The type of the code interpreter tool. Always `code_interpreter`. /// @@ -26,6 +17,16 @@ public sealed partial class CodeInterpreterTool [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolTypeJsonConverter))] public global::tryAGI.OpenAI.CodeInterpreterToolType Type { get; set; } + /// + /// The code interpreter container. Can be a container ID or an object that
+ /// specifies uploaded file IDs to make available to your code, along with an
+ /// optional `memory_limit` setting. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("container")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Container { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -35,18 +36,19 @@ public sealed partial class CodeInterpreterTool /// /// Initializes a new instance of the class. /// - /// - /// The code interpreter container. Can be a container ID or an object that
- /// specifies uploaded file IDs to make available to your code. - /// /// /// The type of the code interpreter tool. Always `code_interpreter`. /// + /// + /// The code interpreter container. Can be a container ID or an object that
+ /// specifies uploaded file IDs to make available to your code, along with an
+ /// optional `memory_limit` setting. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CodeInterpreterTool( - global::tryAGI.OpenAI.AnyOf container, + global::tryAGI.OpenAI.OneOf container, global::tryAGI.OpenAI.CodeInterpreterToolType type) { this.Container = container; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.Json.g.cs deleted file mode 100644 index 50a20248..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CodeInterpreterToolAuto - { - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolAuto? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolAuto), - jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolAuto; - } - - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolAuto? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolAuto), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolAuto; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.g.cs deleted file mode 100644 index e05ea576..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAuto.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Configuration for a code interpreter container. Optionally specify the IDs
- /// of the files to run the code on. - ///
- public sealed partial class CodeInterpreterToolAuto - { - /// - /// An optional list of uploaded files to make available to your code. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] - public global::System.Collections.Generic.IList? FileIds { get; set; } - - /// - /// Always `auto`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolAutoTypeJsonConverter))] - public global::tryAGI.OpenAI.CodeInterpreterToolAutoType 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An optional list of uploaded files to make available to your code. - /// - /// - /// Always `auto`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CodeInterpreterToolAuto( - global::System.Collections.Generic.IList? fileIds, - global::tryAGI.OpenAI.CodeInterpreterToolAutoType type) - { - this.FileIds = fileIds; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CodeInterpreterToolAuto() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAutoType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAutoType.g.cs deleted file mode 100644 index 20d6cd95..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolAutoType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `auto`. - /// - public enum CodeInterpreterToolAutoType - { - /// - /// - /// - Auto, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CodeInterpreterToolAutoTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CodeInterpreterToolAutoType value) - { - return value switch - { - CodeInterpreterToolAutoType.Auto => "auto", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CodeInterpreterToolAutoType? ToEnum(string value) - { - return value switch - { - "auto" => CodeInterpreterToolAutoType.Auto, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCall.g.cs index 8bacd682..f649dd85 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCall.g.cs @@ -9,50 +9,49 @@ namespace tryAGI.OpenAI public sealed partial class CodeInterpreterToolCall { /// - /// The code to run, or null if not available. + /// The type of the code interpreter tool call. Always `code_interpreter_call`.
+ /// Default Value: code_interpreter_call ///
- [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string? Code { get; set; } + /// global::tryAGI.OpenAI.CodeInterpreterToolCallType.CodeInterpreterCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.CodeInterpreterToolCallType Type { get; set; } = global::tryAGI.OpenAI.CodeInterpreterToolCallType.CodeInterpreterCall; /// - /// The ID of the container used to run the code. + /// The unique ID of the code interpreter tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ContainerId { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the code interpreter tool call. + /// The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.CodeInterpreterToolCallStatus Status { get; set; } /// - /// The outputs generated by the code interpreter, such as logs or images.
- /// Can be null if no outputs are available. + /// The ID of the container used to run the code. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] + [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Outputs { get; set; } + public required string ContainerId { get; set; } /// - /// The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("code")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CodeInterpreterToolCallStatus Status { get; set; } + public required string? Code { get; set; } /// - /// The type of the code interpreter tool call. Always `code_interpreter_call`.
- /// Default Value: code_interpreter_call + /// ///
- /// global::tryAGI.OpenAI.CodeInterpreterToolCallType.CodeInterpreterCall - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CodeInterpreterToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.CodeInterpreterToolCallType Type { get; set; } = global::tryAGI.OpenAI.CodeInterpreterToolCallType.CodeInterpreterCall; + [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList? Outputs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -63,42 +62,37 @@ public sealed partial class CodeInterpreterToolCall /// /// Initializes a new instance of the class. /// - /// - /// The code to run, or null if not available. - /// - /// - /// The ID of the container used to run the code. + /// + /// The type of the code interpreter tool call. Always `code_interpreter_call`.
+ /// Default Value: code_interpreter_call /// /// /// The unique ID of the code interpreter tool call. /// - /// - /// The outputs generated by the code interpreter, such as logs or images.
- /// Can be null if no outputs are available. - /// /// /// The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. /// - /// - /// The type of the code interpreter tool call. Always `code_interpreter_call`.
- /// Default Value: code_interpreter_call + /// + /// The ID of the container used to run the code. /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CodeInterpreterToolCall( - string? code, - string containerId, string id, - global::System.Collections.Generic.IList? outputs, global::tryAGI.OpenAI.CodeInterpreterToolCallStatus status, + string containerId, + string? code, + global::System.Collections.Generic.IList? outputs, global::tryAGI.OpenAI.CodeInterpreterToolCallType type = global::tryAGI.OpenAI.CodeInterpreterToolCallType.CodeInterpreterCall) { - this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); - this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Outputs = outputs ?? throw new global::System.ArgumentNullException(nameof(outputs)); this.Status = status; + this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); + this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); + this.Outputs = outputs ?? throw new global::System.ArgumentNullException(nameof(outputs)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.Json.g.cs new file mode 100644 index 00000000..1c2bbb72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CodeInterpreterToolCallCode + { + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallCode), + jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallCode; + } + + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.g.cs new file mode 100644 index 00000000..10b24bac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CodeInterpreterToolCallCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.Json.g.cs deleted file mode 100644 index a0341595..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CodeInterpreterToolCallOutputDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.g.cs deleted file mode 100644 index 5fd0096a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CodeInterpreterToolCallOutputDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CodeInterpreterToolCallOutputDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CodeInterpreterToolCallOutputDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.Json.g.cs new file mode 100644 index 00000000..e5604a17 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CodeInterpreterToolCallOutputs + { + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputs), + jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputs; + } + + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.g.cs new file mode 100644 index 00000000..f13f4771 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CodeInterpreterToolCallOutputs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.Json.g.cs deleted file mode 100644 index 4c5ba978..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CodeInterpreterToolCallOutputsDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.g.cs deleted file mode 100644 index 8a73bc4e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CodeInterpreterToolCallOutputsDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CodeInterpreterToolCallOutputsDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CodeInterpreterToolCallOutputsDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.Json.g.cs new file mode 100644 index 00000000..ff0e05af --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CodeInterpreterToolCallOutputsVariant1Discriminator + { + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator; + } + + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1Discriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.g.cs new file mode 100644 index 00000000..9004b228 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1Discriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CodeInterpreterToolCallOutputsVariant1Discriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CodeInterpreterToolCallOutputsVariant1Discriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CodeInterpreterToolCallOutputsVariant1Discriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.Json.g.cs new file mode 100644 index 00000000..e8ca4bf1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CodeInterpreterToolCallOutputsVariant1ItemDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.g.cs new file mode 100644 index 00000000..9cdb81e4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CodeInterpreterToolCallOutputsVariant1ItemDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CodeInterpreterToolCallOutputsVariant1ItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CodeInterpreterToolCallOutputsVariant1ItemDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CodeInterpreterToolCallOutputsVariant1ItemDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.Json.g.cs new file mode 100644 index 00000000..8d108599 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResource + { + /// + /// 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::tryAGI.OpenAI.CompactResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResource), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResource; + } + + /// + /// 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::tryAGI.OpenAI.CompactResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.g.cs new file mode 100644 index 00000000..7413f087 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResource.g.cs @@ -0,0 +1,98 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Example: {"id":"resp_001","object":"response.compaction","output":[{"type":"message","role":"user","content":[{"type":"input_text","text":"Summarize our launch checklist from last week."}]},{"type":"message","role":"user","content":[{"type":"input_text","text":"You are performing a CONTEXT CHECKPOINT COMPACTION..."}]},{"type":"compaction","id":"cmp_001","encrypted_content":"encrypted-summary"}],"created_at":1731459200,"usage":{"input_tokens":42897,"output_tokens":12000,"total_tokens":54912}} + /// + public sealed partial class CompactResource + { + /// + /// The unique identifier for the compacted response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The object type. Always `response.compaction`.
+ /// Default Value: response.compaction + ///
+ /// global::tryAGI.OpenAI.CompactResourceObject.ResponseCompaction + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CompactResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.CompactResourceObject Object { get; set; } = global::tryAGI.OpenAI.CompactResourceObject.ResponseCompaction; + + /// + /// The compacted list of output items. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Output { get; set; } + + /// + /// Unix timestamp (in seconds) when the compacted conversation was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Token accounting for the compaction pass, including cached, reasoning, and total tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ResponseUsage Usage { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier for the compacted response. + /// + /// + /// The object type. Always `response.compaction`.
+ /// Default Value: response.compaction + /// + /// + /// The compacted list of output items. + /// + /// + /// Unix timestamp (in seconds) when the compacted conversation was created. + /// + /// + /// Token accounting for the compaction pass, including cached, reasoning, and total tokens. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CompactResource( + string id, + global::System.Collections.Generic.IList output, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.ResponseUsage usage, + global::tryAGI.OpenAI.CompactResourceObject @object = global::tryAGI.OpenAI.CompactResourceObject.ResponseCompaction) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.CreatedAt = createdAt; + this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public CompactResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResourceObject.g.cs new file mode 100644 index 00000000..ea637a05 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type. Always `response.compaction`.
+ /// Default Value: response.compaction + ///
+ public enum CompactResourceObject + { + /// + /// + /// + ResponseCompaction, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CompactResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CompactResourceObject value) + { + return value switch + { + CompactResourceObject.ResponseCompaction => "response.compaction", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CompactResourceObject? ToEnum(string value) + { + return value switch + { + "response.compaction" => CompactResourceObject.ResponseCompaction, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.Json.g.cs new file mode 100644 index 00000000..af38f105 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResponseMethodPublicBody + { + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResponseMethodPublicBody; + } + + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResponseMethodPublicBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.g.cs new file mode 100644 index 00000000..ba3eec68 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBody.g.cs @@ -0,0 +1,85 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactResponseMethodPublicBody + { + /// + /// Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsCompactionJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ModelIdsCompaction Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public global::tryAGI.OpenAI.OneOf>? Input { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("previous_response_id")] + public string? PreviousResponseId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_cache_key")] + public string? PromptCacheKey { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CompactResponseMethodPublicBody( + global::tryAGI.OpenAI.ModelIdsCompaction model, + global::tryAGI.OpenAI.OneOf>? input, + string? previousResponseId, + string? instructions, + string? promptCacheKey) + { + this.Model = model; + this.Input = input; + this.PreviousResponseId = previousResponseId; + this.Instructions = instructions; + this.PromptCacheKey = promptCacheKey; + } + + /// + /// Initializes a new instance of the class. + /// + public CompactResponseMethodPublicBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.Json.g.cs new file mode 100644 index 00000000..69f45171 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResponseMethodPublicBodyInput + { + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput; + } + + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.g.cs new file mode 100644 index 00000000..ec788923 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactResponseMethodPublicBodyInput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.Json.g.cs new file mode 100644 index 00000000..13b278fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResponseMethodPublicBodyInstructions + { + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions; + } + + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyInstructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.g.cs new file mode 100644 index 00000000..a866a31b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyInstructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactResponseMethodPublicBodyInstructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.Json.g.cs new file mode 100644 index 00000000..0910c628 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResponseMethodPublicBodyPreviousResponseId + { + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId; + } + + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPreviousResponseId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.g.cs new file mode 100644 index 00000000..48545b3c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPreviousResponseId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactResponseMethodPublicBodyPreviousResponseId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.Json.g.cs new file mode 100644 index 00000000..b55ee0d7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactResponseMethodPublicBodyPromptCacheKey + { + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey; + } + + /// + /// 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::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactResponseMethodPublicBodyPromptCacheKey; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.g.cs new file mode 100644 index 00000000..e3b88c06 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactResponseMethodPublicBodyPromptCacheKey.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactResponseMethodPublicBodyPromptCacheKey + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.Json.g.cs new file mode 100644 index 00000000..6c07e298 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactionBody + { + /// + /// 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::tryAGI.OpenAI.CompactionBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactionBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactionBody; + } + + /// + /// 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::tryAGI.OpenAI.CompactionBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactionBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactionBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.g.cs new file mode 100644 index 00000000..ba276284 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBody.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + /// + public sealed partial class CompactionBody + { + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + ///
+ /// global::tryAGI.OpenAI.CompactionBodyType.Compaction + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CompactionBodyTypeJsonConverter))] + public global::tryAGI.OpenAI.CompactionBodyType Type { get; set; } = global::tryAGI.OpenAI.CompactionBodyType.Compaction; + + /// + /// The unique ID of the compaction item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The encrypted content that was produced by compaction. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("encrypted_content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EncryptedContent { get; set; } + + /// + /// The identifier of the actor that created the item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + /// + /// + /// The unique ID of the compaction item. + /// + /// + /// The encrypted content that was produced by compaction. + /// + /// + /// The identifier of the actor that created the item. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CompactionBody( + string id, + string encryptedContent, + string? createdBy, + global::tryAGI.OpenAI.CompactionBodyType type = global::tryAGI.OpenAI.CompactionBodyType.Compaction) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.EncryptedContent = encryptedContent ?? throw new global::System.ArgumentNullException(nameof(encryptedContent)); + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public CompactionBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBodyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBodyType.g.cs new file mode 100644 index 00000000..ce1fa10b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionBodyType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + ///
+ public enum CompactionBodyType + { + /// + /// + /// + Compaction, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CompactionBodyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CompactionBodyType value) + { + return value switch + { + CompactionBodyType.Compaction => "compaction", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CompactionBodyType? ToEnum(string value) + { + return value switch + { + "compaction" => CompactionBodyType.Compaction, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.Json.g.cs new file mode 100644 index 00000000..c623babd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactionSummaryItemParam + { + /// + /// 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::tryAGI.OpenAI.CompactionSummaryItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactionSummaryItemParam; + } + + /// + /// 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::tryAGI.OpenAI.CompactionSummaryItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactionSummaryItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.g.cs new file mode 100644 index 00000000..18ef3151 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParam.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + /// + public sealed partial class CompactionSummaryItemParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + ///
+ /// global::tryAGI.OpenAI.CompactionSummaryItemParamType.Compaction + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CompactionSummaryItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.CompactionSummaryItemParamType Type { get; set; } = global::tryAGI.OpenAI.CompactionSummaryItemParamType.Compaction; + + /// + /// The encrypted content of the compaction summary. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("encrypted_content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EncryptedContent { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + /// + /// + /// The encrypted content of the compaction summary. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CompactionSummaryItemParam( + string encryptedContent, + string? id, + global::tryAGI.OpenAI.CompactionSummaryItemParamType type = global::tryAGI.OpenAI.CompactionSummaryItemParamType.Compaction) + { + this.EncryptedContent = encryptedContent ?? throw new global::System.ArgumentNullException(nameof(encryptedContent)); + this.Id = id; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CompactionSummaryItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.Json.g.cs new file mode 100644 index 00000000..9e98e561 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompactionSummaryItemParamId + { + /// + /// 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::tryAGI.OpenAI.CompactionSummaryItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompactionSummaryItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.CompactionSummaryItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.CompactionSummaryItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompactionSummaryItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompactionSummaryItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.g.cs new file mode 100644 index 00000000..88d396d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompactionSummaryItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamType.g.cs new file mode 100644 index 00000000..f53986ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompactionSummaryItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `compaction`.
+ /// Default Value: compaction + ///
+ public enum CompactionSummaryItemParamType + { + /// + /// + /// + Compaction, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CompactionSummaryItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CompactionSummaryItemParamType value) + { + return value switch + { + CompactionSummaryItemParamType.Compaction => "compaction", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CompactionSummaryItemParamType? ToEnum(string value) + { + return value switch + { + "compaction" => CompactionSummaryItemParamType.Compaction, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilter.g.cs index a877a196..6bd50c34 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilter.g.cs @@ -11,20 +11,15 @@ namespace tryAGI.OpenAI public sealed partial class ComparisonFilter { /// - /// The key to compare against the value. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("key")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Key { get; set; } - - /// - /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.
+ /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
/// - `eq`: equals
/// - `ne`: not equal
/// - `gt`: greater than
/// - `gte`: greater than or equal
/// - `lt`: less than
/// - `lte`: less than or equal
+ /// - `in`: in
+ /// - `nin`: not in
/// Default Value: eq ///
/// global::tryAGI.OpenAI.ComparisonFilterType.Eq @@ -33,13 +28,20 @@ public sealed partial class ComparisonFilter [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ComparisonFilterType Type { get; set; } = global::tryAGI.OpenAI.ComparisonFilterType.Eq; + /// + /// The key to compare against the value. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { get; set; } + /// /// The value to compare against the attribute key; supports string, number, or boolean types. /// [global::System.Text.Json.Serialization.JsonPropertyName("value")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Value { get; set; } + public required global::tryAGI.OpenAI.OneOf>> Value { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -50,19 +52,21 @@ public sealed partial class ComparisonFilter /// /// Initializes a new instance of the class. /// - /// - /// The key to compare against the value. - /// /// - /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.
+ /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
/// - `eq`: equals
/// - `ne`: not equal
/// - `gt`: greater than
/// - `gte`: greater than or equal
/// - `lt`: less than
/// - `lte`: less than or equal
+ /// - `in`: in
+ /// - `nin`: not in
/// Default Value: eq /// + /// + /// The key to compare against the value. + /// /// /// The value to compare against the attribute key; supports string, number, or boolean types. /// @@ -70,12 +74,12 @@ public sealed partial class ComparisonFilter [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComparisonFilter( - string key, global::tryAGI.OpenAI.ComparisonFilterType type, - global::tryAGI.OpenAI.AnyOf value) + string key, + global::tryAGI.OpenAI.OneOf>> value) { - this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); this.Type = type; + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); this.Value = value; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilterType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilterType.g.cs index 62e4a815..3f8e68ed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilterType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComparisonFilterType.g.cs @@ -4,39 +4,41 @@ namespace tryAGI.OpenAI { /// - /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.
+ /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
/// - `eq`: equals
/// - `ne`: not equal
/// - `gt`: greater than
/// - `gte`: greater than or equal
/// - `lt`: less than
/// - `lte`: less than or equal
+ /// - `in`: in
+ /// - `nin`: not in
/// Default Value: eq ///
public enum ComparisonFilterType { /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Eq, /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Ne, /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Gt, /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Gte, /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Lt, /// - /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`. + /// `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// Lte, } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompleteUploadRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompleteUploadRequest.g.cs index be20ca4c..adc43ff1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompleteUploadRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompleteUploadRequest.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CompleteUploadRequest { - /// - /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("md5")] - public string? Md5 { get; set; } - /// /// The ordered list of Part IDs. /// @@ -21,6 +15,12 @@ public sealed partial class CompleteUploadRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList PartIds { get; set; } + /// + /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("md5")] + public string? Md5 { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,12 +30,12 @@ public sealed partial class CompleteUploadRequest /// /// Initializes a new instance of the class. /// - /// - /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. - /// /// /// The ordered list of Part IDs. /// + /// + /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompletionUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompletionUsage.g.cs index 94edc5dc..0d22e39a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompletionUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompletionUsage.g.cs @@ -12,40 +12,37 @@ public sealed partial class CompletionUsage /// Number of tokens in the generated completion.
/// Default Value: 0 ///
- /// 0 [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int CompletionTokens { get; set; } = 0; - - /// - /// Breakdown of tokens used in a completion. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens_details")] - public global::tryAGI.OpenAI.CompletionUsageCompletionTokensDetails? CompletionTokensDetails { get; set; } + public required int CompletionTokens { get; set; } /// /// Number of tokens in the prompt.
/// Default Value: 0 ///
- /// 0 [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int PromptTokens { get; set; } = 0; - - /// - /// Breakdown of tokens used in the prompt. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens_details")] - public global::tryAGI.OpenAI.CompletionUsagePromptTokensDetails? PromptTokensDetails { get; set; } + public required int PromptTokens { get; set; } /// /// Total number of tokens used in the request (prompt + completion).
/// Default Value: 0 ///
- /// 0 [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { get; set; } = 0; + public required int TotalTokens { get; set; } + + /// + /// Breakdown of tokens used in a completion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens_details")] + public global::tryAGI.OpenAI.CompletionUsageCompletionTokensDetails? CompletionTokensDetails { get; set; } + + /// + /// Breakdown of tokens used in the prompt. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens_details")] + public global::tryAGI.OpenAI.CompletionUsagePromptTokensDetails? PromptTokensDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,20 +57,20 @@ public sealed partial class CompletionUsage /// Number of tokens in the generated completion.
/// Default Value: 0 /// - /// - /// Breakdown of tokens used in a completion. - /// /// /// Number of tokens in the prompt.
/// Default Value: 0 /// - /// - /// Breakdown of tokens used in the prompt. - /// /// /// Total number of tokens used in the request (prompt + completion).
/// Default Value: 0 /// + /// + /// Breakdown of tokens used in a completion. + /// + /// + /// Breakdown of tokens used in the prompt. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilter.g.cs index aa964802..ec51e66f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilter.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace tryAGI.OpenAI @@ -10,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CompoundFilter { - /// - /// Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filters")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Filters { get; set; } - /// /// Type of operation: `and` or `or`. /// @@ -25,6 +16,13 @@ public sealed partial class CompoundFilter [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.CompoundFilterType Type { get; set; } + /// + /// Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filters")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Filters { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -34,21 +32,21 @@ public sealed partial class CompoundFilter /// /// Initializes a new instance of the class. /// - /// - /// Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. - /// /// /// Type of operation: `and` or `or`. /// + /// + /// Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CompoundFilter( - global::System.Collections.Generic.IList> filters, - global::tryAGI.OpenAI.CompoundFilterType type) + global::tryAGI.OpenAI.CompoundFilterType type, + global::System.Collections.Generic.IList filters) { - this.Filters = filters ?? throw new global::System.ArgumentNullException(nameof(filters)); this.Type = type; + this.Filters = filters ?? throw new global::System.ArgumentNullException(nameof(filters)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.Json.g.cs deleted file mode 100644 index 15db9ba9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CompoundFilterFilter - { - /// - /// 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::tryAGI.OpenAI.CompoundFilterFilter? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CompoundFilterFilter), - jsonSerializerContext) as global::tryAGI.OpenAI.CompoundFilterFilter; - } - - /// - /// 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::tryAGI.OpenAI.CompoundFilterFilter? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CompoundFilterFilter), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompoundFilterFilter; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.g.cs deleted file mode 100644 index aa5c927c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilter.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CompoundFilterFilter - { - - /// - /// 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(); - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.Json.g.cs new file mode 100644 index 00000000..95d6da53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompoundFilterFilterDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CompoundFilterFilterDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompoundFilterFilterDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CompoundFilterFilterDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CompoundFilterFilterDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompoundFilterFilterDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompoundFilterFilterDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.g.cs new file mode 100644 index 00000000..5f260049 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompoundFilterFilterDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CompoundFilterFilterDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CompoundFilterFilterDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.Json.g.cs new file mode 100644 index 00000000..1ecea46a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CompoundFilterFilterVariant2 + { + /// + /// 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::tryAGI.OpenAI.CompoundFilterFilterVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CompoundFilterFilterVariant2), + jsonSerializerContext) as global::tryAGI.OpenAI.CompoundFilterFilterVariant2; + } + + /// + /// 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::tryAGI.OpenAI.CompoundFilterFilterVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CompoundFilterFilterVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CompoundFilterFilterVariant2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.g.cs new file mode 100644 index 00000000..8aa85418 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CompoundFilterFilterVariant2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CompoundFilterFilterVariant2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerAction.g.cs index 25f9a962..d8aa97d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerAction.g.cs @@ -13,9 +13,9 @@ namespace tryAGI.OpenAI /// A click action. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Click? Click { get; init; } + public global::tryAGI.OpenAI.ClickParam? Click { get; init; } #else - public global::tryAGI.OpenAI.Click? Click { get; } + public global::tryAGI.OpenAI.ClickParam? Click { get; } #endif /// @@ -27,299 +27,298 @@ namespace tryAGI.OpenAI public bool IsClick => Click != null; /// - /// + /// A double click action. /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Click value) => new ComputerAction((global::tryAGI.OpenAI.Click?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.DoubleClickAction? DoubleClick { get; init; } +#else + public global::tryAGI.OpenAI.DoubleClickAction? DoubleClick { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.Click?(ComputerAction @this) => @this.Click; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DoubleClick))] +#endif + public bool IsDoubleClick => DoubleClick != null; /// - /// + /// A drag action. /// - public ComputerAction(global::tryAGI.OpenAI.Click? value) - { - Click = value; - } +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.DragParam? Drag { get; init; } +#else + public global::tryAGI.OpenAI.DragParam? Drag { get; } +#endif /// - /// A double click action. + /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.DoubleClick? DoubleClick { get; init; } -#else - public global::tryAGI.OpenAI.DoubleClick? DoubleClick { get; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Drag))] #endif + public bool IsDrag => Drag != null; /// - /// + /// A collection of keypresses the model would like to perform. /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DoubleClick))] + public global::tryAGI.OpenAI.KeyPressAction? Keypress { get; init; } +#else + public global::tryAGI.OpenAI.KeyPressAction? Keypress { get; } #endif - public bool IsDoubleClick => DoubleClick != null; /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.DoubleClick value) => new ComputerAction((global::tryAGI.OpenAI.DoubleClick?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Keypress))] +#endif + public bool IsKeypress => Keypress != null; /// - /// + /// A mouse move action. /// - public static implicit operator global::tryAGI.OpenAI.DoubleClick?(ComputerAction @this) => @this.DoubleClick; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MoveParam? Move { get; init; } +#else + public global::tryAGI.OpenAI.MoveParam? Move { get; } +#endif /// /// /// - public ComputerAction(global::tryAGI.OpenAI.DoubleClick? value) - { - DoubleClick = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Move))] +#endif + public bool IsMove => Move != null; /// - /// A drag action. + /// A screenshot action. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Drag? Drag { get; init; } + public global::tryAGI.OpenAI.ScreenshotParam? Screenshot { get; init; } #else - public global::tryAGI.OpenAI.Drag? Drag { get; } + public global::tryAGI.OpenAI.ScreenshotParam? Screenshot { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Drag))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Screenshot))] #endif - public bool IsDrag => Drag != null; + public bool IsScreenshot => Screenshot != null; /// - /// + /// A scroll action. /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Drag value) => new ComputerAction((global::tryAGI.OpenAI.Drag?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ScrollParam? Scroll { get; init; } +#else + public global::tryAGI.OpenAI.ScrollParam? Scroll { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.Drag?(ComputerAction @this) => @this.Drag; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Scroll))] +#endif + public bool IsScroll => Scroll != null; + + /// + /// An action to type in text. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TypeParam? Type { get; init; } +#else + public global::tryAGI.OpenAI.TypeParam? Type { get; } +#endif /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Drag? value) - { - Drag = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Type))] +#endif + public bool IsType => Type != null; /// - /// A collection of keypresses the model would like to perform. + /// A wait action. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.KeyPress? KeyPress { get; init; } + public global::tryAGI.OpenAI.WaitParam? Wait { get; init; } #else - public global::tryAGI.OpenAI.KeyPress? KeyPress { get; } + public global::tryAGI.OpenAI.WaitParam? Wait { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(KeyPress))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wait))] #endif - public bool IsKeyPress => KeyPress != null; - + public bool IsWait => Wait != null; /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.KeyPress value) => new ComputerAction((global::tryAGI.OpenAI.KeyPress?)value); + public static implicit operator ComputerAction(global::tryAGI.OpenAI.ClickParam value) => new ComputerAction((global::tryAGI.OpenAI.ClickParam?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.KeyPress?(ComputerAction @this) => @this.KeyPress; + public static implicit operator global::tryAGI.OpenAI.ClickParam?(ComputerAction @this) => @this.Click; /// /// /// - public ComputerAction(global::tryAGI.OpenAI.KeyPress? value) + public ComputerAction(global::tryAGI.OpenAI.ClickParam? value) { - KeyPress = value; + Click = value; } - /// - /// A mouse move action. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Move? Move { get; init; } -#else - public global::tryAGI.OpenAI.Move? Move { get; } -#endif - /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Move))] -#endif - public bool IsMove => Move != null; + public static implicit operator ComputerAction(global::tryAGI.OpenAI.DoubleClickAction value) => new ComputerAction((global::tryAGI.OpenAI.DoubleClickAction?)value); /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Move value) => new ComputerAction((global::tryAGI.OpenAI.Move?)value); + public static implicit operator global::tryAGI.OpenAI.DoubleClickAction?(ComputerAction @this) => @this.DoubleClick; /// /// /// - public static implicit operator global::tryAGI.OpenAI.Move?(ComputerAction @this) => @this.Move; + public ComputerAction(global::tryAGI.OpenAI.DoubleClickAction? value) + { + DoubleClick = value; + } /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Move? value) - { - Move = value; - } + public static implicit operator ComputerAction(global::tryAGI.OpenAI.DragParam value) => new ComputerAction((global::tryAGI.OpenAI.DragParam?)value); /// - /// A screenshot action. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Screenshot? Screenshot { get; init; } -#else - public global::tryAGI.OpenAI.Screenshot? Screenshot { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.DragParam?(ComputerAction @this) => @this.Drag; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Screenshot))] -#endif - public bool IsScreenshot => Screenshot != null; + public ComputerAction(global::tryAGI.OpenAI.DragParam? value) + { + Drag = value; + } /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Screenshot value) => new ComputerAction((global::tryAGI.OpenAI.Screenshot?)value); + public static implicit operator ComputerAction(global::tryAGI.OpenAI.KeyPressAction value) => new ComputerAction((global::tryAGI.OpenAI.KeyPressAction?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.Screenshot?(ComputerAction @this) => @this.Screenshot; + public static implicit operator global::tryAGI.OpenAI.KeyPressAction?(ComputerAction @this) => @this.Keypress; /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Screenshot? value) + public ComputerAction(global::tryAGI.OpenAI.KeyPressAction? value) { - Screenshot = value; + Keypress = value; } /// - /// A scroll action. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Scroll? Scroll { get; init; } -#else - public global::tryAGI.OpenAI.Scroll? Scroll { get; } -#endif + public static implicit operator ComputerAction(global::tryAGI.OpenAI.MoveParam value) => new ComputerAction((global::tryAGI.OpenAI.MoveParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Scroll))] -#endif - public bool IsScroll => Scroll != null; + public static implicit operator global::tryAGI.OpenAI.MoveParam?(ComputerAction @this) => @this.Move; /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Scroll value) => new ComputerAction((global::tryAGI.OpenAI.Scroll?)value); + public ComputerAction(global::tryAGI.OpenAI.MoveParam? value) + { + Move = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.Scroll?(ComputerAction @this) => @this.Scroll; + public static implicit operator ComputerAction(global::tryAGI.OpenAI.ScreenshotParam value) => new ComputerAction((global::tryAGI.OpenAI.ScreenshotParam?)value); /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Scroll? value) - { - Scroll = value; - } + public static implicit operator global::tryAGI.OpenAI.ScreenshotParam?(ComputerAction @this) => @this.Screenshot; /// - /// An action to type in text. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Type? Type { get; init; } -#else - public global::tryAGI.OpenAI.Type? Type { get; } -#endif + public ComputerAction(global::tryAGI.OpenAI.ScreenshotParam? value) + { + Screenshot = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Type))] -#endif - public bool IsType => Type != null; + public static implicit operator ComputerAction(global::tryAGI.OpenAI.ScrollParam value) => new ComputerAction((global::tryAGI.OpenAI.ScrollParam?)value); /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Type value) => new ComputerAction((global::tryAGI.OpenAI.Type?)value); + public static implicit operator global::tryAGI.OpenAI.ScrollParam?(ComputerAction @this) => @this.Scroll; /// /// /// - public static implicit operator global::tryAGI.OpenAI.Type?(ComputerAction @this) => @this.Type; + public ComputerAction(global::tryAGI.OpenAI.ScrollParam? value) + { + Scroll = value; + } /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Type? value) - { - Type = value; - } + public static implicit operator ComputerAction(global::tryAGI.OpenAI.TypeParam value) => new ComputerAction((global::tryAGI.OpenAI.TypeParam?)value); /// - /// A wait action. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Wait? Wait { get; init; } -#else - public global::tryAGI.OpenAI.Wait? Wait { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.TypeParam?(ComputerAction @this) => @this.Type; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wait))] -#endif - public bool IsWait => Wait != null; + public ComputerAction(global::tryAGI.OpenAI.TypeParam? value) + { + Type = value; + } /// /// /// - public static implicit operator ComputerAction(global::tryAGI.OpenAI.Wait value) => new ComputerAction((global::tryAGI.OpenAI.Wait?)value); + public static implicit operator ComputerAction(global::tryAGI.OpenAI.WaitParam value) => new ComputerAction((global::tryAGI.OpenAI.WaitParam?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.Wait?(ComputerAction @this) => @this.Wait; + public static implicit operator global::tryAGI.OpenAI.WaitParam?(ComputerAction @this) => @this.Wait; /// /// /// - public ComputerAction(global::tryAGI.OpenAI.Wait? value) + public ComputerAction(global::tryAGI.OpenAI.WaitParam? value) { Wait = value; } @@ -328,21 +327,21 @@ public ComputerAction(global::tryAGI.OpenAI.Wait? value) /// /// public ComputerAction( - global::tryAGI.OpenAI.Click? click, - global::tryAGI.OpenAI.DoubleClick? doubleClick, - global::tryAGI.OpenAI.Drag? drag, - global::tryAGI.OpenAI.KeyPress? keyPress, - global::tryAGI.OpenAI.Move? move, - global::tryAGI.OpenAI.Screenshot? screenshot, - global::tryAGI.OpenAI.Scroll? scroll, - global::tryAGI.OpenAI.Type? type, - global::tryAGI.OpenAI.Wait? wait + global::tryAGI.OpenAI.ClickParam? click, + global::tryAGI.OpenAI.DoubleClickAction? doubleClick, + global::tryAGI.OpenAI.DragParam? drag, + global::tryAGI.OpenAI.KeyPressAction? keypress, + global::tryAGI.OpenAI.MoveParam? move, + global::tryAGI.OpenAI.ScreenshotParam? screenshot, + global::tryAGI.OpenAI.ScrollParam? scroll, + global::tryAGI.OpenAI.TypeParam? type, + global::tryAGI.OpenAI.WaitParam? wait ) { Click = click; DoubleClick = doubleClick; Drag = drag; - KeyPress = keyPress; + Keypress = keypress; Move = move; Screenshot = screenshot; Scroll = scroll; @@ -359,7 +358,7 @@ Type as object ?? Scroll as object ?? Screenshot as object ?? Move as object ?? - KeyPress as object ?? + Keypress as object ?? Drag as object ?? DoubleClick as object ?? Click as object @@ -372,7 +371,7 @@ Click as object Click?.ToString() ?? DoubleClick?.ToString() ?? Drag?.ToString() ?? - KeyPress?.ToString() ?? + Keypress?.ToString() ?? Move?.ToString() ?? Screenshot?.ToString() ?? Scroll?.ToString() ?? @@ -385,22 +384,22 @@ Click as object ///
public bool Validate() { - return IsClick || IsDoubleClick || IsDrag || IsKeyPress || IsMove || IsScreenshot || IsScroll || IsType || IsWait; + return IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && !IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && !IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && IsDrag && !IsKeypress && !IsMove && !IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && IsKeypress && !IsMove && !IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && IsMove && !IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && IsScreenshot && !IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && !IsScreenshot && IsScroll && !IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && !IsScreenshot && !IsScroll && IsType && !IsWait || !IsClick && !IsDoubleClick && !IsDrag && !IsKeypress && !IsMove && !IsScreenshot && !IsScroll && !IsType && IsWait; } /// /// /// public TResult? Match( - global::System.Func? click = null, - global::System.Func? doubleClick = null, - global::System.Func? drag = null, - global::System.Func? keyPress = null, - global::System.Func? move = null, - global::System.Func? screenshot = null, - global::System.Func? scroll = null, - global::System.Func? type = null, - global::System.Func? wait = null, + global::System.Func? click = null, + global::System.Func? doubleClick = null, + global::System.Func? drag = null, + global::System.Func? keypress = null, + global::System.Func? move = null, + global::System.Func? screenshot = null, + global::System.Func? scroll = null, + global::System.Func? type = null, + global::System.Func? wait = null, bool validate = true) { if (validate) @@ -420,9 +419,9 @@ public bool Validate() { return drag(Drag!); } - else if (IsKeyPress && keyPress != null) + else if (IsKeypress && keypress != null) { - return keyPress(KeyPress!); + return keypress(Keypress!); } else if (IsMove && move != null) { @@ -452,15 +451,15 @@ public bool Validate() /// ///
public void Match( - global::System.Action? click = null, - global::System.Action? doubleClick = null, - global::System.Action? drag = null, - global::System.Action? keyPress = null, - global::System.Action? move = null, - global::System.Action? screenshot = null, - global::System.Action? scroll = null, - global::System.Action? type = null, - global::System.Action? wait = null, + global::System.Action? click = null, + global::System.Action? doubleClick = null, + global::System.Action? drag = null, + global::System.Action? keypress = null, + global::System.Action? move = null, + global::System.Action? screenshot = null, + global::System.Action? scroll = null, + global::System.Action? type = null, + global::System.Action? wait = null, bool validate = true) { if (validate) @@ -480,9 +479,9 @@ public void Match( { drag?.Invoke(Drag!); } - else if (IsKeyPress) + else if (IsKeypress) { - keyPress?.Invoke(KeyPress!); + keypress?.Invoke(Keypress!); } else if (IsMove) { @@ -514,23 +513,23 @@ public override int GetHashCode() var fields = new object?[] { Click, - typeof(global::tryAGI.OpenAI.Click), + typeof(global::tryAGI.OpenAI.ClickParam), DoubleClick, - typeof(global::tryAGI.OpenAI.DoubleClick), + typeof(global::tryAGI.OpenAI.DoubleClickAction), Drag, - typeof(global::tryAGI.OpenAI.Drag), - KeyPress, - typeof(global::tryAGI.OpenAI.KeyPress), + typeof(global::tryAGI.OpenAI.DragParam), + Keypress, + typeof(global::tryAGI.OpenAI.KeyPressAction), Move, - typeof(global::tryAGI.OpenAI.Move), + typeof(global::tryAGI.OpenAI.MoveParam), Screenshot, - typeof(global::tryAGI.OpenAI.Screenshot), + typeof(global::tryAGI.OpenAI.ScreenshotParam), Scroll, - typeof(global::tryAGI.OpenAI.Scroll), + typeof(global::tryAGI.OpenAI.ScrollParam), Type, - typeof(global::tryAGI.OpenAI.Type), + typeof(global::tryAGI.OpenAI.TypeParam), Wait, - typeof(global::tryAGI.OpenAI.Wait), + typeof(global::tryAGI.OpenAI.WaitParam), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -547,15 +546,15 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ComputerAction other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Click, other.Click) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(DoubleClick, other.DoubleClick) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Drag, other.Drag) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(KeyPress, other.KeyPress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Move, other.Move) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Screenshot, other.Screenshot) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Scroll, other.Scroll) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Type, other.Type) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Wait, other.Wait) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Click, other.Click) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(DoubleClick, other.DoubleClick) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Drag, other.Drag) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Keypress, other.Keypress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Move, other.Move) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Screenshot, other.Screenshot) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Scroll, other.Scroll) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Type, other.Type) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wait, other.Wait) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParam.g.cs index a299652f..41778edd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParam.g.cs @@ -9,10 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class ComputerCallOutputItemParam { /// - /// The safety checks reported by the API that have been acknowledged by the developer. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("acknowledged_safety_checks")] - public global::System.Collections.Generic.IList? AcknowledgedSafetyChecks { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } /// /// The ID of the computer tool call that produced the output. @@ -22,12 +22,13 @@ public sealed partial class ComputerCallOutputItemParam public required string CallId { get; set; } /// - /// The ID of the computer tool call output.
- /// Example: cuo_123 + /// The type of the computer tool call output. Always `computer_call_output`.
+ /// Default Value: computer_call_output ///
- /// cuo_123 - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } + /// global::tryAGI.OpenAI.ComputerCallOutputItemParamType.ComputerCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.ComputerCallOutputItemParamType.ComputerCallOutput; /// /// A computer screenshot image used with the computer use tool. @@ -39,17 +40,14 @@ public sealed partial class ComputerCallOutputItemParam /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - public object? Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("acknowledged_safety_checks")] + public global::System.Collections.Generic.IList? AcknowledgedSafetyChecks { get; set; } /// - /// The type of the computer tool call output. Always `computer_call_output`.
- /// Default Value: computer_call_output + /// ///
- /// global::tryAGI.OpenAI.ComputerCallOutputItemParamType.ComputerCallOutput - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.ComputerCallOutputItemParamType.ComputerCallOutput; + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public global::tryAGI.OpenAI.FunctionCallItemStatus? Status { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,41 +58,36 @@ public sealed partial class ComputerCallOutputItemParam /// /// Initializes a new instance of the class. /// - /// - /// The safety checks reported by the API that have been acknowledged by the developer. - /// + /// /// /// The ID of the computer tool call that produced the output. /// - /// - /// The ID of the computer tool call output.
- /// Example: cuo_123 + /// + /// The type of the computer tool call output. Always `computer_call_output`.
+ /// Default Value: computer_call_output /// /// /// A computer screenshot image used with the computer use tool. /// + /// /// - /// - /// The type of the computer tool call output. Always `computer_call_output`.
- /// Default Value: computer_call_output - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerCallOutputItemParam( string callId, global::tryAGI.OpenAI.ComputerScreenshotImage output, - global::System.Collections.Generic.IList? acknowledgedSafetyChecks, string? id, - object? status, + global::System.Collections.Generic.IList? acknowledgedSafetyChecks, + global::tryAGI.OpenAI.FunctionCallItemStatus? status, global::tryAGI.OpenAI.ComputerCallOutputItemParamType type = global::tryAGI.OpenAI.ComputerCallOutputItemParamType.ComputerCallOutput) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); - this.AcknowledgedSafetyChecks = acknowledgedSafetyChecks; this.Id = id; - this.Status = status; this.Type = type; + this.AcknowledgedSafetyChecks = acknowledgedSafetyChecks; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.Json.g.cs new file mode 100644 index 00000000..1e869c63 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerCallOutputItemParamAcknowledgedSafetyChecks + { + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks; + } + + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerCallOutputItemParamAcknowledgedSafetyChecks; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.g.cs new file mode 100644 index 00000000..a03605d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamAcknowledgedSafetyChecks.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerCallOutputItemParamAcknowledgedSafetyChecks + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.Json.g.cs new file mode 100644 index 00000000..78f53b99 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerCallOutputItemParamId + { + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerCallOutputItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerCallOutputItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.g.cs new file mode 100644 index 00000000..3af204b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerCallOutputItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.Json.g.cs new file mode 100644 index 00000000..e6da9fb4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerCallOutputItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerCallOutputItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.ComputerCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerCallOutputItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.g.cs new file mode 100644 index 00000000..db70541d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerCallOutputItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParam.g.cs index a00866c5..9f5966be 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParam.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ComputerCallSafetyCheckParam { - /// - /// The type of the pending safety check. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } - /// /// The ID of the pending safety check. /// @@ -22,7 +16,13 @@ public sealed partial class ComputerCallSafetyCheckParam public required string Id { get; set; } /// - /// Details about the pending safety check. + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("message")] public string? Message { get; set; } @@ -36,15 +36,11 @@ public sealed partial class ComputerCallSafetyCheckParam /// /// Initializes a new instance of the class. /// - /// - /// The type of the pending safety check. - /// /// /// The ID of the pending safety check. /// - /// - /// Details about the pending safety check. - /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.Json.g.cs new file mode 100644 index 00000000..91e23c38 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerCallSafetyCheckParamCode + { + /// + /// 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::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode; + } + + /// + /// 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::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerCallSafetyCheckParamCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.g.cs new file mode 100644 index 00000000..076e50e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerCallSafetyCheckParamCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.Json.g.cs new file mode 100644 index 00000000..75296d85 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerCallSafetyCheckParamMessage + { + /// + /// 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::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage; + } + + /// + /// 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::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerCallSafetyCheckParamMessage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.g.cs new file mode 100644 index 00000000..82f35266 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallSafetyCheckParamMessage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerCallSafetyCheckParamMessage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContent.g.cs index 96779cde..781ec8e4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContent.g.cs @@ -9,27 +9,35 @@ namespace tryAGI.OpenAI public sealed partial class ComputerScreenshotContent { /// - /// The identifier of an uploaded file that contains the screenshot. + /// Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
+ /// Default Value: computer_screenshot ///
- [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string? FileId { get; set; } + /// global::tryAGI.OpenAI.ComputerScreenshotContentType.ComputerScreenshot + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerScreenshotContentType Type { get; set; } = global::tryAGI.OpenAI.ComputerScreenshotContentType.ComputerScreenshot; /// - /// The URL of the screenshot image. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] [global::System.Text.Json.Serialization.JsonRequired] public required string? ImageUrl { get; set; } /// - /// Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
- /// Default Value: computer_screenshot + /// ///
- /// global::tryAGI.OpenAI.ComputerScreenshotContentType.ComputerScreenshot - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotContentTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerScreenshotContentType Type { get; set; } = global::tryAGI.OpenAI.ComputerScreenshotContentType.ComputerScreenshot; + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FileId { get; set; } + + /// + /// The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageDetail Detail { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -40,26 +48,27 @@ public sealed partial class ComputerScreenshotContent /// /// Initializes a new instance of the class. /// - /// - /// The identifier of an uploaded file that contains the screenshot. - /// - /// - /// The URL of the screenshot image. - /// /// /// Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.
/// Default Value: computer_screenshot /// + /// + /// + /// + /// The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerScreenshotContent( - string? fileId, string? imageUrl, + string? fileId, + global::tryAGI.OpenAI.ImageDetail detail, global::tryAGI.OpenAI.ComputerScreenshotContentType type = global::tryAGI.OpenAI.ComputerScreenshotContentType.ComputerScreenshot) { - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); + this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); + this.Detail = detail; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.Json.g.cs new file mode 100644 index 00000000..fdeda836 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerScreenshotContentFileId + { + /// + /// 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::tryAGI.OpenAI.ComputerScreenshotContentFileId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerScreenshotContentFileId), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerScreenshotContentFileId; + } + + /// + /// 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::tryAGI.OpenAI.ComputerScreenshotContentFileId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerScreenshotContentFileId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerScreenshotContentFileId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.g.cs new file mode 100644 index 00000000..d46debea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentFileId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerScreenshotContentFileId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.Json.g.cs new file mode 100644 index 00000000..274034ac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerScreenshotContentImageUrl + { + /// + /// 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::tryAGI.OpenAI.ComputerScreenshotContentImageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerScreenshotContentImageUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerScreenshotContentImageUrl; + } + + /// + /// 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::tryAGI.OpenAI.ComputerScreenshotContentImageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerScreenshotContentImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerScreenshotContentImageUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.g.cs new file mode 100644 index 00000000..18f76f80 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContentImageUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ComputerScreenshotContentImageUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotImage.g.cs index 930a8bfb..cf7c2d81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotImage.g.cs @@ -9,10 +9,14 @@ namespace tryAGI.OpenAI public sealed partial class ComputerScreenshotImage { /// - /// The identifier of an uploaded file that contains the screenshot. + /// Specifies the event type. For a computer screenshot, this property is
+ /// always set to `computer_screenshot`.
+ /// Default Value: computer_screenshot ///
- [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } + /// global::tryAGI.OpenAI.ComputerScreenshotImageType.ComputerScreenshot + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotImageTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerScreenshotImageType Type { get; set; } = global::tryAGI.OpenAI.ComputerScreenshotImageType.ComputerScreenshot; /// /// The URL of the screenshot image. @@ -21,14 +25,10 @@ public sealed partial class ComputerScreenshotImage public string? ImageUrl { get; set; } /// - /// Specifies the event type. For a computer screenshot, this property is
- /// always set to `computer_screenshot`.
- /// Default Value: computer_screenshot + /// The identifier of an uploaded file that contains the screenshot. ///
- /// global::tryAGI.OpenAI.ComputerScreenshotImageType.ComputerScreenshot - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerScreenshotImageTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerScreenshotImageType Type { get; set; } = global::tryAGI.OpenAI.ComputerScreenshotImageType.ComputerScreenshot; + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,28 +39,28 @@ public sealed partial class ComputerScreenshotImage /// /// Initializes a new instance of the class. /// - /// - /// The identifier of an uploaded file that contains the screenshot. - /// - /// - /// The URL of the screenshot image. - /// /// /// Specifies the event type. For a computer screenshot, this property is
/// always set to `computer_screenshot`.
/// Default Value: computer_screenshot /// + /// + /// The URL of the screenshot image. + /// + /// + /// The identifier of an uploaded file that contains the screenshot. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerScreenshotImage( - string? fileId, string? imageUrl, + string? fileId, global::tryAGI.OpenAI.ComputerScreenshotImageType type = global::tryAGI.OpenAI.ComputerScreenshotImageType.ComputerScreenshot) { - this.FileId = fileId; - this.ImageUrl = imageUrl; this.Type = type; + this.ImageUrl = imageUrl; + this.FileId = fileId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.Json.g.cs new file mode 100644 index 00000000..d77eca5f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ComputerTool + { + /// + /// 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::tryAGI.OpenAI.ComputerTool? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ComputerTool), + jsonSerializerContext) as global::tryAGI.OpenAI.ComputerTool; + } + + /// + /// 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::tryAGI.OpenAI.ComputerTool? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ComputerTool), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerTool; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.g.cs new file mode 100644 index 00000000..4661850a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerTool.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + /// + public sealed partial class ComputerTool + { + /// + /// The type of the computer tool. Always `computer`.
+ /// Default Value: computer + ///
+ /// global::tryAGI.OpenAI.ComputerToolType.Computer + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerToolType Type { get; set; } = global::tryAGI.OpenAI.ComputerToolType.Computer; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the computer tool. Always `computer`.
+ /// Default Value: computer + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ComputerTool( + global::tryAGI.OpenAI.ComputerToolType type = global::tryAGI.OpenAI.ComputerToolType.Computer) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ComputerTool() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCall.g.cs index 760a0416..4635245f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCall.g.cs @@ -4,18 +4,26 @@ namespace tryAGI.OpenAI { /// - /// A tool call to a computer use tool. See the
- /// [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. ///
public sealed partial class ComputerToolCall { /// - /// + /// The type of the computer call. Always `computer_call`.
+ /// Default Value: computer_call ///
- [global::System.Text.Json.Serialization.JsonPropertyName("action")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerActionJsonConverter))] + /// global::tryAGI.OpenAI.ComputerToolCallType.ComputerCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerToolCallType Type { get; set; } = global::tryAGI.OpenAI.ComputerToolCallType.ComputerCall; + + /// + /// The unique ID of the computer call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ComputerAction Action { get; set; } + public required string Id { get; set; } /// /// An identifier used when responding to the tool call with output. @@ -25,18 +33,25 @@ public sealed partial class ComputerToolCall public required string CallId { get; set; } /// - /// The unique ID of the computer call. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerActionJsonConverter))] + public global::tryAGI.OpenAI.ComputerAction? Action { get; set; } + + /// + /// Flattened batched actions for `computer_use`. Each action includes an
+ /// `type` discriminator and action-specific fields. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("actions")] + public global::System.Collections.Generic.IList? Actions { get; set; } /// /// The pending safety checks for the computer call. /// [global::System.Text.Json.Serialization.JsonPropertyName("pending_safety_checks")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList PendingSafetyChecks { get; set; } + public required global::System.Collections.Generic.IList PendingSafetyChecks { get; set; } /// /// The status of the item. One of `in_progress`, `completed`, or
@@ -47,15 +62,6 @@ public sealed partial class ComputerToolCall [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ComputerToolCallStatus Status { get; set; } - /// - /// The type of the computer call. Always `computer_call`.
- /// Default Value: computer_call - ///
- /// global::tryAGI.OpenAI.ComputerToolCallType.ComputerCall - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerToolCallType Type { get; set; } = global::tryAGI.OpenAI.ComputerToolCallType.ComputerCall; - /// /// Additional properties that are not explicitly defined in the schema /// @@ -65,13 +71,21 @@ public sealed partial class ComputerToolCall /// /// Initializes a new instance of the class. /// - /// - /// - /// An identifier used when responding to the tool call with output. + /// + /// The type of the computer call. Always `computer_call`.
+ /// Default Value: computer_call /// /// /// The unique ID of the computer call. /// + /// + /// An identifier used when responding to the tool call with output. + /// + /// + /// + /// Flattened batched actions for `computer_use`. Each action includes an
+ /// `type` discriminator and action-specific fields. + /// /// /// The pending safety checks for the computer call. /// @@ -79,27 +93,25 @@ public sealed partial class ComputerToolCall /// The status of the item. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when items are returned via API. /// - /// - /// The type of the computer call. Always `computer_call`.
- /// Default Value: computer_call - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerToolCall( - global::tryAGI.OpenAI.ComputerAction action, - string callId, string id, - global::System.Collections.Generic.IList pendingSafetyChecks, + string callId, + global::System.Collections.Generic.IList pendingSafetyChecks, global::tryAGI.OpenAI.ComputerToolCallStatus status, + global::tryAGI.OpenAI.ComputerAction? action, + global::System.Collections.Generic.IList? actions, global::tryAGI.OpenAI.ComputerToolCallType type = global::tryAGI.OpenAI.ComputerToolCallType.ComputerCall) { - this.Action = action; - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.PendingSafetyChecks = pendingSafetyChecks ?? throw new global::System.ArgumentNullException(nameof(pendingSafetyChecks)); this.Status = status; this.Type = type; + this.Action = action; + this.Actions = actions; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutput.g.cs index 37e06f20..ea5d32ad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutput.g.cs @@ -9,11 +9,19 @@ namespace tryAGI.OpenAI public sealed partial class ComputerToolCallOutput { /// - /// The safety checks reported by the API that have been acknowledged by the
- /// developer. + /// The type of the computer tool call output. Always `computer_call_output`.
+ /// Default Value: computer_call_output ///
- [global::System.Text.Json.Serialization.JsonPropertyName("acknowledged_safety_checks")] - public global::System.Collections.Generic.IList? AcknowledgedSafetyChecks { get; set; } + /// global::tryAGI.OpenAI.ComputerToolCallOutputType.ComputerCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerToolCallOutputType Type { get; set; } = global::tryAGI.OpenAI.ComputerToolCallOutputType.ComputerCallOutput; + + /// + /// The ID of the computer tool call output. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } /// /// The ID of the computer tool call that produced the output. @@ -23,10 +31,11 @@ public sealed partial class ComputerToolCallOutput public required string CallId { get; set; } /// - /// The ID of the computer tool call output. + /// The safety checks reported by the API that have been acknowledged by the
+ /// developer. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("acknowledged_safety_checks")] + public global::System.Collections.Generic.IList? AcknowledgedSafetyChecks { get; set; } /// /// A computer screenshot image used with the computer use tool. @@ -43,15 +52,6 @@ public sealed partial class ComputerToolCallOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputStatusJsonConverter))] public global::tryAGI.OpenAI.ComputerToolCallOutputStatus? Status { get; set; } - /// - /// The type of the computer tool call output. Always `computer_call_output`.
- /// Default Value: computer_call_output - ///
- /// global::tryAGI.OpenAI.ComputerToolCallOutputType.ComputerCallOutput - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerToolCallOutputTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerToolCallOutputType Type { get; set; } = global::tryAGI.OpenAI.ComputerToolCallOutputType.ComputerCallOutput; - /// /// Additional properties that are not explicitly defined in the schema /// @@ -61,15 +61,19 @@ public sealed partial class ComputerToolCallOutput /// /// Initializes a new instance of the class. /// - /// - /// The safety checks reported by the API that have been acknowledged by the
- /// developer. + /// + /// The type of the computer tool call output. Always `computer_call_output`.
+ /// Default Value: computer_call_output + /// + /// + /// The ID of the computer tool call output. /// /// /// The ID of the computer tool call that produced the output. /// - /// - /// The ID of the computer tool call output. + /// + /// The safety checks reported by the API that have been acknowledged by the
+ /// developer. /// /// /// A computer screenshot image used with the computer use tool. @@ -78,27 +82,23 @@ public sealed partial class ComputerToolCallOutput /// The status of the message input. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when input items are returned via API. /// - /// - /// The type of the computer tool call output. Always `computer_call_output`.
- /// Default Value: computer_call_output - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerToolCallOutput( string callId, global::tryAGI.OpenAI.ComputerScreenshotImage output, - global::System.Collections.Generic.IList? acknowledgedSafetyChecks, string? id, + global::System.Collections.Generic.IList? acknowledgedSafetyChecks, global::tryAGI.OpenAI.ComputerToolCallOutputStatus? status, global::tryAGI.OpenAI.ComputerToolCallOutputType type = global::tryAGI.OpenAI.ComputerToolCallOutputType.ComputerCallOutput) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); - this.AcknowledgedSafetyChecks = acknowledgedSafetyChecks; + this.Type = type; this.Id = id; + this.AcknowledgedSafetyChecks = acknowledgedSafetyChecks; this.Status = status; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutputResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutputResource.g.cs index 94b0d976..f291e858 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutputResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallOutputResource.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// The output of a computer tool call. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCallOutput? Value1 { get; init; } + public global::tryAGI.OpenAI.ComputerToolCallOutput? ComputerToolCallOutput { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCallOutput? Value1 { get; } + public global::tryAGI.OpenAI.ComputerToolCallOutput? ComputerToolCallOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutput))] #endif - public bool IsValue1 => Value1 != null; + public bool IsComputerToolCallOutput => ComputerToolCallOutput != null; /// /// /// - public static implicit operator ComputerToolCallOutputResource(global::tryAGI.OpenAI.ComputerToolCallOutput value) => new ComputerToolCallOutputResource((global::tryAGI.OpenAI.ComputerToolCallOutput?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutput?(ComputerToolCallOutputResource @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public ComputerToolCallOutputResource(global::tryAGI.OpenAI.ComputerToolCallOutput? value) - { - Value1 = value; - } + public static implicit operator ComputerToolCallOutputResource(global::tryAGI.OpenAI.ComputerToolCallOutput value) => new ComputerToolCallOutputResource((global::tryAGI.OpenAI.ComputerToolCallOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutput?(ComputerToolCallOutputResource @this) => @this.ComputerToolCallOutput; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public ComputerToolCallOutputResource(global::tryAGI.OpenAI.ComputerToolCallOutput? value) + { + ComputerToolCallOutput = value; + } /// /// @@ -83,11 +82,11 @@ public ComputerToolCallOutputResource(global::tryAGI.OpenAI.ComputerToolCallOutp /// /// public ComputerToolCallOutputResource( - global::tryAGI.OpenAI.ComputerToolCallOutput? value1, + global::tryAGI.OpenAI.ComputerToolCallOutput? computerToolCallOutput, global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2? value2 ) { - Value1 = value1; + ComputerToolCallOutput = computerToolCallOutput; Value2 = value2; } @@ -96,14 +95,14 @@ public ComputerToolCallOutputResource( ///
public object? Object => Value2 as object ?? - Value1 as object + ComputerToolCallOutput as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + ComputerToolCallOutput?.ToString() ?? Value2?.ToString() ; @@ -112,14 +111,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsComputerToolCallOutput && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? computerToolCallOutput = null, global::System.Func? value2 = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsComputerToolCallOutput && computerToolCallOutput != null) { - return value1(Value1!); + return computerToolCallOutput(ComputerToolCallOutput!); } else if (IsValue2 && value2 != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? computerToolCallOutput = null, global::System.Action? value2 = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsComputerToolCallOutput) { - value1?.Invoke(Value1!); + computerToolCallOutput?.Invoke(ComputerToolCallOutput!); } else if (IsValue2) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ComputerToolCallOutput, typeof(global::tryAGI.OpenAI.ComputerToolCallOutput), Value2, typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResourceVariant2), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ComputerToolCallOutputResource other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCallOutput, other.ComputerToolCallOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.Json.g.cs deleted file mode 100644 index 48085b90..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ComputerToolCallSafetyCheck - { - /// - /// 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::tryAGI.OpenAI.ComputerToolCallSafetyCheck? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ComputerToolCallSafetyCheck), - jsonSerializerContext) as global::tryAGI.OpenAI.ComputerToolCallSafetyCheck; - } - - /// - /// 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::tryAGI.OpenAI.ComputerToolCallSafetyCheck? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ComputerToolCallSafetyCheck), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ComputerToolCallSafetyCheck; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.g.cs deleted file mode 100644 index 774cf7f5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolCallSafetyCheck.g.cs +++ /dev/null @@ -1,70 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A pending safety check for the computer call. - /// - public sealed partial class ComputerToolCallSafetyCheck - { - /// - /// The type of the pending safety check. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Code { get; set; } - - /// - /// The ID of the pending safety check. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Details about the pending safety check. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The type of the pending safety check. - /// - /// - /// The ID of the pending safety check. - /// - /// - /// Details about the pending safety check. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ComputerToolCallSafetyCheck( - string code, - string id, - string message) - { - this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - } - - /// - /// Initializes a new instance of the class. - /// - public ComputerToolCallSafetyCheck() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolType.g.cs new file mode 100644 index 00000000..fbb62bac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerToolType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the computer tool. Always `computer`.
+ /// Default Value: computer + ///
+ public enum ComputerToolType + { + /// + /// + /// + Computer, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ComputerToolTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ComputerToolType value) + { + return value switch + { + ComputerToolType.Computer => "computer", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ComputerToolType? ToEnum(string value) + { + return value switch + { + "computer" => ComputerToolType.Computer, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs index e8aaff94..38559f16 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs @@ -9,11 +9,21 @@ namespace tryAGI.OpenAI public sealed partial class ComputerUsePreviewTool { /// - /// The height of the computer display. + /// The type of the computer use tool. Always `computer_use_preview`.
+ /// Default Value: computer_use_preview ///
- [global::System.Text.Json.Serialization.JsonPropertyName("display_height")] + /// global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeJsonConverter))] + public global::tryAGI.OpenAI.ComputerUsePreviewToolType Type { get; set; } = global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview; + + /// + /// The type of computer environment to control. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required int DisplayHeight { get; set; } + public required global::tryAGI.OpenAI.ComputerEnvironment Environment { get; set; } /// /// The width of the computer display. @@ -23,21 +33,11 @@ public sealed partial class ComputerUsePreviewTool public required int DisplayWidth { get; set; } /// - /// + /// The height of the computer display. /// - [global::System.Text.Json.Serialization.JsonPropertyName("environment")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerEnvironmentJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("display_height")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ComputerEnvironment Environment { get; set; } - - /// - /// The type of the computer use tool. Always `computer_use_preview`.
- /// Default Value: computer_use_preview - ///
- /// global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolTypeJsonConverter))] - public global::tryAGI.OpenAI.ComputerUsePreviewToolType Type { get; set; } = global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview; + public required int DisplayHeight { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,29 +48,31 @@ public sealed partial class ComputerUsePreviewTool /// /// Initializes a new instance of the class. /// - /// - /// The height of the computer display. + /// + /// The type of the computer use tool. Always `computer_use_preview`.
+ /// Default Value: computer_use_preview + /// + /// + /// The type of computer environment to control. /// /// /// The width of the computer display. /// - /// - /// - /// The type of the computer use tool. Always `computer_use_preview`.
- /// Default Value: computer_use_preview + /// + /// The height of the computer display. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ComputerUsePreviewTool( - int displayHeight, - int displayWidth, global::tryAGI.OpenAI.ComputerEnvironment environment, + int displayWidth, + int displayHeight, global::tryAGI.OpenAI.ComputerUsePreviewToolType type = global::tryAGI.OpenAI.ComputerUsePreviewToolType.ComputerUsePreview) { - this.DisplayHeight = displayHeight; - this.DisplayWidth = displayWidth; this.Environment = environment; + this.DisplayWidth = displayWidth; + this.DisplayHeight = displayHeight; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.Json.g.cs new file mode 100644 index 00000000..e83ed262 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerAutoParam + { + /// + /// 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::tryAGI.OpenAI.ContainerAutoParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerAutoParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerAutoParam; + } + + /// + /// 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::tryAGI.OpenAI.ContainerAutoParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerAutoParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerAutoParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.g.cs new file mode 100644 index 00000000..d50e6be3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParam.g.cs @@ -0,0 +1,92 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerAutoParam + { + /// + /// Automatically creates a container for this request
+ /// Default Value: container_auto + ///
+ /// global::tryAGI.OpenAI.ContainerAutoParamType.ContainerAuto + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerAutoParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerAutoParamType Type { get; set; } = global::tryAGI.OpenAI.ContainerAutoParamType.ContainerAuto; + + /// + /// An optional list of uploaded files to make available to your code. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("memory_limit")] + public global::tryAGI.OpenAI.ContainerMemoryLimit? MemoryLimit { get; set; } + + /// + /// Network access policy for the container. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("network_policy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicy3JsonConverter))] + public global::tryAGI.OpenAI.NetworkPolicy3? NetworkPolicy { get; set; } + + /// + /// An optional list of skills referenced by id or inline data. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skills")] + public global::System.Collections.Generic.IList? Skills { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Automatically creates a container for this request
+ /// Default Value: container_auto + /// + /// + /// An optional list of uploaded files to make available to your code. + /// + /// + /// + /// Network access policy for the container. + /// + /// + /// An optional list of skills referenced by id or inline data. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerAutoParam( + global::System.Collections.Generic.IList? fileIds, + global::tryAGI.OpenAI.ContainerMemoryLimit? memoryLimit, + global::tryAGI.OpenAI.NetworkPolicy3? networkPolicy, + global::System.Collections.Generic.IList? skills, + global::tryAGI.OpenAI.ContainerAutoParamType type = global::tryAGI.OpenAI.ContainerAutoParamType.ContainerAuto) + { + this.Type = type; + this.FileIds = fileIds; + this.MemoryLimit = memoryLimit; + this.NetworkPolicy = networkPolicy; + this.Skills = skills; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerAutoParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.Json.g.cs new file mode 100644 index 00000000..208e2aa5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerAutoParamMemoryLimit + { + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamMemoryLimit? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerAutoParamMemoryLimit), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerAutoParamMemoryLimit; + } + + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamMemoryLimit? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerAutoParamMemoryLimit), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerAutoParamMemoryLimit; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.g.cs new file mode 100644 index 00000000..4a289055 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamMemoryLimit.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerAutoParamMemoryLimit + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.Json.g.cs new file mode 100644 index 00000000..ef902629 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerAutoParamNetworkPolicyDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerAutoParamNetworkPolicyDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.g.cs new file mode 100644 index 00000000..ad1d173a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamNetworkPolicyDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerAutoParamNetworkPolicyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerAutoParamNetworkPolicyDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerAutoParamNetworkPolicyDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.Json.g.cs new file mode 100644 index 00000000..ec1ebf30 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerAutoParamSkillDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerAutoParamSkillDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.g.cs new file mode 100644 index 00000000..205bd8a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamSkillDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerAutoParamSkillDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerAutoParamSkillDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerAutoParamSkillDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamType.g.cs new file mode 100644 index 00000000..407f1c1b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerAutoParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Automatically creates a container for this request
+ /// Default Value: container_auto + ///
+ public enum ContainerAutoParamType + { + /// + /// + /// + ContainerAuto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerAutoParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerAutoParamType value) + { + return value switch + { + ContainerAutoParamType.ContainerAuto => "container_auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerAutoParamType? ToEnum(string value) + { + return value switch + { + "container_auto" => ContainerAutoParamType.ContainerAuto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody.g.cs index 1c48ed67..5b64e8ab 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody.g.cs @@ -9,18 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class ContainerFileCitationBody { /// - /// The ID of the container file. + /// The type of the container file citation. Always `container_file_citation`.
+ /// Default Value: container_file_citation ///
- [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ContainerId { get; set; } + /// global::tryAGI.OpenAI.ContainerFileCitationBodyType.ContainerFileCitation + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerFileCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.ContainerFileCitationBodyType.ContainerFileCitation; /// - /// The index of the last character of the container file citation in the message. + /// The ID of the container file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int EndIndex { get; set; } + public required string ContainerId { get; set; } /// /// The ID of the file. @@ -30,27 +32,25 @@ public sealed partial class ContainerFileCitationBody public required string FileId { get; set; } /// - /// The filename of the container file cited. + /// The index of the first character of the container file citation in the message. /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } + public required int StartIndex { get; set; } /// - /// The index of the first character of the container file citation in the message. + /// The index of the last character of the container file citation in the message. /// - [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int StartIndex { get; set; } + public required int EndIndex { get; set; } /// - /// The type of the container file citation. Always `container_file_citation`.
- /// Default Value: container_file_citation + /// The filename of the container file cited. ///
- /// global::tryAGI.OpenAI.ContainerFileCitationBodyType.ContainerFileCitation - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileCitationBodyTypeJsonConverter))] - public global::tryAGI.OpenAI.ContainerFileCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.ContainerFileCitationBodyType.ContainerFileCitation; + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -61,41 +61,41 @@ public sealed partial class ContainerFileCitationBody /// /// Initializes a new instance of the class. /// + /// + /// The type of the container file citation. Always `container_file_citation`.
+ /// Default Value: container_file_citation + /// /// /// The ID of the container file. /// - /// - /// The index of the last character of the container file citation in the message. - /// /// /// The ID of the file. /// - /// - /// The filename of the container file cited. - /// /// /// The index of the first character of the container file citation in the message. /// - /// - /// The type of the container file citation. Always `container_file_citation`.
- /// Default Value: container_file_citation + /// + /// The index of the last character of the container file citation in the message. + /// + /// + /// The filename of the container file cited. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ContainerFileCitationBody( string containerId, - int endIndex, string fileId, - string filename, int startIndex, + int endIndex, + string filename, global::tryAGI.OpenAI.ContainerFileCitationBodyType type = global::tryAGI.OpenAI.ContainerFileCitationBodyType.ContainerFileCitation) { this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); - this.EndIndex = endIndex; this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.StartIndex = startIndex; + this.EndIndex = endIndex; + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileListResource.g.cs index 04df1e43..f1aa73cb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileListResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileListResource.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class ContainerFileListResource { + /// + /// The type of object returned, must be 'list'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ContainerFileListResourceObject Object { get; set; } + /// /// A list of container files. /// @@ -22,13 +29,6 @@ public sealed partial class ContainerFileListResource [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Whether there are more files available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The ID of the last file in the list. /// @@ -37,11 +37,11 @@ public sealed partial class ContainerFileListResource public required string LastId { get; set; } /// - /// The type of object returned, must be 'list'. + /// Whether there are more files available. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileListResourceObjectJsonConverter))] - public global::tryAGI.OpenAI.ContainerFileListResourceObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,20 +52,20 @@ public sealed partial class ContainerFileListResource /// /// Initializes a new instance of the class. /// + /// + /// The type of object returned, must be 'list'. + /// /// /// A list of container files. /// /// /// The ID of the first file in the list. /// - /// - /// Whether there are more files available. - /// /// /// The ID of the last file in the list. /// - /// - /// The type of object returned, must be 'list'. + /// + /// Whether there are more files available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -73,14 +73,14 @@ public sealed partial class ContainerFileListResource public ContainerFileListResource( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ContainerFileListResourceObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResource.g.cs index 488d0b3d..637eb88f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResource.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ContainerFileResource { /// - /// Size of the file in bytes. + /// Unique identifier for the file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Bytes { get; set; } + public required string Id { get; set; } + + /// + /// The type of this object (`container.file`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } /// /// The container this file belongs to. @@ -31,18 +38,11 @@ public sealed partial class ContainerFileResource public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Unique identifier for the file. + /// Size of the file in bytes. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// The type of this object (`container.file`). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerFileResourceObjectJsonConverter))] - public global::tryAGI.OpenAI.ContainerFileResourceObject Object { get; set; } + public required int Bytes { get; set; } /// /// Path of the file in the container. @@ -67,8 +67,11 @@ public sealed partial class ContainerFileResource /// /// Initializes a new instance of the class. /// - /// - /// Size of the file in bytes. + /// + /// Unique identifier for the file. + /// + /// + /// The type of this object (`container.file`). /// /// /// The container this file belongs to. @@ -76,11 +79,8 @@ public sealed partial class ContainerFileResource /// /// Unix timestamp (in seconds) when the file was created. /// - /// - /// Unique identifier for the file. - /// - /// - /// The type of this object (`container.file`). + /// + /// Size of the file in bytes. /// /// /// Path of the file in the container. @@ -92,21 +92,21 @@ public sealed partial class ContainerFileResource [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ContainerFileResource( - int bytes, + string id, + string @object, string containerId, global::System.DateTimeOffset createdAt, - string id, + int bytes, string path, - string source, - global::tryAGI.OpenAI.ContainerFileResourceObject @object) + string source) { - this.Bytes = bytes; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); this.CreatedAt = createdAt; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Bytes = bytes; this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResourceObject.g.cs deleted file mode 100644 index 35a92981..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileResourceObject.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of this object (`container.file`). - /// - public enum ContainerFileResourceObject - { - /// - /// - /// - ContainerFile, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ContainerFileResourceObjectExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ContainerFileResourceObject value) - { - return value switch - { - ContainerFileResourceObject.ContainerFile => "container.file", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ContainerFileResourceObject? ToEnum(string value) - { - return value switch - { - "container.file" => ContainerFileResourceObject.ContainerFile, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerListResource.g.cs index d745da36..5bc6ad35 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerListResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerListResource.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ContainerListResource { + /// + /// The type of object returned, must be 'list'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ContainerListResourceObject Object { get; set; } + /// /// A list of containers. /// @@ -22,13 +29,6 @@ public sealed partial class ContainerListResource [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Whether there are more containers available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The ID of the last container in the list. /// @@ -37,11 +37,11 @@ public sealed partial class ContainerListResource public required string LastId { get; set; } /// - /// The type of object returned, must be 'list'. + /// Whether there are more containers available. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerListResourceObjectJsonConverter))] - public global::tryAGI.OpenAI.ContainerListResourceObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,20 +52,20 @@ public sealed partial class ContainerListResource /// /// Initializes a new instance of the class. /// + /// + /// The type of object returned, must be 'list'. + /// /// /// A list of containers. /// /// /// The ID of the first container in the list. /// - /// - /// Whether there are more containers available. - /// /// /// The ID of the last container in the list. /// - /// - /// The type of object returned, must be 'list'. + /// + /// Whether there are more containers available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -73,14 +73,14 @@ public sealed partial class ContainerListResource public ContainerListResource( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ContainerListResourceObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerMemoryLimit.g.cs new file mode 100644 index 00000000..60f91ed5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerMemoryLimit.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ContainerMemoryLimit + { + /// + /// + /// + x1g, + /// + /// + /// + x4g, + /// + /// + /// + x16g, + /// + /// + /// + x64g, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerMemoryLimitExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerMemoryLimit value) + { + return value switch + { + ContainerMemoryLimit.x1g => "1g", + ContainerMemoryLimit.x4g => "4g", + ContainerMemoryLimit.x16g => "16g", + ContainerMemoryLimit.x64g => "64g", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerMemoryLimit? ToEnum(string value) + { + return value switch + { + "1g" => ContainerMemoryLimit.x1g, + "4g" => ContainerMemoryLimit.x4g, + "16g" => ContainerMemoryLimit.x16g, + "64g" => ContainerMemoryLimit.x64g, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.Json.g.cs new file mode 100644 index 00000000..e61379fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerNetworkPolicyAllowlistParam + { + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam; + } + + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.g.cs new file mode 100644 index 00000000..061a46ca --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParam.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerNetworkPolicyAllowlistParam + { + /// + /// Allow outbound network access only to specified domains. Always `allowlist`.
+ /// Default Value: allowlist + ///
+ /// global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType.Allowlist + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyAllowlistParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType Type { get; set; } = global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType.Allowlist; + + /// + /// A list of allowed domains when type is `allowlist`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_domains")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList AllowedDomains { get; set; } + + /// + /// Optional domain-scoped secrets for allowlisted domains. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("domain_secrets")] + public global::System.Collections.Generic.IList? DomainSecrets { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Allow outbound network access only to specified domains. Always `allowlist`.
+ /// Default Value: allowlist + /// + /// + /// A list of allowed domains when type is `allowlist`. + /// + /// + /// Optional domain-scoped secrets for allowlisted domains. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerNetworkPolicyAllowlistParam( + global::System.Collections.Generic.IList allowedDomains, + global::System.Collections.Generic.IList? domainSecrets, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType type = global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParamType.Allowlist) + { + this.AllowedDomains = allowedDomains ?? throw new global::System.ArgumentNullException(nameof(allowedDomains)); + this.Type = type; + this.DomainSecrets = domainSecrets; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerNetworkPolicyAllowlistParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParamType.g.cs new file mode 100644 index 00000000..53cb6d25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyAllowlistParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Allow outbound network access only to specified domains. Always `allowlist`.
+ /// Default Value: allowlist + ///
+ public enum ContainerNetworkPolicyAllowlistParamType + { + /// + /// + /// + Allowlist, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerNetworkPolicyAllowlistParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerNetworkPolicyAllowlistParamType value) + { + return value switch + { + ContainerNetworkPolicyAllowlistParamType.Allowlist => "allowlist", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerNetworkPolicyAllowlistParamType? ToEnum(string value) + { + return value switch + { + "allowlist" => ContainerNetworkPolicyAllowlistParamType.Allowlist, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.Json.g.cs new file mode 100644 index 00000000..16bb023e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerNetworkPolicyDisabledParam + { + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam; + } + + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.g.cs new file mode 100644 index 00000000..4137accd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerNetworkPolicyDisabledParam + { + /// + /// Disable outbound network access. Always `disabled`.
+ /// Default Value: disabled + ///
+ /// global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType.Disabled + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerNetworkPolicyDisabledParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType Type { get; set; } = global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType.Disabled; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Disable outbound network access. Always `disabled`.
+ /// Default Value: disabled + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerNetworkPolicyDisabledParam( + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType type = global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParamType.Disabled) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerNetworkPolicyDisabledParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParamType.g.cs new file mode 100644 index 00000000..2e3b3a40 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDisabledParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Disable outbound network access. Always `disabled`.
+ /// Default Value: disabled + ///
+ public enum ContainerNetworkPolicyDisabledParamType + { + /// + /// + /// + Disabled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerNetworkPolicyDisabledParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerNetworkPolicyDisabledParamType value) + { + return value switch + { + ContainerNetworkPolicyDisabledParamType.Disabled => "disabled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerNetworkPolicyDisabledParamType? ToEnum(string value) + { + return value switch + { + "disabled" => ContainerNetworkPolicyDisabledParamType.Disabled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.Json.g.cs new file mode 100644 index 00000000..061051f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerNetworkPolicyDomainSecretParam + { + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam; + } + + /// + /// 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::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerNetworkPolicyDomainSecretParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.g.cs new file mode 100644 index 00000000..71f5894b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerNetworkPolicyDomainSecretParam.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerNetworkPolicyDomainSecretParam + { + /// + /// The domain associated with the secret. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("domain")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Domain { get; set; } + + /// + /// The name of the secret to inject for the domain. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The secret value to inject for the domain. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Value { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The domain associated with the secret. + /// + /// + /// The name of the secret to inject for the domain. + /// + /// + /// The secret value to inject for the domain. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerNetworkPolicyDomainSecretParam( + string domain, + string name, + string value) + { + this.Domain = domain ?? throw new global::System.ArgumentNullException(nameof(domain)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerNetworkPolicyDomainSecretParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.Json.g.cs new file mode 100644 index 00000000..0186bb6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerReferenceParam + { + /// + /// 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::tryAGI.OpenAI.ContainerReferenceParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerReferenceParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerReferenceParam; + } + + /// + /// 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::tryAGI.OpenAI.ContainerReferenceParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerReferenceParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerReferenceParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.g.cs new file mode 100644 index 00000000..c32ae405 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParam.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContainerReferenceParam + { + /// + /// References a container created with the /v1/containers endpoint
+ /// Default Value: container_reference + ///
+ /// global::tryAGI.OpenAI.ContainerReferenceParamType.ContainerReference + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerReferenceParamType Type { get; set; } = global::tryAGI.OpenAI.ContainerReferenceParamType.ContainerReference; + + /// + /// The ID of the referenced container.
+ /// Example: cntr_123 + ///
+ /// cntr_123 + [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ContainerId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// References a container created with the /v1/containers endpoint
+ /// Default Value: container_reference + /// + /// + /// The ID of the referenced container.
+ /// Example: cntr_123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerReferenceParam( + string containerId, + global::tryAGI.OpenAI.ContainerReferenceParamType type = global::tryAGI.OpenAI.ContainerReferenceParamType.ContainerReference) + { + this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerReferenceParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParamType.g.cs new file mode 100644 index 00000000..89fdc707 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// References a container created with the /v1/containers endpoint
+ /// Default Value: container_reference + ///
+ public enum ContainerReferenceParamType + { + /// + /// + /// + ContainerReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerReferenceParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerReferenceParamType value) + { + return value switch + { + ContainerReferenceParamType.ContainerReference => "container_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerReferenceParamType? ToEnum(string value) + { + return value switch + { + "container_reference" => ContainerReferenceParamType.ContainerReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.Json.g.cs new file mode 100644 index 00000000..7f9594e7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerReferenceResource + { + /// + /// 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::tryAGI.OpenAI.ContainerReferenceResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerReferenceResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerReferenceResource; + } + + /// + /// 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::tryAGI.OpenAI.ContainerReferenceResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerReferenceResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerReferenceResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.g.cs new file mode 100644 index 00000000..ae711226 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResource.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents a container created with /v1/containers. + /// + public sealed partial class ContainerReferenceResource + { + /// + /// The environment type. Always `container_reference`.
+ /// Default Value: container_reference + ///
+ /// global::tryAGI.OpenAI.ContainerReferenceResourceType.ContainerReference + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerReferenceResourceTypeJsonConverter))] + public global::tryAGI.OpenAI.ContainerReferenceResourceType Type { get; set; } = global::tryAGI.OpenAI.ContainerReferenceResourceType.ContainerReference; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("container_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ContainerId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The environment type. Always `container_reference`.
+ /// Default Value: container_reference + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerReferenceResource( + string containerId, + global::tryAGI.OpenAI.ContainerReferenceResourceType type = global::tryAGI.OpenAI.ContainerReferenceResourceType.ContainerReference) + { + this.ContainerId = containerId ?? throw new global::System.ArgumentNullException(nameof(containerId)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerReferenceResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResourceType.g.cs new file mode 100644 index 00000000..38e87805 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerReferenceResourceType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The environment type. Always `container_reference`.
+ /// Default Value: container_reference + ///
+ public enum ContainerReferenceResourceType + { + /// + /// + /// + ContainerReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerReferenceResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerReferenceResourceType value) + { + return value switch + { + ContainerReferenceResourceType.ContainerReference => "container_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerReferenceResourceType? ToEnum(string value) + { + return value switch + { + "container_reference" => ContainerReferenceResourceType.ContainerReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResource.g.cs index 6ecdd128..9373ae35 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResource.g.cs @@ -9,27 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ContainerResource { /// - /// Unix timestamp (in seconds) when the container was created. + /// Unique identifier for the container. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The container will expire after this time period.
- /// The anchor is the reference point for the expiration.
- /// The minutes is the number of minutes after the anchor before the container expires. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.ContainerResourceExpiresAfter? ExpiresAfter { get; set; } + public required string Id { get; set; } /// - /// Unique identifier for the container. + /// The type of this object. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("object")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string Object { get; set; } /// /// Name of the container. @@ -39,11 +30,12 @@ public sealed partial class ContainerResource public required string Name { get; set; } /// - /// The type of this object. + /// Unix timestamp (in seconds) when the container was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required global::System.DateTimeOffset CreatedAt { get; set; } /// /// Status of the container (e.g., active, deleted). @@ -52,6 +44,34 @@ public sealed partial class ContainerResource [global::System.Text.Json.Serialization.JsonRequired] public required string Status { get; set; } + /// + /// Unix timestamp (in seconds) when the container was last active. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_active_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? LastActiveAt { get; set; } + + /// + /// The container will expire after this time period.
+ /// The anchor is the reference point for the expiration.
+ /// The minutes is the number of minutes after the anchor before the container expires. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.ContainerResourceExpiresAfter? ExpiresAfter { get; set; } + + /// + /// The memory limit configured for the container. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("memory_limit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceMemoryLimitJsonConverter))] + public global::tryAGI.OpenAI.ContainerResourceMemoryLimit? MemoryLimit { get; set; } + + /// + /// Network access policy for the container. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("network_policy")] + public global::tryAGI.OpenAI.ContainerResourceNetworkPolicy? NetworkPolicy { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -61,43 +81,58 @@ public sealed partial class ContainerResource /// /// Initializes a new instance of the class. /// - /// - /// Unix timestamp (in seconds) when the container was created. - /// - /// - /// The container will expire after this time period.
- /// The anchor is the reference point for the expiration.
- /// The minutes is the number of minutes after the anchor before the container expires. - /// /// /// Unique identifier for the container. /// + /// + /// The type of this object. + /// /// /// Name of the container. /// - /// - /// The type of this object. + /// + /// Unix timestamp (in seconds) when the container was created. /// /// /// Status of the container (e.g., active, deleted). /// + /// + /// Unix timestamp (in seconds) when the container was last active. + /// + /// + /// The container will expire after this time period.
+ /// The anchor is the reference point for the expiration.
+ /// The minutes is the number of minutes after the anchor before the container expires. + /// + /// + /// The memory limit configured for the container. + /// + /// + /// Network access policy for the container. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ContainerResource( - global::System.DateTimeOffset createdAt, string id, - string name, string @object, + string name, + global::System.DateTimeOffset createdAt, string status, - global::tryAGI.OpenAI.ContainerResourceExpiresAfter? expiresAfter) + global::System.DateTimeOffset? lastActiveAt, + global::tryAGI.OpenAI.ContainerResourceExpiresAfter? expiresAfter, + global::tryAGI.OpenAI.ContainerResourceMemoryLimit? memoryLimit, + global::tryAGI.OpenAI.ContainerResourceNetworkPolicy? networkPolicy) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); + this.LastActiveAt = lastActiveAt; this.ExpiresAfter = expiresAfter; + this.MemoryLimit = memoryLimit; + this.NetworkPolicy = networkPolicy; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceMemoryLimit.g.cs new file mode 100644 index 00000000..bb7d6fe8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceMemoryLimit.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The memory limit configured for the container. + /// + public enum ContainerResourceMemoryLimit + { + /// + /// + /// + x1g, + /// + /// + /// + x4g, + /// + /// + /// + x16g, + /// + /// + /// + x64g, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerResourceMemoryLimitExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerResourceMemoryLimit value) + { + return value switch + { + ContainerResourceMemoryLimit.x1g => "1g", + ContainerResourceMemoryLimit.x4g => "4g", + ContainerResourceMemoryLimit.x16g => "16g", + ContainerResourceMemoryLimit.x64g => "64g", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerResourceMemoryLimit? ToEnum(string value) + { + return value switch + { + "1g" => ContainerResourceMemoryLimit.x1g, + "4g" => ContainerResourceMemoryLimit.x4g, + "16g" => ContainerResourceMemoryLimit.x16g, + "64g" => ContainerResourceMemoryLimit.x64g, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.Json.g.cs new file mode 100644 index 00000000..9bd7e302 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContainerResourceNetworkPolicy + { + /// + /// 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::tryAGI.OpenAI.ContainerResourceNetworkPolicy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContainerResourceNetworkPolicy), + jsonSerializerContext) as global::tryAGI.OpenAI.ContainerResourceNetworkPolicy; + } + + /// + /// 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::tryAGI.OpenAI.ContainerResourceNetworkPolicy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContainerResourceNetworkPolicy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContainerResourceNetworkPolicy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.g.cs new file mode 100644 index 00000000..06517831 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicy.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Network access policy for the container. + /// + public sealed partial class ContainerResourceNetworkPolicy + { + /// + /// The network policy mode. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ContainerResourceNetworkPolicyTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType Type { get; set; } + + /// + /// Allowed outbound domains when `type` is `allowlist`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_domains")] + public global::System.Collections.Generic.IList? AllowedDomains { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The network policy mode. + /// + /// + /// Allowed outbound domains when `type` is `allowlist`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContainerResourceNetworkPolicy( + global::tryAGI.OpenAI.ContainerResourceNetworkPolicyType type, + global::System.Collections.Generic.IList? allowedDomains) + { + this.Type = type; + this.AllowedDomains = allowedDomains; + } + + /// + /// Initializes a new instance of the class. + /// + public ContainerResourceNetworkPolicy() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicyType.g.cs new file mode 100644 index 00000000..eef2e348 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerResourceNetworkPolicyType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The network policy mode. + /// + public enum ContainerResourceNetworkPolicyType + { + /// + /// + /// + Allowlist, + /// + /// + /// + Disabled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ContainerResourceNetworkPolicyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ContainerResourceNetworkPolicyType value) + { + return value switch + { + ContainerResourceNetworkPolicyType.Allowlist => "allowlist", + ContainerResourceNetworkPolicyType.Disabled => "disabled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ContainerResourceNetworkPolicyType? ToEnum(string value) + { + return value switch + { + "allowlist" => ContainerResourceNetworkPolicyType.Allowlist, + "disabled" => ContainerResourceNetworkPolicyType.Disabled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Content5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Content5.g.cs index 5661b2ea..0a83f4a3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Content5.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Content5.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputContent? InputContent { get; init; } + public global::tryAGI.OpenAI.InputContent? InputContentTypes { get; init; } #else - public global::tryAGI.OpenAI.InputContent? InputContent { get; } + public global::tryAGI.OpenAI.InputContent? InputContentTypes { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputContent))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputContentTypes))] #endif - public bool IsInputContent => InputContent != null; + public bool IsInputContentTypes => InputContentTypes != null; /// /// /// - public static implicit operator Content5(global::tryAGI.OpenAI.InputContent value) => new Content5((global::tryAGI.OpenAI.InputContent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.OutputContent? OutputContentTypes { get; init; } +#else + public global::tryAGI.OpenAI.OutputContent? OutputContentTypes { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputContent?(Content5 @this) => @this.InputContent; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputContentTypes))] +#endif + public bool IsOutputContentTypes => OutputContentTypes != null; /// /// /// - public Content5(global::tryAGI.OpenAI.InputContent? value) - { - InputContent = value; - } + public static implicit operator Content5(global::tryAGI.OpenAI.InputContent value) => new Content5((global::tryAGI.OpenAI.InputContent?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputContent? OutputContent { get; init; } -#else - public global::tryAGI.OpenAI.OutputContent? OutputContent { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.InputContent?(Content5 @this) => @this.InputContentTypes; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputContent))] -#endif - public bool IsOutputContent => OutputContent != null; + public Content5(global::tryAGI.OpenAI.InputContent? value) + { + InputContentTypes = value; + } /// /// @@ -69,42 +68,42 @@ public Content5(global::tryAGI.OpenAI.InputContent? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.OutputContent?(Content5 @this) => @this.OutputContent; + public static implicit operator global::tryAGI.OpenAI.OutputContent?(Content5 @this) => @this.OutputContentTypes; /// /// /// public Content5(global::tryAGI.OpenAI.OutputContent? value) { - OutputContent = value; + OutputContentTypes = value; } /// /// /// public Content5( - global::tryAGI.OpenAI.InputContent? inputContent, - global::tryAGI.OpenAI.OutputContent? outputContent + global::tryAGI.OpenAI.InputContent? inputContentTypes, + global::tryAGI.OpenAI.OutputContent? outputContentTypes ) { - InputContent = inputContent; - OutputContent = outputContent; + InputContentTypes = inputContentTypes; + OutputContentTypes = outputContentTypes; } /// /// /// public object? Object => - OutputContent as object ?? - InputContent as object + OutputContentTypes as object ?? + InputContentTypes as object ; /// /// /// public override string? ToString() => - InputContent?.ToString() ?? - OutputContent?.ToString() + InputContentTypes?.ToString() ?? + OutputContentTypes?.ToString() ; /// @@ -112,15 +111,15 @@ InputContent as object /// public bool Validate() { - return IsInputContent || IsOutputContent; + return IsInputContentTypes && !IsOutputContentTypes || !IsInputContentTypes && IsOutputContentTypes; } /// /// /// public TResult? Match( - global::System.Func? inputContent = null, - global::System.Func? outputContent = null, + global::System.Func? inputContentTypes = null, + global::System.Func? outputContentTypes = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsInputContent && inputContent != null) + if (IsInputContentTypes && inputContentTypes != null) { - return inputContent(InputContent!); + return inputContentTypes(InputContentTypes!); } - else if (IsOutputContent && outputContent != null) + else if (IsOutputContentTypes && outputContentTypes != null) { - return outputContent(OutputContent!); + return outputContentTypes(OutputContentTypes!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? inputContent = null, - global::System.Action? outputContent = null, + global::System.Action? inputContentTypes = null, + global::System.Action? outputContentTypes = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsInputContent) + if (IsInputContentTypes) { - inputContent?.Invoke(InputContent!); + inputContentTypes?.Invoke(InputContentTypes!); } - else if (IsOutputContent) + else if (IsOutputContentTypes) { - outputContent?.Invoke(OutputContent!); + outputContentTypes?.Invoke(OutputContentTypes!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - InputContent, + InputContentTypes, typeof(global::tryAGI.OpenAI.InputContent), - OutputContent, + OutputContentTypes, typeof(global::tryAGI.OpenAI.OutputContent), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Content5 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputContent, other.InputContent) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputContent, other.OutputContent) + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputContentTypes, other.InputContentTypes) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputContentTypes, other.OutputContentTypes) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.Json.g.cs deleted file mode 100644 index 5b3196be..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ContentItem - { - /// - /// 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::tryAGI.OpenAI.ContentItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ContentItem), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ContentItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ContentItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContentItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.g.cs deleted file mode 100644 index 31904e61..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.g.cs +++ /dev/null @@ -1,586 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ContentItem : global::System.IEquatable - { - /// - /// A text input to the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputTextContent? InputText { get; init; } -#else - public global::tryAGI.OpenAI.InputTextContent? InputText { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] -#endif - public bool IsInputText => InputText != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.InputTextContent value) => new ContentItem((global::tryAGI.OpenAI.InputTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.InputTextContent?(ContentItem @this) => @this.InputText; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.InputTextContent? value) - { - InputText = value; - } - - /// - /// A text output from the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; init; } -#else - public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputText))] -#endif - public bool IsOutputText => OutputText != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.OutputTextContent value) => new ContentItem((global::tryAGI.OpenAI.OutputTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(ContentItem @this) => @this.OutputText; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.OutputTextContent? value) - { - OutputText = value; - } - - /// - /// A text content. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.TextContent? Text { get; init; } -#else - public global::tryAGI.OpenAI.TextContent? 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 ContentItem(global::tryAGI.OpenAI.TextContent value) => new ContentItem((global::tryAGI.OpenAI.TextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.TextContent?(ContentItem @this) => @this.Text; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.TextContent? value) - { - Text = value; - } - - /// - /// A summary text from the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.SummaryTextContent? SummaryText { get; init; } -#else - public global::tryAGI.OpenAI.SummaryTextContent? SummaryText { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SummaryText))] -#endif - public bool IsSummaryText => SummaryText != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.SummaryTextContent value) => new ContentItem((global::tryAGI.OpenAI.SummaryTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.SummaryTextContent?(ContentItem @this) => @this.SummaryText; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.SummaryTextContent? value) - { - SummaryText = value; - } - - /// - /// Reasoning text from the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; init; } -#else - public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningText))] -#endif - public bool IsReasoningText => ReasoningText != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.ReasoningTextContent value) => new ContentItem((global::tryAGI.OpenAI.ReasoningTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ReasoningTextContent?(ContentItem @this) => @this.ReasoningText; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.ReasoningTextContent? value) - { - ReasoningText = value; - } - - /// - /// A refusal from the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RefusalContent? Refusal { get; init; } -#else - public global::tryAGI.OpenAI.RefusalContent? Refusal { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] -#endif - public bool IsRefusal => Refusal != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.RefusalContent value) => new ContentItem((global::tryAGI.OpenAI.RefusalContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RefusalContent?(ContentItem @this) => @this.Refusal; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.RefusalContent? value) - { - Refusal = value; - } - - /// - /// An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputImageContent? InputImage { get; init; } -#else - public global::tryAGI.OpenAI.InputImageContent? InputImage { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] -#endif - public bool IsInputImage => InputImage != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.InputImageContent value) => new ContentItem((global::tryAGI.OpenAI.InputImageContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.InputImageContent?(ContentItem @this) => @this.InputImage; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.InputImageContent? value) - { - InputImage = value; - } - - /// - /// A screenshot of a computer. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerScreenshotContent? ComputerScreenshot { get; init; } -#else - public global::tryAGI.OpenAI.ComputerScreenshotContent? ComputerScreenshot { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerScreenshot))] -#endif - public bool IsComputerScreenshot => ComputerScreenshot != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.ComputerScreenshotContent value) => new ContentItem((global::tryAGI.OpenAI.ComputerScreenshotContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ComputerScreenshotContent?(ContentItem @this) => @this.ComputerScreenshot; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.ComputerScreenshotContent? value) - { - ComputerScreenshot = value; - } - - /// - /// A file input to the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputFileContent? InputFile { get; init; } -#else - public global::tryAGI.OpenAI.InputFileContent? InputFile { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputFile))] -#endif - public bool IsInputFile => InputFile != null; - - /// - /// - /// - public static implicit operator ContentItem(global::tryAGI.OpenAI.InputFileContent value) => new ContentItem((global::tryAGI.OpenAI.InputFileContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.InputFileContent?(ContentItem @this) => @this.InputFile; - - /// - /// - /// - public ContentItem(global::tryAGI.OpenAI.InputFileContent? value) - { - InputFile = value; - } - - /// - /// - /// - public ContentItem( - global::tryAGI.OpenAI.InputTextContent? inputText, - global::tryAGI.OpenAI.OutputTextContent? outputText, - global::tryAGI.OpenAI.TextContent? text, - global::tryAGI.OpenAI.SummaryTextContent? summaryText, - global::tryAGI.OpenAI.ReasoningTextContent? reasoningText, - global::tryAGI.OpenAI.RefusalContent? refusal, - global::tryAGI.OpenAI.InputImageContent? inputImage, - global::tryAGI.OpenAI.ComputerScreenshotContent? computerScreenshot, - global::tryAGI.OpenAI.InputFileContent? inputFile - ) - { - InputText = inputText; - OutputText = outputText; - Text = text; - SummaryText = summaryText; - ReasoningText = reasoningText; - Refusal = refusal; - InputImage = inputImage; - ComputerScreenshot = computerScreenshot; - InputFile = inputFile; - } - - /// - /// - /// - public object? Object => - InputFile as object ?? - ComputerScreenshot as object ?? - InputImage as object ?? - Refusal as object ?? - ReasoningText as object ?? - SummaryText as object ?? - Text as object ?? - OutputText as object ?? - InputText as object - ; - - /// - /// - /// - public override string? ToString() => - InputText?.ToString() ?? - OutputText?.ToString() ?? - Text?.ToString() ?? - SummaryText?.ToString() ?? - ReasoningText?.ToString() ?? - Refusal?.ToString() ?? - InputImage?.ToString() ?? - ComputerScreenshot?.ToString() ?? - InputFile?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsInputText || IsOutputText || IsText || IsSummaryText || IsReasoningText || IsRefusal || IsInputImage || IsComputerScreenshot || IsInputFile; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? inputText = null, - global::System.Func? outputText = null, - global::System.Func? text = null, - global::System.Func? summaryText = null, - global::System.Func? reasoningText = null, - global::System.Func? refusal = null, - global::System.Func? inputImage = null, - global::System.Func? computerScreenshot = null, - global::System.Func? inputFile = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsInputText && inputText != null) - { - return inputText(InputText!); - } - else if (IsOutputText && outputText != null) - { - return outputText(OutputText!); - } - else if (IsText && text != null) - { - return text(Text!); - } - else if (IsSummaryText && summaryText != null) - { - return summaryText(SummaryText!); - } - else if (IsReasoningText && reasoningText != null) - { - return reasoningText(ReasoningText!); - } - else if (IsRefusal && refusal != null) - { - return refusal(Refusal!); - } - else if (IsInputImage && inputImage != null) - { - return inputImage(InputImage!); - } - else if (IsComputerScreenshot && computerScreenshot != null) - { - return computerScreenshot(ComputerScreenshot!); - } - else if (IsInputFile && inputFile != null) - { - return inputFile(InputFile!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? inputText = null, - global::System.Action? outputText = null, - global::System.Action? text = null, - global::System.Action? summaryText = null, - global::System.Action? reasoningText = null, - global::System.Action? refusal = null, - global::System.Action? inputImage = null, - global::System.Action? computerScreenshot = null, - global::System.Action? inputFile = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsInputText) - { - inputText?.Invoke(InputText!); - } - else if (IsOutputText) - { - outputText?.Invoke(OutputText!); - } - else if (IsText) - { - text?.Invoke(Text!); - } - else if (IsSummaryText) - { - summaryText?.Invoke(SummaryText!); - } - else if (IsReasoningText) - { - reasoningText?.Invoke(ReasoningText!); - } - else if (IsRefusal) - { - refusal?.Invoke(Refusal!); - } - else if (IsInputImage) - { - inputImage?.Invoke(InputImage!); - } - else if (IsComputerScreenshot) - { - computerScreenshot?.Invoke(ComputerScreenshot!); - } - else if (IsInputFile) - { - inputFile?.Invoke(InputFile!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - InputText, - typeof(global::tryAGI.OpenAI.InputTextContent), - OutputText, - typeof(global::tryAGI.OpenAI.OutputTextContent), - Text, - typeof(global::tryAGI.OpenAI.TextContent), - SummaryText, - typeof(global::tryAGI.OpenAI.SummaryTextContent), - ReasoningText, - typeof(global::tryAGI.OpenAI.ReasoningTextContent), - Refusal, - typeof(global::tryAGI.OpenAI.RefusalContent), - InputImage, - typeof(global::tryAGI.OpenAI.InputImageContent), - ComputerScreenshot, - typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), - InputFile, - typeof(global::tryAGI.OpenAI.InputFileContent), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ContentItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputText, other.OutputText) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SummaryText, other.SummaryText) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningText, other.ReasoningText) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerScreenshot, other.ComputerScreenshot) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputFile, other.InputFile) - ; - } - - /// - /// - /// - 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.Json.g.cs new file mode 100644 index 00000000..382def44 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ContentItem3 + { + /// + /// 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::tryAGI.OpenAI.ContentItem3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContentItem3), + jsonSerializerContext) as global::tryAGI.OpenAI.ContentItem3?; + } + + /// + /// 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::tryAGI.OpenAI.ContentItem3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContentItem3), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContentItem3?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.g.cs new file mode 100644 index 00000000..828575ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem3.g.cs @@ -0,0 +1,585 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A content part that makes up an input or output item. + /// + public readonly partial struct ContentItem3 : global::System.IEquatable + { + /// + /// A text input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputTextContent? InputText { get; init; } +#else + public global::tryAGI.OpenAI.InputTextContent? InputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] +#endif + public bool IsInputText => InputText != null; + + /// + /// A text output from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; init; } +#else + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputText))] +#endif + public bool IsOutputText => OutputText != null; + + /// + /// A text content. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TextContent? Text { get; init; } +#else + public global::tryAGI.OpenAI.TextContent? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// A summary text from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SummaryTextContent? SummaryText { get; init; } +#else + public global::tryAGI.OpenAI.SummaryTextContent? SummaryText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SummaryText))] +#endif + public bool IsSummaryText => SummaryText != null; + + /// + /// Reasoning text from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; init; } +#else + public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningText))] +#endif + public bool IsReasoningText => ReasoningText != null; + + /// + /// A refusal from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RefusalContent? Refusal { get; init; } +#else + public global::tryAGI.OpenAI.RefusalContent? Refusal { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] +#endif + public bool IsRefusal => Refusal != null; + + /// + /// An image input to the model. Learn about [image inputs](/docs/guides/vision). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; init; } +#else + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] +#endif + public bool IsInputImage => InputImage != null; + + /// + /// A screenshot of a computer. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerScreenshotContent? ComputerScreenshot { get; init; } +#else + public global::tryAGI.OpenAI.ComputerScreenshotContent? ComputerScreenshot { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerScreenshot))] +#endif + public bool IsComputerScreenshot => ComputerScreenshot != null; + + /// + /// A file input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; init; } +#else + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputFile))] +#endif + public bool IsInputFile => InputFile != null; + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.InputTextContent value) => new ContentItem3((global::tryAGI.OpenAI.InputTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputTextContent?(ContentItem3 @this) => @this.InputText; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.InputTextContent? value) + { + InputText = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.OutputTextContent value) => new ContentItem3((global::tryAGI.OpenAI.OutputTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(ContentItem3 @this) => @this.OutputText; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.OutputTextContent? value) + { + OutputText = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.TextContent value) => new ContentItem3((global::tryAGI.OpenAI.TextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TextContent?(ContentItem3 @this) => @this.Text; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.TextContent? value) + { + Text = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.SummaryTextContent value) => new ContentItem3((global::tryAGI.OpenAI.SummaryTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.SummaryTextContent?(ContentItem3 @this) => @this.SummaryText; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.SummaryTextContent? value) + { + SummaryText = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.ReasoningTextContent value) => new ContentItem3((global::tryAGI.OpenAI.ReasoningTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ReasoningTextContent?(ContentItem3 @this) => @this.ReasoningText; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.ReasoningTextContent? value) + { + ReasoningText = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.RefusalContent value) => new ContentItem3((global::tryAGI.OpenAI.RefusalContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RefusalContent?(ContentItem3 @this) => @this.Refusal; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.RefusalContent? value) + { + Refusal = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.InputImageContent value) => new ContentItem3((global::tryAGI.OpenAI.InputImageContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputImageContent?(ContentItem3 @this) => @this.InputImage; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.InputImageContent? value) + { + InputImage = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.ComputerScreenshotContent value) => new ContentItem3((global::tryAGI.OpenAI.ComputerScreenshotContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComputerScreenshotContent?(ContentItem3 @this) => @this.ComputerScreenshot; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.ComputerScreenshotContent? value) + { + ComputerScreenshot = value; + } + + /// + /// + /// + public static implicit operator ContentItem3(global::tryAGI.OpenAI.InputFileContent value) => new ContentItem3((global::tryAGI.OpenAI.InputFileContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputFileContent?(ContentItem3 @this) => @this.InputFile; + + /// + /// + /// + public ContentItem3(global::tryAGI.OpenAI.InputFileContent? value) + { + InputFile = value; + } + + /// + /// + /// + public ContentItem3( + global::tryAGI.OpenAI.InputTextContent? inputText, + global::tryAGI.OpenAI.OutputTextContent? outputText, + global::tryAGI.OpenAI.TextContent? text, + global::tryAGI.OpenAI.SummaryTextContent? summaryText, + global::tryAGI.OpenAI.ReasoningTextContent? reasoningText, + global::tryAGI.OpenAI.RefusalContent? refusal, + global::tryAGI.OpenAI.InputImageContent? inputImage, + global::tryAGI.OpenAI.ComputerScreenshotContent? computerScreenshot, + global::tryAGI.OpenAI.InputFileContent? inputFile + ) + { + InputText = inputText; + OutputText = outputText; + Text = text; + SummaryText = summaryText; + ReasoningText = reasoningText; + Refusal = refusal; + InputImage = inputImage; + ComputerScreenshot = computerScreenshot; + InputFile = inputFile; + } + + /// + /// + /// + public object? Object => + InputFile as object ?? + ComputerScreenshot as object ?? + InputImage as object ?? + Refusal as object ?? + ReasoningText as object ?? + SummaryText as object ?? + Text as object ?? + OutputText as object ?? + InputText as object + ; + + /// + /// + /// + public override string? ToString() => + InputText?.ToString() ?? + OutputText?.ToString() ?? + Text?.ToString() ?? + SummaryText?.ToString() ?? + ReasoningText?.ToString() ?? + Refusal?.ToString() ?? + InputImage?.ToString() ?? + ComputerScreenshot?.ToString() ?? + InputFile?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsInputText && !IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && !IsSummaryText && IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && IsRefusal && !IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && IsInputImage && !IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && IsComputerScreenshot && !IsInputFile || !IsInputText && !IsOutputText && !IsText && !IsSummaryText && !IsReasoningText && !IsRefusal && !IsInputImage && !IsComputerScreenshot && IsInputFile; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? inputText = null, + global::System.Func? outputText = null, + global::System.Func? text = null, + global::System.Func? summaryText = null, + global::System.Func? reasoningText = null, + global::System.Func? refusal = null, + global::System.Func? inputImage = null, + global::System.Func? computerScreenshot = null, + global::System.Func? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText && inputText != null) + { + return inputText(InputText!); + } + else if (IsOutputText && outputText != null) + { + return outputText(OutputText!); + } + else if (IsText && text != null) + { + return text(Text!); + } + else if (IsSummaryText && summaryText != null) + { + return summaryText(SummaryText!); + } + else if (IsReasoningText && reasoningText != null) + { + return reasoningText(ReasoningText!); + } + else if (IsRefusal && refusal != null) + { + return refusal(Refusal!); + } + else if (IsInputImage && inputImage != null) + { + return inputImage(InputImage!); + } + else if (IsComputerScreenshot && computerScreenshot != null) + { + return computerScreenshot(ComputerScreenshot!); + } + else if (IsInputFile && inputFile != null) + { + return inputFile(InputFile!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? inputText = null, + global::System.Action? outputText = null, + global::System.Action? text = null, + global::System.Action? summaryText = null, + global::System.Action? reasoningText = null, + global::System.Action? refusal = null, + global::System.Action? inputImage = null, + global::System.Action? computerScreenshot = null, + global::System.Action? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText) + { + inputText?.Invoke(InputText!); + } + else if (IsOutputText) + { + outputText?.Invoke(OutputText!); + } + else if (IsText) + { + text?.Invoke(Text!); + } + else if (IsSummaryText) + { + summaryText?.Invoke(SummaryText!); + } + else if (IsReasoningText) + { + reasoningText?.Invoke(ReasoningText!); + } + else if (IsRefusal) + { + refusal?.Invoke(Refusal!); + } + else if (IsInputImage) + { + inputImage?.Invoke(InputImage!); + } + else if (IsComputerScreenshot) + { + computerScreenshot?.Invoke(ComputerScreenshot!); + } + else if (IsInputFile) + { + inputFile?.Invoke(InputFile!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + InputText, + typeof(global::tryAGI.OpenAI.InputTextContent), + OutputText, + typeof(global::tryAGI.OpenAI.OutputTextContent), + Text, + typeof(global::tryAGI.OpenAI.TextContent), + SummaryText, + typeof(global::tryAGI.OpenAI.SummaryTextContent), + ReasoningText, + typeof(global::tryAGI.OpenAI.ReasoningTextContent), + Refusal, + typeof(global::tryAGI.OpenAI.RefusalContent), + InputImage, + typeof(global::tryAGI.OpenAI.InputImageContent), + ComputerScreenshot, + typeof(global::tryAGI.OpenAI.ComputerScreenshotContent), + InputFile, + typeof(global::tryAGI.OpenAI.InputFileContent), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ContentItem3 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputText, other.OutputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SummaryText, other.SummaryText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningText, other.ReasoningText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerScreenshot, other.ComputerScreenshot) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputFile, other.InputFile) + ; + } + + /// + /// + /// + public static bool operator ==(ContentItem3 obj1, ContentItem3 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ContentItem3 obj1, ContentItem3 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ContentItem3 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.Json.g.cs new file mode 100644 index 00000000..967ef997 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ContentItem4 + { + /// + /// 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::tryAGI.OpenAI.ContentItem4? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContentItem4), + jsonSerializerContext) as global::tryAGI.OpenAI.ContentItem4?; + } + + /// + /// 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::tryAGI.OpenAI.ContentItem4? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContentItem4), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContentItem4?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.g.cs new file mode 100644 index 00000000..1911672b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem4.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Content blocks that comprise a user message. + /// + public readonly partial struct ContentItem4 : global::System.IEquatable + { + /// + /// Text block that a user contributed to the thread. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.UserMessageInputText? InputText { get; init; } +#else + public global::tryAGI.OpenAI.UserMessageInputText? InputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] +#endif + public bool IsInputText => InputText != null; + + /// + /// Quoted snippet that the user referenced in their message. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.UserMessageQuotedText? QuotedText { get; init; } +#else + public global::tryAGI.OpenAI.UserMessageQuotedText? QuotedText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(QuotedText))] +#endif + public bool IsQuotedText => QuotedText != null; + /// + /// + /// + public static implicit operator ContentItem4(global::tryAGI.OpenAI.UserMessageInputText value) => new ContentItem4((global::tryAGI.OpenAI.UserMessageInputText?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.UserMessageInputText?(ContentItem4 @this) => @this.InputText; + + /// + /// + /// + public ContentItem4(global::tryAGI.OpenAI.UserMessageInputText? value) + { + InputText = value; + } + + /// + /// + /// + public static implicit operator ContentItem4(global::tryAGI.OpenAI.UserMessageQuotedText value) => new ContentItem4((global::tryAGI.OpenAI.UserMessageQuotedText?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.UserMessageQuotedText?(ContentItem4 @this) => @this.QuotedText; + + /// + /// + /// + public ContentItem4(global::tryAGI.OpenAI.UserMessageQuotedText? value) + { + QuotedText = value; + } + + /// + /// + /// + public ContentItem4( + global::tryAGI.OpenAI.UserMessageInputText? inputText, + global::tryAGI.OpenAI.UserMessageQuotedText? quotedText + ) + { + InputText = inputText; + QuotedText = quotedText; + } + + /// + /// + /// + public object? Object => + QuotedText as object ?? + InputText as object + ; + + /// + /// + /// + public override string? ToString() => + InputText?.ToString() ?? + QuotedText?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsInputText && !IsQuotedText || !IsInputText && IsQuotedText; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? inputText = null, + global::System.Func? quotedText = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText && inputText != null) + { + return inputText(InputText!); + } + else if (IsQuotedText && quotedText != null) + { + return quotedText(QuotedText!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? inputText = null, + global::System.Action? quotedText = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText) + { + inputText?.Invoke(InputText!); + } + else if (IsQuotedText) + { + quotedText?.Invoke(QuotedText!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + InputText, + typeof(global::tryAGI.OpenAI.UserMessageInputText), + QuotedText, + typeof(global::tryAGI.OpenAI.UserMessageQuotedText), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ContentItem4 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(QuotedText, other.QuotedText) + ; + } + + /// + /// + /// + public static bool operator ==(ContentItem4 obj1, ContentItem4 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ContentItem4 obj1, ContentItem4 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ContentItem4 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.Json.g.cs deleted file mode 100644 index 472b03d1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ContentVariant2Item - { - /// - /// 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::tryAGI.OpenAI.ContentVariant2Item? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ContentVariant2Item), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ContentVariant2Item? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ContentVariant2Item), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContentVariant2Item?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.g.cs deleted file mode 100644 index 52a23fc1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentVariant2Item.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ContentVariant2Item : global::System.IEquatable - { - /// - /// References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentImageFileObject? MessageImageFileObject { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.MessageContentImageFileObject value) => new ContentVariant2Item((global::tryAGI.OpenAI.MessageContentImageFileObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.MessageImageFileObject; - - /// - /// - /// - public ContentVariant2Item(global::tryAGI.OpenAI.MessageContentImageFileObject? value) - { - MessageImageFileObject = value; - } - - /// - /// References an image URL in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.MessageContentImageUrlObject value) => new ContentVariant2Item((global::tryAGI.OpenAI.MessageContentImageUrlObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.MessageImageUrlObject; - - /// - /// - /// - public ContentVariant2Item(global::tryAGI.OpenAI.MessageContentImageUrlObject? value) - { - MessageImageUrlObject = value; - } - - /// - /// The text content that is part of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageRequestContentTextObject? MessageRequestTextObject { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.MessageRequestContentTextObject value) => new ContentVariant2Item((global::tryAGI.OpenAI.MessageRequestContentTextObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.MessageRequestTextObject; - - /// - /// - /// - public ContentVariant2Item(global::tryAGI.OpenAI.MessageRequestContentTextObject? value) - { - MessageRequestTextObject = value; - } - - /// - /// - /// - public ContentVariant2Item( - global::tryAGI.OpenAI.MessageContentImageFileObject? messageImageFileObject, - global::tryAGI.OpenAI.MessageContentImageUrlObject? messageImageUrlObject, - global::tryAGI.OpenAI.MessageRequestContentTextObject? messageRequestTextObject - ) - { - MessageImageFileObject = messageImageFileObject; - MessageImageUrlObject = messageImageUrlObject; - MessageRequestTextObject = messageRequestTextObject; - } - - /// - /// - /// - public object? Object => - MessageRequestTextObject as object ?? - MessageImageUrlObject as object ?? - MessageImageFileObject as object - ; - - /// - /// - /// - public override string? ToString() => - MessageImageFileObject?.ToString() ?? - MessageImageUrlObject?.ToString() ?? - MessageRequestTextObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.MessageContentImageFileObject), - MessageImageUrlObject, - typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), - MessageRequestTextObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.Json.g.cs new file mode 100644 index 00000000..2c1ed99b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContextManagementParam + { + /// + /// 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::tryAGI.OpenAI.ContextManagementParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContextManagementParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ContextManagementParam; + } + + /// + /// 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::tryAGI.OpenAI.ContextManagementParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContextManagementParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContextManagementParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.g.cs new file mode 100644 index 00000000..9233bbf8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParam.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContextManagementParam + { + /// + /// The context management entry type. Currently only 'compaction' is supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("compact_threshold")] + public int? CompactThreshold { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The context management entry type. Currently only 'compaction' is supported. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ContextManagementParam( + string type, + int? compactThreshold) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.CompactThreshold = compactThreshold; + } + + /// + /// Initializes a new instance of the class. + /// + public ContextManagementParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.Json.g.cs new file mode 100644 index 00000000..426f155b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ContextManagementParamCompactThreshold + { + /// + /// 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::tryAGI.OpenAI.ContextManagementParamCompactThreshold? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ContextManagementParamCompactThreshold), + jsonSerializerContext) as global::tryAGI.OpenAI.ContextManagementParamCompactThreshold; + } + + /// + /// 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::tryAGI.OpenAI.ContextManagementParamCompactThreshold? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ContextManagementParamCompactThreshold), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ContextManagementParamCompactThreshold; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.g.cs new file mode 100644 index 00000000..3f982b5a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContextManagementParamCompactThreshold.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ContextManagementParamCompactThreshold + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.Json.g.cs deleted file mode 100644 index 4cdb6d9b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Conversation - { - /// - /// 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::tryAGI.OpenAI.Conversation? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Conversation), - jsonSerializerContext) as global::tryAGI.OpenAI.Conversation?; - } - - /// - /// 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::tryAGI.OpenAI.Conversation? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Conversation), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Conversation?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.g.cs deleted file mode 100644 index 0d5c0959..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation.g.cs +++ /dev/null @@ -1,160 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct Conversation : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ConversationResource? Resource { get; init; } -#else - public global::tryAGI.OpenAI.ConversationResource? Resource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Resource))] -#endif - public bool IsResource => Resource != null; - - /// - /// - /// - public static implicit operator Conversation(global::tryAGI.OpenAI.ConversationResource value) => new Conversation((global::tryAGI.OpenAI.ConversationResource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ConversationResource?(Conversation @this) => @this.Resource; - - /// - /// - /// - public Conversation(global::tryAGI.OpenAI.ConversationResource? value) - { - Resource = value; - } - - /// - /// - /// - public object? Object => - Resource as object - ; - - /// - /// - /// - public override string? ToString() => - Resource?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsResource; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? resource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsResource && resource != null) - { - return resource(Resource!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? resource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsResource) - { - resource?.Invoke(Resource!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Resource, - typeof(global::tryAGI.OpenAI.ConversationResource), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Conversation other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Resource, other.Resource) - ; - } - - /// - /// - /// - public static bool operator ==(Conversation obj1, Conversation obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Conversation obj1, Conversation obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Conversation o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.Json.g.cs deleted file mode 100644 index c1ca3967..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Conversation2 - { - /// - /// 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::tryAGI.OpenAI.Conversation2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Conversation2), - jsonSerializerContext) as global::tryAGI.OpenAI.Conversation2; - } - - /// - /// 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::tryAGI.OpenAI.Conversation2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Conversation2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Conversation2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.g.cs deleted file mode 100644 index a1e5a5fd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation2.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation. - /// - public sealed partial class Conversation2 - { - /// - /// The unique ID of the conversation. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The unique ID of the conversation. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Conversation2( - string id) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - } - - /// - /// Initializes a new instance of the class. - /// - public Conversation2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.Json.g.cs new file mode 100644 index 00000000..a69be7a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Conversation22 + { + /// + /// 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::tryAGI.OpenAI.Conversation22? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Conversation22), + jsonSerializerContext) as global::tryAGI.OpenAI.Conversation22; + } + + /// + /// 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::tryAGI.OpenAI.Conversation22? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Conversation22), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Conversation22; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.g.cs new file mode 100644 index 00000000..1dcd4cad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Conversation22.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation. + /// + public sealed partial class Conversation22 + { + /// + /// The unique ID of the conversation that this response was associated with. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique ID of the conversation that this response was associated with. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Conversation22( + string id) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + } + + /// + /// Initializes a new instance of the class. + /// + public Conversation22() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItem.g.cs index 1606d7ca..a78c5b25 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItem.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// - /// A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](https://platform.openai.com/docs/api-reference/responses/object#responses/object-output). + /// A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/docs/api-reference/responses/object#responses/object-output). /// public readonly partial struct ConversationItem : global::System.IEquatable { @@ -29,603 +29,812 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.Message value) => new ConversationItem((global::tryAGI.OpenAI.Message?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCallResource { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCallResource { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.Message?(ConversationItem @this) => @this.Message; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallResource))] +#endif + public bool IsFunctionToolCallResource => FunctionToolCallResource != null; /// /// /// - public ConversationItem(global::tryAGI.OpenAI.Message? value) - { - Message = value; - } +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutputResource { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutputResource { get; } +#endif /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCallResource { get; init; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallOutputResource))] +#endif + public bool IsFunctionToolCallOutputResource => FunctionToolCallOutputResource != null; + + /// + /// The results of a file search tool call. See the
+ /// [file search guide](/docs/guides/tools-file-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCallResource { get; } + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallResource))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCall))] +#endif + public bool IsFileSearchCall => FileSearchCall != null; + + /// + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; } #endif - public bool IsFunctionToolCallResource => FunctionToolCallResource != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionToolCallResource value) => new ConversationItem((global::tryAGI.OpenAI.FunctionToolCallResource?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCall))] +#endif + public bool IsWebSearchCall => WebSearchCall != null; + + /// + /// An image generation request made by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCallResource?(ConversationItem @this) => @this.FunctionToolCallResource; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCall))] +#endif + public bool IsImageGenerationCall => ImageGenerationCall != null; + + /// + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; init; } +#else + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; } +#endif /// /// /// - public ConversationItem(global::tryAGI.OpenAI.FunctionToolCallResource? value) - { - FunctionToolCallResource = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCall))] +#endif + public bool IsComputerCall => ComputerCall != null; /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutputResource { get; init; } + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutputResource { get; } + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallOutputResource))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutputResource))] #endif - public bool IsFunctionToolCallOutputResource => FunctionToolCallOutputResource != null; + public bool IsComputerToolCallOutputResource => ComputerToolCallOutputResource != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionToolCallOutputResource value) => new ConversationItem((global::tryAGI.OpenAI.FunctionToolCallOutputResource?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutputResource?(ConversationItem @this) => @this.FunctionToolCallOutputResource; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchCall))] +#endif + public bool IsToolSearchCall => ToolSearchCall != null; /// /// /// - public ConversationItem(global::tryAGI.OpenAI.FunctionToolCallOutputResource? value) - { - FunctionToolCallOutputResource = value; - } +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; } +#endif /// - /// The results of a file search tool call. See the
- /// [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + /// + ///
+#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchOutput))] +#endif + public bool IsToolSearchOutput => ToolSearchOutput != null; + + /// + /// A description of the chain of thought used by a reasoning model while generating
+ /// a response. Be sure to include these items in your `input` to the Responses API
+ /// for subsequent turns of a conversation if you are manually
+ /// [managing context](/docs/guides/conversation-state). ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; init; } + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } #else - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; } + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] +#endif + public bool IsReasoning => Reasoning != null; + + /// + /// A tool call to run code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; } #endif - public bool IsFileSearchToolCall => FileSearchToolCall != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.FileSearchToolCall value) => new ConversationItem((global::tryAGI.OpenAI.FileSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCall))] +#endif + public bool IsCodeInterpreterCall => CodeInterpreterCall != null; + + /// + /// A tool call to run a command on the local shell. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(ConversationItem @this) => @this.FileSearchToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCall))] +#endif + public bool IsLocalShellCall => LocalShellCall != null; + + /// + /// The output of a local shell tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; } +#endif /// /// /// - public ConversationItem(global::tryAGI.OpenAI.FileSearchToolCall? value) - { - FileSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCallOutput))] +#endif + public bool IsLocalShellCallOutput => LocalShellCallOutput != null; /// - /// The results of a web search tool call. See the
- /// [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + /// A tool call that executes one or more shell commands in a managed environment. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; init; } + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; init; } #else - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; } + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCall))] +#endif + public bool IsShellCall => ShellCall != null; + + /// + /// The output of a shell tool call that was emitted. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; } #endif - public bool IsWebSearchToolCall => WebSearchToolCall != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.WebSearchToolCall value) => new ConversationItem((global::tryAGI.OpenAI.WebSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCallOutput))] +#endif + public bool IsShellCallOutput => ShellCallOutput != null; + + /// + /// A tool call that applies file diffs by creating, deleting, or updating files. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(ConversationItem @this) => @this.WebSearchToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCall))] +#endif + public bool IsApplyPatchCall => ApplyPatchCall != null; + + /// + /// The output emitted by an apply patch tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; } +#endif /// /// /// - public ConversationItem(global::tryAGI.OpenAI.WebSearchToolCall? value) - { - WebSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCallOutput))] +#endif + public bool IsApplyPatchCallOutput => ApplyPatchCallOutput != null; /// - /// An image generation request made by the model. + /// A list of tools available on an MCP server. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; init; } + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; init; } #else - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; } + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpListTools))] +#endif + public bool IsMcpListTools => McpListTools != null; + + /// + /// A request for human approval of a tool invocation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; } #endif - public bool IsImageGenToolCall => ImageGenToolCall != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.ImageGenToolCall value) => new ConversationItem((global::tryAGI.OpenAI.ImageGenToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalRequest))] +#endif + public bool IsMcpApprovalRequest => McpApprovalRequest != null; + + /// + /// A response to an MCP approval request. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(ConversationItem @this) => @this.ImageGenToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalResponse))] +#endif + public bool IsMcpApprovalResponse => McpApprovalResponse != null; + + /// + /// An invocation of a tool on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; init; } +#else + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; } +#endif /// /// /// - public ConversationItem(global::tryAGI.OpenAI.ImageGenToolCall? value) - { - ImageGenToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpCall))] +#endif + public bool IsMcpCall => McpCall != null; /// - /// A tool call to a computer use tool. See the
- /// [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + /// A call to a custom tool created by the model. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; init; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] +#endif + public bool IsCustomToolCall => CustomToolCall != null; + + /// + /// The output of a custom tool call from your code, being sent back to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; } #endif - public bool IsComputerToolCall => ComputerToolCall != null; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.ComputerToolCall value) => new ConversationItem((global::tryAGI.OpenAI.ComputerToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallOutput))] +#endif + public bool IsCustomToolCallOutput => CustomToolCallOutput != null; + /// + /// + /// + public static implicit operator ConversationItem(global::tryAGI.OpenAI.Message value) => new ConversationItem((global::tryAGI.OpenAI.Message?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(ConversationItem @this) => @this.ComputerToolCall; + public static implicit operator global::tryAGI.OpenAI.Message?(ConversationItem @this) => @this.Message; /// /// /// - public ConversationItem(global::tryAGI.OpenAI.ComputerToolCall? value) + public ConversationItem(global::tryAGI.OpenAI.Message? value) { - ComputerToolCall = value; + Message = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; init; } -#else - public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionToolCallResource value) => new ConversationItem((global::tryAGI.OpenAI.FunctionToolCallResource?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutputResource))] -#endif - public bool IsComputerToolCallOutputResource => ComputerToolCallOutputResource != null; + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallResource?(ConversationItem @this) => @this.FunctionToolCallResource; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.ComputerToolCallOutputResource value) => new ConversationItem((global::tryAGI.OpenAI.ComputerToolCallOutputResource?)value); + public ConversationItem(global::tryAGI.OpenAI.FunctionToolCallResource? value) + { + FunctionToolCallResource = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutputResource?(ConversationItem @this) => @this.ComputerToolCallOutputResource; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionToolCallOutputResource value) => new ConversationItem((global::tryAGI.OpenAI.FunctionToolCallOutputResource?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.ComputerToolCallOutputResource? value) + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutputResource?(ConversationItem @this) => @this.FunctionToolCallOutputResource; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.FunctionToolCallOutputResource? value) { - ComputerToolCallOutputResource = value; + FunctionToolCallOutputResource = value; } /// - /// A description of the chain of thought used by a reasoning model while generating
- /// a response. Be sure to include these items in your `input` to the Responses API
- /// for subsequent turns of a conversation if you are manually
- /// [managing context](https://platform.openai.com/docs/guides/conversation-state). + /// ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } -#else - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.FileSearchToolCall value) => new ConversationItem((global::tryAGI.OpenAI.FileSearchToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] -#endif - public bool IsReasoning => Reasoning != null; + public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(ConversationItem @this) => @this.FileSearchCall; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.ReasoningItem value) => new ConversationItem((global::tryAGI.OpenAI.ReasoningItem?)value); + public ConversationItem(global::tryAGI.OpenAI.FileSearchToolCall? value) + { + FileSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ReasoningItem?(ConversationItem @this) => @this.Reasoning; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.WebSearchToolCall value) => new ConversationItem((global::tryAGI.OpenAI.WebSearchToolCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.ReasoningItem? value) + public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(ConversationItem @this) => @this.WebSearchCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.WebSearchToolCall? value) { - Reasoning = value; + WebSearchCall = value; } /// - /// A tool call to run code. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ImageGenToolCall value) => new ConversationItem((global::tryAGI.OpenAI.ImageGenToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterToolCall))] -#endif - public bool IsCodeInterpreterToolCall => CodeInterpreterToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(ConversationItem @this) => @this.ImageGenerationCall; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new ConversationItem((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + public ConversationItem(global::tryAGI.OpenAI.ImageGenToolCall? value) + { + ImageGenerationCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(ConversationItem @this) => @this.CodeInterpreterToolCall; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ComputerToolCall value) => new ConversationItem((global::tryAGI.OpenAI.ComputerToolCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(ConversationItem @this) => @this.ComputerCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.ComputerToolCall? value) { - CodeInterpreterToolCall = value; + ComputerCall = value; } /// - /// A tool call to run a command on the local shell. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ComputerToolCallOutputResource value) => new ConversationItem((global::tryAGI.OpenAI.ComputerToolCallOutputResource?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCall))] -#endif - public bool IsLocalShellToolCall => LocalShellToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutputResource?(ConversationItem @this) => @this.ComputerToolCallOutputResource; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.LocalShellToolCall value) => new ConversationItem((global::tryAGI.OpenAI.LocalShellToolCall?)value); + public ConversationItem(global::tryAGI.OpenAI.ComputerToolCallOutputResource? value) + { + ComputerToolCallOutputResource = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(ConversationItem @this) => @this.LocalShellToolCall; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ToolSearchCall value) => new ConversationItem((global::tryAGI.OpenAI.ToolSearchCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.LocalShellToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ToolSearchCall?(ConversationItem @this) => @this.ToolSearchCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.ToolSearchCall? value) { - LocalShellToolCall = value; + ToolSearchCall = value; } /// - /// The output of a local shell tool call. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ToolSearchOutput value) => new ConversationItem((global::tryAGI.OpenAI.ToolSearchOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCallOutput))] -#endif - public bool IsLocalShellToolCallOutput => LocalShellToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.ToolSearchOutput?(ConversationItem @this) => @this.ToolSearchOutput; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.LocalShellToolCallOutput value) => new ConversationItem((global::tryAGI.OpenAI.LocalShellToolCallOutput?)value); + public ConversationItem(global::tryAGI.OpenAI.ToolSearchOutput? value) + { + ToolSearchOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(ConversationItem @this) => @this.LocalShellToolCallOutput; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ReasoningItem value) => new ConversationItem((global::tryAGI.OpenAI.ReasoningItem?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) + public static implicit operator global::tryAGI.OpenAI.ReasoningItem?(ConversationItem @this) => @this.Reasoning; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.ReasoningItem? value) { - LocalShellToolCallOutput = value; + Reasoning = value; } /// - /// A list of tools available on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; init; } -#else - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new ConversationItem((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListTools))] -#endif - public bool IsMCPListTools => MCPListTools != null; + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(ConversationItem @this) => @this.CodeInterpreterCall; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPListTools value) => new ConversationItem((global::tryAGI.OpenAI.MCPListTools?)value); + public ConversationItem(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + { + CodeInterpreterCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPListTools?(ConversationItem @this) => @this.MCPListTools; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.LocalShellToolCall value) => new ConversationItem((global::tryAGI.OpenAI.LocalShellToolCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.MCPListTools? value) + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(ConversationItem @this) => @this.LocalShellCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.LocalShellToolCall? value) { - MCPListTools = value; + LocalShellCall = value; } /// - /// A request for human approval of a tool invocation. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.LocalShellToolCallOutput value) => new ConversationItem((global::tryAGI.OpenAI.LocalShellToolCallOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalRequest))] -#endif - public bool IsMCPApprovalRequest => MCPApprovalRequest != null; + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(ConversationItem @this) => @this.LocalShellCallOutput; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPApprovalRequest value) => new ConversationItem((global::tryAGI.OpenAI.MCPApprovalRequest?)value); + public ConversationItem(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) + { + LocalShellCallOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(ConversationItem @this) => @this.MCPApprovalRequest; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionShellCall value) => new ConversationItem((global::tryAGI.OpenAI.FunctionShellCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.MCPApprovalRequest? value) + public static implicit operator global::tryAGI.OpenAI.FunctionShellCall?(ConversationItem @this) => @this.ShellCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.FunctionShellCall? value) { - MCPApprovalRequest = value; + ShellCall = value; } /// - /// A response to an MCP approval request. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalResponseResource? MCPApprovalResponseResource { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalResponseResource? MCPApprovalResponseResource { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.FunctionShellCallOutput value) => new ConversationItem((global::tryAGI.OpenAI.FunctionShellCallOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalResponseResource))] -#endif - public bool IsMCPApprovalResponseResource => MCPApprovalResponseResource != null; + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutput?(ConversationItem @this) => @this.ShellCallOutput; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPApprovalResponseResource value) => new ConversationItem((global::tryAGI.OpenAI.MCPApprovalResponseResource?)value); + public ConversationItem(global::tryAGI.OpenAI.FunctionShellCallOutput? value) + { + ShellCallOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponseResource?(ConversationItem @this) => @this.MCPApprovalResponseResource; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ApplyPatchToolCall value) => new ConversationItem((global::tryAGI.OpenAI.ApplyPatchToolCall?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCall?(ConversationItem @this) => @this.ApplyPatchCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.ApplyPatchToolCall? value) { - MCPApprovalResponseResource = value; + ApplyPatchCall = value; } /// - /// An invocation of a tool on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; init; } -#else - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.ApplyPatchToolCallOutput value) => new ConversationItem((global::tryAGI.OpenAI.ApplyPatchToolCallOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPToolCall))] -#endif - public bool IsMCPToolCall => MCPToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallOutput?(ConversationItem @this) => @this.ApplyPatchCallOutput; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPToolCall value) => new ConversationItem((global::tryAGI.OpenAI.MCPToolCall?)value); + public ConversationItem(global::tryAGI.OpenAI.ApplyPatchToolCallOutput? value) + { + ApplyPatchCallOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(ConversationItem @this) => @this.MCPToolCall; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPListTools value) => new ConversationItem((global::tryAGI.OpenAI.MCPListTools?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.MCPToolCall? value) + public static implicit operator global::tryAGI.OpenAI.MCPListTools?(ConversationItem @this) => @this.McpListTools; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.MCPListTools? value) { - MCPToolCall = value; + McpListTools = value; } /// - /// A call to a custom tool created by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPApprovalRequest value) => new ConversationItem((global::tryAGI.OpenAI.MCPApprovalRequest?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] -#endif - public bool IsCustomToolCall => CustomToolCall != null; + public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(ConversationItem @this) => @this.McpApprovalRequest; /// /// /// - public static implicit operator ConversationItem(global::tryAGI.OpenAI.CustomToolCall value) => new ConversationItem((global::tryAGI.OpenAI.CustomToolCall?)value); + public ConversationItem(global::tryAGI.OpenAI.MCPApprovalRequest? value) + { + McpApprovalRequest = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CustomToolCall?(ConversationItem @this) => @this.CustomToolCall; + public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPApprovalResponseResource value) => new ConversationItem((global::tryAGI.OpenAI.MCPApprovalResponseResource?)value); /// /// /// - public ConversationItem(global::tryAGI.OpenAI.CustomToolCall? value) + public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponseResource?(ConversationItem @this) => @this.McpApprovalResponse; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) { - CustomToolCall = value; + McpApprovalResponse = value; } /// - /// The output of a custom tool call from your code, being sent back to the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; } -#endif + public static implicit operator ConversationItem(global::tryAGI.OpenAI.MCPToolCall value) => new ConversationItem((global::tryAGI.OpenAI.MCPToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallOutput))] -#endif - public bool IsCustomToolCallOutput => CustomToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(ConversationItem @this) => @this.McpCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.MCPToolCall? value) + { + McpCall = value; + } + + /// + /// + /// + public static implicit operator ConversationItem(global::tryAGI.OpenAI.CustomToolCall value) => new ConversationItem((global::tryAGI.OpenAI.CustomToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CustomToolCall?(ConversationItem @this) => @this.CustomToolCall; + + /// + /// + /// + public ConversationItem(global::tryAGI.OpenAI.CustomToolCall? value) + { + CustomToolCall = value; + } /// /// @@ -652,19 +861,25 @@ public ConversationItem( global::tryAGI.OpenAI.Message? message, global::tryAGI.OpenAI.FunctionToolCallResource? functionToolCallResource, global::tryAGI.OpenAI.FunctionToolCallOutputResource? functionToolCallOutputResource, - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall, - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall, - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall, - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall, + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall, + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall, + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall, + global::tryAGI.OpenAI.ComputerToolCall? computerCall, global::tryAGI.OpenAI.ComputerToolCallOutputResource? computerToolCallOutputResource, + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall, + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput, global::tryAGI.OpenAI.ReasoningItem? reasoning, - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall, - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall, - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput, - global::tryAGI.OpenAI.MCPListTools? mCPListTools, - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest, - global::tryAGI.OpenAI.MCPApprovalResponseResource? mCPApprovalResponseResource, - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall, + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall, + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall, + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput, + global::tryAGI.OpenAI.FunctionShellCall? shellCall, + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput, + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall, + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput, + global::tryAGI.OpenAI.MCPListTools? mcpListTools, + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest, + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse, + global::tryAGI.OpenAI.MCPToolCall? mcpCall, global::tryAGI.OpenAI.CustomToolCall? customToolCall, global::tryAGI.OpenAI.CustomToolCallOutput? customToolCallOutput ) @@ -672,19 +887,25 @@ public ConversationItem( Message = message; FunctionToolCallResource = functionToolCallResource; FunctionToolCallOutputResource = functionToolCallOutputResource; - FileSearchToolCall = fileSearchToolCall; - WebSearchToolCall = webSearchToolCall; - ImageGenToolCall = imageGenToolCall; - ComputerToolCall = computerToolCall; + FileSearchCall = fileSearchCall; + WebSearchCall = webSearchCall; + ImageGenerationCall = imageGenerationCall; + ComputerCall = computerCall; ComputerToolCallOutputResource = computerToolCallOutputResource; + ToolSearchCall = toolSearchCall; + ToolSearchOutput = toolSearchOutput; Reasoning = reasoning; - CodeInterpreterToolCall = codeInterpreterToolCall; - LocalShellToolCall = localShellToolCall; - LocalShellToolCallOutput = localShellToolCallOutput; - MCPListTools = mCPListTools; - MCPApprovalRequest = mCPApprovalRequest; - MCPApprovalResponseResource = mCPApprovalResponseResource; - MCPToolCall = mCPToolCall; + CodeInterpreterCall = codeInterpreterCall; + LocalShellCall = localShellCall; + LocalShellCallOutput = localShellCallOutput; + ShellCall = shellCall; + ShellCallOutput = shellCallOutput; + ApplyPatchCall = applyPatchCall; + ApplyPatchCallOutput = applyPatchCallOutput; + McpListTools = mcpListTools; + McpApprovalRequest = mcpApprovalRequest; + McpApprovalResponse = mcpApprovalResponse; + McpCall = mcpCall; CustomToolCall = customToolCall; CustomToolCallOutput = customToolCallOutput; } @@ -695,19 +916,25 @@ public ConversationItem( public object? Object => CustomToolCallOutput as object ?? CustomToolCall as object ?? - MCPToolCall as object ?? - MCPApprovalResponseResource as object ?? - MCPApprovalRequest as object ?? - MCPListTools as object ?? - LocalShellToolCallOutput as object ?? - LocalShellToolCall as object ?? - CodeInterpreterToolCall as object ?? + McpCall as object ?? + McpApprovalResponse as object ?? + McpApprovalRequest as object ?? + McpListTools as object ?? + ApplyPatchCallOutput as object ?? + ApplyPatchCall as object ?? + ShellCallOutput as object ?? + ShellCall as object ?? + LocalShellCallOutput as object ?? + LocalShellCall as object ?? + CodeInterpreterCall as object ?? Reasoning as object ?? + ToolSearchOutput as object ?? + ToolSearchCall as object ?? ComputerToolCallOutputResource as object ?? - ComputerToolCall as object ?? - ImageGenToolCall as object ?? - WebSearchToolCall as object ?? - FileSearchToolCall as object ?? + ComputerCall as object ?? + ImageGenerationCall as object ?? + WebSearchCall as object ?? + FileSearchCall as object ?? FunctionToolCallOutputResource as object ?? FunctionToolCallResource as object ?? Message as object @@ -720,19 +947,25 @@ Message as object Message?.ToString() ?? FunctionToolCallResource?.ToString() ?? FunctionToolCallOutputResource?.ToString() ?? - FileSearchToolCall?.ToString() ?? - WebSearchToolCall?.ToString() ?? - ImageGenToolCall?.ToString() ?? - ComputerToolCall?.ToString() ?? + FileSearchCall?.ToString() ?? + WebSearchCall?.ToString() ?? + ImageGenerationCall?.ToString() ?? + ComputerCall?.ToString() ?? ComputerToolCallOutputResource?.ToString() ?? + ToolSearchCall?.ToString() ?? + ToolSearchOutput?.ToString() ?? Reasoning?.ToString() ?? - CodeInterpreterToolCall?.ToString() ?? - LocalShellToolCall?.ToString() ?? - LocalShellToolCallOutput?.ToString() ?? - MCPListTools?.ToString() ?? - MCPApprovalRequest?.ToString() ?? - MCPApprovalResponseResource?.ToString() ?? - MCPToolCall?.ToString() ?? + CodeInterpreterCall?.ToString() ?? + LocalShellCall?.ToString() ?? + LocalShellCallOutput?.ToString() ?? + ShellCall?.ToString() ?? + ShellCallOutput?.ToString() ?? + ApplyPatchCall?.ToString() ?? + ApplyPatchCallOutput?.ToString() ?? + McpListTools?.ToString() ?? + McpApprovalRequest?.ToString() ?? + McpApprovalResponse?.ToString() ?? + McpCall?.ToString() ?? CustomToolCall?.ToString() ?? CustomToolCallOutput?.ToString() ; @@ -742,7 +975,7 @@ Message as object /// public bool Validate() { - return IsMessage || IsFunctionToolCallResource || IsFunctionToolCallOutputResource || IsFileSearchToolCall || IsWebSearchToolCall || IsImageGenToolCall || IsComputerToolCall || IsComputerToolCallOutputResource || IsReasoning || IsCodeInterpreterToolCall || IsLocalShellToolCall || IsLocalShellToolCallOutput || IsMCPListTools || IsMCPApprovalRequest || IsMCPApprovalResponseResource || IsMCPToolCall || IsCustomToolCall || IsCustomToolCallOutput; + return IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionToolCallResource && !IsFunctionToolCallOutputResource && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && IsCustomToolCallOutput; } /// @@ -752,19 +985,25 @@ public bool Validate() global::System.Func? message = null, global::System.Func? functionToolCallResource = null, global::System.Func? functionToolCallOutputResource = null, - global::System.Func? fileSearchToolCall = null, - global::System.Func? webSearchToolCall = null, - global::System.Func? imageGenToolCall = null, - global::System.Func? computerToolCall = null, + global::System.Func? fileSearchCall = null, + global::System.Func? webSearchCall = null, + global::System.Func? imageGenerationCall = null, + global::System.Func? computerCall = null, global::System.Func? computerToolCallOutputResource = null, + global::System.Func? toolSearchCall = null, + global::System.Func? toolSearchOutput = null, global::System.Func? reasoning = null, - global::System.Func? codeInterpreterToolCall = null, - global::System.Func? localShellToolCall = null, - global::System.Func? localShellToolCallOutput = null, - global::System.Func? mCPListTools = null, - global::System.Func? mCPApprovalRequest = null, - global::System.Func? mCPApprovalResponseResource = null, - global::System.Func? mCPToolCall = null, + global::System.Func? codeInterpreterCall = null, + global::System.Func? localShellCall = null, + global::System.Func? localShellCallOutput = null, + global::System.Func? shellCall = null, + global::System.Func? shellCallOutput = null, + global::System.Func? applyPatchCall = null, + global::System.Func? applyPatchCallOutput = null, + global::System.Func? mcpListTools = null, + global::System.Func? mcpApprovalRequest = null, + global::System.Func? mcpApprovalResponse = null, + global::System.Func? mcpCall = null, global::System.Func? customToolCall = null, global::System.Func? customToolCallOutput = null, bool validate = true) @@ -786,57 +1025,81 @@ public bool Validate() { return functionToolCallOutputResource(FunctionToolCallOutputResource!); } - else if (IsFileSearchToolCall && fileSearchToolCall != null) + else if (IsFileSearchCall && fileSearchCall != null) { - return fileSearchToolCall(FileSearchToolCall!); + return fileSearchCall(FileSearchCall!); } - else if (IsWebSearchToolCall && webSearchToolCall != null) + else if (IsWebSearchCall && webSearchCall != null) { - return webSearchToolCall(WebSearchToolCall!); + return webSearchCall(WebSearchCall!); } - else if (IsImageGenToolCall && imageGenToolCall != null) + else if (IsImageGenerationCall && imageGenerationCall != null) { - return imageGenToolCall(ImageGenToolCall!); + return imageGenerationCall(ImageGenerationCall!); } - else if (IsComputerToolCall && computerToolCall != null) + else if (IsComputerCall && computerCall != null) { - return computerToolCall(ComputerToolCall!); + return computerCall(ComputerCall!); } else if (IsComputerToolCallOutputResource && computerToolCallOutputResource != null) { return computerToolCallOutputResource(ComputerToolCallOutputResource!); } + else if (IsToolSearchCall && toolSearchCall != null) + { + return toolSearchCall(ToolSearchCall!); + } + else if (IsToolSearchOutput && toolSearchOutput != null) + { + return toolSearchOutput(ToolSearchOutput!); + } else if (IsReasoning && reasoning != null) { return reasoning(Reasoning!); } - else if (IsCodeInterpreterToolCall && codeInterpreterToolCall != null) + else if (IsCodeInterpreterCall && codeInterpreterCall != null) + { + return codeInterpreterCall(CodeInterpreterCall!); + } + else if (IsLocalShellCall && localShellCall != null) + { + return localShellCall(LocalShellCall!); + } + else if (IsLocalShellCallOutput && localShellCallOutput != null) + { + return localShellCallOutput(LocalShellCallOutput!); + } + else if (IsShellCall && shellCall != null) + { + return shellCall(ShellCall!); + } + else if (IsShellCallOutput && shellCallOutput != null) { - return codeInterpreterToolCall(CodeInterpreterToolCall!); + return shellCallOutput(ShellCallOutput!); } - else if (IsLocalShellToolCall && localShellToolCall != null) + else if (IsApplyPatchCall && applyPatchCall != null) { - return localShellToolCall(LocalShellToolCall!); + return applyPatchCall(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput && localShellToolCallOutput != null) + else if (IsApplyPatchCallOutput && applyPatchCallOutput != null) { - return localShellToolCallOutput(LocalShellToolCallOutput!); + return applyPatchCallOutput(ApplyPatchCallOutput!); } - else if (IsMCPListTools && mCPListTools != null) + else if (IsMcpListTools && mcpListTools != null) { - return mCPListTools(MCPListTools!); + return mcpListTools(McpListTools!); } - else if (IsMCPApprovalRequest && mCPApprovalRequest != null) + else if (IsMcpApprovalRequest && mcpApprovalRequest != null) { - return mCPApprovalRequest(MCPApprovalRequest!); + return mcpApprovalRequest(McpApprovalRequest!); } - else if (IsMCPApprovalResponseResource && mCPApprovalResponseResource != null) + else if (IsMcpApprovalResponse && mcpApprovalResponse != null) { - return mCPApprovalResponseResource(MCPApprovalResponseResource!); + return mcpApprovalResponse(McpApprovalResponse!); } - else if (IsMCPToolCall && mCPToolCall != null) + else if (IsMcpCall && mcpCall != null) { - return mCPToolCall(MCPToolCall!); + return mcpCall(McpCall!); } else if (IsCustomToolCall && customToolCall != null) { @@ -857,19 +1120,25 @@ public void Match( global::System.Action? message = null, global::System.Action? functionToolCallResource = null, global::System.Action? functionToolCallOutputResource = null, - global::System.Action? fileSearchToolCall = null, - global::System.Action? webSearchToolCall = null, - global::System.Action? imageGenToolCall = null, - global::System.Action? computerToolCall = null, + global::System.Action? fileSearchCall = null, + global::System.Action? webSearchCall = null, + global::System.Action? imageGenerationCall = null, + global::System.Action? computerCall = null, global::System.Action? computerToolCallOutputResource = null, + global::System.Action? toolSearchCall = null, + global::System.Action? toolSearchOutput = null, global::System.Action? reasoning = null, - global::System.Action? codeInterpreterToolCall = null, - global::System.Action? localShellToolCall = null, - global::System.Action? localShellToolCallOutput = null, - global::System.Action? mCPListTools = null, - global::System.Action? mCPApprovalRequest = null, - global::System.Action? mCPApprovalResponseResource = null, - global::System.Action? mCPToolCall = null, + global::System.Action? codeInterpreterCall = null, + global::System.Action? localShellCall = null, + global::System.Action? localShellCallOutput = null, + global::System.Action? shellCall = null, + global::System.Action? shellCallOutput = null, + global::System.Action? applyPatchCall = null, + global::System.Action? applyPatchCallOutput = null, + global::System.Action? mcpListTools = null, + global::System.Action? mcpApprovalRequest = null, + global::System.Action? mcpApprovalResponse = null, + global::System.Action? mcpCall = null, global::System.Action? customToolCall = null, global::System.Action? customToolCallOutput = null, bool validate = true) @@ -891,57 +1160,81 @@ public void Match( { functionToolCallOutputResource?.Invoke(FunctionToolCallOutputResource!); } - else if (IsFileSearchToolCall) + else if (IsFileSearchCall) { - fileSearchToolCall?.Invoke(FileSearchToolCall!); + fileSearchCall?.Invoke(FileSearchCall!); } - else if (IsWebSearchToolCall) + else if (IsWebSearchCall) { - webSearchToolCall?.Invoke(WebSearchToolCall!); + webSearchCall?.Invoke(WebSearchCall!); } - else if (IsImageGenToolCall) + else if (IsImageGenerationCall) { - imageGenToolCall?.Invoke(ImageGenToolCall!); + imageGenerationCall?.Invoke(ImageGenerationCall!); } - else if (IsComputerToolCall) + else if (IsComputerCall) { - computerToolCall?.Invoke(ComputerToolCall!); + computerCall?.Invoke(ComputerCall!); } else if (IsComputerToolCallOutputResource) { computerToolCallOutputResource?.Invoke(ComputerToolCallOutputResource!); } + else if (IsToolSearchCall) + { + toolSearchCall?.Invoke(ToolSearchCall!); + } + else if (IsToolSearchOutput) + { + toolSearchOutput?.Invoke(ToolSearchOutput!); + } else if (IsReasoning) { reasoning?.Invoke(Reasoning!); } - else if (IsCodeInterpreterToolCall) + else if (IsCodeInterpreterCall) + { + codeInterpreterCall?.Invoke(CodeInterpreterCall!); + } + else if (IsLocalShellCall) + { + localShellCall?.Invoke(LocalShellCall!); + } + else if (IsLocalShellCallOutput) + { + localShellCallOutput?.Invoke(LocalShellCallOutput!); + } + else if (IsShellCall) + { + shellCall?.Invoke(ShellCall!); + } + else if (IsShellCallOutput) { - codeInterpreterToolCall?.Invoke(CodeInterpreterToolCall!); + shellCallOutput?.Invoke(ShellCallOutput!); } - else if (IsLocalShellToolCall) + else if (IsApplyPatchCall) { - localShellToolCall?.Invoke(LocalShellToolCall!); + applyPatchCall?.Invoke(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput) + else if (IsApplyPatchCallOutput) { - localShellToolCallOutput?.Invoke(LocalShellToolCallOutput!); + applyPatchCallOutput?.Invoke(ApplyPatchCallOutput!); } - else if (IsMCPListTools) + else if (IsMcpListTools) { - mCPListTools?.Invoke(MCPListTools!); + mcpListTools?.Invoke(McpListTools!); } - else if (IsMCPApprovalRequest) + else if (IsMcpApprovalRequest) { - mCPApprovalRequest?.Invoke(MCPApprovalRequest!); + mcpApprovalRequest?.Invoke(McpApprovalRequest!); } - else if (IsMCPApprovalResponseResource) + else if (IsMcpApprovalResponse) { - mCPApprovalResponseResource?.Invoke(MCPApprovalResponseResource!); + mcpApprovalResponse?.Invoke(McpApprovalResponse!); } - else if (IsMCPToolCall) + else if (IsMcpCall) { - mCPToolCall?.Invoke(MCPToolCall!); + mcpCall?.Invoke(McpCall!); } else if (IsCustomToolCall) { @@ -966,31 +1259,43 @@ public override int GetHashCode() typeof(global::tryAGI.OpenAI.FunctionToolCallResource), FunctionToolCallOutputResource, typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource), - FileSearchToolCall, + FileSearchCall, typeof(global::tryAGI.OpenAI.FileSearchToolCall), - WebSearchToolCall, + WebSearchCall, typeof(global::tryAGI.OpenAI.WebSearchToolCall), - ImageGenToolCall, + ImageGenerationCall, typeof(global::tryAGI.OpenAI.ImageGenToolCall), - ComputerToolCall, + ComputerCall, typeof(global::tryAGI.OpenAI.ComputerToolCall), ComputerToolCallOutputResource, typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), + ToolSearchCall, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + ToolSearchOutput, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), Reasoning, typeof(global::tryAGI.OpenAI.ReasoningItem), - CodeInterpreterToolCall, + CodeInterpreterCall, typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), - LocalShellToolCall, + LocalShellCall, typeof(global::tryAGI.OpenAI.LocalShellToolCall), - LocalShellToolCallOutput, + LocalShellCallOutput, typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), - MCPListTools, + ShellCall, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + ShellCallOutput, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + ApplyPatchCall, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + ApplyPatchCallOutput, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + McpListTools, typeof(global::tryAGI.OpenAI.MCPListTools), - MCPApprovalRequest, + McpApprovalRequest, typeof(global::tryAGI.OpenAI.MCPApprovalRequest), - MCPApprovalResponseResource, + McpApprovalResponse, typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), - MCPToolCall, + McpCall, typeof(global::tryAGI.OpenAI.MCPToolCall), CustomToolCall, typeof(global::tryAGI.OpenAI.CustomToolCall), @@ -1015,19 +1320,25 @@ public bool Equals(ConversationItem other) global::System.Collections.Generic.EqualityComparer.Default.Equals(Message, other.Message) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCallResource, other.FunctionToolCallResource) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCallOutputResource, other.FunctionToolCallOutputResource) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchToolCall, other.FileSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchToolCall, other.WebSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenToolCall, other.ImageGenToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCall, other.ComputerToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCall, other.FileSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCall, other.WebSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCall, other.ImageGenerationCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCall, other.ComputerCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCallOutputResource, other.ComputerToolCallOutputResource) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchCall, other.ToolSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchOutput, other.ToolSearchOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Reasoning, other.Reasoning) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterToolCall, other.CodeInterpreterToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCall, other.LocalShellToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCallOutput, other.LocalShellToolCallOutput) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListTools, other.MCPListTools) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalRequest, other.MCPApprovalRequest) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalResponseResource, other.MCPApprovalResponseResource) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolCall, other.MCPToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCall, other.CodeInterpreterCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCall, other.LocalShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCallOutput, other.LocalShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCall, other.ShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCallOutput, other.ShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCall, other.ApplyPatchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCallOutput, other.ApplyPatchCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpListTools, other.McpListTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalRequest, other.McpApprovalRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalResponse, other.McpApprovalResponse) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpCall, other.McpCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCall, other.CustomToolCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCallOutput, other.CustomToolCallOutput) ; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItemList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItemList.g.cs index 1de80a6c..e6c78a5e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItemList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItemList.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ConversationItemList { + /// + /// The type of object returned, must be `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ConversationItemListObjectJsonConverter))] + public global::tryAGI.OpenAI.ConversationItemListObject Object { get; set; } + /// /// A list of conversation items. /// @@ -16,18 +23,18 @@ public sealed partial class ConversationItemList public required global::System.Collections.Generic.IList Data { get; set; } /// - /// The ID of the first item in the list. + /// Whether there are more items available. /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required bool HasMore { get; set; } /// - /// Whether there are more items available. + /// The ID of the first item in the list. /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// The ID of the last item in the list. @@ -36,13 +43,6 @@ public sealed partial class ConversationItemList [global::System.Text.Json.Serialization.JsonRequired] public required string LastId { get; set; } - /// - /// The type of object returned, must be `list`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ConversationItemListObjectJsonConverter))] - public global::tryAGI.OpenAI.ConversationItemListObject Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ConversationItemList /// /// Initializes a new instance of the class. /// + /// + /// The type of object returned, must be `list`. + /// /// /// A list of conversation items. /// - /// - /// The ID of the first item in the list. - /// /// /// Whether there are more items available. /// + /// + /// The ID of the first item in the list. + /// /// /// The ID of the last item in the list. /// - /// - /// The type of object returned, must be `list`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ConversationItemList( global::System.Collections.Generic.IList data, - string firstId, bool hasMore, + string firstId, string lastId, global::tryAGI.OpenAI.ConversationItemListObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); - this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); this.HasMore = hasMore; + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.Json.g.cs index 6444db78..12c67f0c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.Json.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.Json.g.cs @@ -2,7 +2,7 @@ namespace tryAGI.OpenAI { - public sealed partial class ConversationParam + public readonly partial struct ConversationParam { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::tryAGI.OpenAI.ConversationParam), - jsonSerializerContext) as global::tryAGI.OpenAI.ConversationParam; + jsonSerializerContext) as global::tryAGI.OpenAI.ConversationParam?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::tryAGI.OpenAI.ConversationParam), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ConversationParam; + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ConversationParam?; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.g.cs index 8d814f34..c10768cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam.g.cs @@ -1,49 +1,223 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable namespace tryAGI.OpenAI { /// - /// The conversation that this response belongs to. + /// The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.
+ /// Input items and output items from this response are automatically added to this conversation after this response completes.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
- public sealed partial class ConversationParam + public readonly partial struct ConversationParam : global::System.IEquatable { /// - /// The unique ID of the conversation.
- /// Example: conv_123 + /// The unique ID of the conversation. ///
- /// conv_123 - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } +#if NET6_0_OR_GREATER + public string? ConversationId { get; init; } +#else + public string? ConversationId { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationId))] +#endif + public bool IsConversationId => ConversationId != null; /// - /// Additional properties that are not explicitly defined in the schema + /// The conversation that this response belongs to. /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ConversationParam2? ConversationObject { get; init; } +#else + public global::tryAGI.OpenAI.ConversationParam2? ConversationObject { get; } +#endif /// - /// Initializes a new instance of the class. + /// /// - /// - /// The unique ID of the conversation.
- /// Example: conv_123 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationObject))] #endif + public bool IsConversationObject => ConversationObject != null; + /// + /// + /// + public static implicit operator ConversationParam(string value) => new ConversationParam((string?)value); + + /// + /// + /// + public static implicit operator string?(ConversationParam @this) => @this.ConversationId; + + /// + /// + /// + public ConversationParam(string? value) + { + ConversationId = value; + } + + /// + /// + /// + public static implicit operator ConversationParam(global::tryAGI.OpenAI.ConversationParam2 value) => new ConversationParam((global::tryAGI.OpenAI.ConversationParam2?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ConversationParam2?(ConversationParam @this) => @this.ConversationObject; + + /// + /// + /// + public ConversationParam(global::tryAGI.OpenAI.ConversationParam2? value) + { + ConversationObject = value; + } + + /// + /// + /// public ConversationParam( - string id) + string? conversationId, + global::tryAGI.OpenAI.ConversationParam2? conversationObject + ) + { + ConversationId = conversationId; + ConversationObject = conversationObject; + } + + /// + /// + /// + public object? Object => + ConversationObject as object ?? + ConversationId as object + ; + + /// + /// + /// + public override string? ToString() => + ConversationId?.ToString() ?? + ConversationObject?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsConversationId && !IsConversationObject || !IsConversationId && IsConversationObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? conversationId = null, + global::System.Func? conversationObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsConversationId && conversationId != null) + { + return conversationId(ConversationId!); + } + else if (IsConversationObject && conversationObject != null) + { + return conversationObject(ConversationObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? conversationId = null, + global::System.Action? conversationObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsConversationId) + { + conversationId?.Invoke(ConversationId!); + } + else if (IsConversationObject) + { + conversationObject?.Invoke(ConversationObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ConversationId, + typeof(string), + ConversationObject, + typeof(global::tryAGI.OpenAI.ConversationParam2), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ConversationParam other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ConversationId, other.ConversationId) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ConversationObject, other.ConversationObject) + ; + } + + /// + /// + /// + public static bool operator ==(ConversationParam obj1, ConversationParam obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ConversationParam obj1, ConversationParam obj2) { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public ConversationParam() + public override bool Equals(object? obj) { + return obj is ConversationParam o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.Json.g.cs new file mode 100644 index 00000000..d637b317 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ConversationParam2 + { + /// + /// 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::tryAGI.OpenAI.ConversationParam2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ConversationParam2), + jsonSerializerContext) as global::tryAGI.OpenAI.ConversationParam2; + } + + /// + /// 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::tryAGI.OpenAI.ConversationParam2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ConversationParam2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ConversationParam2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.g.cs new file mode 100644 index 00000000..f0d6e671 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationParam2.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The conversation that this response belongs to. + /// + public sealed partial class ConversationParam2 + { + /// + /// The unique ID of the conversation.
+ /// Example: conv_123 + ///
+ /// conv_123 + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique ID of the conversation.
+ /// Example: conv_123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ConversationParam2( + string id) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + } + + /// + /// Initializes a new instance of the class. + /// + public ConversationParam2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationResource.g.cs index 9be22521..32480d45 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationResource.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ConversationResource { - /// - /// The time at which the conversation was created, measured in seconds since the Unix epoch. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CreatedAt { get; set; } - /// /// The unique ID of the conversation. /// @@ -22,6 +15,15 @@ public sealed partial class ConversationResource [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The object type, which is always `conversation`.
+ /// Default Value: conversation + ///
+ /// global::tryAGI.OpenAI.ConversationResourceObject.Conversation + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ConversationResourceObject Object { get; set; } = global::tryAGI.OpenAI.ConversationResourceObject.Conversation; + /// /// 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, and querying for objects via API or the dashboard.
/// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. @@ -31,13 +33,11 @@ public sealed partial class ConversationResource public required object Metadata { get; set; } /// - /// The object type, which is always `conversation`.
- /// Default Value: conversation + /// The time at which the conversation was created, measured in seconds since the Unix epoch. ///
- /// global::tryAGI.OpenAI.ConversationResourceObject.Conversation - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ConversationResourceObjectJsonConverter))] - public global::tryAGI.OpenAI.ConversationResourceObject Object { get; set; } = global::tryAGI.OpenAI.ConversationResourceObject.Conversation; + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CreatedAt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,32 +48,32 @@ public sealed partial class ConversationResource /// /// Initializes a new instance of the class. /// - /// - /// The time at which the conversation was created, measured in seconds since the Unix epoch. - /// /// /// The unique ID of the conversation. /// + /// + /// The object type, which is always `conversation`.
+ /// Default Value: conversation + /// /// /// 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, and querying for objects via API or the dashboard.
/// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// - /// - /// The object type, which is always `conversation`.
- /// Default Value: conversation + /// + /// The time at which the conversation was created, measured in seconds since the Unix epoch. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ConversationResource( - int createdAt, string id, object metadata, + int createdAt, global::tryAGI.OpenAI.ConversationResourceObject @object = global::tryAGI.OpenAI.ConversationResourceObject.Conversation) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.CreatedAt = createdAt; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.Json.g.cs new file mode 100644 index 00000000..3ef6e271 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CoordParam + { + /// + /// 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::tryAGI.OpenAI.CoordParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CoordParam), + jsonSerializerContext) as global::tryAGI.OpenAI.CoordParam; + } + + /// + /// 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::tryAGI.OpenAI.CoordParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CoordParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CoordParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.g.cs new file mode 100644 index 00000000..49b62308 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CoordParam.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. + /// + public sealed partial class CoordParam + { + /// + /// The x-coordinate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The x-coordinate. + /// + /// + /// The y-coordinate. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CoordParam( + int x, + int y) + { + this.X = x; + this.Y = y; + } + + /// + /// Initializes a new instance of the class. + /// + public CoordParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.Json.g.cs deleted file mode 100644 index 3ce47488..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Coordinate - { - /// - /// 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::tryAGI.OpenAI.Coordinate? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Coordinate), - jsonSerializerContext) as global::tryAGI.OpenAI.Coordinate; - } - - /// - /// 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::tryAGI.OpenAI.Coordinate? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Coordinate), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Coordinate; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.g.cs deleted file mode 100644 index e8c1cd3c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Coordinate.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. - /// - public sealed partial class Coordinate - { - /// - /// The x-coordinate. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int X { get; set; } - - /// - /// The y-coordinate. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Y { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The x-coordinate. - /// - /// - /// The y-coordinate. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Coordinate( - int x, - int y) - { - this.X = x; - this.Y = y; - } - - /// - /// Initializes a new instance of the class. - /// - public Coordinate() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs index aed02b9c..4650247e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResult.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class CostsResult { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CostsResultObjectJsonConverter))] + public global::tryAGI.OpenAI.CostsResultObject Object { get; set; } + /// /// The monetary value in its associated currency. /// @@ -15,7 +22,7 @@ public sealed partial class CostsResult public global::tryAGI.OpenAI.CostsResultAmount? Amount { get; set; } /// - /// When `group_by=line_item`, this field provides the line item of the grouped costs result. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("line_item")] public string? LineItem { get; set; } @@ -23,13 +30,6 @@ public sealed partial class CostsResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CostsResultObjectJsonConverter))] - public global::tryAGI.OpenAI.CostsResultObject Object { get; set; } - - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped costs result. - /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } @@ -42,28 +42,24 @@ public sealed partial class CostsResult /// /// Initializes a new instance of the class. /// + /// /// /// The monetary value in its associated currency. /// - /// - /// When `group_by=line_item`, this field provides the line item of the grouped costs result. - /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped costs result. - /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CostsResult( + global::tryAGI.OpenAI.CostsResultObject @object, global::tryAGI.OpenAI.CostsResultAmount? amount, string? lineItem, - global::tryAGI.OpenAI.CostsResultObject @object, string? projectId) { + this.Object = @object; this.Amount = amount; this.LineItem = lineItem; - this.Object = @object; this.ProjectId = projectId; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultAmount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultAmount.g.cs index 813ef8b4..7dde7094 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultAmount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultAmount.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI ///
public sealed partial class CostsResultAmount { - /// - /// Lowercase ISO-4217 currency e.g. "usd" - /// - [global::System.Text.Json.Serialization.JsonPropertyName("currency")] - public string? Currency { get; set; } - /// /// The numeric value of the cost. /// [global::System.Text.Json.Serialization.JsonPropertyName("value")] public double? Value { get; set; } + /// + /// Lowercase ISO-4217 currency e.g. "usd" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("currency")] + public string? Currency { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class CostsResultAmount /// /// Initializes a new instance of the class. /// - /// - /// Lowercase ISO-4217 currency e.g. "usd" - /// /// /// The numeric value of the cost. /// + /// + /// Lowercase ISO-4217 currency e.g. "usd" + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CostsResultAmount( - string? currency, - double? value) + double? value, + string? currency) { - this.Currency = currency; this.Value = value; + this.Currency = currency; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.Json.g.cs new file mode 100644 index 00000000..ba4e0265 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CostsResultLineItem + { + /// + /// 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::tryAGI.OpenAI.CostsResultLineItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CostsResultLineItem), + jsonSerializerContext) as global::tryAGI.OpenAI.CostsResultLineItem; + } + + /// + /// 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::tryAGI.OpenAI.CostsResultLineItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CostsResultLineItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CostsResultLineItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.g.cs new file mode 100644 index 00000000..79f7ba35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultLineItem.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CostsResultLineItem + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.Json.g.cs new file mode 100644 index 00000000..c19134b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CostsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.CostsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CostsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.CostsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.CostsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CostsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CostsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.g.cs new file mode 100644 index 00000000..4834bcb7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CostsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CostsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequest.g.cs index 5e7a8c41..00f0437d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequest.g.cs @@ -11,29 +11,7 @@ namespace tryAGI.OpenAI public sealed partial class CreateAssistantRequest { /// - /// The description of the assistant. The maximum length is 512 characters. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: gpt-4o ///
/// gpt-4o @@ -43,60 +21,66 @@ public sealed partial class CreateAssistantRequest public required global::tryAGI.OpenAI.AnyOf Model { get; set; } /// - /// The name of the assistant. The maximum length is 256 characters. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - public object? ResponseFormat { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { 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. + /// 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`.
+ /// Default Value: [] + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResources? ToolResources { get; set; } + public global::tryAGI.OpenAI.CreateAssistantRequestToolResources2? ToolResources { get; set; } /// - /// 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; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + + /// + /// /// - /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] public double? TopP { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -106,79 +90,50 @@ public sealed partial class CreateAssistantRequest /// /// Initializes a new instance of the class. /// - /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: gpt-4o /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. - /// + /// + /// + /// + /// /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// 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`.
+ /// Default Value: [] /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateAssistantRequest( global::tryAGI.OpenAI.AnyOf model, + string? name, string? description, string? instructions, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.CreateAssistantRequestToolResources2? toolResources, global::System.Collections.Generic.Dictionary? metadata, - string? name, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - object? responseFormat, double? temperature, - global::tryAGI.OpenAI.CreateAssistantRequestToolResources? toolResources, - global::System.Collections.Generic.IList? tools, - double? topP) + double? topP, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat) { this.Model = model; + this.Name = name; this.Description = description; this.Instructions = instructions; - this.Metadata = metadata; - this.Name = name; this.ReasoningEffort = reasoningEffort; - this.ResponseFormat = responseFormat; - this.Temperature = temperature; - this.ToolResources = toolResources; this.Tools = tools; + this.ToolResources = toolResources; + this.Metadata = metadata; + this.Temperature = temperature; this.TopP = topP; + this.ResponseFormat = responseFormat; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.Json.g.cs new file mode 100644 index 00000000..89797901 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestDescription + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestDescription; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.g.cs new file mode 100644 index 00000000..e12b9390 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.Json.g.cs new file mode 100644 index 00000000..ff62242b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestInstructions + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestInstructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestInstructions), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestInstructions; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestInstructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestInstructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestInstructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.g.cs new file mode 100644 index 00000000..dcf0a2a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestInstructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestInstructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.Json.g.cs new file mode 100644 index 00000000..5058d830 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestName + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestName), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestName; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.g.cs new file mode 100644 index 00000000..b911bc12 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.Json.g.cs new file mode 100644 index 00000000..f5d902a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestResponseFormat + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestResponseFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestResponseFormat; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestResponseFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestResponseFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestResponseFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.g.cs new file mode 100644 index 00000000..10e9a381 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestResponseFormat.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestResponseFormat + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.Json.g.cs new file mode 100644 index 00000000..18976588 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestTemperature + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestTemperature; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.g.cs new file mode 100644 index 00000000..2d96649b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources.g.cs index a1be1aff..a2e622ae 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// 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. + /// /// public sealed partial class CreateAssistantRequestToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateAssistantRequestToolResources( - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateAssistantRequestToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.Json.g.cs new file mode 100644 index 00000000..e030263b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestToolResources2 + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.g.cs new file mode 100644 index 00000000..ff80f27b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// 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. + /// + public sealed partial class CreateAssistantRequestToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAssistantRequestToolResources2( + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAssistantRequestToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesCodeInterpreter.g.cs index 4b51492d..e1d17bda 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class CreateAssistantRequestToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class CreateAssistantRequestToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearch.g.cs index 7940c893..798f391b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearch.g.cs @@ -9,13 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class CreateAssistantRequestToolResourcesFileSearch { /// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } /// - /// A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// A helper to create a [vector store](/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_stores")] public global::System.Collections.Generic.IList? VectorStores { get; set; } @@ -30,10 +30,10 @@ public sealed partial class CreateAssistantRequestToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// /// - /// A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// A helper to create a [vector store](/docs/api-reference/vector-stores/object) with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs index 643552ae..6962959b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStore.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,24 +11,20 @@ namespace tryAGI.OpenAI public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStore { /// - /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + /// A list of [file](/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter))] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] - public global::System.Collections.Generic.IList? FileIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -40,29 +38,23 @@ public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorS /// /// Initializes a new instance of the class. /// - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. - /// /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + /// A list of [file](/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateAssistantRequestToolResourcesFileSearchVectorStore( - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? chunkingStrategy, global::System.Collections.Generic.IList? fileIds, + global::tryAGI.OpenAI.OneOf? chunkingStrategy, global::System.Collections.Generic.Dictionary? metadata) { - this.ChunkingStrategy = chunkingStrategy; this.FileIds = fileIds; + this.ChunkingStrategy = chunkingStrategy; this.Metadata = metadata; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs deleted file mode 100644 index cc7e5944..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs deleted file mode 100644 index 758ae6d5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.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 - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 value) => new CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy((global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; - - /// - /// - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 value) => new CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy((global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; - - /// - /// - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) - { - Value2 = value; - } - - /// - /// - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..cb8c24b7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs new file mode 100644 index 00000000..c6560b34 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + /// + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy + { + /// + /// Always `auto`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `auto`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy( + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs new file mode 100644 index 00000000..7c1034cd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `auto`. + /// + public enum CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType value) + { + return value switch + { + CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? ToEnum(string value) + { + return value switch + { + "auto" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs deleted file mode 100644 index ec798b62..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs deleted file mode 100644 index 579c11a2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..f512c7c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs new file mode 100644 index 00000000..735119c4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy + { + /// + /// Always `static`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("static")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic Static { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `static`. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy( + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic @static, + global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType type) + { + this.Static = @static ?? throw new global::System.ArgumentNullException(nameof(@static)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs new file mode 100644 index 00000000..17705832 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs new file mode 100644 index 00000000..15714491 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic + { + /// + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxChunkSizeTokens { get; set; } + + /// + /// The number of tokens that overlap between chunks. The default value is `400`.
+ /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ChunkOverlapTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// + /// + /// The number of tokens that overlap between chunks. The default value is `400`.
+ /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic( + int maxChunkSizeTokens, + int chunkOverlapTokens) + { + this.MaxChunkSizeTokens = maxChunkSizeTokens; + this.ChunkOverlapTokens = chunkOverlapTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs new file mode 100644 index 00000000..6bff6c07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `static`. + /// + public enum CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType + { + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType value) + { + return value switch + { + CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? ToEnum(string value) + { + return value switch + { + "static" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs deleted file mode 100644 index 68465b85..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs deleted file mode 100644 index fc70064e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. - /// - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 - { - /// - /// Always `auto`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Always `auto`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1( - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs deleted file mode 100644 index 9aa92d74..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `auto`. - /// - public enum CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type - { - /// - /// - /// - Auto, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type value) - { - return value switch - { - CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.Auto => "auto", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? ToEnum(string value) - { - return value switch - { - "auto" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.Auto, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs deleted file mode 100644 index a1f4d112..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs deleted file mode 100644 index 60b3acee..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs +++ /dev/null @@ -1,56 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("static")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static Static { get; set; } - - /// - /// Always `static`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Always `static`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2( - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static @static, - global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type type) - { - this.Static = @static ?? throw new global::System.ArgumentNullException(nameof(@static)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs deleted file mode 100644 index 77ea1784..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static - { - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static; - } - - /// - /// 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::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs deleted file mode 100644 index 8bf94004..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static - { - /// - /// The number of tokens that overlap between chunks. The default value is `400`.
- /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkOverlapTokens { get; set; } - - /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int MaxChunkSizeTokens { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The number of tokens that overlap between chunks. The default value is `400`.
- /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. - /// - /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static( - int chunkOverlapTokens, - int maxChunkSizeTokens) - { - this.ChunkOverlapTokens = chunkOverlapTokens; - this.MaxChunkSizeTokens = maxChunkSizeTokens; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs deleted file mode 100644 index 318673e2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `static`. - /// - public enum CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type - { - /// - /// - /// - Static, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type value) - { - return value switch - { - CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.Static => "static", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? ToEnum(string value) - { - return value switch - { - "static" => CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.Static, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.Json.g.cs new file mode 100644 index 00000000..de9e6f72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateAssistantRequestTopP + { + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateAssistantRequestTopP; + } + + /// + /// 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::tryAGI.OpenAI.CreateAssistantRequestTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateAssistantRequestTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateAssistantRequestTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.g.cs new file mode 100644 index 00000000..66a6313b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateAssistantRequestTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequest.g.cs index f0d201ed..a01fa238 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequest.g.cs @@ -9,14 +9,16 @@ namespace tryAGI.OpenAI public sealed partial class CreateBatchRequest { /// - /// The time frame within which the batch should be processed. Currently only `24h` is supported. + /// The ID of an uploaded file that contains requests for the new batch.
+ /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
+ /// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("completion_window")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter))] - public global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow CompletionWindow { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string InputFileId { get; set; } /// - /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. + /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. /// [global::System.Text.Json.Serialization.JsonPropertyName("endpoint")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestEndpointJsonConverter))] @@ -24,20 +26,14 @@ public sealed partial class CreateBatchRequest public required global::tryAGI.OpenAI.CreateBatchRequestEndpoint Endpoint { get; set; } /// - /// The ID of an uploaded file that contains requests for the new batch.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
- /// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// The time frame within which the batch should be processed. Currently only `24h` is supported. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string InputFileId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("completion_window")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateBatchRequestCompletionWindowJsonConverter))] + public global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow CompletionWindow { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -57,24 +53,18 @@ public sealed partial class CreateBatchRequest /// /// Initializes a new instance of the class. /// - /// - /// The time frame within which the batch should be processed. Currently only `24h` is supported. - /// - /// - /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. - /// /// /// The ID of an uploaded file that contains requests for the new batch.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
- /// Your input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
+ /// Your input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size. + /// + /// + /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The time frame within which the batch should be processed. Currently only `24h` is supported. /// + /// /// /// The expiration policy for the output and/or error file that are generated for a batch. /// @@ -82,14 +72,14 @@ public sealed partial class CreateBatchRequest [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateBatchRequest( - global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, string inputFileId, + global::tryAGI.OpenAI.CreateBatchRequestEndpoint endpoint, global::tryAGI.OpenAI.CreateBatchRequestCompletionWindow completionWindow, global::System.Collections.Generic.Dictionary? metadata, global::tryAGI.OpenAI.BatchFileExpirationAfter? outputExpiresAfter) { - this.Endpoint = endpoint; this.InputFileId = inputFileId ?? throw new global::System.ArgumentNullException(nameof(inputFileId)); + this.Endpoint = endpoint; this.CompletionWindow = completionWindow; this.Metadata = metadata; this.OutputExpiresAfter = outputExpiresAfter; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequestEndpoint.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequestEndpoint.g.cs index 0416e53b..fa25aed6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequestEndpoint.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateBatchRequestEndpoint.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. + /// The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. /// public enum CreateBatchRequestEndpoint { @@ -24,6 +24,18 @@ public enum CreateBatchRequestEndpoint /// ///
V1Completions, + /// + /// + /// + V1Moderations, + /// + /// + /// + V1ImagesGenerations, + /// + /// + /// + V1ImagesEdits, } /// @@ -42,6 +54,9 @@ public static string ToValueString(this CreateBatchRequestEndpoint value) CreateBatchRequestEndpoint.V1ChatCompletions => "/v1/chat/completions", CreateBatchRequestEndpoint.V1Embeddings => "/v1/embeddings", CreateBatchRequestEndpoint.V1Completions => "/v1/completions", + CreateBatchRequestEndpoint.V1Moderations => "/v1/moderations", + CreateBatchRequestEndpoint.V1ImagesGenerations => "/v1/images/generations", + CreateBatchRequestEndpoint.V1ImagesEdits => "/v1/images/edits", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -56,6 +71,9 @@ public static string ToValueString(this CreateBatchRequestEndpoint value) "/v1/chat/completions" => CreateBatchRequestEndpoint.V1ChatCompletions, "/v1/embeddings" => CreateBatchRequestEndpoint.V1Embeddings, "/v1/completions" => CreateBatchRequestEndpoint.V1Completions, + "/v1/moderations" => CreateBatchRequestEndpoint.V1Moderations, + "/v1/images/generations" => CreateBatchRequestEndpoint.V1ImagesGenerations, + "/v1/images/edits" => CreateBatchRequestEndpoint.V1ImagesEdits, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequest.g.cs index 62f0f2ef..e6c0bbdb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequest.g.cs @@ -29,37 +29,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator CreateChatCompletionRequest(global::tryAGI.OpenAI.CreateModelResponseProperties value) => new CreateChatCompletionRequest((global::tryAGI.OpenAI.CreateModelResponseProperties?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.CreateModelResponseProperties?(CreateChatCompletionRequest @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public CreateChatCompletionRequest(global::tryAGI.OpenAI.CreateModelResponseProperties? value) - { - Value1 = value; - } + public static implicit operator CreateChatCompletionRequest(global::tryAGI.OpenAI.CreateModelResponseProperties value) => new CreateChatCompletionRequest((global::tryAGI.OpenAI.CreateModelResponseProperties?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.CreateModelResponseProperties?(CreateChatCompletionRequest @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public CreateChatCompletionRequest(global::tryAGI.OpenAI.CreateModelResponseProperties? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs index 7750a346..9bbb795e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2.g.cs @@ -11,11 +11,51 @@ namespace tryAGI.OpenAI public sealed partial class CreateChatCompletionRequestVariant2 { /// - /// Parameters for audio output. Required when audio output is requested with
- /// `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + /// A list of messages comprising the conversation so far. Depending on the
+ /// [model](/docs/models) you use, different message types (modalities) are
+ /// supported, like [text](/docs/guides/text-generation),
+ /// [images](/docs/guides/vision), and [audio](/docs/guides/audio). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model guide](/docs/models)
+ /// to browse and compare available models.
+ /// Example: gpt-5.4 + ///
+ /// gpt-5.4 + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsSharedJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ModelIdsShared Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] + public global::System.Collections.Generic.IList? Modalities { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("verbosity")] + public global::tryAGI.OpenAI.VerbosityEnum? Verbosity { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } + + /// + /// An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + public int? MaxCompletionTokens { get; set; } /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -27,28 +67,80 @@ public sealed partial class CreateChatCompletionRequestVariant2 public double? FrequencyPenalty { get; set; } /// - /// Deprecated in favor of `tool_choice`.
- /// Controls which (if any) function is called by the model.
- /// `none` means the model will not call a function and instead generates a
- /// message.
- /// `auto` means the model can pick between generating a message or calling a
- /// function.
- /// Specifying a particular function via `{"name": "my_function"}` forces the
- /// model to call that function.
- /// `none` is the default when no functions are present. `auto` is the default
- /// if functions are present. + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
+ /// whether they appear in the text so far, increasing the model's likelihood
+ /// to talk about new topics.
+ /// Default Value: 0 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? FunctionCall { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] + public double? PresencePenalty { get; set; } /// - /// Deprecated in favor of `tools`.
- /// A list of functions the model may generate JSON inputs for. + /// This tool searches the web for relevant results to use in a response.
+ /// Learn more about the [web search tool](/docs/guides/tools-web-search?api-mode=chat). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("functions")] - [global::System.Obsolete("This property marked as deprecated.")] - public global::System.Collections.Generic.IList? Functions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("web_search_options")] + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? WebSearchOptions { get; set; } + + /// + /// An integer between 0 and 20 specifying the number of most likely tokens to
+ /// return at each token position, each with an associated log probability.
+ /// `logprobs` must be set to `true` if this parameter is used. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] + public int? TopLogprobs { get; set; } + + /// + /// An object specifying the format that the model must output.
+ /// 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 the older JSON mode, which
+ /// ensures the message the model generates is valid JSON. Using `json_schema`
+ /// is preferred for models that support it. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonConverter))] + public global::tryAGI.OpenAI.ResponseFormat? ResponseFormat { get; set; } + + /// + /// Parameters for audio output. Required when audio output is requested with
+ /// `modalities: ["audio"]`. [Learn more](/docs/guides/audio). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? Audio { get; set; } + + /// + /// Whether or not to store the output of this chat completion request for
+ /// use in our [model distillation](/docs/guides/distillation) or
+ /// [evals](/docs/guides/evals) products.
+ /// Supports text and image inputs. Note: image inputs over 8MB will be dropped.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("store")] + public bool? Store { get; set; } + + /// + /// If set to true, the model response data will be streamed to the client
+ /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
+ /// See the [Streaming section below](/docs/api-reference/chat/streaming)
+ /// for more information, along with the [streaming responses](/docs/guides/streaming-responses)
+ /// guide for more information on how to handle the streaming events.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + + /// + /// Not supported with latest reasoning models `o3` and `o4-mini`.
+ /// Up to 4 sequences where the API will stop generating further tokens. The
+ /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stop")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StopConfigurationJsonConverter))] + public global::tryAGI.OpenAI.StopConfiguration? Stop { get; set; } /// /// Modify the likelihood of specified tokens appearing in the completion.
@@ -57,7 +149,8 @@ public sealed partial class CreateChatCompletionRequestVariant2 /// the bias is added to the logits generated by the model prior to sampling.
/// The exact effect will vary per model, but values between -1 and 1 should
/// decrease or increase likelihood of selection; values like -100 or 100
- /// should result in a ban or exclusive selection of the relevant token. + /// should result in a ban or exclusive selection of the relevant token.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("logit_bias")] public global::System.Collections.Generic.Dictionary? LogitBias { get; set; } @@ -71,54 +164,17 @@ public sealed partial class CreateChatCompletionRequestVariant2 [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] public bool? Logprobs { get; set; } - /// - /// An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } - /// /// The maximum number of [tokens](/tokenizer) that can be generated in the
/// chat completion. This value can be used to control
/// [costs](https://openai.com/api/pricing/) for text generated via API.
/// This value is now deprecated in favor of `max_completion_tokens`, and is
- /// not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning). + /// not compatible with [o-series models](/docs/guides/reasoning). ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] [global::System.Obsolete("This property marked as deprecated.")] public int? MaxTokens { get; set; } - /// - /// A list of messages comprising the conversation so far. Depending on the
- /// [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are
- /// supported, like [text](https://platform.openai.com/docs/guides/text-generation),
- /// [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Messages { get; set; } - - /// - /// Output types that you would like the model to generate.
- /// Most models are capable of generating text, which is the default:
- /// `["text"]`
- /// The `gpt-4o-audio-preview` model can also be used to
- /// [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate
- /// both text and audio responses, you can use:
- /// `["text", "audio"]` - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] - public global::System.Collections.Generic.IList? Modalities { get; set; } - - /// - /// Example: gpt-4o - /// - /// gpt-4o - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsSharedJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ModelIdsShared Model { get; set; } - /// /// How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
/// Default Value: 1
@@ -129,13 +185,7 @@ public sealed partial class CreateChatCompletionRequestVariant2 public int? N { get; set; } /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } - - /// - /// Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),
+ /// Configuration for a [Predicted Output](/docs/guides/predicted-outputs),
/// which can greatly improve response times when large parts of the model
/// response are known ahead of time. This is most common when you are
/// regenerating a file with only minor changes to most of the content. @@ -143,41 +193,6 @@ public sealed partial class CreateChatCompletionRequestVariant2 [global::System.Text.Json.Serialization.JsonPropertyName("prediction")] public global::tryAGI.OpenAI.PredictionContent? Prediction { get; set; } - /// - /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
- /// whether they appear in the text so far, increasing the model's likelihood
- /// to talk about new topics.
- /// Default Value: 0 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] - public double? PresencePenalty { get; set; } - - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } - - /// - /// An object specifying the format that the model must output.
- /// 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](https://platform.openai.com/docs/guides/structured-outputs).
- /// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
- /// ensures the message the model generates is valid JSON. Using `json_schema`
- /// is preferred for models that support it. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ResponseFormat { get; set; } - /// /// This feature is in Beta.
/// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
@@ -188,40 +203,18 @@ public sealed partial class CreateChatCompletionRequestVariant2 public int? Seed { get; set; } /// - /// Not supported with latest reasoning models `o3` and `o4-mini`.
- /// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("stop")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StopConfigurationJsonConverter))] - public global::tryAGI.OpenAI.StopConfiguration? Stop { get; set; } - - /// - /// Whether or not to store the output of this chat completion request for
- /// use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or
- /// [evals](https://platform.openai.com/docs/guides/evals) products.
- /// Supports text and image inputs. Note: image inputs over 8MB will be dropped.
- /// Default Value: false - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("store")] - public bool? Store { get; set; } - - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)
- /// for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)
- /// guide for more information on how to handle the streaming events.
- /// Default Value: false + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("stream")] - public bool? Stream { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("stream_options")] + public global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? StreamOptions { get; set; } /// - /// Options for streaming response. Only set this when you set `stream: true`. + /// A list of tools the model may call. You can provide either
+ /// [custom tools](/docs/guides/function-calling#custom-tools) or
+ /// [function tools](/docs/guides/function-calling). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("stream_options")] - public global::tryAGI.OpenAI.ChatCompletionStreamOptions? StreamOptions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// /// Controls which (if any) tool is called by the model.
@@ -236,37 +229,34 @@ public sealed partial class CreateChatCompletionRequestVariant2 public global::tryAGI.OpenAI.ChatCompletionToolChoiceOption? ToolChoice { get; set; } /// - /// A list of tools the model may call. You can provide either
- /// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or
- /// [function tools](https://platform.openai.com/docs/guides/function-calling). + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } - - /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability.
- /// `logprobs` must be set to `true` if this parameter is used. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] - public int? TopLogprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] + public bool? ParallelToolCalls { get; set; } /// - /// Constrains the verbosity of the model's response. Lower values will result in
- /// more concise responses, while higher values will result in more verbose responses.
- /// Currently supported values are `low`, `medium`, and `high`.
- /// Default Value: medium + /// Deprecated in favor of `tool_choice`.
+ /// Controls which (if any) function is called by the model.
+ /// `none` means the model will not call a function and instead generates a
+ /// message.
+ /// `auto` means the model can pick between generating a message or calling a
+ /// function.
+ /// Specifying a particular function via `{"name": "my_function"}` forces the
+ /// model to call that function.
+ /// `none` is the default when no functions are present. `auto` is the default
+ /// if functions are present. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("verbosity")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter))] - public global::tryAGI.OpenAI.Verbosity? Verbosity { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("function_call")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? FunctionCall { get; set; } /// - /// This tool searches the web for relevant results to use in a response.
- /// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + /// Deprecated in favor of `tools`.
+ /// A list of functions the model may generate JSON inputs for. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("web_search_options")] - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? WebSearchOptions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("functions")] + [global::System.Obsolete("This property marked as deprecated.")] + public global::System.Collections.Generic.IList? Functions { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -277,65 +267,30 @@ public sealed partial class CreateChatCompletionRequestVariant2 /// /// Initializes a new instance of the class. /// - /// - /// Parameters for audio output. Required when audio output is requested with
- /// `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). - /// - /// - /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
- /// their existing frequency in the text so far, decreasing the model's
- /// likelihood to repeat the same line verbatim.
- /// Default Value: 0 - /// - /// - /// Modify the likelihood of specified tokens appearing in the completion.
- /// Accepts a JSON object that maps tokens (specified by their token ID in the
- /// tokenizer) to an associated bias value from -100 to 100. Mathematically,
- /// the bias is added to the logits generated by the model prior to sampling.
- /// The exact effect will vary per model, but values between -1 and 1 should
- /// decrease or increase likelihood of selection; values like -100 or 100
- /// should result in a ban or exclusive selection of the relevant token. - /// - /// - /// Whether to return log probabilities of the output tokens or not. If true,
- /// returns the log probabilities of each output token returned in the
- /// `content` of `message`.
- /// Default Value: false - /// - /// - /// An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). - /// /// /// A list of messages comprising the conversation so far. Depending on the
- /// [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are
- /// supported, like [text](https://platform.openai.com/docs/guides/text-generation),
- /// [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). - /// - /// - /// Output types that you would like the model to generate.
- /// Most models are capable of generating text, which is the default:
- /// `["text"]`
- /// The `gpt-4o-audio-preview` model can also be used to
- /// [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate
- /// both text and audio responses, you can use:
- /// `["text", "audio"]` + /// [model](/docs/models) you use, different message types (modalities) are
+ /// supported, like [text](/docs/guides/text-generation),
+ /// [images](/docs/guides/vision), and [audio](/docs/guides/audio). /// /// - /// Example: gpt-4o - /// - /// - /// How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
- /// Default Value: 1
- /// Example: 1 + /// Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model guide](/docs/models)
+ /// to browse and compare available models.
+ /// Example: gpt-5.4 /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// + /// + /// An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning). /// - /// - /// Configuration for a [Predicted Output](https://platform.openai.com/docs/guides/predicted-outputs),
- /// which can greatly improve response times when large parts of the model
- /// response are known ahead of time. This is most common when you are
- /// regenerating a file with only minor changes to most of the content. + /// + /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
+ /// their existing frequency in the text so far, decreasing the model's
+ /// likelihood to repeat the same line verbatim.
+ /// Default Value: 0 /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -343,46 +298,82 @@ public sealed partial class CreateChatCompletionRequestVariant2 /// to talk about new topics.
/// Default Value: 0 /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// This tool searches the web for relevant results to use in a response.
+ /// Learn more about the [web search tool](/docs/guides/tools-web-search?api-mode=chat). + /// + /// + /// An integer between 0 and 20 specifying the number of most likely tokens to
+ /// return at each token position, each with an associated log probability.
+ /// `logprobs` must be set to `true` if this parameter is used. /// /// /// An object specifying the format that the model must output.
/// 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](https://platform.openai.com/docs/guides/structured-outputs).
+ /// guide](/docs/guides/structured-outputs).
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
/// ensures the message the model generates is valid JSON. Using `json_schema`
/// is preferred for models that support it. /// - /// - /// Not supported with latest reasoning models `o3` and `o4-mini`.
- /// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// + /// Parameters for audio output. Required when audio output is requested with
+ /// `modalities: ["audio"]`. [Learn more](/docs/guides/audio). /// /// /// Whether or not to store the output of this chat completion request for
- /// use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or
- /// [evals](https://platform.openai.com/docs/guides/evals) products.
+ /// use in our [model distillation](/docs/guides/distillation) or
+ /// [evals](/docs/guides/evals) products.
/// Supports text and image inputs. Note: image inputs over 8MB will be dropped.
/// Default Value: false /// /// /// If set to true, the model response data will be streamed to the client
/// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)
- /// for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)
+ /// See the [Streaming section below](/docs/api-reference/chat/streaming)
+ /// for more information, along with the [streaming responses](/docs/guides/streaming-responses)
/// guide for more information on how to handle the streaming events.
/// Default Value: false /// - /// - /// Options for streaming response. Only set this when you set `stream: true`. + /// + /// Not supported with latest reasoning models `o3` and `o4-mini`.
+ /// Up to 4 sequences where the API will stop generating further tokens. The
+ /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Modify the likelihood of specified tokens appearing in the completion.
+ /// Accepts a JSON object that maps tokens (specified by their token ID in the
+ /// tokenizer) to an associated bias value from -100 to 100. Mathematically,
+ /// the bias is added to the logits generated by the model prior to sampling.
+ /// The exact effect will vary per model, but values between -1 and 1 should
+ /// decrease or increase likelihood of selection; values like -100 or 100
+ /// should result in a ban or exclusive selection of the relevant token.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Whether to return log probabilities of the output tokens or not. If true,
+ /// returns the log probabilities of each output token returned in the
+ /// `content` of `message`.
+ /// Default Value: false + /// + /// + /// How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// Configuration for a [Predicted Output](/docs/guides/predicted-outputs),
+ /// which can greatly improve response times when large parts of the model
+ /// response are known ahead of time. This is most common when you are
+ /// regenerating a file with only minor changes to most of the content. + /// + /// + /// + /// A list of tools the model may call. You can provide either
+ /// [custom tools](/docs/guides/function-calling#custom-tools) or
+ /// [function tools](/docs/guides/function-calling). /// /// /// Controls which (if any) tool is called by the model.
@@ -392,25 +383,8 @@ public sealed partial class CreateChatCompletionRequestVariant2 /// Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
/// `none` is the default when no tools are present. `auto` is the default if tools are present. /// - /// - /// A list of tools the model may call. You can provide either
- /// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or
- /// [function tools](https://platform.openai.com/docs/guides/function-calling). - /// - /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability.
- /// `logprobs` must be set to `true` if this parameter is used. - /// - /// - /// Constrains the verbosity of the model's response. Lower values will result in
- /// more concise responses, while higher values will result in more verbose responses.
- /// Currently supported values are `low`, `medium`, and `high`.
- /// Default Value: medium - /// - /// - /// This tool searches the web for relevant results to use in a response.
- /// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -418,51 +392,51 @@ public sealed partial class CreateChatCompletionRequestVariant2 public CreateChatCompletionRequestVariant2( global::System.Collections.Generic.IList messages, global::tryAGI.OpenAI.ModelIdsShared model, - global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? audio, + global::System.Collections.Generic.IList? modalities, + global::tryAGI.OpenAI.VerbosityEnum? verbosity, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + int? maxCompletionTokens, double? frequencyPenalty, + double? presencePenalty, + global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? webSearchOptions, + int? topLogprobs, + global::tryAGI.OpenAI.ResponseFormat? responseFormat, + global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2Audio? audio, + bool? store, + bool? stream, + global::tryAGI.OpenAI.StopConfiguration? stop, global::System.Collections.Generic.Dictionary? logitBias, bool? logprobs, - int? maxCompletionTokens, - global::System.Collections.Generic.IList? modalities, int? n, - bool? parallelToolCalls, global::tryAGI.OpenAI.PredictionContent? prediction, - double? presencePenalty, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - global::tryAGI.OpenAI.AnyOf? responseFormat, - global::tryAGI.OpenAI.StopConfiguration? stop, - bool? store, - bool? stream, - global::tryAGI.OpenAI.ChatCompletionStreamOptions? streamOptions, + global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? streamOptions, + global::System.Collections.Generic.IList>? tools, global::tryAGI.OpenAI.ChatCompletionToolChoiceOption? toolChoice, - global::System.Collections.Generic.IList? tools, - int? topLogprobs, - global::tryAGI.OpenAI.Verbosity? verbosity, - global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptions? webSearchOptions) + bool? parallelToolCalls) { this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); this.Model = model; - this.Audio = audio; - this.FrequencyPenalty = frequencyPenalty; - this.LogitBias = logitBias; - this.Logprobs = logprobs; - this.MaxCompletionTokens = maxCompletionTokens; this.Modalities = modalities; - this.N = n; - this.ParallelToolCalls = parallelToolCalls; - this.Prediction = prediction; - this.PresencePenalty = presencePenalty; + this.Verbosity = verbosity; this.ReasoningEffort = reasoningEffort; + this.MaxCompletionTokens = maxCompletionTokens; + this.FrequencyPenalty = frequencyPenalty; + this.PresencePenalty = presencePenalty; + this.WebSearchOptions = webSearchOptions; + this.TopLogprobs = topLogprobs; this.ResponseFormat = responseFormat; - this.Stop = stop; + this.Audio = audio; this.Store = store; this.Stream = stream; + this.Stop = stop; + this.LogitBias = logitBias; + this.Logprobs = logprobs; + this.N = n; + this.Prediction = prediction; this.StreamOptions = streamOptions; - this.ToolChoice = toolChoice; this.Tools = tools; - this.TopLogprobs = topLogprobs; - this.Verbosity = verbosity; - this.WebSearchOptions = webSearchOptions; + this.ToolChoice = toolChoice; + this.ParallelToolCalls = parallelToolCalls; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2Audio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2Audio.g.cs index 73ffe66a..18cd3a81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2Audio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2Audio.g.cs @@ -5,10 +5,21 @@ namespace tryAGI.OpenAI { /// /// Parameters for audio output. Required when audio output is requested with
- /// `modalities: ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + /// `modalities: ["audio"]`. [Learn more](/docs/guides/audio). ///
public sealed partial class CreateChatCompletionRequestVariant2Audio { + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`,
+ /// `sage`, `shimmer`, `marin`, and `cedar`. You may also provide a
+ /// custom voice object with an `id`, for example `{ "id": "voice_1234" }`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.VoiceIdsOrCustomVoice Voice { get; set; } + /// /// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,
/// `opus`, or `pcm16`. @@ -18,15 +29,6 @@ public sealed partial class CreateChatCompletionRequestVariant2Audio [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat Format { get; set; } - /// - /// Example: ash - /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VoiceIdsShared Voice { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -36,22 +38,25 @@ public sealed partial class CreateChatCompletionRequestVariant2Audio /// /// Initializes a new instance of the class. /// + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`,
+ /// `sage`, `shimmer`, `marin`, and `cedar`. You may also provide a
+ /// custom voice object with an `id`, for example `{ "id": "voice_1234" }`. + /// /// /// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,
/// `opus`, or `pcm16`. /// - /// - /// Example: ash - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateChatCompletionRequestVariant2Audio( - global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat format, - global::tryAGI.OpenAI.VoiceIdsShared voice) + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice, + global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2AudioFormat format) { - this.Format = format; this.Voice = voice; + this.Format = format; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2LogitBias.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2LogitBias.g.cs index d04485cc..0c17be7f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2LogitBias.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2LogitBias.g.cs @@ -10,7 +10,8 @@ namespace tryAGI.OpenAI /// the bias is added to the logits generated by the model prior to sampling.
/// The exact effect will vary per model, but values between -1 and 1 should
/// decrease or increase likelihood of selection; values like -100 or 100
- /// should result in a ban or exclusive selection of the relevant token. + /// should result in a ban or exclusive selection of the relevant token.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class CreateChatCompletionRequestVariant2LogitBias { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.Json.g.cs deleted file mode 100644 index 711827bd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateChatCompletionRequestVariant2PredictionDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2PredictionDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.g.cs deleted file mode 100644 index ee93bb1e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2PredictionDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateChatCompletionRequestVariant2PredictionDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateChatCompletionRequestVariant2PredictionDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateChatCompletionRequestVariant2PredictionDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.Json.g.cs new file mode 100644 index 00000000..644aaa0b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateChatCompletionRequestVariant2ResponseFormatDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.g.cs new file mode 100644 index 00000000..bb6b9fcb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ResponseFormatDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateChatCompletionRequestVariant2ResponseFormatDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateChatCompletionRequestVariant2ResponseFormatDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateChatCompletionRequestVariant2ResponseFormatDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.Json.g.cs deleted file mode 100644 index 16956d55..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateChatCompletionRequestVariant2ToolDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2ToolDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.g.cs deleted file mode 100644 index a247bc88..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2ToolDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateChatCompletionRequestVariant2ToolDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateChatCompletionRequestVariant2ToolDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateChatCompletionRequestVariant2ToolDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptions.g.cs index 069d2329..ce3939cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptions.g.cs @@ -5,10 +5,16 @@ namespace tryAGI.OpenAI { /// /// This tool searches the web for relevant results to use in a response.
- /// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat). + /// Learn more about the [web search tool](/docs/guides/tools-web-search?api-mode=chat). ///
public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptions { + /// + /// Approximate location parameters for the search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_location")] + public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? UserLocation { get; set; } + /// /// High level guidance for the amount of context window space to use for the
/// search. One of `low`, `medium`, or `high`. `medium` is the default.
@@ -18,12 +24,6 @@ public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptions [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchContextSizeJsonConverter))] public global::tryAGI.OpenAI.WebSearchContextSize? SearchContextSize { get; set; } - /// - /// Approximate location parameters for the search. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_location")] - public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? UserLocation { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,23 +33,23 @@ public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptions /// /// Initializes a new instance of the class. /// + /// + /// Approximate location parameters for the search. + /// /// /// High level guidance for the amount of context window space to use for the
/// search. One of `low`, `medium`, or `high`. `medium` is the default.
/// Default Value: medium /// - /// - /// Approximate location parameters for the search. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateChatCompletionRequestVariant2WebSearchOptions( - global::tryAGI.OpenAI.WebSearchContextSize? searchContextSize, - global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? userLocation) + global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation? userLocation, + global::tryAGI.OpenAI.WebSearchContextSize? searchContextSize) { - this.SearchContextSize = searchContextSize; this.UserLocation = userLocation; + this.SearchContextSize = searchContextSize; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation.g.cs index 6080251f..799f00bb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptionsUserLocation { - /// - /// Approximate location parameters for the search. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("approximate")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebSearchLocation Approximate { get; set; } - /// /// The type of location approximation. Always `approximate`. /// @@ -22,6 +15,13 @@ public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptionsU [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationTypeJsonConverter))] public global::tryAGI.OpenAI.CreateChatCompletionRequestVariant2WebSearchOptionsUserLocationType Type { get; set; } + /// + /// Approximate location parameters for the search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("approximate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.WebSearchLocation Approximate { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class CreateChatCompletionRequestVariant2WebSearchOptionsU /// /// Initializes a new instance of the class. /// - /// - /// Approximate location parameters for the search. - /// /// /// The type of location approximation. Always `approximate`. /// + /// + /// Approximate location parameters for the search. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponse.g.cs index ff643d37..b72708aa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateChatCompletionResponse { + /// + /// A unique identifier for the chat completion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// A list of chat completion choices. Can be more than one if `n` is greater than 1. /// @@ -23,13 +30,6 @@ public sealed partial class CreateChatCompletionResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTimeOffset Created { get; set; } - /// - /// A unique identifier for the chat completion. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The model used for the chat completion. /// @@ -38,24 +38,10 @@ public sealed partial class CreateChatCompletionResponse public required string Model { get; set; } /// - /// The object type, which is always `chat.completion`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.CreateChatCompletionResponseObject Object { get; set; } - - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("service_tier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierJsonConverter))] - public global::tryAGI.OpenAI.ServiceTier? ServiceTier { get; set; } + public global::tryAGI.OpenAI.ServiceTierEnum? ServiceTier { get; set; } /// /// This fingerprint represents the backend configuration that the model runs with.
@@ -65,6 +51,13 @@ public sealed partial class CreateChatCompletionResponse [global::System.Obsolete("This property marked as deprecated.")] public string? SystemFingerprint { get; set; } + /// + /// The object type, which is always `chat.completion`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.CreateChatCompletionResponseObject Object { get; set; } + /// /// Usage statistics for the completion request. /// @@ -80,30 +73,22 @@ public sealed partial class CreateChatCompletionResponse /// /// Initializes a new instance of the class. /// + /// + /// A unique identifier for the chat completion. + /// /// /// A list of chat completion choices. Can be more than one if `n` is greater than 1. /// /// /// The Unix timestamp (in seconds) of when the chat completion was created. /// - /// - /// A unique identifier for the chat completion. - /// /// /// The model used for the chat completion. /// + /// /// /// The object type, which is always `chat.completion`. /// - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto - /// /// /// Usage statistics for the completion request. /// @@ -111,20 +96,20 @@ public sealed partial class CreateChatCompletionResponse [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateChatCompletionResponse( + string id, global::System.Collections.Generic.IList choices, global::System.DateTimeOffset created, - string id, string model, + global::tryAGI.OpenAI.ServiceTierEnum? serviceTier, global::tryAGI.OpenAI.CreateChatCompletionResponseObject @object, - global::tryAGI.OpenAI.ServiceTier? serviceTier, global::tryAGI.OpenAI.CompletionUsage? usage) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Choices = choices ?? throw new global::System.ArgumentNullException(nameof(choices)); this.Created = created; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Object = @object; this.ServiceTier = serviceTier; + this.Object = @object; this.Usage = usage; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoice.g.cs index 0ed0d0e6..adb6fad3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoice.g.cs @@ -26,12 +26,6 @@ public sealed partial class CreateChatCompletionResponseChoice [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// Log probability information for the choice. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs? Logprobs { get; set; } - /// /// A chat completion message generated by the model. /// @@ -39,6 +33,12 @@ public sealed partial class CreateChatCompletionResponseChoice [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ChatCompletionResponseMessage Message { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2? Logprobs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -57,12 +57,10 @@ public sealed partial class CreateChatCompletionResponseChoice /// /// The index of the choice in the list of choices. /// - /// - /// Log probability information for the choice. - /// /// /// A chat completion message generated by the model. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -70,7 +68,7 @@ public CreateChatCompletionResponseChoice( global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceFinishReason finishReason, int index, global::tryAGI.OpenAI.ChatCompletionResponseMessage message, - global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs? logprobs) + global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2? logprobs) { this.FinishReason = finishReason; this.Index = index; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs.g.cs index 118b56bc..f17f005f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs.g.cs @@ -4,55 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Log probability information for the choice. + /// /// public sealed partial class CreateChatCompletionResponseChoiceLogprobs { - /// - /// A list of message content tokens with log probability information. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Content { get; set; } - - /// - /// A list of message refusal tokens with log probability information. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Refusal { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A list of message content tokens with log probability information. - /// - /// - /// A list of message refusal tokens with log probability information. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateChatCompletionResponseChoiceLogprobs( - global::System.Collections.Generic.IList? content, - global::System.Collections.Generic.IList? refusal) - { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.Refusal = refusal ?? throw new global::System.ArgumentNullException(nameof(refusal)); - } - - /// - /// Initializes a new instance of the class. - /// - public CreateChatCompletionResponseChoiceLogprobs() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.Json.g.cs new file mode 100644 index 00000000..a61a3f25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateChatCompletionResponseChoiceLogprobs2 + { + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2; + } + + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobs2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.g.cs new file mode 100644 index 00000000..49c8d182 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobs2.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Log probability information for the choice. + /// + public sealed partial class CreateChatCompletionResponseChoiceLogprobs2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList? Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList? Refusal { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateChatCompletionResponseChoiceLogprobs2( + global::System.Collections.Generic.IList? content, + global::System.Collections.Generic.IList? refusal) + { + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.Refusal = refusal ?? throw new global::System.ArgumentNullException(nameof(refusal)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateChatCompletionResponseChoiceLogprobs2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.Json.g.cs new file mode 100644 index 00000000..233fc7e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateChatCompletionResponseChoiceLogprobsContent + { + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent; + } + + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.g.cs new file mode 100644 index 00000000..c5883e02 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateChatCompletionResponseChoiceLogprobsContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.Json.g.cs new file mode 100644 index 00000000..fd1fa4bd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateChatCompletionResponseChoiceLogprobsRefusal + { + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal; + } + + /// + /// 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::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatCompletionResponseChoiceLogprobsRefusal; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.g.cs new file mode 100644 index 00000000..313626bd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionResponseChoiceLogprobsRefusal.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateChatCompletionResponseChoiceLogprobsRefusal + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponse.g.cs index 8280a94a..e4c87ab5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponse.g.cs @@ -6,10 +6,17 @@ namespace tryAGI.OpenAI /// /// Represents a streamed chunk of a chat completion response returned
/// by the model, based on the provided input.
- /// [Learn more](https://platform.openai.com/docs/guides/streaming-responses). + /// [Learn more](/docs/guides/streaming-responses). ///
public sealed partial class CreateChatCompletionStreamResponse { + /// + /// A unique identifier for the chat completion. Each chunk has the same ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the
/// last chunk if you set `stream_options: {"include_usage": true}`. @@ -26,13 +33,6 @@ public sealed partial class CreateChatCompletionStreamResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTimeOffset Created { get; set; } - /// - /// A unique identifier for the chat completion. Each chunk has the same ID. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The model to generate the completion. /// @@ -41,24 +41,10 @@ public sealed partial class CreateChatCompletionStreamResponse public required string Model { get; set; } /// - /// The object type, which is always `chat.completion.chunk`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionStreamResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseObject Object { get; set; } - - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("service_tier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierJsonConverter))] - public global::tryAGI.OpenAI.ServiceTier? ServiceTier { get; set; } + public global::tryAGI.OpenAI.ServiceTierEnum? ServiceTier { get; set; } /// /// This fingerprint represents the backend configuration that the model runs with.
@@ -69,7 +55,20 @@ public sealed partial class CreateChatCompletionStreamResponse public string? SystemFingerprint { get; set; } /// - /// Usage statistics for the completion request. + /// The object type, which is always `chat.completion.chunk`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateChatCompletionStreamResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseObject Object { get; set; } + + /// + /// An optional field that will only be present when you set
+ /// `stream_options: {"include_usage": true}` in your request. When present, it
+ /// contains a null value **except for the last chunk** which contains the
+ /// token usage statistics for the entire request.
+ /// **NOTE:** If the stream is interrupted or cancelled, you may not
+ /// receive the final usage chunk which contains the total token usage for
+ /// the request. ///
[global::System.Text.Json.Serialization.JsonPropertyName("usage")] public global::tryAGI.OpenAI.CompletionUsage? Usage { get; set; } @@ -83,6 +82,9 @@ public sealed partial class CreateChatCompletionStreamResponse /// /// Initializes a new instance of the class. /// + /// + /// A unique identifier for the chat completion. Each chunk has the same ID. + /// /// /// A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the
/// last chunk if you set `stream_options: {"include_usage": true}`. @@ -90,45 +92,40 @@ public sealed partial class CreateChatCompletionStreamResponse /// /// The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. /// - /// - /// A unique identifier for the chat completion. Each chunk has the same ID. - /// /// /// The model to generate the completion. /// + /// /// /// The object type, which is always `chat.completion.chunk`. /// - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto - /// /// - /// Usage statistics for the completion request. + /// An optional field that will only be present when you set
+ /// `stream_options: {"include_usage": true}` in your request. When present, it
+ /// contains a null value **except for the last chunk** which contains the
+ /// token usage statistics for the entire request.
+ /// **NOTE:** If the stream is interrupted or cancelled, you may not
+ /// receive the final usage chunk which contains the total token usage for
+ /// the request. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateChatCompletionStreamResponse( + string id, global::System.Collections.Generic.IList choices, global::System.DateTimeOffset created, - string id, string model, + global::tryAGI.OpenAI.ServiceTierEnum? serviceTier, global::tryAGI.OpenAI.CreateChatCompletionStreamResponseObject @object, - global::tryAGI.OpenAI.ServiceTier? serviceTier, global::tryAGI.OpenAI.CompletionUsage? usage) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Choices = choices ?? throw new global::System.ArgumentNullException(nameof(choices)); this.Created = created; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Object = @object; this.ServiceTier = serviceTier; + this.Object = @object; this.Usage = usage; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponseChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponseChoice.g.cs index a2178b84..6d53bb12 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponseChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatCompletionStreamResponseChoice.g.cs @@ -15,6 +15,12 @@ public sealed partial class CreateChatCompletionStreamResponseChoice [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ChatCompletionStreamResponseDelta Delta { get; set; } + /// + /// Log probability information for the choice. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Logprobs { get; set; } + /// /// The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
/// `length` if the maximum number of tokens specified in the request was reached,
@@ -33,12 +39,6 @@ public sealed partial class CreateChatCompletionStreamResponseChoice [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// Log probability information for the choice. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::tryAGI.OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Logprobs { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,6 +51,9 @@ public sealed partial class CreateChatCompletionStreamResponseChoice /// /// A chat completion delta generated by streamed model responses. /// + /// + /// Log probability information for the choice. + /// /// /// The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
/// `length` if the maximum number of tokens specified in the request was reached,
@@ -60,9 +63,6 @@ public sealed partial class CreateChatCompletionStreamResponseChoice /// /// The index of the choice in the list of choices. /// - /// - /// Log probability information for the choice. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.Json.g.cs new file mode 100644 index 00000000..b31f0992 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateChatSessionBody + { + /// + /// 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::tryAGI.OpenAI.CreateChatSessionBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateChatSessionBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateChatSessionBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateChatSessionBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateChatSessionBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateChatSessionBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.g.cs new file mode 100644 index 00000000..37c8acd7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateChatSessionBody.g.cs @@ -0,0 +1,91 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters for provisioning a new ChatKit session. + /// + public sealed partial class CreateChatSessionBody + { + /// + /// Workflow that powers the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("workflow")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.WorkflowParam Workflow { get; set; } + + /// + /// A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string User { get; set; } + + /// + /// Optional override for session expiration timing in seconds from creation. Defaults to 10 minutes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.ExpiresAfterParam? ExpiresAfter { get; set; } + + /// + /// Optional override for per-minute request limits. When omitted, defaults to 10. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + public global::tryAGI.OpenAI.RateLimitsParam? RateLimits { get; set; } + + /// + /// Optional overrides for ChatKit runtime configuration features + /// + [global::System.Text.Json.Serialization.JsonPropertyName("chatkit_configuration")] + public global::tryAGI.OpenAI.ChatkitConfigurationParam? ChatkitConfiguration { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Workflow that powers the session. + /// + /// + /// A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope. + /// + /// + /// Optional override for session expiration timing in seconds from creation. Defaults to 10 minutes. + /// + /// + /// Optional override for per-minute request limits. When omitted, defaults to 10. + /// + /// + /// Optional overrides for ChatKit runtime configuration features + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateChatSessionBody( + global::tryAGI.OpenAI.WorkflowParam workflow, + string user, + global::tryAGI.OpenAI.ExpiresAfterParam? expiresAfter, + global::tryAGI.OpenAI.RateLimitsParam? rateLimits, + global::tryAGI.OpenAI.ChatkitConfigurationParam? chatkitConfiguration) + { + this.Workflow = workflow ?? throw new global::System.ArgumentNullException(nameof(workflow)); + this.User = user ?? throw new global::System.ArgumentNullException(nameof(user)); + this.ExpiresAfter = expiresAfter; + this.RateLimits = rateLimits; + this.ChatkitConfiguration = chatkitConfiguration; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateChatSessionBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequest.g.cs index bf6bf538..7283b1c2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequest.g.cs @@ -10,6 +10,24 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateCompletionRequest { + /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AnyOf Model { get; set; } + + /// + /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
+ /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
+ /// Default Value: <|endoftext|> + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Prompt { get; set; } + /// /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
/// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
@@ -28,7 +46,7 @@ public sealed partial class CreateCompletionRequest /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 ///
[global::System.Text.Json.Serialization.JsonPropertyName("frequency_penalty")] @@ -37,14 +55,16 @@ public sealed partial class CreateCompletionRequest /// /// Modify the likelihood of specified tokens appearing in the completion.
/// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
- /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("logit_bias")] public global::System.Collections.Generic.Dictionary? LogitBias { get; set; } /// /// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.
- /// The maximum value for `logprobs` is 5. + /// The maximum value for `logprobs` is 5.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] public int? Logprobs { get; set; } @@ -59,14 +79,6 @@ public sealed partial class CreateCompletionRequest [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] public int? MaxTokens { get; set; } - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Model { get; set; } - /// /// How many completions to generate for each prompt.
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
@@ -79,21 +91,12 @@ public sealed partial class CreateCompletionRequest /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 ///
[global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] public double? PresencePenalty { get; set; } - /// - /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
- /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Prompt { get; set; } - /// /// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. @@ -104,7 +107,8 @@ public sealed partial class CreateCompletionRequest /// /// Not supported with latest reasoning models `o3` and `o4-mini`.
/// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("stop")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StopConfigurationJsonConverter))] @@ -118,14 +122,15 @@ public sealed partial class CreateCompletionRequest public bool? Stream { get; set; } /// - /// Options for streaming response. Only set this when you set `stream: true`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("stream_options")] - public global::tryAGI.OpenAI.ChatCompletionStreamOptions? StreamOptions { get; set; } + public global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? StreamOptions { get; set; } /// /// The suffix that comes after a completion of inserted text.
/// This parameter is only supported for `gpt-3.5-turbo-instruct`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// Example: test. ///
/// test. @@ -153,7 +158,7 @@ public sealed partial class CreateCompletionRequest public double? TopP { get; set; } /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 ///
/// user-1234 @@ -169,6 +174,14 @@ public sealed partial class CreateCompletionRequest /// /// Initializes a new instance of the class. /// + /// + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. + /// + /// + /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
+ /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
+ /// Default Value: <|endoftext|> + /// /// /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
/// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
@@ -181,17 +194,19 @@ public sealed partial class CreateCompletionRequest /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// /// /// Modify the likelihood of specified tokens appearing in the completion.
/// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
- /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.
- /// The maximum value for `logprobs` is 5. + /// The maximum value for `logprobs` is 5.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The maximum number of [tokens](/tokenizer) that can be generated in the completion.
@@ -199,9 +214,6 @@ public sealed partial class CreateCompletionRequest /// Default Value: 16
/// Example: 16 /// - /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// /// /// How many completions to generate for each prompt.
/// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.
@@ -210,13 +222,9 @@ public sealed partial class CreateCompletionRequest /// /// /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
- /// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
+ /// [See more information about frequency and presence penalties.](/docs/guides/text-generation)
/// Default Value: 0 /// - /// - /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
- /// Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. - /// /// /// If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
/// Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. @@ -224,18 +232,18 @@ public sealed partial class CreateCompletionRequest /// /// Not supported with latest reasoning models `o3` and `o4-mini`.
/// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
/// Default Value: false /// - /// - /// Options for streaming response. Only set this when you set `stream: true`. - /// + /// /// /// The suffix that comes after a completion of inserted text.
/// This parameter is only supported for `gpt-3.5-turbo-instruct`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// Example: test. /// /// @@ -251,7 +259,7 @@ public sealed partial class CreateCompletionRequest /// Example: 1 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// #if NET7_0_OR_GREATER @@ -259,7 +267,7 @@ public sealed partial class CreateCompletionRequest #endif public CreateCompletionRequest( global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? prompt, int? bestOf, bool? echo, double? frequencyPenalty, @@ -271,7 +279,7 @@ public CreateCompletionRequest( long? seed, global::tryAGI.OpenAI.StopConfiguration? stop, bool? stream, - global::tryAGI.OpenAI.ChatCompletionStreamOptions? streamOptions, + global::tryAGI.OpenAI.ChatCompletionStreamOptionsVariant1? streamOptions, string? suffix, double? temperature, double? topP, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequestLogitBias.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequestLogitBias.g.cs index f5536742..1211e3bb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequestLogitBias.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionRequestLogitBias.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// Modify the likelihood of specified tokens appearing in the completion.
/// Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
- /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated. + /// As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class CreateCompletionRequestLogitBias { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponse.g.cs index 77650b93..bd63ccbe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateCompletionResponse { + /// + /// A unique identifier for the completion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The list of completion choices the model generated for the input prompt. /// @@ -23,13 +30,6 @@ public sealed partial class CreateCompletionResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTimeOffset Created { get; set; } - /// - /// A unique identifier for the completion. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The model used for completion. /// @@ -37,13 +37,6 @@ public sealed partial class CreateCompletionResponse [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } - /// - /// The object type, which is always "text_completion" - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateCompletionResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.CreateCompletionResponseObject Object { get; set; } - /// /// This fingerprint represents the backend configuration that the model runs with.
/// Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. @@ -51,6 +44,13 @@ public sealed partial class CreateCompletionResponse [global::System.Text.Json.Serialization.JsonPropertyName("system_fingerprint")] public string? SystemFingerprint { get; set; } + /// + /// The object type, which is always "text_completion" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateCompletionResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.CreateCompletionResponseObject Object { get; set; } + /// /// Usage statistics for the completion request. /// @@ -66,25 +66,25 @@ public sealed partial class CreateCompletionResponse /// /// Initializes a new instance of the class. /// + /// + /// A unique identifier for the completion. + /// /// /// The list of completion choices the model generated for the input prompt. /// /// /// The Unix timestamp (in seconds) of when the completion was created. /// - /// - /// A unique identifier for the completion. - /// /// /// The model used for completion. /// - /// - /// The object type, which is always "text_completion" - /// /// /// This fingerprint represents the backend configuration that the model runs with.
/// Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. /// + /// + /// The object type, which is always "text_completion" + /// /// /// Usage statistics for the completion request. /// @@ -92,20 +92,20 @@ public sealed partial class CreateCompletionResponse [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateCompletionResponse( + string id, global::System.Collections.Generic.IList choices, global::System.DateTimeOffset created, - string id, string model, - global::tryAGI.OpenAI.CreateCompletionResponseObject @object, string? systemFingerprint, + global::tryAGI.OpenAI.CreateCompletionResponseObject @object, global::tryAGI.OpenAI.CompletionUsage? usage) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Choices = choices ?? throw new global::System.ArgumentNullException(nameof(choices)); this.Created = created; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Object = @object; this.SystemFingerprint = systemFingerprint; + this.Object = @object; this.Usage = usage; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoice.g.cs index f2271e27..f5aeeb68 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoice.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoice.g.cs @@ -30,7 +30,7 @@ public sealed partial class CreateCompletionResponseChoice ///
[global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs? Logprobs { get; set; } + public required global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2? Logprobs { get; set; } /// /// @@ -62,7 +62,7 @@ public sealed partial class CreateCompletionResponseChoice public CreateCompletionResponseChoice( global::tryAGI.OpenAI.CreateCompletionResponseChoiceFinishReason finishReason, int index, - global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs? logprobs, + global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2? logprobs, string text) { this.FinishReason = finishReason; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs.g.cs index 25de1063..d6ce55f6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs.g.cs @@ -8,63 +8,11 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateCompletionResponseChoiceLogprobs { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text_offset")] - public global::System.Collections.Generic.IList? TextOffset { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("token_logprobs")] - public global::System.Collections.Generic.IList? TokenLogprobs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] - public global::System.Collections.Generic.IList? Tokens { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] - public global::System.Collections.Generic.IList>? TopLogprobs { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateCompletionResponseChoiceLogprobs( - global::System.Collections.Generic.IList? textOffset, - global::System.Collections.Generic.IList? tokenLogprobs, - global::System.Collections.Generic.IList? tokens, - global::System.Collections.Generic.IList>? topLogprobs) - { - this.TextOffset = textOffset; - this.TokenLogprobs = tokenLogprobs; - this.Tokens = tokens; - this.TopLogprobs = topLogprobs; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateCompletionResponseChoiceLogprobs() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.Json.g.cs new file mode 100644 index 00000000..4dc15788 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateCompletionResponseChoiceLogprobs2 + { + /// + /// 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::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2; + } + + /// + /// 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::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateCompletionResponseChoiceLogprobs2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.g.cs new file mode 100644 index 00000000..76e00405 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateCompletionResponseChoiceLogprobs2.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateCompletionResponseChoiceLogprobs2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text_offset")] + public global::System.Collections.Generic.IList? TextOffset { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_logprobs")] + public global::System.Collections.Generic.IList? TokenLogprobs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + public global::System.Collections.Generic.IList? Tokens { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] + public global::System.Collections.Generic.IList>? TopLogprobs { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateCompletionResponseChoiceLogprobs2( + global::System.Collections.Generic.IList? textOffset, + global::System.Collections.Generic.IList? tokenLogprobs, + global::System.Collections.Generic.IList? tokens, + global::System.Collections.Generic.IList>? topLogprobs) + { + this.TextOffset = textOffset; + this.TokenLogprobs = tokenLogprobs; + this.Tokens = tokens; + this.TopLogprobs = topLogprobs; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateCompletionResponseChoiceLogprobs2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBody.g.cs index 5898bc07..ba727f45 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBody.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class CreateContainerBody { /// - /// Container expiration time in seconds relative to the 'anchor' time. + /// Name of the container to create. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? ExpiresAfter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } /// /// IDs of files to copy to the container. @@ -21,11 +22,30 @@ public sealed partial class CreateContainerBody public global::System.Collections.Generic.IList? FileIds { get; set; } /// - /// Name of the container to create. + /// Container expiration time in seconds relative to the 'anchor' time. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? ExpiresAfter { get; set; } + + /// + /// An optional list of skills referenced by id or inline data. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skills")] + public global::System.Collections.Generic.IList? Skills { get; set; } + + /// + /// Optional memory limit for the container. Defaults to "1g". + /// + [global::System.Text.Json.Serialization.JsonPropertyName("memory_limit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateContainerBodyMemoryLimitJsonConverter))] + public global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? MemoryLimit { get; set; } + + /// + /// Network access policy for the container. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("network_policy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.NetworkPolicyJsonConverter))] + public global::tryAGI.OpenAI.NetworkPolicy? NetworkPolicy { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -36,26 +56,41 @@ public sealed partial class CreateContainerBody /// /// Initializes a new instance of the class. /// - /// - /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// Name of the container to create. /// /// /// IDs of files to copy to the container. /// - /// - /// Name of the container to create. + /// + /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// + /// An optional list of skills referenced by id or inline data. + /// + /// + /// Optional memory limit for the container. Defaults to "1g". + /// + /// + /// Network access policy for the container. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateContainerBody( string name, + global::System.Collections.Generic.IList? fileIds, global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? expiresAfter, - global::System.Collections.Generic.IList? fileIds) + global::System.Collections.Generic.IList? skills, + global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? memoryLimit, + global::tryAGI.OpenAI.NetworkPolicy? networkPolicy) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.ExpiresAfter = expiresAfter; this.FileIds = fileIds; + this.ExpiresAfter = expiresAfter; + this.Skills = skills; + this.MemoryLimit = memoryLimit; + this.NetworkPolicy = networkPolicy; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyMemoryLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyMemoryLimit.g.cs new file mode 100644 index 00000000..395b2335 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyMemoryLimit.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional memory limit for the container. Defaults to "1g". + /// + public enum CreateContainerBodyMemoryLimit + { + /// + /// + /// + x1g, + /// + /// + /// + x4g, + /// + /// + /// + x16g, + /// + /// + /// + x64g, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateContainerBodyMemoryLimitExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateContainerBodyMemoryLimit value) + { + return value switch + { + CreateContainerBodyMemoryLimit.x1g => "1g", + CreateContainerBodyMemoryLimit.x4g => "4g", + CreateContainerBodyMemoryLimit.x16g => "16g", + CreateContainerBodyMemoryLimit.x64g => "64g", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateContainerBodyMemoryLimit? ToEnum(string value) + { + return value switch + { + "1g" => CreateContainerBodyMemoryLimit.x1g, + "4g" => CreateContainerBodyMemoryLimit.x4g, + "16g" => CreateContainerBodyMemoryLimit.x16g, + "64g" => CreateContainerBodyMemoryLimit.x64g, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.Json.g.cs new file mode 100644 index 00000000..ab70885a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateContainerBodyNetworkPolicyDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateContainerBodyNetworkPolicyDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.g.cs new file mode 100644 index 00000000..ab5d5f6f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodyNetworkPolicyDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateContainerBodyNetworkPolicyDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateContainerBodyNetworkPolicyDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateContainerBodyNetworkPolicyDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.Json.g.cs new file mode 100644 index 00000000..812bf849 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateContainerBodySkillDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateContainerBodySkillDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.g.cs new file mode 100644 index 00000000..908ad9aa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerBodySkillDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateContainerBodySkillDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateContainerBodySkillDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateContainerBodySkillDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerFileBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerFileBody.g.cs index a18a338e..ecdeaadd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerFileBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateContainerFileBody.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateContainerFileBody { + /// + /// Name of the file to create. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + /// /// The File object (not file name) to be uploaded. /// @@ -20,12 +26,6 @@ public sealed partial class CreateContainerFileBody [global::System.Text.Json.Serialization.JsonPropertyName("filename")] public string? Filename { get; set; } - /// - /// Name of the file to create. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -35,26 +35,26 @@ public sealed partial class CreateContainerFileBody /// /// Initializes a new instance of the class. /// + /// + /// Name of the file to create. + /// /// /// The File object (not file name) to be uploaded. /// /// /// The File object (not file name) to be uploaded. /// - /// - /// Name of the file to create. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateContainerFileBody( + string? fileId, byte[]? file, - string? filename, - string? fileId) + string? filename) { + this.FileId = fileId; this.File = file; this.Filename = filename; - this.FileId = fileId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs index c53d4e1c..8f6620cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.cs @@ -9,16 +9,16 @@ namespace tryAGI.OpenAI public sealed partial class CreateConversationBody { /// - /// Initial items to include in the conversation context. You may add up to 20 items at a time. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("items")] - public global::System.Collections.Generic.IList? Items { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public object? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("items")] + public global::System.Collections.Generic.IList? Items { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -29,19 +29,17 @@ public sealed partial class CreateConversationBody /// /// Initializes a new instance of the class. /// - /// - /// Initial items to include in the conversation context. You may add up to 20 items at a time. - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateConversationBody( - global::System.Collections.Generic.IList? items, - object? metadata) + global::System.Collections.Generic.Dictionary? metadata, + global::System.Collections.Generic.IList? items) { - this.Items = items; this.Metadata = metadata; + this.Items = items; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.Json.g.cs new file mode 100644 index 00000000..88857da3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateConversationBodyItems + { + /// + /// 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::tryAGI.OpenAI.CreateConversationBodyItems? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateConversationBodyItems), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateConversationBodyItems; + } + + /// + /// 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::tryAGI.OpenAI.CreateConversationBodyItems? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateConversationBodyItems), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateConversationBodyItems; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.g.cs new file mode 100644 index 00000000..fd14aaef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyItems.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateConversationBodyItems + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.Json.g.cs new file mode 100644 index 00000000..1a84bbc5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateConversationBodyMetadata + { + /// + /// 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::tryAGI.OpenAI.CreateConversationBodyMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateConversationBodyMetadata), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateConversationBodyMetadata; + } + + /// + /// 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::tryAGI.OpenAI.CreateConversationBodyMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateConversationBodyMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateConversationBodyMetadata; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.g.cs new file mode 100644 index 00000000..6c024722 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBodyMetadata.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateConversationBodyMetadata + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEmbeddingRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEmbeddingRequest.g.cs index eed5bd9a..c0dd1240 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEmbeddingRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEmbeddingRequest.g.cs @@ -10,34 +10,18 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateEmbeddingRequest { - /// - /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("dimensions")] - public int? Dimensions { get; set; } - - /// - /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
- /// Default Value: float
- /// Example: float - ///
- /// float - [global::System.Text.Json.Serialization.JsonPropertyName("encoding_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatJsonConverter))] - public global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? EncodingFormat { get; set; } - /// /// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
/// Example: The quick brown fox jumped over the lazy dog ///
/// The quick brown fox jumped over the lazy dog [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> Input { get; set; } + public required global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> Input { get; set; } /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: text-embedding-3-small ///
/// text-embedding-3-small @@ -47,7 +31,23 @@ public sealed partial class CreateEmbeddingRequest public required global::tryAGI.OpenAI.AnyOf Model { get; set; } /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
+ /// Default Value: float
+ /// Example: float + ///
+ /// float + [global::System.Text.Json.Serialization.JsonPropertyName("encoding_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEmbeddingRequestEncodingFormatJsonConverter))] + public global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? EncodingFormat { get; set; } + + /// + /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dimensions")] + public int? Dimensions { get; set; } + + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 ///
/// user-1234 @@ -63,40 +63,40 @@ public sealed partial class CreateEmbeddingRequest /// /// Initializes a new instance of the class. /// - /// - /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. - /// - /// - /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
- /// Default Value: float
- /// Example: float - /// /// /// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
/// Example: The quick brown fox jumped over the lazy dog /// /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
+ /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them.
/// Example: text-embedding-3-small /// + /// + /// The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
+ /// Default Value: float
+ /// Example: float + /// + /// + /// The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. + /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEmbeddingRequest( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf model, - int? dimensions, global::tryAGI.OpenAI.CreateEmbeddingRequestEncodingFormat? encodingFormat, + int? dimensions, string? user) { this.Input = input; this.Model = model; - this.Dimensions = dimensions; this.EncodingFormat = encodingFormat; + this.Dimensions = dimensions; this.User = user; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSource.g.cs index 0c499ff1..33643645 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSource.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,17 +11,20 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalCompletionsRunDataSource { /// - /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. + /// The type of run data source. Always `completions`.
+ /// Default Value: completions ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_messages")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputMessagesJsonConverter))] - public global::tryAGI.OpenAI.InputMessages? InputMessages { get; set; } + /// global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType.Completions + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType.Completions; /// - /// The name of the model to use for generating completions (e.g. "o3-mini"). + /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_messages")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? InputMessages { get; set; } /// /// @@ -28,21 +33,18 @@ public sealed partial class CreateEvalCompletionsRunDataSource public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams? SamplingParams { get; set; } /// - /// Determines what populates the `item` namespace in this run's data source. + /// The name of the model to use for generating completions (e.g. "o3-mini"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SourceJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.Source Source { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// - /// The type of run data source. Always `completions`.
- /// Default Value: completions + /// Determines what populates the `item` namespace in this run's data source. ///
- /// global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType.Completions - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceTypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType.Completions; + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Source { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,35 +55,35 @@ public sealed partial class CreateEvalCompletionsRunDataSource /// /// Initializes a new instance of the class. /// + /// + /// The type of run data source. Always `completions`.
+ /// Default Value: completions + /// /// /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. /// + /// /// /// The name of the model to use for generating completions (e.g. "o3-mini"). /// - /// /// /// Determines what populates the `item` namespace in this run's data source. /// - /// - /// The type of run data source. Always `completions`.
- /// Default Value: completions - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalCompletionsRunDataSource( - global::tryAGI.OpenAI.Source source, - global::tryAGI.OpenAI.InputMessages? inputMessages, - string? model, + global::tryAGI.OpenAI.OneOf source, + global::tryAGI.OpenAI.OneOf? inputMessages, global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams? samplingParams, + string? model, global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType type = global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceType.Completions) { this.Source = source; + this.Type = type; this.InputMessages = inputMessages; - this.Model = model; this.SamplingParams = samplingParams; - this.Type = type; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.Json.g.cs deleted file mode 100644 index b241a879..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.g.cs deleted file mode 100644 index 76247559..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalCompletionsRunDataSourceInputMessagesDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.Json.g.cs new file mode 100644 index 00000000..dd885d1a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages + { + /// + /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.g.cs new file mode 100644 index 00000000..31f63f9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages + { + /// + /// The type of input messages. Always `item_reference`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType Type { get; set; } + + /// + /// A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_reference")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemReference { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of input messages. Always `item_reference`. + /// + /// + /// A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages( + string itemReference, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType type) + { + this.ItemReference = itemReference ?? throw new global::System.ArgumentNullException(nameof(itemReference)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessages() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs new file mode 100644 index 00000000..16d40405 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of input messages. Always `item_reference`. + /// + public enum CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType + { + /// + /// + /// + ItemReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType value) + { + return value switch + { + CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.ItemReference => "item_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType? ToEnum(string value) + { + return value switch + { + "item_reference" => CreateEvalCompletionsRunDataSourceInputMessagesItemReferenceInputMessagesType.ItemReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.Json.g.cs new file mode 100644 index 00000000..ad97dd18 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages + { + /// + /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.g.cs new file mode 100644 index 00000000..7424b7f1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages.g.cs @@ -0,0 +1,60 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages + { + /// + /// The type of input messages. Always `template`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType Type { get; set; } + + /// + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("template")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Template { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of input messages. Always `template`. + /// + /// + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages( + global::System.Collections.Generic.IList> template, + global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType type) + { + this.Template = template ?? throw new global::System.ArgumentNullException(nameof(template)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessages() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs new file mode 100644 index 00000000..98fd8a2e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of input messages. Always `template`. + /// + public enum CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType + { + /// + /// + /// + Template, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType value) + { + return value switch + { + CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.Template => "template", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType? ToEnum(string value) + { + return value switch + { + "template" => CreateEvalCompletionsRunDataSourceInputMessagesTemplateInputMessagesType.Template, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.Json.g.cs deleted file mode 100644 index c00435fb..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesVariant1 - { - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.g.cs deleted file mode 100644 index 1cf6a090..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesVariant1 - { - /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("template")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Template { get; set; } - - /// - /// The type of input messages. Always `template`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. - /// - /// - /// The type of input messages. Always `template`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalCompletionsRunDataSourceInputMessagesVariant1( - global::System.Collections.Generic.IList> template, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type type) - { - this.Template = template ?? throw new global::System.ArgumentNullException(nameof(template)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalCompletionsRunDataSourceInputMessagesVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs deleted file mode 100644 index fa165ad0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of input messages. Always `template`. - /// - public enum CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type - { - /// - /// - /// - Template, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateEvalCompletionsRunDataSourceInputMessagesVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type value) - { - return value switch - { - CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.Template => "template", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type? ToEnum(string value) - { - return value switch - { - "template" => CreateEvalCompletionsRunDataSourceInputMessagesVariant1Type.Template, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.Json.g.cs deleted file mode 100644 index 85866910..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesVariant2 - { - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.g.cs deleted file mode 100644 index b52af8a9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalCompletionsRunDataSourceInputMessagesVariant2 - { - /// - /// A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_reference")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemReference { get; set; } - - /// - /// The type of input messages. Always `item_reference`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A reference to a variable in the `item` namespace. Ie, "item.input_trajectory" - /// - /// - /// The type of input messages. Always `item_reference`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalCompletionsRunDataSourceInputMessagesVariant2( - string itemReference, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type type) - { - this.ItemReference = itemReference ?? throw new global::System.ArgumentNullException(nameof(itemReference)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalCompletionsRunDataSourceInputMessagesVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs deleted file mode 100644 index 5a6998b4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of input messages. Always `item_reference`. - /// - public enum CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type - { - /// - /// - /// - ItemReference, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateEvalCompletionsRunDataSourceInputMessagesVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type value) - { - return value switch - { - CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.ItemReference => "item_reference", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type? ToEnum(string value) - { - return value switch - { - "item_reference" => CreateEvalCompletionsRunDataSourceInputMessagesVariant2Type.ItemReference, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSamplingParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSamplingParams.g.cs index 590732ae..4985a8cf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSamplingParams.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSamplingParams.g.cs @@ -10,6 +10,19 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateEvalCompletionsRunDataSourceSamplingParams { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } + + /// + /// A higher temperature increases randomness in the outputs.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + /// /// The maximum number of tokens in the generated output. /// @@ -17,44 +30,32 @@ public sealed partial class CreateEvalCompletionsRunDataSourceSamplingParams public int? MaxCompletionTokens { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
+ /// Default Value: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } + + /// + /// A seed value to initialize the randomness, during sampling.
+ /// Default Value: 42 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } /// /// An object specifying the format that the model must output.
/// 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](https://platform.openai.com/docs/guides/structured-outputs).
+ /// guide](/docs/guides/structured-outputs).
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
/// ensures the message the model generates is valid JSON. Using `json_schema`
/// is preferred for models that support it. ///
[global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ResponseFormat { get; set; } - - /// - /// A seed value to initialize the randomness, during sampling.
- /// Default Value: 42 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public int? Seed { get; set; } - - /// - /// A higher temperature increases randomness in the outputs.
- /// Default Value: 1 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ResponseFormat { get; set; } /// /// A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. @@ -62,13 +63,6 @@ public sealed partial class CreateEvalCompletionsRunDataSourceSamplingParams [global::System.Text.Json.Serialization.JsonPropertyName("tools")] public global::System.Collections.Generic.IList? Tools { get; set; } - /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -78,61 +72,54 @@ public sealed partial class CreateEvalCompletionsRunDataSourceSamplingParams /// /// Initializes a new instance of the class. /// + /// + /// + /// A higher temperature increases randomness in the outputs.
+ /// Default Value: 1 + /// /// /// The maximum number of tokens in the generated output. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
+ /// Default Value: 1 + /// + /// + /// A seed value to initialize the randomness, during sampling.
+ /// Default Value: 42 /// /// /// An object specifying the format that the model must output.
/// 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](https://platform.openai.com/docs/guides/structured-outputs).
+ /// guide](/docs/guides/structured-outputs).
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
/// ensures the message the model generates is valid JSON. Using `json_schema`
/// is preferred for models that support it. /// - /// - /// A seed value to initialize the randomness, during sampling.
- /// Default Value: 42 - /// - /// - /// A higher temperature increases randomness in the outputs.
- /// Default Value: 1 - /// /// /// A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. /// - /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1 - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalCompletionsRunDataSourceSamplingParams( + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + double? temperature, int? maxCompletionTokens, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - global::tryAGI.OpenAI.AnyOf? responseFormat, + double? topP, int? seed, - double? temperature, - global::System.Collections.Generic.IList? tools, - double? topP) + global::tryAGI.OpenAI.OneOf? responseFormat, + global::System.Collections.Generic.IList? tools) { - this.MaxCompletionTokens = maxCompletionTokens; this.ReasoningEffort = reasoningEffort; - this.ResponseFormat = responseFormat; - this.Seed = seed; this.Temperature = temperature; - this.Tools = tools; + this.MaxCompletionTokens = maxCompletionTokens; this.TopP = topP; + this.Seed = seed; + this.ResponseFormat = responseFormat; + this.Tools = tools; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.Json.g.cs deleted file mode 100644 index 2af75943..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalCompletionsRunDataSourceSourceDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceSourceDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.g.cs deleted file mode 100644 index 49dc8c6b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSourceDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalCompletionsRunDataSourceSourceDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalCompletionsRunDataSourceSourceDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalCompletionsRunDataSourceSourceDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfig.g.cs index 0731cb79..734b4490 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfig.g.cs @@ -12,27 +12,45 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalCustomDataSourceConfig { /// - /// Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)
- /// Default Value: false + /// The type of data source. Always `custom`.
+ /// Default Value: custom ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include_sample_schema")] - public bool? IncludeSampleSchema { get; set; } + /// global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType.Custom + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCustomDataSourceConfigTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType.Custom; /// - /// The json schema for each row in the data source. + /// The json schema for each row in the data source.
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// } ///
+ /// + /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// } + ///
[global::System.Text.Json.Serialization.JsonPropertyName("item_schema")] [global::System.Text.Json.Serialization.JsonRequired] public required object ItemSchema { get; set; } /// - /// The type of data source. Always `custom`.
- /// Default Value: custom + /// Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)
+ /// Default Value: false ///
- /// global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType.Custom - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalCustomDataSourceConfigTypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType.Custom; + [global::System.Text.Json.Serialization.JsonPropertyName("include_sample_schema")] + public bool? IncludeSampleSchema { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -43,17 +61,25 @@ public sealed partial class CreateEvalCustomDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)
- /// Default Value: false - /// - /// - /// The json schema for each row in the data source. - /// /// /// The type of data source. Always `custom`.
/// Default Value: custom /// + /// + /// The json schema for each row in the data source.
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// } + /// + /// + /// Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)
+ /// Default Value: false + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -63,8 +89,8 @@ public CreateEvalCustomDataSourceConfig( global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType type = global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfigType.Custom) { this.ItemSchema = itemSchema ?? throw new global::System.ArgumentNullException(nameof(itemSchema)); - this.IncludeSampleSchema = includeSampleSchema; this.Type = type; + this.IncludeSampleSchema = includeSampleSchema; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfigItemSchema.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfigItemSchema.g.cs index aaee2858..3d20991f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfigItemSchema.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCustomDataSourceConfigItemSchema.g.cs @@ -4,7 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The json schema for each row in the data source. + /// The json schema for each row in the data source.
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// } ///
public sealed partial class CreateEvalCustomDataSourceConfigItemSchema { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItem.g.cs index 4501b472..944de991 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItem.g.cs @@ -13,36 +13,18 @@ namespace tryAGI.OpenAI /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalItemVariant1? Value1 { get; init; } + public global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? SimpleInputMessage { get; init; } #else - public global::tryAGI.OpenAI.CreateEvalItemVariant1? Value1 { get; } + public global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? SimpleInputMessage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SimpleInputMessage))] #endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// - public static implicit operator CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemVariant1 value) => new CreateEvalItem((global::tryAGI.OpenAI.CreateEvalItemVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalItemVariant1?(CreateEvalItem @this) => @this.Value1; - - /// - /// - /// - public CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemVariant1? value) - { - Value1 = value; - } + public bool IsSimpleInputMessage => SimpleInputMessage != null; /// /// A message input to the model with a role indicating instruction following
@@ -52,18 +34,35 @@ public CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemVariant1? value) /// interactions. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalItem? Value2 { get; init; } + public global::tryAGI.OpenAI.EvalItem? EvalMessageObject { get; init; } #else - public global::tryAGI.OpenAI.EvalItem? Value2 { get; } + public global::tryAGI.OpenAI.EvalItem? EvalMessageObject { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalMessageObject))] #endif - public bool IsValue2 => Value2 != null; + public bool IsEvalMessageObject => EvalMessageObject != null; + /// + /// + /// + public static implicit operator CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage value) => new CreateEvalItem((global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage?(CreateEvalItem @this) => @this.SimpleInputMessage; + + /// + /// + /// + public CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? value) + { + SimpleInputMessage = value; + } /// /// @@ -73,42 +72,42 @@ public CreateEvalItem(global::tryAGI.OpenAI.CreateEvalItemVariant1? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.EvalItem?(CreateEvalItem @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.EvalItem?(CreateEvalItem @this) => @this.EvalMessageObject; /// /// /// public CreateEvalItem(global::tryAGI.OpenAI.EvalItem? value) { - Value2 = value; + EvalMessageObject = value; } /// /// /// public CreateEvalItem( - global::tryAGI.OpenAI.CreateEvalItemVariant1? value1, - global::tryAGI.OpenAI.EvalItem? value2 + global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? simpleInputMessage, + global::tryAGI.OpenAI.EvalItem? evalMessageObject ) { - Value1 = value1; - Value2 = value2; + SimpleInputMessage = simpleInputMessage; + EvalMessageObject = evalMessageObject; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + EvalMessageObject as object ?? + SimpleInputMessage as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + SimpleInputMessage?.ToString() ?? + EvalMessageObject?.ToString() ; /// @@ -116,15 +115,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2; + return IsSimpleInputMessage && !IsEvalMessageObject || !IsSimpleInputMessage && IsEvalMessageObject; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? simpleInputMessage = null, + global::System.Func? evalMessageObject = null, bool validate = true) { if (validate) @@ -132,13 +131,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsSimpleInputMessage && simpleInputMessage != null) { - return value1(Value1!); + return simpleInputMessage(SimpleInputMessage!); } - else if (IsValue2 && value2 != null) + else if (IsEvalMessageObject && evalMessageObject != null) { - return value2(Value2!); + return evalMessageObject(EvalMessageObject!); } return default(TResult); @@ -148,8 +147,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? simpleInputMessage = null, + global::System.Action? evalMessageObject = null, bool validate = true) { if (validate) @@ -157,13 +156,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsSimpleInputMessage) { - value1?.Invoke(Value1!); + simpleInputMessage?.Invoke(SimpleInputMessage!); } - else if (IsValue2) + else if (IsEvalMessageObject) { - value2?.Invoke(Value2!); + evalMessageObject?.Invoke(EvalMessageObject!); } } @@ -174,9 +173,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, - typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), - Value2, + SimpleInputMessage, + typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), + EvalMessageObject, typeof(global::tryAGI.OpenAI.EvalItem), }; const int offset = unchecked((int)2166136261); @@ -194,8 +193,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateEvalItem 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(SimpleInputMessage, other.SimpleInputMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalMessageObject, other.EvalMessageObject) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.Json.g.cs new file mode 100644 index 00000000..ef935711 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalItemSimpleInputMessage + { + /// + /// 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::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalItemSimpleInputMessage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.g.cs new file mode 100644 index 00000000..8dc7811c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemSimpleInputMessage.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalItemSimpleInputMessage + { + /// + /// The role of the message (e.g. "system", "assistant", "user"). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Role { get; set; } + + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The role of the message (e.g. "system", "assistant", "user"). + /// + /// + /// The content of the message. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalItemSimpleInputMessage( + string role, + string content) + { + this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalItemSimpleInputMessage() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.Json.g.cs deleted file mode 100644 index 6cd6d03a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalItemVariant1 - { - /// - /// 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::tryAGI.OpenAI.CreateEvalItemVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalItemVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalItemVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalItemVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalItemVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.g.cs deleted file mode 100644 index 903aff1b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalItemVariant1.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalItemVariant1 - { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// The role of the message (e.g. "system", "assistant", "user"). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The content of the message. - /// - /// - /// The role of the message (e.g. "system", "assistant", "user"). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalItemVariant1( - string content, - string role) - { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalItemVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSource.g.cs index 7ddc1db7..3f1ffa1d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSource.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,14 +10,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateEvalJsonlRunDataSource { - /// - /// Determines what populates the `item` namespace in the data source. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.Source2JsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.Source2 Source { get; set; } - /// /// The type of data source. Always `jsonl`.
/// Default Value: jsonl @@ -25,6 +19,14 @@ public sealed partial class CreateEvalJsonlRunDataSource [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalJsonlRunDataSourceTypeJsonConverter))] public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType.Jsonl; + /// + /// Determines what populates the `item` namespace in the data source. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Source { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -34,18 +36,18 @@ public sealed partial class CreateEvalJsonlRunDataSource /// /// Initializes a new instance of the class. /// - /// - /// Determines what populates the `item` namespace in the data source. - /// /// /// The type of data source. Always `jsonl`.
/// Default Value: jsonl /// + /// + /// Determines what populates the `item` namespace in the data source. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalJsonlRunDataSource( - global::tryAGI.OpenAI.Source2 source, + global::tryAGI.OpenAI.OneOf source, global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType type = global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceType.Jsonl) { this.Source = source; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.Json.g.cs deleted file mode 100644 index 9af2f49c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalJsonlRunDataSourceSourceDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalJsonlRunDataSourceSourceDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.g.cs deleted file mode 100644 index deb7d7f1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalJsonlRunDataSourceSourceDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalJsonlRunDataSourceSourceDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalJsonlRunDataSourceSourceDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalJsonlRunDataSourceSourceDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLabelModelGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLabelModelGrader.g.cs index b9834e93..2b9db69e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLabelModelGrader.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLabelModelGrader.g.cs @@ -10,18 +10,18 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalLabelModelGrader { /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// The object type, which is always `label_model`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalLabelModelGraderTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalLabelModelGraderType Type { get; set; } /// - /// The labels to classify to each item in the evaluation. + /// The name of the grader. /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Labels { get; set; } + public required string Name { get; set; } /// /// The model to use for the evaluation. Must support structured outputs. @@ -31,25 +31,25 @@ public sealed partial class CreateEvalLabelModelGrader public required string Model { get; set; } /// - /// The name of the grader. + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required global::System.Collections.Generic.IList Input { get; set; } /// - /// The labels that indicate a passing result. Must be a subset of labels. + /// The labels to classify to each item in the evaluation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("passing_labels")] + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList PassingLabels { get; set; } + public required global::System.Collections.Generic.IList Labels { get; set; } /// - /// The object type, which is always `label_model`. + /// The labels that indicate a passing result. Must be a subset of labels. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalLabelModelGraderTypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalLabelModelGraderType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("passing_labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList PassingLabels { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,39 +60,39 @@ public sealed partial class CreateEvalLabelModelGrader /// /// Initializes a new instance of the class. /// - /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// + /// The object type, which is always `label_model`. /// - /// - /// The labels to classify to each item in the evaluation. + /// + /// The name of the grader. /// /// /// The model to use for the evaluation. Must support structured outputs. /// - /// - /// The name of the grader. + /// + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// + /// + /// The labels to classify to each item in the evaluation. /// /// /// The labels that indicate a passing result. Must be a subset of labels. /// - /// - /// The object type, which is always `label_model`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalLabelModelGrader( + string name, + string model, global::System.Collections.Generic.IList input, global::System.Collections.Generic.IList labels, - string model, - string name, global::System.Collections.Generic.IList passingLabels, global::tryAGI.OpenAI.CreateEvalLabelModelGraderType type) { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.PassingLabels = passingLabels ?? throw new global::System.ArgumentNullException(nameof(passingLabels)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfig.g.cs index 691f8964..4db54127 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfig.g.cs @@ -9,12 +9,6 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateEvalLogsDataSourceConfig { - /// - /// Metadata filters for the logs data source. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public object? Metadata { get; set; } - /// /// The type of data source. Always `logs`.
/// Default Value: logs @@ -24,6 +18,20 @@ public sealed partial class CreateEvalLogsDataSourceConfig [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalLogsDataSourceConfigTypeJsonConverter))] public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType.Logs; + /// + /// Metadata filters for the logs data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } + ///
+ /// + /// {
+ /// "use_case": "customer_support_agent"
+ /// } + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +41,16 @@ public sealed partial class CreateEvalLogsDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// Metadata filters for the logs data source. - /// /// /// The type of data source. Always `logs`.
/// Default Value: logs /// + /// + /// Metadata filters for the logs data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -47,8 +58,8 @@ public CreateEvalLogsDataSourceConfig( object? metadata, global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType type = global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfigType.Logs) { - this.Metadata = metadata; this.Type = type; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfigMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfigMetadata.g.cs index 44302ee2..cbd344a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfigMetadata.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalLogsDataSourceConfigMetadata.g.cs @@ -4,7 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Metadata filters for the logs data source. + /// Metadata filters for the logs data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } ///
public sealed partial class CreateEvalLogsDataSourceConfigMetadata { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequest.g.cs index a85de0e1..5186dbdc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequest.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,35 +11,31 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalRequest { /// - /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. + /// The name of the evaluation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data_source_config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalRequestDataSourceConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig DataSourceConfig { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// The name of the evaluation. + /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data_source_config")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf DataSourceConfig { get; set; } /// /// A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`). /// [global::System.Text.Json.Serialization.JsonPropertyName("testing_criteria")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList TestingCriteria { get; set; } + public required global::System.Collections.Generic.IList> TestingCriteria { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,19 +46,13 @@ public sealed partial class CreateEvalRequest /// /// Initializes a new instance of the class. /// - /// - /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the evaluation. /// + /// + /// + /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. + /// /// /// A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`). /// @@ -68,15 +60,15 @@ public sealed partial class CreateEvalRequest [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalRequest( - global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig dataSourceConfig, - global::System.Collections.Generic.IList testingCriteria, - global::System.Collections.Generic.Dictionary? metadata, - string? name) + global::tryAGI.OpenAI.OneOf dataSourceConfig, + global::System.Collections.Generic.IList> testingCriteria, + string? name, + global::System.Collections.Generic.Dictionary? metadata) { this.DataSourceConfig = dataSourceConfig; this.TestingCriteria = testingCriteria ?? throw new global::System.ArgumentNullException(nameof(testingCriteria)); - this.Metadata = metadata; this.Name = name; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.Json.g.cs deleted file mode 100644 index 963c2a8d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct CreateEvalRequestDataSourceConfig - { - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig?; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfig?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.g.cs deleted file mode 100644 index 2f8031c5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfig.g.cs +++ /dev/null @@ -1,278 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation. - /// - public readonly partial struct CreateEvalRequestDataSourceConfig : global::System.IEquatable - { - /// - /// A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.
- /// This schema is used to define the shape of the data that will be:
- /// - Used to define your testing criteria and
- /// - What data is required when creating a run - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? Custom { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? Custom { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] -#endif - public bool IsCustom => Custom != null; - - /// - /// - /// - public static implicit operator CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig value) => new CreateEvalRequestDataSourceConfig((global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig?(CreateEvalRequestDataSourceConfig @this) => @this.Custom; - - /// - /// - /// - public CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? value) - { - Custom = value; - } - - /// - /// A data source config which specifies the metadata property of your logs query.
- /// This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc. - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? Logs { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? 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 CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig value) => new CreateEvalRequestDataSourceConfig((global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig?(CreateEvalRequestDataSourceConfig @this) => @this.Logs; - - /// - /// - /// - public CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? value) - { - Logs = value; - } - - /// - /// Deprecated in favor of LogsDataSourceConfig. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? StoredCompletions { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? StoredCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StoredCompletions))] -#endif - public bool IsStoredCompletions => StoredCompletions != null; - - /// - /// - /// - public static implicit operator CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig value) => new CreateEvalRequestDataSourceConfig((global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig?(CreateEvalRequestDataSourceConfig @this) => @this.StoredCompletions; - - /// - /// - /// - public CreateEvalRequestDataSourceConfig(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? value) - { - StoredCompletions = value; - } - - /// - /// - /// - public CreateEvalRequestDataSourceConfig( - global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig? custom, - global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig? logs, - global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig? storedCompletions - ) - { - Custom = custom; - Logs = logs; - StoredCompletions = storedCompletions; - } - - /// - /// - /// - public object? Object => - StoredCompletions as object ?? - Logs as object ?? - Custom as object - ; - - /// - /// - /// - public override string? ToString() => - Custom?.ToString() ?? - Logs?.ToString() ?? - StoredCompletions?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCustom || IsLogs || IsStoredCompletions; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? custom = null, - global::System.Func? logs = null, - global::System.Func? storedCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCustom && custom != null) - { - return custom(Custom!); - } - else if (IsLogs && logs != null) - { - return logs(Logs!); - } - else if (IsStoredCompletions && storedCompletions != null) - { - return storedCompletions(StoredCompletions!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? custom = null, - global::System.Action? logs = null, - global::System.Action? storedCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCustom) - { - custom?.Invoke(Custom!); - } - else if (IsLogs) - { - logs?.Invoke(Logs!); - } - else if (IsStoredCompletions) - { - storedCompletions?.Invoke(StoredCompletions!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Custom, - typeof(global::tryAGI.OpenAI.CreateEvalCustomDataSourceConfig), - Logs, - typeof(global::tryAGI.OpenAI.CreateEvalLogsDataSourceConfig), - StoredCompletions, - typeof(global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfig), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(CreateEvalRequestDataSourceConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Logs, other.Logs) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StoredCompletions, other.StoredCompletions) - ; - } - - /// - /// - /// - public static bool operator ==(CreateEvalRequestDataSourceConfig obj1, CreateEvalRequestDataSourceConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(CreateEvalRequestDataSourceConfig obj1, CreateEvalRequestDataSourceConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is CreateEvalRequestDataSourceConfig o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.Json.g.cs deleted file mode 100644 index 69dda29d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalRequestDataSourceConfigDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalRequestDataSourceConfigDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.g.cs deleted file mode 100644 index f43fe1ea..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestDataSourceConfigDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalRequestDataSourceConfigDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalRequestDataSourceConfigDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalRequestDataSourceConfigDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.Json.g.cs deleted file mode 100644 index 8959fd6e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalRequestTestingCriteriaItemDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalRequestTestingCriteriaItemDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.g.cs deleted file mode 100644 index fbf78e3a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRequestTestingCriteriaItemDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalRequestTestingCriteriaItemDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalRequestTestingCriteriaItemDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalRequestTestingCriteriaItemDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSource.g.cs index 31ef7c30..a85c119b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSource.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,17 +11,20 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalResponsesRunDataSource { /// - /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. + /// The type of run data source. Always `responses`.
+ /// Default Value: responses ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_messages")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputMessages2JsonConverter))] - public global::tryAGI.OpenAI.InputMessages2? InputMessages { get; set; } + /// global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType.Responses + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType.Responses; /// - /// The name of the model to use for generating completions (e.g. "o3-mini"). + /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_messages")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? InputMessages { get; set; } /// /// @@ -28,21 +33,18 @@ public sealed partial class CreateEvalResponsesRunDataSource public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParams? SamplingParams { get; set; } /// - /// Determines what populates the `item` namespace in this run's data source. + /// The name of the model to use for generating completions (e.g. "o3-mini"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.Source3JsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.Source3 Source { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// - /// The type of run data source. Always `responses`.
- /// Default Value: responses + /// Determines what populates the `item` namespace in this run's data source. ///
- /// global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType.Responses - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceTypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType.Responses; + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Source { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,35 +55,35 @@ public sealed partial class CreateEvalResponsesRunDataSource /// /// Initializes a new instance of the class. /// + /// + /// The type of run data source. Always `responses`.
+ /// Default Value: responses + /// /// /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. /// + /// /// /// The name of the model to use for generating completions (e.g. "o3-mini"). /// - /// /// /// Determines what populates the `item` namespace in this run's data source. /// - /// - /// The type of run data source. Always `responses`.
- /// Default Value: responses - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalResponsesRunDataSource( - global::tryAGI.OpenAI.Source3 source, - global::tryAGI.OpenAI.InputMessages2? inputMessages, - string? model, + global::tryAGI.OpenAI.OneOf source, + global::tryAGI.OpenAI.OneOf? inputMessages, global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParams? samplingParams, + string? model, global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType type = global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceType.Responses) { this.Source = source; + this.Type = type; this.InputMessages = inputMessages; - this.Model = model; this.SamplingParams = samplingParams; - this.Type = type; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.Json.g.cs deleted file mode 100644 index a89743a1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.g.cs deleted file mode 100644 index aa1e889c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalResponsesRunDataSourceInputMessagesDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalResponsesRunDataSourceInputMessagesDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.Json.g.cs new file mode 100644 index 00000000..5290fb2d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference + { + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.g.cs new file mode 100644 index 00000000..ddede47b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference + { + /// + /// The type of input messages. Always `item_reference`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType Type { get; set; } + + /// + /// A reference to a variable in the `item` namespace. Ie, "item.name" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_reference")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemReference { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of input messages. Always `item_reference`. + /// + /// + /// A reference to a variable in the `item` namespace. Ie, "item.name" + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference( + string itemReference, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType type) + { + this.ItemReference = itemReference ?? throw new global::System.ArgumentNullException(nameof(itemReference)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReference() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs new file mode 100644 index 00000000..3537c89c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of input messages. Always `item_reference`. + /// + public enum CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType + { + /// + /// + /// + ItemReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType value) + { + return value switch + { + CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.ItemReference => "item_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType? ToEnum(string value) + { + return value switch + { + "item_reference" => CreateEvalResponsesRunDataSourceInputMessagesInputMessagesItemReferenceType.ItemReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.Json.g.cs new file mode 100644 index 00000000..bbf29b6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate + { + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.g.cs new file mode 100644 index 00000000..8e741c0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate.g.cs @@ -0,0 +1,60 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate + { + /// + /// The type of input messages. Always `template`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType Type { get; set; } + + /// + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("template")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Template { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of input messages. Always `template`. + /// + /// + /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate( + global::System.Collections.Generic.IList> template, + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType type) + { + this.Template = template ?? throw new global::System.ArgumentNullException(nameof(template)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplate() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.Json.g.cs new file mode 100644 index 00000000..6d1c3537 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem + { + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem; + } + + /// + /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.g.cs new file mode 100644 index 00000000..b0f47464 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem + { + /// + /// The role of the message (e.g. "system", "assistant", "user"). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Role { get; set; } + + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The role of the message (e.g. "system", "assistant", "user"). + /// + /// + /// The content of the message. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem( + string role, + string content) + { + this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTemplateItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs new file mode 100644 index 00000000..9e9eaecb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of input messages. Always `template`. + /// + public enum CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType + { + /// + /// + /// + Template, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType value) + { + return value switch + { + CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.Template => "template", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType? ToEnum(string value) + { + return value switch + { + "template" => CreateEvalResponsesRunDataSourceInputMessagesInputMessagesTemplateType.Template, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.Json.g.cs deleted file mode 100644 index f2b364f1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant1 - { - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.g.cs deleted file mode 100644 index eabbe60c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant1 - { - /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("template")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Template { get; set; } - - /// - /// The type of input messages. Always `template`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A list of chat messages forming the prompt or context. May include variable references to the `item` namespace, ie {{item.name}}. - /// - /// - /// The type of input messages. Always `template`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalResponsesRunDataSourceInputMessagesVariant1( - global::System.Collections.Generic.IList> template, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type type) - { - this.Template = template ?? throw new global::System.ArgumentNullException(nameof(template)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalResponsesRunDataSourceInputMessagesVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.Json.g.cs deleted file mode 100644 index 8a4d15d2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem - { - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.g.cs deleted file mode 100644 index 702eb933..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem - { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// The role of the message (e.g. "system", "assistant", "user"). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The content of the message. - /// - /// - /// The role of the message (e.g. "system", "assistant", "user"). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem( - string content, - string role) - { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalResponsesRunDataSourceInputMessagesVariant1TemplateItem() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs deleted file mode 100644 index d4245610..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of input messages. Always `template`. - /// - public enum CreateEvalResponsesRunDataSourceInputMessagesVariant1Type - { - /// - /// - /// - Template, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateEvalResponsesRunDataSourceInputMessagesVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateEvalResponsesRunDataSourceInputMessagesVariant1Type value) - { - return value switch - { - CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.Template => "template", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateEvalResponsesRunDataSourceInputMessagesVariant1Type? ToEnum(string value) - { - return value switch - { - "template" => CreateEvalResponsesRunDataSourceInputMessagesVariant1Type.Template, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.Json.g.cs deleted file mode 100644 index 69a25d4e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant2 - { - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.g.cs deleted file mode 100644 index 952968d0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalResponsesRunDataSourceInputMessagesVariant2 - { - /// - /// A reference to a variable in the `item` namespace. Ie, "item.name" - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_reference")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemReference { get; set; } - - /// - /// The type of input messages. Always `item_reference`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A reference to a variable in the `item` namespace. Ie, "item.name" - /// - /// - /// The type of input messages. Always `item_reference`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalResponsesRunDataSourceInputMessagesVariant2( - string itemReference, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type type) - { - this.ItemReference = itemReference ?? throw new global::System.ArgumentNullException(nameof(itemReference)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalResponsesRunDataSourceInputMessagesVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs deleted file mode 100644 index 94eb70a3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of input messages. Always `item_reference`. - /// - public enum CreateEvalResponsesRunDataSourceInputMessagesVariant2Type - { - /// - /// - /// - ItemReference, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateEvalResponsesRunDataSourceInputMessagesVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateEvalResponsesRunDataSourceInputMessagesVariant2Type value) - { - return value switch - { - CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.ItemReference => "item_reference", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateEvalResponsesRunDataSourceInputMessagesVariant2Type? ToEnum(string value) - { - return value switch - { - "item_reference" => CreateEvalResponsesRunDataSourceInputMessagesVariant2Type.ItemReference, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParams.g.cs index b94da275..1c03a091 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParams.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParams.g.cs @@ -9,67 +9,61 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalResponsesRunDataSourceSamplingParams { /// - /// The maximum number of tokens in the generated output. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// A higher temperature increases randomness in the outputs.
+ /// Default Value: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// A seed value to initialize the randomness, during sampling.
- /// Default Value: 42 + /// The maximum number of tokens in the generated output. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public int? Seed { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + public int? MaxCompletionTokens { get; set; } /// - /// A higher temperature increases randomness in the outputs.
+ /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
/// Default Value: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } /// - /// Configuration options for a text response from the model. Can be plain
- /// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + /// A seed value to initialize the randomness, during sampling.
+ /// Default Value: 42 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? Text { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } /// /// An array of tools the model may call while generating a response. You
/// can specify which tool to use by setting the `tool_choice` parameter.
/// The two categories of tools you can provide the model are:
/// - **Built-in tools**: Tools that are provided by OpenAI that extend the
- /// model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// model's capabilities, like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search). Learn more about
+ /// [built-in tools](/docs/guides/tools).
/// - **Function calls (custom tools)**: Functions that are defined by you,
/// enabling the model to call your own code. Learn more about
- /// [function calling](https://platform.openai.com/docs/guides/function-calling). + /// [function calling](/docs/guides/function-calling). ///
[global::System.Text.Json.Serialization.JsonPropertyName("tools")] public global::System.Collections.Generic.IList? Tools { get; set; } /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1 + /// Configuration options for a text response from the model. Can be plain
+ /// text or structured JSON data. Learn more:
+ /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) ///
- [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? Text { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -80,66 +74,59 @@ public sealed partial class CreateEvalResponsesRunDataSourceSamplingParams /// /// Initializes a new instance of the class. /// + /// + /// + /// A higher temperature increases randomness in the outputs.
+ /// Default Value: 1 + /// /// /// The maximum number of tokens in the generated output. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
+ /// Default Value: 1 /// /// /// A seed value to initialize the randomness, during sampling.
/// Default Value: 42 /// - /// - /// A higher temperature increases randomness in the outputs.
- /// Default Value: 1 - /// - /// - /// Configuration options for a text response from the model. Can be plain
- /// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) - /// /// /// An array of tools the model may call while generating a response. You
/// can specify which tool to use by setting the `tool_choice` parameter.
/// The two categories of tools you can provide the model are:
/// - **Built-in tools**: Tools that are provided by OpenAI that extend the
- /// model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// model's capabilities, like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search). Learn more about
+ /// [built-in tools](/docs/guides/tools).
/// - **Function calls (custom tools)**: Functions that are defined by you,
/// enabling the model to call your own code. Learn more about
- /// [function calling](https://platform.openai.com/docs/guides/function-calling). + /// [function calling](/docs/guides/function-calling). /// - /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1 + /// + /// Configuration options for a text response from the model. Can be plain
+ /// text or structured JSON data. Learn more:
+ /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalResponsesRunDataSourceSamplingParams( + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + double? temperature, int? maxCompletionTokens, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, + double? topP, int? seed, - double? temperature, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? text, global::System.Collections.Generic.IList? tools, - double? topP) + global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText? text) { - this.MaxCompletionTokens = maxCompletionTokens; this.ReasoningEffort = reasoningEffort; - this.Seed = seed; this.Temperature = temperature; - this.Text = text; - this.Tools = tools; + this.MaxCompletionTokens = maxCompletionTokens; this.TopP = topP; + this.Seed = seed; + this.Tools = tools; + this.Text = text; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParamsText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParamsText.g.cs index 870f2df2..fd10cad5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParamsText.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParamsText.g.cs @@ -6,8 +6,8 @@ namespace tryAGI.OpenAI /// /// Configuration options for a text response from the model. Can be plain
/// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) ///
public sealed partial class CreateEvalResponsesRunDataSourceSamplingParamsText { @@ -15,7 +15,7 @@ public sealed partial class CreateEvalResponsesRunDataSourceSamplingParamsText /// An object specifying the format that the model must output.
/// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
/// which ensures the model will match your supplied JSON schema. Learn more in the
- /// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
+ /// [Structured Outputs guide](/docs/guides/structured-outputs).
/// The default format is `{ "type": "text" }` with no additional options.
/// **Not recommended for gpt-4o and newer models:**
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
@@ -39,7 +39,7 @@ public sealed partial class CreateEvalResponsesRunDataSourceSamplingParamsText /// An object specifying the format that the model must output.
/// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
/// which ensures the model will match your supplied JSON schema. Learn more in the
- /// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
+ /// [Structured Outputs guide](/docs/guides/structured-outputs).
/// The default format is `{ "type": "text" }` with no additional options.
/// **Not recommended for gpt-4o and newer models:**
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.Json.g.cs deleted file mode 100644 index d4a6ffef..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateEvalResponsesRunDataSourceSourceDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceSourceDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.g.cs deleted file mode 100644 index 4450f843..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSourceDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateEvalResponsesRunDataSourceSourceDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateEvalResponsesRunDataSourceSourceDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateEvalResponsesRunDataSourceSourceDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRunRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRunRequest.g.cs index c0b04cd2..ea5fc5d4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRunRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalRunRequest.g.cs @@ -11,28 +11,24 @@ namespace tryAGI.OpenAI public sealed partial class CreateEvalRunRequest { /// - /// Details about the run's data source. + /// The name of the run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data_source")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf DataSource { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// The name of the run. + /// Details about the run's data source. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data_source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf DataSource { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -43,30 +39,24 @@ public sealed partial class CreateEvalRunRequest /// /// Initializes a new instance of the class. /// - /// - /// Details about the run's data source. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the run. /// + /// + /// + /// Details about the run's data source. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateEvalRunRequest( - global::tryAGI.OpenAI.AnyOf dataSource, - global::System.Collections.Generic.Dictionary? metadata, - string? name) + global::tryAGI.OpenAI.OneOf dataSource, + string? name, + global::System.Collections.Generic.Dictionary? metadata) { this.DataSource = dataSource; - this.Metadata = metadata; this.Name = name; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfig.g.cs index 3f8b5dd6..47748332 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfig.g.cs @@ -9,13 +9,6 @@ namespace tryAGI.OpenAI [global::System.Obsolete("This model marked as deprecated.")] public sealed partial class CreateEvalStoredCompletionsDataSourceConfig { - /// - /// Metadata filters for the stored completions data source. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - [global::System.Obsolete("This property marked as deprecated.")] - public object? Metadata { get; set; } - /// /// The type of data source. Always `stored_completions`.
/// Default Value: stored_completions @@ -26,6 +19,21 @@ public sealed partial class CreateEvalStoredCompletionsDataSourceConfig [global::System.Obsolete("This property marked as deprecated.")] public global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType.StoredCompletions; + /// + /// Metadata filters for the stored completions data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } + ///
+ /// + /// {
+ /// "use_case": "customer_support_agent"
+ /// } + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Obsolete("This property marked as deprecated.")] + public object? Metadata { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -35,13 +43,16 @@ public sealed partial class CreateEvalStoredCompletionsDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// Metadata filters for the stored completions data source. - /// /// /// The type of data source. Always `stored_completions`.
/// Default Value: stored_completions /// + /// + /// Metadata filters for the stored completions data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -49,8 +60,8 @@ public CreateEvalStoredCompletionsDataSourceConfig( object? metadata, global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType type = global::tryAGI.OpenAI.CreateEvalStoredCompletionsDataSourceConfigType.StoredCompletions) { - this.Metadata = metadata; this.Type = type; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfigMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfigMetadata.g.cs index b81dfbf6..ee93d350 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfigMetadata.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalStoredCompletionsDataSourceConfigMetadata.g.cs @@ -4,7 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Metadata filters for the stored completions data source. + /// Metadata filters for the stored completions data source.
+ /// Example: {
+ /// "use_case": "customer_support_agent"
+ /// } ///
public sealed partial class CreateEvalStoredCompletionsDataSourceConfigMetadata { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequest.g.cs index ce04770b..5b34dde9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequest.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateFileRequest { - /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.FileExpirationAfter? ExpiresAfter { get; set; } - /// /// The File object (not file name) to be uploaded. /// @@ -29,12 +23,24 @@ public sealed partial class CreateFileRequest public required string Filename { get; set; } /// - /// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets + /// The intended purpose of the uploaded file. One of:
+ /// - `assistants`: Used in the Assistants API
+ /// - `batch`: Used in the Batch API
+ /// - `fine-tune`: Used for fine-tuning
+ /// - `vision`: Images used for vision fine-tuning
+ /// - `user_data`: Flexible file type for any purpose
+ /// - `evals`: Used for eval data sets ///
[global::System.Text.Json.Serialization.JsonPropertyName("purpose")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FilePurposeJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateFileRequestPurposeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FilePurpose Purpose { get; set; } + public required global::tryAGI.OpenAI.CreateFileRequestPurpose Purpose { get; set; } + + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.FileExpirationAfter? ExpiresAfter { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,9 +51,6 @@ public sealed partial class CreateFileRequest /// /// Initializes a new instance of the class. /// - /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The File object (not file name) to be uploaded. /// @@ -55,7 +58,16 @@ public sealed partial class CreateFileRequest /// The File object (not file name) to be uploaded. /// /// - /// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets + /// The intended purpose of the uploaded file. One of:
+ /// - `assistants`: Used in the Assistants API
+ /// - `batch`: Used in the Batch API
+ /// - `fine-tune`: Used for fine-tuning
+ /// - `vision`: Images used for vision fine-tuning
+ /// - `user_data`: Flexible file type for any purpose
+ /// - `evals`: Used for eval data sets + /// + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -63,7 +75,7 @@ public sealed partial class CreateFileRequest public CreateFileRequest( byte[] file, string filename, - global::tryAGI.OpenAI.FilePurpose purpose, + global::tryAGI.OpenAI.CreateFileRequestPurpose purpose, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter) { this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequestPurpose.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequestPurpose.g.cs new file mode 100644 index 00000000..41444f11 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFileRequestPurpose.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The intended purpose of the uploaded file. One of:
+ /// - `assistants`: Used in the Assistants API
+ /// - `batch`: Used in the Batch API
+ /// - `fine-tune`: Used for fine-tuning
+ /// - `vision`: Images used for vision fine-tuning
+ /// - `user_data`: Flexible file type for any purpose
+ /// - `evals`: Used for eval data sets + ///
+ public enum CreateFileRequestPurpose + { + /// + /// Used in the Assistants API + /// + Assistants, + /// + /// Used in the Batch API + /// + Batch, + /// + /// Used for fine-tuning + /// + FineTune, + /// + /// Images used for vision fine-tuning + /// + Vision, + /// + /// Flexible file type for any purpose + /// + UserData, + /// + /// Used for eval data sets + /// + Evals, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateFileRequestPurposeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateFileRequestPurpose value) + { + return value switch + { + CreateFileRequestPurpose.Assistants => "assistants", + CreateFileRequestPurpose.Batch => "batch", + CreateFileRequestPurpose.FineTune => "fine-tune", + CreateFileRequestPurpose.Vision => "vision", + CreateFileRequestPurpose.UserData => "user_data", + CreateFileRequestPurpose.Evals => "evals", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateFileRequestPurpose? ToEnum(string value) + { + return value switch + { + "assistants" => CreateFileRequestPurpose.Assistants, + "batch" => CreateFileRequestPurpose.Batch, + "fine-tune" => CreateFileRequestPurpose.FineTune, + "vision" => CreateFileRequestPurpose.Vision, + "user_data" => CreateFileRequestPurpose.UserData, + "evals" => CreateFileRequestPurpose.Evals, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequest.g.cs index 47bcf624..0af4509f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequest.g.cs @@ -10,39 +10,9 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateFineTuningJobRequest { - /// - /// The hyperparameters used for the fine-tuning job.
- /// This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("hyperparameters")] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparameters? Hyperparameters { get; set; } - - /// - /// A list of integrations to enable for your fine-tuning job. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("integrations")] - public global::System.Collections.Generic.IList? Integrations { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The method used for fine-tuning. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("method")] - public global::tryAGI.OpenAI.FineTuneMethod? Method { get; set; } - /// /// The name of the model to fine-tune. You can select one of the
- /// [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
+ /// [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
/// Example: gpt-4o-mini ///
/// gpt-4o-mini @@ -51,28 +21,12 @@ public sealed partial class CreateFineTuningJobRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.AnyOf Model { get; set; } - /// - /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
- /// If a seed is not specified, one will be generated for you.
- /// Example: 42 - ///
- /// 42 - [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public int? Seed { get; set; } - - /// - /// A string of up to 64 characters that will be added to your fine-tuned model name.
- /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("suffix")] - public string? Suffix { get; set; } - /// /// The ID of an uploaded file that contains training data.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
+ /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.
- /// The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 ///
/// file-abc123 @@ -80,6 +34,22 @@ public sealed partial class CreateFineTuningJobRequest [global::System.Text.Json.Serialization.JsonRequired] public required string TrainingFile { get; set; } + /// + /// The hyperparameters used for the fine-tuning job.
+ /// This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("hyperparameters")] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.CreateFineTuningJobRequestHyperparameters? Hyperparameters { get; set; } + + /// + /// A string of up to 64 characters that will be added to your fine-tuned model name.
+ /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("suffix")] + public string? Suffix { get; set; } + /// /// The ID of an uploaded file that contains validation data.
/// If you provide this file, the data is used to generate validation
@@ -87,13 +57,40 @@ public sealed partial class CreateFineTuningJobRequest /// the fine-tuning results file.
/// The same data should not be present in both train and validation files.
/// Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 ///
/// file-abc123 [global::System.Text.Json.Serialization.JsonPropertyName("validation_file")] public string? ValidationFile { get; set; } + /// + /// A list of integrations to enable for your fine-tuning job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("integrations")] + public global::System.Collections.Generic.IList? Integrations { get; set; } + + /// + /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
+ /// If a seed is not specified, one will be generated for you.
+ /// Example: 42 + ///
+ /// 42 + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// The method used for fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("method")] + public global::tryAGI.OpenAI.FineTuneMethod? Method { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -103,41 +100,24 @@ public sealed partial class CreateFineTuningJobRequest /// /// Initializes a new instance of the class. /// - /// - /// A list of integrations to enable for your fine-tuning job. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The method used for fine-tuning. - /// /// /// The name of the model to fine-tune. You can select one of the
- /// [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
+ /// [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
/// Example: gpt-4o-mini /// - /// - /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
- /// If a seed is not specified, one will be generated for you.
- /// Example: 42 - /// - /// - /// A string of up to 64 characters that will be added to your fine-tuned model name.
- /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`. - /// /// /// The ID of an uploaded file that contains training data.
- /// See [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.
+ /// See [upload file](/docs/api-reference/files/create) for how to upload a file.
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.
- /// The contents of the file should differ depending on if the model uses the [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input), [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](https://platform.openai.com/docs/api-reference/fine-tuning/preference-input) format.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A string of up to 64 characters that will be added to your fine-tuned model name.
+ /// For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// The ID of an uploaded file that contains validation data.
/// If you provide this file, the data is used to generate validation
@@ -145,30 +125,42 @@ public sealed partial class CreateFineTuningJobRequest /// the fine-tuning results file.
/// The same data should not be present in both train and validation files.
/// Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.
- /// See the [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for more details.
+ /// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.
/// Example: file-abc123 /// + /// + /// A list of integrations to enable for your fine-tuning job. + /// + /// + /// The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
+ /// If a seed is not specified, one will be generated for you.
+ /// Example: 42 + /// + /// + /// The method used for fine-tuning. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateFineTuningJobRequest( global::tryAGI.OpenAI.AnyOf model, string trainingFile, + string? suffix, + string? validationFile, global::System.Collections.Generic.IList? integrations, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.FineTuneMethod? method, int? seed, - string? suffix, - string? validationFile) + global::tryAGI.OpenAI.FineTuneMethod? method, + global::System.Collections.Generic.Dictionary? metadata) { this.Model = model; this.TrainingFile = trainingFile ?? throw new global::System.ArgumentNullException(nameof(trainingFile)); - this.Integrations = integrations; - this.Metadata = metadata; - this.Method = method; - this.Seed = seed; this.Suffix = suffix; this.ValidationFile = validationFile; + this.Integrations = integrations; + this.Seed = seed; + this.Method = method; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs index e5a57a31..677d7341 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestHyperparameters.g.cs @@ -18,18 +18,19 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters /// Default Value: auto /// [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.AnyOf? BatchSize { get; set; } + public global::tryAGI.OpenAI.OneOf? BatchSize { get; set; } /// /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
- /// overfitting. + /// overfitting.
+ /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.AnyOf? LearningRateMultiplier { get; set; } + public global::tryAGI.OpenAI.OneOf? LearningRateMultiplier { get; set; } /// /// The number of epochs to train the model for. An epoch refers to one full cycle
@@ -37,9 +38,9 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.AnyOf? NEpochs { get; set; } + public global::tryAGI.OpenAI.OneOf? NEpochs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,7 +58,8 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters /// /// /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
- /// overfitting. + /// overfitting.
+ /// Default Value: auto /// /// /// The number of epochs to train the model for. An epoch refers to one full cycle
@@ -68,9 +70,9 @@ public sealed partial class CreateFineTuningJobRequestHyperparameters [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateFineTuningJobRequestHyperparameters( - global::tryAGI.OpenAI.AnyOf? batchSize, - global::tryAGI.OpenAI.AnyOf? learningRateMultiplier, - global::tryAGI.OpenAI.AnyOf? nEpochs) + global::tryAGI.OpenAI.OneOf? batchSize, + global::tryAGI.OpenAI.OneOf? learningRateMultiplier, + global::tryAGI.OpenAI.OneOf? nEpochs) { this.BatchSize = batchSize; this.LearningRateMultiplier = learningRateMultiplier; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestIntegrationWandb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestIntegrationWandb.g.cs index f6f83c1d..a6fdd138 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestIntegrationWandb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateFineTuningJobRequestIntegrationWandb.g.cs @@ -11,11 +11,13 @@ namespace tryAGI.OpenAI public sealed partial class CreateFineTuningJobRequestIntegrationWandb { /// - /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
- /// like associated with the run. If not set, the default entity for the registered WandB API key is used. + /// The name of the project that the new run will be created under.
+ /// Example: my-wandb-project ///
- [global::System.Text.Json.Serialization.JsonPropertyName("entity")] - public string? Entity { get; set; } + /// my-wandb-project + [global::System.Text.Json.Serialization.JsonPropertyName("project")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Project { get; set; } /// /// A display name to set for the run. If not set, we will use the Job ID as the name. @@ -24,13 +26,11 @@ public sealed partial class CreateFineTuningJobRequestIntegrationWandb public string? Name { get; set; } /// - /// The name of the project that the new run will be created under.
- /// Example: my-wandb-project + /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
+ /// like associated with the run. If not set, the default entity for the registered WandB API key is used. ///
- /// my-wandb-project - [global::System.Text.Json.Serialization.JsonPropertyName("project")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Project { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("entity")] + public string? Entity { get; set; } /// /// A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some
@@ -48,16 +48,16 @@ public sealed partial class CreateFineTuningJobRequestIntegrationWandb /// /// Initializes a new instance of the class. /// - /// - /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
- /// like associated with the run. If not set, the default entity for the registered WandB API key is used. + /// + /// The name of the project that the new run will be created under.
+ /// Example: my-wandb-project /// /// /// A display name to set for the run. If not set, we will use the Job ID as the name. /// - /// - /// The name of the project that the new run will be created under.
- /// Example: my-wandb-project + /// + /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
+ /// like associated with the run. If not set, the default entity for the registered WandB API key is used. /// /// /// A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some
@@ -68,13 +68,13 @@ public sealed partial class CreateFineTuningJobRequestIntegrationWandb #endif public CreateFineTuningJobRequestIntegrationWandb( string project, - string? entity, string? name, + string? entity, global::System.Collections.Generic.IList? tags) { this.Project = project ?? throw new global::System.ArgumentNullException(nameof(project)); - this.Entity = entity; this.Name = name; + this.Entity = entity; this.Tags = tags; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.Json.g.cs new file mode 100644 index 00000000..7518c2a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateGroupBody + { + /// + /// 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::tryAGI.OpenAI.CreateGroupBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateGroupBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateGroupBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateGroupBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateGroupBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateGroupBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.g.cs new file mode 100644 index 00000000..0bcf3f57 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for creating a new group in the organization. + /// + public sealed partial class CreateGroupBody + { + /// + /// Human readable name for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Human readable name for the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateGroupBody( + string name) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateGroupBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.Json.g.cs new file mode 100644 index 00000000..95812848 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateGroupUserBody + { + /// + /// 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::tryAGI.OpenAI.CreateGroupUserBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateGroupUserBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateGroupUserBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateGroupUserBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateGroupUserBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateGroupUserBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.g.cs new file mode 100644 index 00000000..c2f38ed5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateGroupUserBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for adding a user to a group. + /// + public sealed partial class CreateGroupUserBody + { + /// + /// Identifier of the user to add to the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string UserId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the user to add to the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateGroupUserBody( + string userId) + { + this.UserId = userId ?? throw new global::System.ArgumentNullException(nameof(userId)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateGroupUserBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs index 5cbf6d51..36626f80 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequest.g.cs @@ -10,26 +10,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateImageEditRequest { - /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent - ///
- /// transparent - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestBackgroundJsonConverter))] - public global::tryAGI.OpenAI.CreateImageEditRequestBackground? Background { get; set; } - /// /// The image(s) to edit. Must be a supported image file or an array of images.
- /// For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less
- /// than 50MB. You can provide up to 16 images.
- /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
/// `png` file less than 4MB. ///
[global::System.Text.Json.Serialization.JsonPropertyName("image")] @@ -38,14 +24,13 @@ public sealed partial class CreateImageEditRequest public required global::tryAGI.OpenAI.AnyOf> Image { get; set; } /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_fidelity")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageInputFidelityJsonConverter))] - public global::tryAGI.OpenAI.ImageInputFidelity? InputFidelity { get; set; } + /// A cute baby sea otter wearing a beret + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. @@ -60,8 +45,26 @@ public sealed partial class CreateImageEditRequest public string? Maskname { get; set; } /// - /// The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent ///
+ /// transparent + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestBackgroundJsonConverter))] + public global::tryAGI.OpenAI.CreateImageEditRequestBackground? Background { get; set; } + + /// + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 + ///
+ /// gpt-image-1.5 [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] public global::tryAGI.OpenAI.AnyOf? Model { get; set; } @@ -76,19 +79,27 @@ public sealed partial class CreateImageEditRequest public int? N { get; set; } /// - /// The compression level (0-100%) for the generated images. This parameter
- /// is only supported for `gpt-image-1` with the `webp` or `jpeg` output
- /// formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 ///
- /// 100 - [global::System.Text.Json.Serialization.JsonPropertyName("output_compression")] - public int? OutputCompression { get; set; } + /// 1024x1024 + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeJsonConverter))] + public global::tryAGI.OpenAI.CreateImageEditRequestSize? Size { get; set; } + + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url + ///
+ /// url + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatJsonConverter))] + public global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? ResponseFormat { get; set; } /// /// The format in which the generated images are returned. This parameter is
- /// only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// The default value is `png`.
/// Default Value: png
/// Example: png @@ -99,60 +110,33 @@ public sealed partial class CreateImageEditRequest public global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? OutputFormat { get; set; } /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] - public int? PartialImages { get; set; } - - /// - /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
- /// Example: A cute baby sea otter wearing a beret - ///
- /// A cute baby sea otter wearing a beret - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Prompt { get; set; } - - /// - /// The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.
- /// Default Value: auto
- /// Example: high + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 ///
- /// high - [global::System.Text.Json.Serialization.JsonPropertyName("quality")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestQualityJsonConverter))] - public global::tryAGI.OpenAI.CreateImageEditRequestQuality? Quality { get; set; } + /// 100 + [global::System.Text.Json.Serialization.JsonPropertyName("output_compression")] + public int? OutputCompression { get; set; } /// - /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.
- /// Default Value: url
- /// Example: url + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 ///
- /// url - [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestResponseFormatJsonConverter))] - public global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? ResponseFormat { get; set; } + /// user-1234 + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + public string? User { get; set; } /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
- /// Default Value: 1024x1024
- /// Example: 1024x1024 + /// ///
- /// 1024x1024 - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestSizeJsonConverter))] - public global::tryAGI.OpenAI.CreateImageEditRequestSize? Size { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_fidelity")] + public global::tryAGI.OpenAI.InputFidelity? InputFidelity { get; set; } /// - /// Edit the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
+ /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
/// Default Value: false
/// Example: false ///
@@ -161,12 +145,20 @@ public sealed partial class CreateImageEditRequest public bool? Stream { get; set; } /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
- /// Example: user-1234 + /// ///
- /// user-1234 - [global::System.Text.Json.Serialization.JsonPropertyName("user")] - public string? User { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] + public int? PartialImages { get; set; } + + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high + ///
+ /// high + [global::System.Text.Json.Serialization.JsonPropertyName("quality")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageEditRequestQualityJsonConverter))] + public global::tryAGI.OpenAI.CreateImageEditRequestQuality? Quality { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -177,28 +169,17 @@ public sealed partial class CreateImageEditRequest /// /// Initializes a new instance of the class. /// - /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent - /// /// /// The image(s) to edit. Must be a supported image file or an array of images.
- /// For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less
- /// than 50MB. You can provide up to 16 images.
- /// For `dall-e-2`, you can only provide one image, and it should be a square
+ /// For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and `gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg`
+ /// file less than 50MB. You can provide up to 16 images.
+ /// `chatgpt-image-latest` follows the same input constraints as GPT image models.
+ /// For `dall-e-2`, you can only provide one image, and it should be a square
/// `png` file less than 4MB. /// - /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// + /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for the GPT image models.
+ /// Example: A cute baby sea otter wearing a beret /// /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. @@ -206,65 +187,65 @@ public sealed partial class CreateImageEditRequest /// /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// - /// The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. + /// The model to use for image generation. Defaults to `gpt-image-1.5`.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter
- /// is only supported for `gpt-image-1` with the `webp` or `jpeg` output
- /// formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// Default Value: 1024x1024
+ /// Example: 1024x1024 + /// + /// + /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
+ /// Example: url /// /// /// The format in which the generated images are returned. This parameter is
- /// only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// The default value is `png`.
/// Default Value: png
/// Example: png /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
- /// Example: A cute baby sea otter wearing a beret - /// - /// - /// The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.
- /// Default Value: auto
- /// Example: high - /// - /// - /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.
- /// Default Value: url
- /// Example: url + /// + /// The compression level (0-100%) for the generated images. This parameter
+ /// is only supported for the GPT image models with the `webp` or `jpeg` output
+ /// formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
- /// Default Value: 1024x1024
- /// Example: 1024x1024 + /// + /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
+ /// Example: user-1234 /// + /// /// - /// Edit the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
+ /// Edit the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
/// Default Value: false
/// Example: false /// - /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
- /// Example: user-1234 + /// + /// + /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
+ /// Default Value: auto
+ /// Example: high /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -272,37 +253,37 @@ public sealed partial class CreateImageEditRequest public CreateImageEditRequest( global::tryAGI.OpenAI.AnyOf> image, string prompt, - global::tryAGI.OpenAI.CreateImageEditRequestBackground? background, - global::tryAGI.OpenAI.ImageInputFidelity? inputFidelity, byte[]? mask, string? maskname, + global::tryAGI.OpenAI.CreateImageEditRequestBackground? background, global::tryAGI.OpenAI.AnyOf? model, int? n, - int? outputCompression, - global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat, - int? partialImages, - global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality, - global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat, global::tryAGI.OpenAI.CreateImageEditRequestSize? size, + global::tryAGI.OpenAI.CreateImageEditRequestResponseFormat? responseFormat, + global::tryAGI.OpenAI.CreateImageEditRequestOutputFormat? outputFormat, + int? outputCompression, + string? user, + global::tryAGI.OpenAI.InputFidelity? inputFidelity, bool? stream, - string? user) + int? partialImages, + global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality) { this.Image = image; this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); - this.Background = background; - this.InputFidelity = inputFidelity; this.Mask = mask; this.Maskname = maskname; + this.Background = background; this.Model = model; this.N = n; - this.OutputCompression = outputCompression; + this.Size = size; + this.ResponseFormat = responseFormat; this.OutputFormat = outputFormat; + this.OutputCompression = outputCompression; + this.User = user; + this.InputFidelity = inputFidelity; + this.Stream = stream; this.PartialImages = partialImages; this.Quality = quality; - this.ResponseFormat = responseFormat; - this.Size = size; - this.Stream = stream; - this.User = user; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs index de8b3d95..3b0a6006 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestBackground.g.cs @@ -4,11 +4,11 @@ namespace tryAGI.OpenAI { /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
/// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
+ /// If `transparent`, the output format needs to support transparency, so it
/// should be set to either `png` (default value) or `webp`.
/// Default Value: auto
/// Example: transparent diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.Json.g.cs new file mode 100644 index 00000000..2d04819a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateImageEditRequestInputFidelity + { + /// + /// 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::tryAGI.OpenAI.CreateImageEditRequestInputFidelity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateImageEditRequestInputFidelity), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateImageEditRequestInputFidelity; + } + + /// + /// 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::tryAGI.OpenAI.CreateImageEditRequestInputFidelity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateImageEditRequestInputFidelity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateImageEditRequestInputFidelity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.g.cs new file mode 100644 index 00000000..41251074 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestInputFidelity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateImageEditRequestInputFidelity + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestModel.g.cs index e37a5f92..486baf56 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestModel.g.cs @@ -8,6 +8,10 @@ namespace tryAGI.OpenAI ///
public enum CreateImageEditRequestModel { + /// + /// + /// + GptImage15, /// /// /// @@ -16,6 +20,14 @@ public enum CreateImageEditRequestModel /// ///
GptImage1, + /// + /// + /// + GptImage1Mini, + /// + /// + /// + ChatgptImageLatest, } /// @@ -30,8 +42,11 @@ public static string ToValueString(this CreateImageEditRequestModel value) { return value switch { + CreateImageEditRequestModel.GptImage15 => "gpt-image-1.5", CreateImageEditRequestModel.DallE2 => "dall-e-2", CreateImageEditRequestModel.GptImage1 => "gpt-image-1", + CreateImageEditRequestModel.GptImage1Mini => "gpt-image-1-mini", + CreateImageEditRequestModel.ChatgptImageLatest => "chatgpt-image-latest", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +57,11 @@ public static string ToValueString(this CreateImageEditRequestModel value) { return value switch { + "gpt-image-1.5" => CreateImageEditRequestModel.GptImage15, "dall-e-2" => CreateImageEditRequestModel.DallE2, "gpt-image-1" => CreateImageEditRequestModel.GptImage1, + "gpt-image-1-mini" => CreateImageEditRequestModel.GptImage1Mini, + "chatgpt-image-latest" => CreateImageEditRequestModel.ChatgptImageLatest, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs index fb5765e3..ecc70fc3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestOutputFormat.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// /// The format in which the generated images are returned. This parameter is
- /// only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// The default value is `png`.
/// Default Value: png
/// Example: png diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs index 3d62b640..c2adbbbd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestQuality.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The quality of the image that will be generated. `high`, `medium` and `low` are only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality. Defaults to `auto`.
+ /// The quality of the image that will be generated for GPT image models. Defaults to `auto`.
/// Default Value: auto
/// Example: high ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestResponseFormat.g.cs index 85431d13..05517b3d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestResponseFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestResponseFormat.g.cs @@ -4,8 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1` will always return base64-encoded images.
- /// Default Value: url
+ /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for `dall-e-2` (default is `url` for `dall-e-2`), as GPT image models always return base64-encoded images.
/// Example: url ///
public enum CreateImageEditRequestResponseFormat diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestSize.g.cs index 13470129..06101309 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestSize.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageEditRequestSize.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
+ /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
/// Default Value: 1024x1024
/// Example: 1024x1024 ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs index ada6d819..422b33bf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequest.g.cs @@ -11,37 +11,24 @@ namespace tryAGI.OpenAI public sealed partial class CreateImageRequest { /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter ///
- /// transparent - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundJsonConverter))] - public global::tryAGI.OpenAI.CreateImageRequestBackground? Background { get; set; } + /// A cute baby sea otter + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } /// - /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 ///
+ /// gpt-image-1.5 [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] public global::tryAGI.OpenAI.AnyOf? Model { get; set; } - /// - /// Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).
- /// Default Value: auto
- /// Example: low - ///
- /// low - [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationJsonConverter))] - public global::tryAGI.OpenAI.CreateImageRequestModeration? Moderation { get; set; } - /// /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
/// Default Value: 1
@@ -52,50 +39,9 @@ public sealed partial class CreateImageRequest public int? N { get; set; } /// - /// The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 - ///
- /// 100 - [global::System.Text.Json.Serialization.JsonPropertyName("output_compression")] - public int? OutputCompression { get; set; } - - /// - /// The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
- /// Default Value: png
- /// Example: png - ///
- /// png - [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatJsonConverter))] - public global::tryAGI.OpenAI.CreateImageRequestOutputFormat? OutputFormat { get; set; } - - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] - public int? PartialImages { get; set; } - - /// - /// A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
- /// Example: A cute baby sea otter - ///
- /// A cute baby sea otter - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Prompt { get; set; } - - /// - /// The quality of the image that will be generated.
+ /// The quality of the image that will be generated.
/// - `auto` (default value) will automatically select the best quality for the given model.
- /// - `high`, `medium` and `low` are supported for `gpt-image-1`.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
/// - `hd` and `standard` are supported for `dall-e-3`.
/// - `standard` is the only option for `dall-e-2`.
/// Default Value: auto
@@ -107,7 +53,7 @@ public sealed partial class CreateImageRequest public global::tryAGI.OpenAI.CreateImageRequestQuality? Quality { get; set; } /// - /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
+ /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
/// Default Value: url
/// Example: url ///
@@ -117,7 +63,43 @@ public sealed partial class CreateImageRequest public global::tryAGI.OpenAI.CreateImageRequestResponseFormat? ResponseFormat { get; set; } /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + ///
+ /// png + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestOutputFormatJsonConverter))] + public global::tryAGI.OpenAI.CreateImageRequestOutputFormat? OutputFormat { get; set; } + + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 + ///
+ /// 100 + [global::System.Text.Json.Serialization.JsonPropertyName("output_compression")] + public int? OutputCompression { get; set; } + + /// + /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
+ /// Default Value: false
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] + public int? PartialImages { get; set; } + + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
/// Default Value: auto
/// Example: 1024x1024 ///
@@ -127,15 +109,29 @@ public sealed partial class CreateImageRequest public global::tryAGI.OpenAI.CreateImageRequestSize? Size { get; set; } /// - /// Generate the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
- /// This parameter is only supported for `gpt-image-1`.
- /// Default Value: false
- /// Example: false + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low ///
- /// false - [global::System.Text.Json.Serialization.JsonPropertyName("stream")] - public bool? Stream { get; set; } + /// low + [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestModerationJsonConverter))] + public global::tryAGI.OpenAI.CreateImageRequestModeration? Moderation { get; set; } + + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + ///
+ /// transparent + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateImageRequestBackgroundJsonConverter))] + public global::tryAGI.OpenAI.CreateImageRequestBackground? Background { get; set; } /// /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
@@ -148,7 +144,7 @@ public sealed partial class CreateImageRequest public global::tryAGI.OpenAI.CreateImageRequestStyle? Style { get; set; } /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 ///
/// user-1234 @@ -164,85 +160,79 @@ public sealed partial class CreateImageRequest /// /// Initializes a new instance of the class. /// - /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
- /// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
- /// should be set to either `png` (default value) or `webp`.
- /// Default Value: auto
- /// Example: transparent + /// + /// A text description of the desired image(s). The maximum length is 32000 characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
+ /// Example: A cute baby sea otter /// /// - /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or `gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1` is used. - /// - /// - /// Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).
- /// Default Value: auto
- /// Example: low + /// The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to `dall-e-2` unless a parameter specific to the GPT image models is used.
+ /// Default Value: dall-e-2
+ /// Example: gpt-image-1.5 /// /// /// The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
/// Default Value: 1
/// Example: 1 /// - /// - /// The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and defaults to 100.
- /// Default Value: 100
- /// Example: 100 - /// - /// - /// The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
- /// Default Value: png
- /// Example: png - /// - /// - /// The number of partial images to generate. This parameter is used for
- /// streaming responses that return partial images. Value must be between 0 and 3.
- /// When set to 0, the response will be a single image sent in one streaming event.
- /// Note that the final image may be sent before the full number of partial images
- /// are generated if the full image is generated more quickly.
- /// Default Value: 0
- /// Example: 1 - /// - /// - /// A text description of the desired image(s). The maximum length is 32000 characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.
- /// Example: A cute baby sea otter - /// /// - /// The quality of the image that will be generated.
+ /// The quality of the image that will be generated.
/// - `auto` (default value) will automatically select the best quality for the given model.
- /// - `high`, `medium` and `low` are supported for `gpt-image-1`.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
/// - `hd` and `standard` are supported for `dall-e-3`.
/// - `standard` is the only option for `dall-e-2`.
/// Default Value: auto
/// Example: medium /// /// - /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
+ /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
/// Default Value: url
/// Example: url /// - /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
- /// Default Value: auto
- /// Example: 1024x1024 + /// + /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.
+ /// Default Value: 100
+ /// Example: 100 /// /// - /// Generate the image in streaming mode. Defaults to `false`. See the
- /// [Image generation guide](https://platform.openai.com/docs/guides/image-generation) for more information.
- /// This parameter is only supported for `gpt-image-1`.
+ /// Generate the image in streaming mode. Defaults to `false`. See the
+ /// [Image generation guide](/docs/guides/image-generation) for more information.
+ /// This parameter is only supported for the GPT image models.
/// Default Value: false
/// Example: false /// + /// + /// + /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Default Value: auto
+ /// Example: low + /// + /// + /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// model will automatically determine the best background for the image.
+ /// If `transparent`, the output format needs to support transparency, so it
+ /// should be set to either `png` (default value) or `webp`.
+ /// Default Value: auto
+ /// Example: transparent + /// /// /// The style of the generated images. This parameter is only supported for `dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
/// Default Value: vivid
/// Example: vivid /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// #if NET7_0_OR_GREATER @@ -250,32 +240,32 @@ public sealed partial class CreateImageRequest #endif public CreateImageRequest( string prompt, - global::tryAGI.OpenAI.CreateImageRequestBackground? background, global::tryAGI.OpenAI.AnyOf? model, - global::tryAGI.OpenAI.CreateImageRequestModeration? moderation, int? n, - int? outputCompression, - global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat, - int? partialImages, global::tryAGI.OpenAI.CreateImageRequestQuality? quality, global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat, - global::tryAGI.OpenAI.CreateImageRequestSize? size, + global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat, + int? outputCompression, bool? stream, + int? partialImages, + global::tryAGI.OpenAI.CreateImageRequestSize? size, + global::tryAGI.OpenAI.CreateImageRequestModeration? moderation, + global::tryAGI.OpenAI.CreateImageRequestBackground? background, global::tryAGI.OpenAI.CreateImageRequestStyle? style, string? user) { this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); - this.Background = background; this.Model = model; - this.Moderation = moderation; this.N = n; - this.OutputCompression = outputCompression; - this.OutputFormat = outputFormat; - this.PartialImages = partialImages; this.Quality = quality; this.ResponseFormat = responseFormat; - this.Size = size; + this.OutputFormat = outputFormat; + this.OutputCompression = outputCompression; this.Stream = stream; + this.PartialImages = partialImages; + this.Size = size; + this.Moderation = moderation; + this.Background = background; this.Style = style; this.User = user; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs index d1db73f0..1f52a243 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestBackground.g.cs @@ -4,11 +4,11 @@ namespace tryAGI.OpenAI { /// - /// Allows to set transparency for the background of the generated image(s).
- /// This parameter is only supported for `gpt-image-1`. Must be one of
- /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
+ /// Allows to set transparency for the background of the generated image(s).
+ /// This parameter is only supported for the GPT image models. Must be one of
+ /// `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
/// model will automatically determine the best background for the image.
- /// If `transparent`, the output format needs to support transparency, so it
+ /// If `transparent`, the output format needs to support transparency, so it
/// should be set to either `png` (default value) or `webp`.
/// Default Value: auto
/// Example: transparent diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModel.g.cs index 0a2e5b01..1b098489 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModel.g.cs @@ -8,6 +8,10 @@ namespace tryAGI.OpenAI ///
public enum CreateImageRequestModel { + /// + /// + /// + GptImage15, /// /// /// @@ -20,6 +24,10 @@ public enum CreateImageRequestModel /// ///
GptImage1, + /// + /// + /// + GptImage1Mini, } /// @@ -34,9 +42,11 @@ public static string ToValueString(this CreateImageRequestModel value) { return value switch { + CreateImageRequestModel.GptImage15 => "gpt-image-1.5", CreateImageRequestModel.DallE2 => "dall-e-2", CreateImageRequestModel.DallE3 => "dall-e-3", CreateImageRequestModel.GptImage1 => "gpt-image-1", + CreateImageRequestModel.GptImage1Mini => "gpt-image-1-mini", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -47,9 +57,11 @@ public static string ToValueString(this CreateImageRequestModel value) { return value switch { + "gpt-image-1.5" => CreateImageRequestModel.GptImage15, "dall-e-2" => CreateImageRequestModel.DallE2, "dall-e-3" => CreateImageRequestModel.DallE3, "gpt-image-1" => CreateImageRequestModel.GptImage1, + "gpt-image-1-mini" => CreateImageRequestModel.GptImage1Mini, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs index fc6bcaf3..d7e02ca5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestModeration.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` for less restrictive filtering or `auto` (default value).
+ /// Control the content-moderation level for images generated by the GPT image models. Must be either `low` for less restrictive filtering or `auto` (default value).
/// Default Value: auto
/// Example: low ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs index 59e50fad..c17a2df7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestOutputFormat.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The format in which the generated images are returned. This parameter is only supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
+ /// The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
/// Default Value: png
/// Example: png ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs index 0b20218e..39e26556 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestQuality.g.cs @@ -4,9 +4,9 @@ namespace tryAGI.OpenAI { /// - /// The quality of the image that will be generated.
+ /// The quality of the image that will be generated.
/// - `auto` (default value) will automatically select the best quality for the given model.
- /// - `high`, `medium` and `low` are supported for `gpt-image-1`.
+ /// - `high`, `medium` and `low` are supported for the GPT image models.
/// - `hd` and `standard` are supported for `dall-e-3`.
/// - `standard` is the only option for `dall-e-2`.
/// Default Value: auto
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestResponseFormat.g.cs index 3f32cb55..63127c24 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestResponseFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestResponseFormat.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
+ /// The format in which generated images with `dall-e-2` and `dall-e-3` are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported for the GPT image models, which always return base64-encoded images.
/// Default Value: url
/// Example: url ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestSize.g.cs index f33315e2..09114807 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestSize.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageRequestSize.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for `gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
+ /// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
/// Default Value: auto
/// Example: 1024x1024 ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageVariationRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageVariationRequest.g.cs index 5629f725..b390e3ce 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageVariationRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateImageVariationRequest.g.cs @@ -25,8 +25,11 @@ public sealed partial class CreateImageVariationRequest public required string Imagename { get; set; } /// - /// The model to use for image generation. Only `dall-e-2` is supported at this time. + /// The model to use for image generation. Only `dall-e-2` is supported at this time.
+ /// Default Value: dall-e-2
+ /// Example: dall-e-2 ///
+ /// dall-e-2 [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] public global::tryAGI.OpenAI.AnyOf? Model { get; set; } @@ -61,7 +64,7 @@ public sealed partial class CreateImageVariationRequest public global::tryAGI.OpenAI.CreateImageVariationRequestSize? Size { get; set; } /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 ///
/// user-1234 @@ -84,7 +87,9 @@ public sealed partial class CreateImageVariationRequest /// The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. /// /// - /// The model to use for image generation. Only `dall-e-2` is supported at this time. + /// The model to use for image generation. Only `dall-e-2` is supported at this time.
+ /// Default Value: dall-e-2
+ /// Example: dall-e-2 /// /// /// The number of images to generate. Must be between 1 and 10.
@@ -102,7 +107,7 @@ public sealed partial class CreateImageVariationRequest /// Example: 1024x1024 /// /// - /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
+ /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
/// Example: user-1234 /// #if NET7_0_OR_GREATER diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequest.g.cs index 8ea150cd..efea5273 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequest.g.cs @@ -11,38 +11,34 @@ namespace tryAGI.OpenAI public sealed partial class CreateMessageRequest { /// - /// A list of files attached to the message, and the tools they should be added to. + /// The role of the entity that is creating the message. Allowed values include:
+ /// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
+ /// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] - public global::System.Collections.Generic.IList? Attachments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateMessageRequestRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CreateMessageRequestRole Role { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } + public required global::tryAGI.OpenAI.OneOf>> Content { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + public global::System.Collections.Generic.IList? Attachments { get; set; } /// - /// The role of the entity that is creating the message. Allowed values include:
- /// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
- /// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateMessageRequestRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateMessageRequestRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,33 +49,25 @@ public sealed partial class CreateMessageRequest /// /// Initializes a new instance of the class. /// - /// - /// A list of files attached to the message, and the tools they should be added to. - /// - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The role of the entity that is creating the message. Allowed values include:
/// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.
/// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateMessageRequest( - global::tryAGI.OpenAI.AnyOf> content, global::tryAGI.OpenAI.CreateMessageRequestRole role, - global::System.Collections.Generic.IList? attachments, + global::tryAGI.OpenAI.OneOf>> content, + global::System.Collections.Generic.IList? attachments, global::System.Collections.Generic.Dictionary? metadata) { - this.Content = content; this.Role = role; + this.Content = content; this.Attachments = attachments; this.Metadata = metadata; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.Json.g.cs deleted file mode 100644 index ee458131..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateMessageRequestAttachment - { - /// - /// 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::tryAGI.OpenAI.CreateMessageRequestAttachment? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachment), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateMessageRequestAttachment; - } - - /// - /// 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::tryAGI.OpenAI.CreateMessageRequestAttachment? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachment), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateMessageRequestAttachment; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.g.cs deleted file mode 100644 index a39e804f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachment.g.cs +++ /dev/null @@ -1,56 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateMessageRequestAttachment - { - /// - /// The ID of the file to attach to the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - - /// - /// The tools to add this file to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The ID of the file to attach to the message. - /// - /// - /// The tools to add this file to. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateMessageRequestAttachment( - string? fileId, - global::System.Collections.Generic.IList? tools) - { - this.FileId = fileId; - this.Tools = tools; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateMessageRequestAttachment() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.Json.g.cs deleted file mode 100644 index 2563f260..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateMessageRequestAttachmentToolDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateMessageRequestAttachmentToolDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs deleted file mode 100644 index 26a89352..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentToolDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateMessageRequestAttachmentToolDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateMessageRequestAttachmentToolDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateMessageRequestAttachmentToolDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.Json.g.cs new file mode 100644 index 00000000..1b75f32d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateMessageRequestAttachments + { + /// + /// 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::tryAGI.OpenAI.CreateMessageRequestAttachments? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachments), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateMessageRequestAttachments; + } + + /// + /// 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::tryAGI.OpenAI.CreateMessageRequestAttachments? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachments), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateMessageRequestAttachments; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.g.cs new file mode 100644 index 00000000..7c1da80c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachments.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateMessageRequestAttachments + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.Json.g.cs new file mode 100644 index 00000000..612abf95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateMessageRequestAttachmentsVariant1Item + { + /// + /// 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::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item; + } + + /// + /// 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::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateMessageRequestAttachmentsVariant1Item; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.g.cs new file mode 100644 index 00000000..c24c625f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestAttachmentsVariant1Item.g.cs @@ -0,0 +1,58 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateMessageRequestAttachmentsVariant1Item + { + /// + /// The ID of the file to attach to the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + + /// + /// The tools to add this file to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the file to attach to the message. + /// + /// + /// The tools to add this file to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateMessageRequestAttachmentsVariant1Item( + string? fileId, + global::System.Collections.Generic.IList>? tools) + { + this.FileId = fileId; + this.Tools = tools; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateMessageRequestAttachmentsVariant1Item() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.Json.g.cs deleted file mode 100644 index aa53a15c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateMessageRequestContentVariant2ItemDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs deleted file mode 100644 index 21f94535..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateMessageRequestContentVariant2ItemDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateMessageRequestContentVariant2ItemDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateMessageRequestContentVariant2ItemDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateMessageRequestContentVariant2ItemDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponseProperties.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponseProperties.g.cs index 8d78c954..aad62c70 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponseProperties.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModelResponseProperties.g.cs @@ -29,37 +29,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator CreateModelResponseProperties(global::tryAGI.OpenAI.ModelResponseProperties value) => new CreateModelResponseProperties((global::tryAGI.OpenAI.ModelResponseProperties?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ModelResponseProperties?(CreateModelResponseProperties @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public CreateModelResponseProperties(global::tryAGI.OpenAI.ModelResponseProperties? value) - { - Value1 = value; - } + public static implicit operator CreateModelResponseProperties(global::tryAGI.OpenAI.ModelResponseProperties value) => new CreateModelResponseProperties((global::tryAGI.OpenAI.ModelResponseProperties?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CreateModelResponsePropertiesVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ModelResponseProperties?(CreateModelResponseProperties @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public CreateModelResponseProperties(global::tryAGI.OpenAI.ModelResponseProperties? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequest.g.cs index 14fff0a2..2ba76314 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequest.g.cs @@ -15,15 +15,18 @@ public sealed partial class CreateModerationRequest /// an array of multi-modal input objects similar to other models. /// [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, global::System.Collections.Generic.IList>>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList> Input { get; set; } + public required global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList>> Input { get; set; } /// /// The content moderation model you would like to use. Learn more in
- /// [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about
- /// available models [here](https://platform.openai.com/docs/models#moderation). + /// [the moderation guide](/docs/guides/moderation), and learn about
+ /// available models [here](/docs/models#moderation).
+ /// Default Value: omni-moderation-latest
+ /// Example: omni-moderation-2024-09-26 ///
+ /// omni-moderation-2024-09-26 [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] public global::tryAGI.OpenAI.AnyOf? Model { get; set; } @@ -43,14 +46,16 @@ public sealed partial class CreateModerationRequest /// /// /// The content moderation model you would like to use. Learn more in
- /// [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about
- /// available models [here](https://platform.openai.com/docs/models#moderation). + /// [the moderation guide](/docs/guides/moderation), and learn about
+ /// available models [here](/docs/models#moderation).
+ /// Default Value: omni-moderation-latest
+ /// Example: omni-moderation-2024-09-26 /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateModerationRequest( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf? model) { this.Input = input; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.Json.g.cs deleted file mode 100644 index 46c464b7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateModerationRequestInputVariant3ItemDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs deleted file mode 100644 index dfd4a45b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateModerationRequestInputVariant3ItemDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateModerationRequestInputVariant3ItemDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateModerationRequestInputVariant3ItemDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.Json.g.cs new file mode 100644 index 00000000..526e66aa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateModerationRequestInputVariant3ItemVariant1 + { + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1; + } + + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.g.cs new file mode 100644 index 00000000..95dd0025 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An object describing an image to classify. + /// + public sealed partial class CreateModerationRequestInputVariant3ItemVariant1 + { + /// + /// Always `image_url`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant1TypeJsonConverter))] + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type Type { get; set; } + + /// + /// Contains either an image URL or a data URL for a base64 encoded image. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl ImageUrl { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `image_url`. + /// + /// + /// Contains either an image URL or a data URL for a base64 encoded image. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModerationRequestInputVariant3ItemVariant1( + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl imageUrl, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type type) + { + this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModerationRequestInputVariant3ItemVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.Json.g.cs new file mode 100644 index 00000000..437968f1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateModerationRequestInputVariant3ItemVariant1ImageUrl + { + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl; + } + + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.g.cs new file mode 100644 index 00000000..da212810 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1ImageUrl.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Contains either an image URL or a data URL for a base64 encoded image. + /// + public sealed partial class CreateModerationRequestInputVariant3ItemVariant1ImageUrl + { + /// + /// Either a URL of the image or the base64 encoded image data.
+ /// Example: https://example.com/image.jpg + ///
+ /// https://example.com/image.jpg + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Either a URL of the image or the base64 encoded image data.
+ /// Example: https://example.com/image.jpg + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModerationRequestInputVariant3ItemVariant1ImageUrl( + string url) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModerationRequestInputVariant3ItemVariant1ImageUrl() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs new file mode 100644 index 00000000..5f32cdc4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant1Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `image_url`. + /// + public enum CreateModerationRequestInputVariant3ItemVariant1Type + { + /// + /// + /// + ImageUrl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateModerationRequestInputVariant3ItemVariant1TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateModerationRequestInputVariant3ItemVariant1Type value) + { + return value switch + { + CreateModerationRequestInputVariant3ItemVariant1Type.ImageUrl => "image_url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateModerationRequestInputVariant3ItemVariant1Type? ToEnum(string value) + { + return value switch + { + "image_url" => CreateModerationRequestInputVariant3ItemVariant1Type.ImageUrl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.Json.g.cs new file mode 100644 index 00000000..ea15e222 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateModerationRequestInputVariant3ItemVariant2 + { + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2; + } + + /// + /// 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::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.g.cs new file mode 100644 index 00000000..77676ab5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An object describing text to classify. + /// + public sealed partial class CreateModerationRequestInputVariant3ItemVariant2 + { + /// + /// Always `text`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateModerationRequestInputVariant3ItemVariant2TypeJsonConverter))] + public global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type Type { get; set; } + + /// + /// A string of text to classify.
+ /// Example: I want to kill them + ///
+ /// I want to kill them + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `text`. + /// + /// + /// A string of text to classify.
+ /// Example: I want to kill them + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModerationRequestInputVariant3ItemVariant2( + string text, + global::tryAGI.OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type type) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModerationRequestInputVariant3ItemVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs new file mode 100644 index 00000000..ea1bdd53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationRequestInputVariant3ItemVariant2Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `text`. + /// + public enum CreateModerationRequestInputVariant3ItemVariant2Type + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateModerationRequestInputVariant3ItemVariant2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateModerationRequestInputVariant3ItemVariant2Type value) + { + return value switch + { + CreateModerationRequestInputVariant3ItemVariant2Type.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateModerationRequestInputVariant3ItemVariant2Type? ToEnum(string value) + { + return value switch + { + "text" => CreateModerationRequestInputVariant3ItemVariant2Type.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResult.g.cs index eaee2030..a4eb35c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResult.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class CreateModerationResponseResult { /// - /// A list of the categories, and whether they are flagged or not. + /// Whether any of the below categories are flagged. /// - [global::System.Text.Json.Serialization.JsonPropertyName("categories")] + [global::System.Text.Json.Serialization.JsonPropertyName("flagged")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateModerationResponseResultCategories Categories { get; set; } + public required bool Flagged { get; set; } /// - /// A list of the categories along with the input type(s) that the score applies to. + /// A list of the categories, and whether they are flagged or not. /// - [global::System.Text.Json.Serialization.JsonPropertyName("category_applied_input_types")] + [global::System.Text.Json.Serialization.JsonPropertyName("categories")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes CategoryAppliedInputTypes { get; set; } + public required global::tryAGI.OpenAI.CreateModerationResponseResultCategories Categories { get; set; } /// /// A list of the categories along with their scores as predicted by model. @@ -30,11 +30,11 @@ public sealed partial class CreateModerationResponseResult public required global::tryAGI.OpenAI.CreateModerationResponseResultCategoryScores CategoryScores { get; set; } /// - /// Whether any of the below categories are flagged. + /// A list of the categories along with the input type(s) that the score applies to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("flagged")] + [global::System.Text.Json.Serialization.JsonPropertyName("category_applied_input_types")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Flagged { get; set; } + public required global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes CategoryAppliedInputTypes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,31 +45,31 @@ public sealed partial class CreateModerationResponseResult /// /// Initializes a new instance of the class. /// + /// + /// Whether any of the below categories are flagged. + /// /// /// A list of the categories, and whether they are flagged or not. /// - /// - /// A list of the categories along with the input type(s) that the score applies to. - /// /// /// A list of the categories along with their scores as predicted by model. /// - /// - /// Whether any of the below categories are flagged. + /// + /// A list of the categories along with the input type(s) that the score applies to. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateModerationResponseResult( + bool flagged, global::tryAGI.OpenAI.CreateModerationResponseResultCategories categories, - global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes categoryAppliedInputTypes, global::tryAGI.OpenAI.CreateModerationResponseResultCategoryScores categoryScores, - bool flagged) + global::tryAGI.OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes categoryAppliedInputTypes) { + this.Flagged = flagged; this.Categories = categories ?? throw new global::System.ArgumentNullException(nameof(categories)); - this.CategoryAppliedInputTypes = categoryAppliedInputTypes ?? throw new global::System.ArgumentNullException(nameof(categoryAppliedInputTypes)); this.CategoryScores = categoryScores ?? throw new global::System.ArgumentNullException(nameof(categoryScores)); - this.Flagged = flagged; + this.CategoryAppliedInputTypes = categoryAppliedInputTypes ?? throw new global::System.ArgumentNullException(nameof(categoryAppliedInputTypes)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategories.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategories.g.cs index 2a8850d1..09a23f8a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategories.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategories.g.cs @@ -9,42 +9,42 @@ namespace tryAGI.OpenAI public sealed partial class CreateModerationResponseResultCategories { /// - /// Content that expresses, incites, or promotes harassing language towards any target. + /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Harassment { get; set; } + public required bool Hate { get; set; } /// - /// Harassment content that also includes violence or serious harm towards any target. + /// Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HarassmentThreatening { get; set; } + public required bool HateThreatening { get; set; } /// - /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. + /// Content that expresses, incites, or promotes harassing language towards any target. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Hate { get; set; } + public required bool Harassment { get; set; } /// - /// Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. + /// Harassment content that also includes violence or serious harm towards any target. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HateThreatening { get; set; } + public required bool HarassmentThreatening { get; set; } /// - /// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("illicit")] [global::System.Text.Json.Serialization.JsonRequired] public required bool? Illicit { get; set; } /// - /// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("illicit/violent")] [global::System.Text.Json.Serialization.JsonRequired] @@ -58,18 +58,18 @@ public sealed partial class CreateModerationResponseResultCategories public required bool SelfHarm { get; set; } /// - /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. + /// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool SelfHarmInstructions { get; set; } + public required bool SelfHarmIntent { get; set; } /// - /// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. + /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool SelfHarmIntent { get; set; } + public required bool SelfHarmInstructions { get; set; } /// /// Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). @@ -108,33 +108,29 @@ public sealed partial class CreateModerationResponseResultCategories /// /// Initializes a new instance of the class. /// - /// - /// Content that expresses, incites, or promotes harassing language towards any target. - /// - /// - /// Harassment content that also includes violence or serious harm towards any target. - /// /// /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. /// /// /// Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. /// - /// - /// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category. + /// + /// Content that expresses, incites, or promotes harassing language towards any target. /// - /// - /// Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon. + /// + /// Harassment content that also includes violence or serious harm towards any target. /// + /// + /// /// /// Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. /// - /// - /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. - /// /// /// Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. /// + /// + /// Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. + /// /// /// Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). /// @@ -151,29 +147,29 @@ public sealed partial class CreateModerationResponseResultCategories [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateModerationResponseResultCategories( - bool harassment, - bool harassmentThreatening, bool hate, bool hateThreatening, + bool harassment, + bool harassmentThreatening, bool? illicit, bool? illicitViolent, bool selfHarm, - bool selfHarmInstructions, bool selfHarmIntent, + bool selfHarmInstructions, bool sexual, bool sexualMinors, bool violence, bool violenceGraphic) { - this.Harassment = harassment; - this.HarassmentThreatening = harassmentThreatening; this.Hate = hate; this.HateThreatening = hateThreatening; - this.Illicit = illicit; - this.IllicitViolent = illicitViolent; + this.Harassment = harassment; + this.HarassmentThreatening = harassmentThreatening; + this.Illicit = illicit ?? throw new global::System.ArgumentNullException(nameof(illicit)); + this.IllicitViolent = illicitViolent ?? throw new global::System.ArgumentNullException(nameof(illicitViolent)); this.SelfHarm = selfHarm; - this.SelfHarmInstructions = selfHarmInstructions; this.SelfHarmIntent = selfHarmIntent; + this.SelfHarmInstructions = selfHarmInstructions; this.Sexual = sexual; this.SexualMinors = sexualMinors; this.Violence = violence; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.Json.g.cs new file mode 100644 index 00000000..d0da7e97 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateModerationResponseResultCategoriesIllicit + { + /// + /// 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::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit; + } + + /// + /// 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::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicit; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.g.cs new file mode 100644 index 00000000..462dcfdf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicit.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateModerationResponseResultCategoriesIllicit + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.Json.g.cs new file mode 100644 index 00000000..e15849ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateModerationResponseResultCategoriesIllicitViolent + { + /// + /// 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::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent; + } + + /// + /// 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::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateModerationResponseResultCategoriesIllicitViolent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.g.cs new file mode 100644 index 00000000..b4ff234c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoriesIllicitViolent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateModerationResponseResultCategoriesIllicitViolent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryAppliedInputTypes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryAppliedInputTypes.g.cs index 61242435..5a5cdaf0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryAppliedInputTypes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryAppliedInputTypes.g.cs @@ -9,32 +9,32 @@ namespace tryAGI.OpenAI public sealed partial class CreateModerationResponseResultCategoryAppliedInputTypes { /// - /// The applied input type(s) for the category 'harassment'. + /// The applied input type(s) for the category 'hate'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Harassment { get; set; } + public required global::System.Collections.Generic.IList Hate { get; set; } /// - /// The applied input type(s) for the category 'harassment/threatening'. + /// The applied input type(s) for the category 'hate/threatening'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList HarassmentThreatening { get; set; } + public required global::System.Collections.Generic.IList HateThreatening { get; set; } /// - /// The applied input type(s) for the category 'hate'. + /// The applied input type(s) for the category 'harassment'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Hate { get; set; } + public required global::System.Collections.Generic.IList Harassment { get; set; } /// - /// The applied input type(s) for the category 'hate/threatening'. + /// The applied input type(s) for the category 'harassment/threatening'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList HateThreatening { get; set; } + public required global::System.Collections.Generic.IList HarassmentThreatening { get; set; } /// /// The applied input type(s) for the category 'illicit'. @@ -58,18 +58,18 @@ public sealed partial class CreateModerationResponseResultCategoryAppliedInputTy public required global::System.Collections.Generic.IList SelfHarm { get; set; } /// - /// The applied input type(s) for the category 'self-harm/instructions'. + /// The applied input type(s) for the category 'self-harm/intent'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList SelfHarmInstructions { get; set; } + public required global::System.Collections.Generic.IList SelfHarmIntent { get; set; } /// - /// The applied input type(s) for the category 'self-harm/intent'. + /// The applied input type(s) for the category 'self-harm/instructions'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList SelfHarmIntent { get; set; } + public required global::System.Collections.Generic.IList SelfHarmInstructions { get; set; } /// /// The applied input type(s) for the category 'sexual'. @@ -108,18 +108,18 @@ public sealed partial class CreateModerationResponseResultCategoryAppliedInputTy /// /// Initializes a new instance of the class. /// - /// - /// The applied input type(s) for the category 'harassment'. - /// - /// - /// The applied input type(s) for the category 'harassment/threatening'. - /// /// /// The applied input type(s) for the category 'hate'. /// /// /// The applied input type(s) for the category 'hate/threatening'. /// + /// + /// The applied input type(s) for the category 'harassment'. + /// + /// + /// The applied input type(s) for the category 'harassment/threatening'. + /// /// /// The applied input type(s) for the category 'illicit'. /// @@ -129,12 +129,12 @@ public sealed partial class CreateModerationResponseResultCategoryAppliedInputTy /// /// The applied input type(s) for the category 'self-harm'. /// - /// - /// The applied input type(s) for the category 'self-harm/instructions'. - /// /// /// The applied input type(s) for the category 'self-harm/intent'. /// + /// + /// The applied input type(s) for the category 'self-harm/instructions'. + /// /// /// The applied input type(s) for the category 'sexual'. /// @@ -151,29 +151,29 @@ public sealed partial class CreateModerationResponseResultCategoryAppliedInputTy [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateModerationResponseResultCategoryAppliedInputTypes( - global::System.Collections.Generic.IList harassment, - global::System.Collections.Generic.IList harassmentThreatening, global::System.Collections.Generic.IList hate, global::System.Collections.Generic.IList hateThreatening, + global::System.Collections.Generic.IList harassment, + global::System.Collections.Generic.IList harassmentThreatening, global::System.Collections.Generic.IList illicit, global::System.Collections.Generic.IList illicitViolent, global::System.Collections.Generic.IList selfHarm, - global::System.Collections.Generic.IList selfHarmInstructions, global::System.Collections.Generic.IList selfHarmIntent, + global::System.Collections.Generic.IList selfHarmInstructions, global::System.Collections.Generic.IList sexual, global::System.Collections.Generic.IList sexualMinors, global::System.Collections.Generic.IList violence, global::System.Collections.Generic.IList violenceGraphic) { - this.Harassment = harassment ?? throw new global::System.ArgumentNullException(nameof(harassment)); - this.HarassmentThreatening = harassmentThreatening ?? throw new global::System.ArgumentNullException(nameof(harassmentThreatening)); this.Hate = hate ?? throw new global::System.ArgumentNullException(nameof(hate)); this.HateThreatening = hateThreatening ?? throw new global::System.ArgumentNullException(nameof(hateThreatening)); + this.Harassment = harassment ?? throw new global::System.ArgumentNullException(nameof(harassment)); + this.HarassmentThreatening = harassmentThreatening ?? throw new global::System.ArgumentNullException(nameof(harassmentThreatening)); this.Illicit = illicit ?? throw new global::System.ArgumentNullException(nameof(illicit)); this.IllicitViolent = illicitViolent ?? throw new global::System.ArgumentNullException(nameof(illicitViolent)); this.SelfHarm = selfHarm ?? throw new global::System.ArgumentNullException(nameof(selfHarm)); - this.SelfHarmInstructions = selfHarmInstructions ?? throw new global::System.ArgumentNullException(nameof(selfHarmInstructions)); this.SelfHarmIntent = selfHarmIntent ?? throw new global::System.ArgumentNullException(nameof(selfHarmIntent)); + this.SelfHarmInstructions = selfHarmInstructions ?? throw new global::System.ArgumentNullException(nameof(selfHarmInstructions)); this.Sexual = sexual ?? throw new global::System.ArgumentNullException(nameof(sexual)); this.SexualMinors = sexualMinors ?? throw new global::System.ArgumentNullException(nameof(sexualMinors)); this.Violence = violence ?? throw new global::System.ArgumentNullException(nameof(violence)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryScores.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryScores.g.cs index b6e542d6..a0d7c3fe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryScores.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateModerationResponseResultCategoryScores.g.cs @@ -9,32 +9,32 @@ namespace tryAGI.OpenAI public sealed partial class CreateModerationResponseResultCategoryScores { /// - /// The score for the category 'harassment'. + /// The score for the category 'hate'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate")] [global::System.Text.Json.Serialization.JsonRequired] - public required double Harassment { get; set; } + public required double Hate { get; set; } /// - /// The score for the category 'harassment/threatening'. + /// The score for the category 'hate/threatening'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required double HarassmentThreatening { get; set; } + public required double HateThreatening { get; set; } /// - /// The score for the category 'hate'. + /// The score for the category 'harassment'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment")] [global::System.Text.Json.Serialization.JsonRequired] - public required double Hate { get; set; } + public required double Harassment { get; set; } /// - /// The score for the category 'hate/threatening'. + /// The score for the category 'harassment/threatening'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("hate/threatening")] + [global::System.Text.Json.Serialization.JsonPropertyName("harassment/threatening")] [global::System.Text.Json.Serialization.JsonRequired] - public required double HateThreatening { get; set; } + public required double HarassmentThreatening { get; set; } /// /// The score for the category 'illicit'. @@ -58,18 +58,18 @@ public sealed partial class CreateModerationResponseResultCategoryScores public required double SelfHarm { get; set; } /// - /// The score for the category 'self-harm/instructions'. + /// The score for the category 'self-harm/intent'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] [global::System.Text.Json.Serialization.JsonRequired] - public required double SelfHarmInstructions { get; set; } + public required double SelfHarmIntent { get; set; } /// - /// The score for the category 'self-harm/intent'. + /// The score for the category 'self-harm/instructions'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/intent")] + [global::System.Text.Json.Serialization.JsonPropertyName("self-harm/instructions")] [global::System.Text.Json.Serialization.JsonRequired] - public required double SelfHarmIntent { get; set; } + public required double SelfHarmInstructions { get; set; } /// /// The score for the category 'sexual'. @@ -108,18 +108,18 @@ public sealed partial class CreateModerationResponseResultCategoryScores /// /// Initializes a new instance of the class. /// - /// - /// The score for the category 'harassment'. - /// - /// - /// The score for the category 'harassment/threatening'. - /// /// /// The score for the category 'hate'. /// /// /// The score for the category 'hate/threatening'. /// + /// + /// The score for the category 'harassment'. + /// + /// + /// The score for the category 'harassment/threatening'. + /// /// /// The score for the category 'illicit'. /// @@ -129,12 +129,12 @@ public sealed partial class CreateModerationResponseResultCategoryScores /// /// The score for the category 'self-harm'. /// - /// - /// The score for the category 'self-harm/instructions'. - /// /// /// The score for the category 'self-harm/intent'. /// + /// + /// The score for the category 'self-harm/instructions'. + /// /// /// The score for the category 'sexual'. /// @@ -151,29 +151,29 @@ public sealed partial class CreateModerationResponseResultCategoryScores [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateModerationResponseResultCategoryScores( - double harassment, - double harassmentThreatening, double hate, double hateThreatening, + double harassment, + double harassmentThreatening, double illicit, double illicitViolent, double selfHarm, - double selfHarmInstructions, double selfHarmIntent, + double selfHarmInstructions, double sexual, double sexualMinors, double violence, double violenceGraphic) { - this.Harassment = harassment; - this.HarassmentThreatening = harassmentThreatening; this.Hate = hate; this.HateThreatening = hateThreatening; + this.Harassment = harassment; + this.HarassmentThreatening = harassmentThreatening; this.Illicit = illicit; this.IllicitViolent = illicitViolent; this.SelfHarm = selfHarm; - this.SelfHarmInstructions = selfHarmInstructions; this.SelfHarmIntent = selfHarmIntent; + this.SelfHarmInstructions = selfHarmInstructions; this.Sexual = sexual; this.SexualMinors = sexualMinors; this.Violence = violence; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponse.g.cs index a20c1674..30efc39d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponse.g.cs @@ -29,72 +29,71 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator CreateResponse(global::tryAGI.OpenAI.CreateModelResponseProperties value) => new CreateResponse((global::tryAGI.OpenAI.CreateModelResponseProperties?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateModelResponseProperties?(CreateResponse @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; } +#endif /// /// /// - public CreateResponse(global::tryAGI.OpenAI.CreateModelResponseProperties? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; init; } + public global::tryAGI.OpenAI.CreateResponseVariant3? Value3 { get; init; } #else - public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; } + public global::tryAGI.OpenAI.CreateResponseVariant3? Value3 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsValue3 => Value3 != null; /// /// /// - public static implicit operator CreateResponse(global::tryAGI.OpenAI.ResponseProperties value) => new CreateResponse((global::tryAGI.OpenAI.ResponseProperties?)value); + public static implicit operator CreateResponse(global::tryAGI.OpenAI.CreateModelResponseProperties value) => new CreateResponse((global::tryAGI.OpenAI.CreateModelResponseProperties?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseProperties?(CreateResponse @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.CreateModelResponseProperties?(CreateResponse @this) => @this.Value1; /// /// /// - public CreateResponse(global::tryAGI.OpenAI.ResponseProperties? value) + public CreateResponse(global::tryAGI.OpenAI.CreateModelResponseProperties? value) { - Value2 = value; + Value1 = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateResponseVariant3? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.CreateResponseVariant3? Value3 { get; } -#endif + public static implicit operator CreateResponse(global::tryAGI.OpenAI.ResponseProperties value) => new CreateResponse((global::tryAGI.OpenAI.ResponseProperties?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.ResponseProperties?(CreateResponse @this) => @this.Value2; + + /// + /// + /// + public CreateResponse(global::tryAGI.OpenAI.ResponseProperties? value) + { + Value2 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3.g.cs index c7d1bec8..15ca5db2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace tryAGI.OpenAI @@ -10,84 +8,66 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateResponseVariant3 { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - public object? Conversation { get; set; } - - /// - /// Specify additional output data to include in the model response. Currently
- /// supported values are:
- /// - `web_search_call.action.sources`: Include the sources of the web search tool call.
- /// - `code_interpreter_call.outputs`: Includes the outputs of python code execution
- /// in code interpreter tool call items.
- /// - `computer_call_output.output.image_url`: Include image urls from the computer call output.
- /// - `file_search_call.results`: Include the search results of
- /// the file search tool call.
- /// - `message.input_image.image_url`: Include image urls from the input message.
- /// - `message.output_text.logprobs`: Include logprobs with assistant messages.
- /// - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
- /// tokens in reasoning item outputs. This enables reasoning items to be used in
- /// multi-turn conversations when using the Responses API statelessly (like
- /// when the `store` parameter is set to `false`, or when an organization is
- /// enrolled in the zero data retention program). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } - /// /// Text, image, or file inputs to the model, used to generate a response.
/// Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Image inputs](https://platform.openai.com/docs/guides/images)
- /// - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
- /// - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
- /// - [Function calling](https://platform.openai.com/docs/guides/function-calling) + /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Image inputs](/docs/guides/images)
+ /// - [File inputs](/docs/guides/pdf-files)
+ /// - [Conversation state](/docs/guides/conversation-state)
+ /// - [Function calling](/docs/guides/function-calling) ///
[global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] - public global::tryAGI.OpenAI.AnyOf>? Input { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputParamJsonConverter))] + public global::tryAGI.OpenAI.InputParam? Input { get; set; } /// - /// A system (or developer) message inserted into the model's context.
- /// When using along with `previous_response_id`, the instructions from a previous
- /// response will not be carried over to the next response. This makes it simple
- /// to swap out system (or developer) messages in new responses. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } /// - /// Whether to allow the model to run tool calls in parallel.
- /// Default Value: true + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] public bool? ParallelToolCalls { get; set; } /// - /// Whether to store the generated model response for later retrieval via
- /// API.
- /// Default Value: true + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("store")] public bool? Store { get; set; } /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
- /// for more information.
- /// Default Value: false + /// + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("stream")] public bool? Stream { get; set; } /// - /// Options for streaming responses. Only set this when you set `stream: true`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("stream_options")] - public global::tryAGI.OpenAI.ResponseStreamOptions? StreamOptions { get; set; } + public global::tryAGI.OpenAI.ResponseStreamOptionsVariant1? StreamOptions { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + public global::tryAGI.OpenAI.ConversationParam? Conversation { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("context_management")] + public global::System.Collections.Generic.IList? ContextManagement { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -98,79 +78,46 @@ public sealed partial class CreateResponseVariant3 /// /// Initializes a new instance of the class. /// - /// - /// - /// Specify additional output data to include in the model response. Currently
- /// supported values are:
- /// - `web_search_call.action.sources`: Include the sources of the web search tool call.
- /// - `code_interpreter_call.outputs`: Includes the outputs of python code execution
- /// in code interpreter tool call items.
- /// - `computer_call_output.output.image_url`: Include image urls from the computer call output.
- /// - `file_search_call.results`: Include the search results of
- /// the file search tool call.
- /// - `message.input_image.image_url`: Include image urls from the input message.
- /// - `message.output_text.logprobs`: Include logprobs with assistant messages.
- /// - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
- /// tokens in reasoning item outputs. This enables reasoning items to be used in
- /// multi-turn conversations when using the Responses API statelessly (like
- /// when the `store` parameter is set to `false`, or when an organization is
- /// enrolled in the zero data retention program). - /// /// /// Text, image, or file inputs to the model, used to generate a response.
/// Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Image inputs](https://platform.openai.com/docs/guides/images)
- /// - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
- /// - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
- /// - [Function calling](https://platform.openai.com/docs/guides/function-calling) - /// - /// - /// A system (or developer) message inserted into the model's context.
- /// When using along with `previous_response_id`, the instructions from a previous
- /// response will not be carried over to the next response. This makes it simple
- /// to swap out system (or developer) messages in new responses. - /// - /// - /// Whether to allow the model to run tool calls in parallel.
- /// Default Value: true - /// - /// - /// Whether to store the generated model response for later retrieval via
- /// API.
- /// Default Value: true - /// - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
- /// for more information.
- /// Default Value: false - /// - /// - /// Options for streaming responses. Only set this when you set `stream: true`. + /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Image inputs](/docs/guides/images)
+ /// - [File inputs](/docs/guides/pdf-files)
+ /// - [Conversation state](/docs/guides/conversation-state)
+ /// - [Function calling](/docs/guides/function-calling) /// + /// + /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateResponseVariant3( - object? conversation, - global::System.Collections.Generic.IList? include, - global::tryAGI.OpenAI.AnyOf>? input, - string? instructions, + global::tryAGI.OpenAI.InputParam? input, + global::System.Collections.Generic.IList? include, bool? parallelToolCalls, bool? store, + string? instructions, bool? stream, - global::tryAGI.OpenAI.ResponseStreamOptions? streamOptions) + global::tryAGI.OpenAI.ResponseStreamOptionsVariant1? streamOptions, + global::tryAGI.OpenAI.ConversationParam? conversation, + global::System.Collections.Generic.IList? contextManagement) { - this.Conversation = conversation; - this.Include = include; this.Input = input; - this.Instructions = instructions; + this.Include = include; this.ParallelToolCalls = parallelToolCalls; this.Store = store; + this.Instructions = instructions; this.Stream = stream; this.StreamOptions = streamOptions; + this.Conversation = conversation; + this.ContextManagement = contextManagement; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.Json.g.cs new file mode 100644 index 00000000..dc4c2f0f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3ContextManagement + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3ContextManagement? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3ContextManagement), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3ContextManagement; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3ContextManagement? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3ContextManagement), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3ContextManagement; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.g.cs new file mode 100644 index 00000000..7c5d3561 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ContextManagement.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3ContextManagement + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.Json.g.cs new file mode 100644 index 00000000..822d78f5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3Conversation + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Conversation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Conversation), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3Conversation; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Conversation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Conversation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3Conversation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.g.cs new file mode 100644 index 00000000..0dac8dbe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Conversation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3Conversation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.Json.g.cs new file mode 100644 index 00000000..c270e519 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3Include + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Include? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Include), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3Include; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Include? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Include), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3Include; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.g.cs new file mode 100644 index 00000000..66ca521d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Include.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3Include + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.Json.g.cs new file mode 100644 index 00000000..8d434f69 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3Instructions + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Instructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Instructions), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3Instructions; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Instructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Instructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3Instructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.g.cs new file mode 100644 index 00000000..9f076cb1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Instructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3Instructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.Json.g.cs new file mode 100644 index 00000000..7dbe52eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3ParallelToolCalls + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3ParallelToolCalls; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.g.cs new file mode 100644 index 00000000..9f643aea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3ParallelToolCalls.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3ParallelToolCalls + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.Json.g.cs new file mode 100644 index 00000000..a2410a59 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3Store + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Store? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Store), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3Store; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Store? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Store), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3Store; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.g.cs new file mode 100644 index 00000000..3eeb9a2e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Store.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3Store + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.Json.g.cs new file mode 100644 index 00000000..24e4bdec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateResponseVariant3Stream + { + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Stream? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Stream), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateResponseVariant3Stream; + } + + /// + /// 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::tryAGI.OpenAI.CreateResponseVariant3Stream? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateResponseVariant3Stream), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateResponseVariant3Stream; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.g.cs new file mode 100644 index 00000000..867568db --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateResponseVariant3Stream.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateResponseVariant3Stream + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequest.g.cs index c15a2d41..7c6f1575 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequest.g.cs @@ -11,86 +11,75 @@ namespace tryAGI.OpenAI public sealed partial class CreateRunRequest { /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("additional_instructions")] - public string? AdditionalInstructions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AssistantId { get; set; } /// - /// Adds additional messages to the thread before creating the run. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o ///
- [global::System.Text.Json.Serialization.JsonPropertyName("additional_messages")] - public global::System.Collections.Generic.IList? AdditionalMessages { get; set; } + /// gpt-4o + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AssistantId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. + /// Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. /// [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] public string? Instructions { get; set; } /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } - - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] - public int? MaxPromptTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("additional_instructions")] + public string? AdditionalInstructions { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// Adds additional messages to the thread before creating the run. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("additional_messages")] + public global::System.Collections.Generic.IList? AdditionalMessages { get; set; } /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// 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("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
+ /// Default Value: 1
+ /// Example: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + /// 1 + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
+ /// We generally recommend altering this or temperature but not both.
+ /// Default Value: 1
+ /// Example: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } + /// 1 + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } /// /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. @@ -99,46 +88,46 @@ public sealed partial class CreateRunRequest public bool? Stream { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] + public int? MaxPromptTokens { get; set; } /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? ToolChoice { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + public int? MaxCompletionTokens { get; set; } /// - /// 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; } + [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? TruncationStrategy { get; set; } /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? ToolChoice { get; set; } /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. /// - [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] - public global::tryAGI.OpenAI.TruncationObject? TruncationStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] + public bool? ParallelToolCalls { get; set; } + + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -149,117 +138,97 @@ public sealed partial class CreateRunRequest /// /// Initializes a new instance of the class. /// - /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - /// - /// - /// Adds additional messages to the thread before creating the run. - /// /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// + /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Adds additional messages to the thread before creating the run. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateRunRequest( string assistantId, + global::tryAGI.OpenAI.AnyOf? model, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + string? instructions, string? additionalInstructions, global::System.Collections.Generic.IList? additionalMessages, - string? instructions, - int? maxCompletionTokens, - int? maxPromptTokens, + global::System.Collections.Generic.IList>? tools, global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.AnyOf? model, - bool? parallelToolCalls, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat, - bool? stream, double? temperature, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice, - global::System.Collections.Generic.IList? tools, double? topP, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy) + bool? stream, + int? maxPromptTokens, + int? maxCompletionTokens, + global::tryAGI.OpenAI.AllOf? truncationStrategy, + global::tryAGI.OpenAI.AllOf? toolChoice, + bool? parallelToolCalls, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat) { this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); + this.Model = model; + this.ReasoningEffort = reasoningEffort; + this.Instructions = instructions; this.AdditionalInstructions = additionalInstructions; this.AdditionalMessages = additionalMessages; - this.Instructions = instructions; - this.MaxCompletionTokens = maxCompletionTokens; - this.MaxPromptTokens = maxPromptTokens; + this.Tools = tools; this.Metadata = metadata; - this.Model = model; - this.ParallelToolCalls = parallelToolCalls; - this.ReasoningEffort = reasoningEffort; - this.ResponseFormat = responseFormat; - this.Stream = stream; this.Temperature = temperature; - this.ToolChoice = toolChoice; - this.Tools = tools; this.TopP = topP; + this.Stream = stream; + this.MaxPromptTokens = maxPromptTokens; + this.MaxCompletionTokens = maxCompletionTokens; this.TruncationStrategy = truncationStrategy; + this.ToolChoice = toolChoice; + this.ParallelToolCalls = parallelToolCalls; + this.ResponseFormat = responseFormat; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.Json.g.cs deleted file mode 100644 index 26ec970a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateRunRequestWithoutStream - { - /// - /// 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::tryAGI.OpenAI.CreateRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateRunRequestWithoutStream), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateRunRequestWithoutStream; - } - - /// - /// 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::tryAGI.OpenAI.CreateRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateRunRequestWithoutStream), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateRunRequestWithoutStream; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.g.cs deleted file mode 100644 index ba7dbd9d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateRunRequestWithoutStream.g.cs +++ /dev/null @@ -1,261 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateRunRequestWithoutStream - { - /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("additional_instructions")] - public string? AdditionalInstructions { get; set; } - - /// - /// Adds additional messages to the thread before creating the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("additional_messages")] - public global::System.Collections.Generic.IList? AdditionalMessages { get; set; } - - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AssistantId { get; set; } - - /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { get; set; } - - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } - - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] - public int? MaxPromptTokens { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } - - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } - - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } - - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } - - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? ToolChoice { get; set; } - - /// - /// 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; } - - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } - - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] - public global::tryAGI.OpenAI.TruncationObject? TruncationStrategy { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. - /// - /// - /// Adds additional messages to the thread before creating the run. - /// - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Overrides the [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateRunRequestWithoutStream( - string assistantId, - string? additionalInstructions, - global::System.Collections.Generic.IList? additionalMessages, - string? instructions, - int? maxCompletionTokens, - int? maxPromptTokens, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.AnyOf? model, - bool? parallelToolCalls, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat, - double? temperature, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice, - global::System.Collections.Generic.IList? tools, - double? topP, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy) - { - this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); - this.AdditionalInstructions = additionalInstructions; - this.AdditionalMessages = additionalMessages; - this.Instructions = instructions; - this.MaxCompletionTokens = maxCompletionTokens; - this.MaxPromptTokens = maxPromptTokens; - this.Metadata = metadata; - this.Model = model; - this.ParallelToolCalls = parallelToolCalls; - this.ReasoningEffort = reasoningEffort; - this.ResponseFormat = responseFormat; - this.Temperature = temperature; - this.ToolChoice = toolChoice; - this.Tools = tools; - this.TopP = topP; - this.TruncationStrategy = truncationStrategy; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateRunRequestWithoutStream() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.Json.g.cs new file mode 100644 index 00000000..7f5b9352 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateSkillBody + { + /// + /// 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::tryAGI.OpenAI.CreateSkillBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateSkillBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateSkillBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateSkillBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateSkillBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateSkillBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.g.cs new file mode 100644 index 00000000..dd650692 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillBody.g.cs @@ -0,0 +1,47 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Uploads a skill either as a directory (multipart `files[]`) or as a single zip file. + /// + public sealed partial class CreateSkillBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("files")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, byte[]>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf, byte[]> Files { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateSkillBody( + global::tryAGI.OpenAI.OneOf, byte[]> files) + { + this.Files = files; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateSkillBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.Json.g.cs new file mode 100644 index 00000000..7ad26eb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateSkillVersionBody + { + /// + /// 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::tryAGI.OpenAI.CreateSkillVersionBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateSkillVersionBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateSkillVersionBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateSkillVersionBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateSkillVersionBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateSkillVersionBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.g.cs new file mode 100644 index 00000000..0ce9343e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSkillVersionBody.g.cs @@ -0,0 +1,58 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Uploads a new immutable version of a skill. + /// + public sealed partial class CreateSkillVersionBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("files")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter, byte[]>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf, byte[]> Files { get; set; } + + /// + /// Whether to set this version as the default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("default")] + public bool? Default { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Whether to set this version as the default. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateSkillVersionBody( + global::tryAGI.OpenAI.OneOf, byte[]> files, + bool? @default) + { + this.Files = files; + this.Default = @default; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateSkillVersionBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequest.g.cs index f6225540..ac199d43 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequest.g.cs @@ -10,6 +10,14 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateSpeechRequest { + /// + /// One of the available [TTS models](/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AnyOf Model { get; set; } + /// /// The text to generate audio for. The maximum length is 4096 characters. /// @@ -24,12 +32,12 @@ public sealed partial class CreateSpeechRequest public string? Instructions { get; set; } /// - /// One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. + /// The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech#voice-options). /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Model { get; set; } + public required global::tryAGI.OpenAI.VoiceIdsOrCustomVoice Voice { get; set; } /// /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
@@ -54,15 +62,6 @@ public sealed partial class CreateSpeechRequest [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateSpeechRequestStreamFormatJsonConverter))] public global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? StreamFormat { get; set; } - /// - /// Example: ash - /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VoiceIdsShared Voice { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -72,14 +71,17 @@ public sealed partial class CreateSpeechRequest /// /// Initializes a new instance of the class. /// + /// + /// One of the available [TTS models](/docs/models#tts): `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`. + /// /// /// The text to generate audio for. The maximum length is 4096 characters. /// /// /// Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`. /// - /// - /// One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`. + /// + /// The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech#voice-options). /// /// /// The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
@@ -93,23 +95,20 @@ public sealed partial class CreateSpeechRequest /// The format to stream the audio in. Supported formats are `sse` and `audio`. `sse` is not supported for `tts-1` or `tts-1-hd`.
/// Default Value: audio /// - /// - /// Example: ash - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateSpeechRequest( - string input, global::tryAGI.OpenAI.AnyOf model, - global::tryAGI.OpenAI.VoiceIdsShared voice, + string input, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice, string? instructions, global::tryAGI.OpenAI.CreateSpeechRequestResponseFormat? responseFormat, double? speed, global::tryAGI.OpenAI.CreateSpeechRequestStreamFormat? streamFormat) { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Model = model; + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Voice = voice; this.Instructions = instructions; this.ResponseFormat = responseFormat; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequestModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequestModel.g.cs index 7ab42317..f3a0ddc2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequestModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechRequestModel.g.cs @@ -20,6 +20,10 @@ public enum CreateSpeechRequestModel /// ///
Gpt4oMiniTts, + /// + /// + /// + Gpt4oMiniTts20251215, } /// @@ -37,6 +41,7 @@ public static string ToValueString(this CreateSpeechRequestModel value) CreateSpeechRequestModel.Tts1 => "tts-1", CreateSpeechRequestModel.Tts1Hd => "tts-1-hd", CreateSpeechRequestModel.Gpt4oMiniTts => "gpt-4o-mini-tts", + CreateSpeechRequestModel.Gpt4oMiniTts20251215 => "gpt-4o-mini-tts-2025-12-15", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,6 +55,7 @@ public static string ToValueString(this CreateSpeechRequestModel value) "tts-1" => CreateSpeechRequestModel.Tts1, "tts-1-hd" => CreateSpeechRequestModel.Tts1Hd, "gpt-4o-mini-tts" => CreateSpeechRequestModel.Gpt4oMiniTts, + "gpt-4o-mini-tts-2025-12-15" => CreateSpeechRequestModel.Gpt4oMiniTts20251215, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechResponseStreamEvent.g.cs index 452f2940..36a6cb75 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateSpeechResponseStreamEvent.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// Emitted for each chunk of audio data generated during speech synthesis. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? AudioDelta { get; init; } + public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? SpeechAudioDelta { get; init; } #else - public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? AudioDelta { get; } + public global::tryAGI.OpenAI.SpeechAudioDeltaEvent? SpeechAudioDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioDelta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SpeechAudioDelta))] #endif - public bool IsAudioDelta => AudioDelta != null; + public bool IsSpeechAudioDelta => SpeechAudioDelta != null; /// - /// + /// Emitted when the speech synthesis is complete and all audio has been streamed. /// - public static implicit operator CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDeltaEvent value) => new CreateSpeechResponseStreamEvent((global::tryAGI.OpenAI.SpeechAudioDeltaEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SpeechAudioDoneEvent? SpeechAudioDone { get; init; } +#else + public global::tryAGI.OpenAI.SpeechAudioDoneEvent? SpeechAudioDone { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.SpeechAudioDeltaEvent?(CreateSpeechResponseStreamEvent @this) => @this.AudioDelta; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SpeechAudioDone))] +#endif + public bool IsSpeechAudioDone => SpeechAudioDone != null; /// /// /// - public CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDeltaEvent? value) - { - AudioDelta = value; - } + public static implicit operator CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDeltaEvent value) => new CreateSpeechResponseStreamEvent((global::tryAGI.OpenAI.SpeechAudioDeltaEvent?)value); /// - /// Emitted when the speech synthesis is complete and all audio has been streamed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.SpeechAudioDoneEvent? AudioDone { get; init; } -#else - public global::tryAGI.OpenAI.SpeechAudioDoneEvent? AudioDone { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.SpeechAudioDeltaEvent?(CreateSpeechResponseStreamEvent @this) => @this.SpeechAudioDelta; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioDone))] -#endif - public bool IsAudioDone => AudioDone != null; + public CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDeltaEvent? value) + { + SpeechAudioDelta = value; + } /// /// @@ -69,42 +68,42 @@ public CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDeltaEve /// /// /// - public static implicit operator global::tryAGI.OpenAI.SpeechAudioDoneEvent?(CreateSpeechResponseStreamEvent @this) => @this.AudioDone; + public static implicit operator global::tryAGI.OpenAI.SpeechAudioDoneEvent?(CreateSpeechResponseStreamEvent @this) => @this.SpeechAudioDone; /// /// /// public CreateSpeechResponseStreamEvent(global::tryAGI.OpenAI.SpeechAudioDoneEvent? value) { - AudioDone = value; + SpeechAudioDone = value; } /// /// /// public CreateSpeechResponseStreamEvent( - global::tryAGI.OpenAI.SpeechAudioDeltaEvent? audioDelta, - global::tryAGI.OpenAI.SpeechAudioDoneEvent? audioDone + global::tryAGI.OpenAI.SpeechAudioDeltaEvent? speechAudioDelta, + global::tryAGI.OpenAI.SpeechAudioDoneEvent? speechAudioDone ) { - AudioDelta = audioDelta; - AudioDone = audioDone; + SpeechAudioDelta = speechAudioDelta; + SpeechAudioDone = speechAudioDone; } /// /// /// public object? Object => - AudioDone as object ?? - AudioDelta as object + SpeechAudioDone as object ?? + SpeechAudioDelta as object ; /// /// /// public override string? ToString() => - AudioDelta?.ToString() ?? - AudioDone?.ToString() + SpeechAudioDelta?.ToString() ?? + SpeechAudioDone?.ToString() ; /// @@ -112,15 +111,15 @@ AudioDelta as object /// public bool Validate() { - return IsAudioDelta || IsAudioDone; + return IsSpeechAudioDelta || IsSpeechAudioDone; } /// /// /// public TResult? Match( - global::System.Func? audioDelta = null, - global::System.Func? audioDone = null, + global::System.Func? speechAudioDelta = null, + global::System.Func? speechAudioDone = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsAudioDelta && audioDelta != null) + if (IsSpeechAudioDelta && speechAudioDelta != null) { - return audioDelta(AudioDelta!); + return speechAudioDelta(SpeechAudioDelta!); } - else if (IsAudioDone && audioDone != null) + else if (IsSpeechAudioDone && speechAudioDone != null) { - return audioDone(AudioDone!); + return speechAudioDone(SpeechAudioDone!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? audioDelta = null, - global::System.Action? audioDone = null, + global::System.Action? speechAudioDelta = null, + global::System.Action? speechAudioDone = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsAudioDelta) + if (IsSpeechAudioDelta) { - audioDelta?.Invoke(AudioDelta!); + speechAudioDelta?.Invoke(SpeechAudioDelta!); } - else if (IsAudioDone) + else if (IsSpeechAudioDone) { - audioDone?.Invoke(AudioDone!); + speechAudioDone?.Invoke(SpeechAudioDone!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - AudioDelta, + SpeechAudioDelta, typeof(global::tryAGI.OpenAI.SpeechAudioDeltaEvent), - AudioDone, + SpeechAudioDone, typeof(global::tryAGI.OpenAI.SpeechAudioDoneEvent), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateSpeechResponseStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioDelta, other.AudioDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioDone, other.AudioDone) + global::System.Collections.Generic.EqualityComparer.Default.Equals(SpeechAudioDelta, other.SpeechAudioDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SpeechAudioDone, other.SpeechAudioDone) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequest.g.cs index d16ed5b8..b51c32c9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequest.g.cs @@ -11,12 +11,28 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadAndRunRequest { /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string AssistantId { get; set; } + /// + /// Options to create a new thread. If no thread is provided when running a
+ /// request, an empty thread will be created. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("thread")] + public global::tryAGI.OpenAI.CreateThreadRequest? Thread { get; set; } + + /// + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o + ///
+ /// gpt-4o + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + /// /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. /// @@ -24,49 +40,41 @@ public sealed partial class CreateThreadAndRunRequest public string? Instructions { get; set; } /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// 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("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// 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. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] - public int? MaxPromptTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? ToolResources { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } - - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
+ /// Default Value: 1
+ /// Example: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } + /// 1 + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
+ /// We generally recommend altering this or temperature but not both.
+ /// Default Value: 1
+ /// Example: 1 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } + /// 1 + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } /// /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. @@ -75,59 +83,46 @@ public sealed partial class CreateThreadAndRunRequest public bool? Stream { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("thread")] - public global::tryAGI.OpenAI.CreateThreadRequest? Thread { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] + public int? MaxPromptTokens { get; set; } /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? ToolChoice { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + public int? MaxCompletionTokens { 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. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? ToolResources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? TruncationStrategy { get; set; } /// - /// 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; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? ToolChoice { get; set; } /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] + public bool? ParallelToolCalls { get; set; } /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] - public global::tryAGI.OpenAI.TruncationObject? TruncationStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -139,107 +134,94 @@ public sealed partial class CreateThreadAndRunRequest /// Initializes a new instance of the class. /// /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// Options to create a new thread. If no thread is provided when running a
+ /// request, an empty thread will be created. /// /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. + /// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
+ /// Example: gpt-4o /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// 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. /// + /// /// /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
/// Default Value: 1
/// Example: 1 /// - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// 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. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// /// /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
/// We generally recommend altering this or temperature but not both.
/// Default Value: 1
/// Example: 1 /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + /// + /// + /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateThreadAndRunRequest( string assistantId, + global::tryAGI.OpenAI.CreateThreadRequest? thread, + global::tryAGI.OpenAI.AnyOf? model, string? instructions, - int? maxCompletionTokens, - int? maxPromptTokens, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources, global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.AnyOf? model, - bool? parallelToolCalls, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat, - bool? stream, double? temperature, - global::tryAGI.OpenAI.CreateThreadRequest? thread, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice, - global::tryAGI.OpenAI.CreateThreadAndRunRequestToolResources? toolResources, - global::System.Collections.Generic.IList? tools, double? topP, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy) + bool? stream, + int? maxPromptTokens, + int? maxCompletionTokens, + global::tryAGI.OpenAI.AllOf? truncationStrategy, + global::tryAGI.OpenAI.AllOf? toolChoice, + bool? parallelToolCalls, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat) { this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); + this.Thread = thread; + this.Model = model; this.Instructions = instructions; - this.MaxCompletionTokens = maxCompletionTokens; - this.MaxPromptTokens = maxPromptTokens; + this.Tools = tools; + this.ToolResources = toolResources; this.Metadata = metadata; - this.Model = model; - this.ParallelToolCalls = parallelToolCalls; - this.ResponseFormat = responseFormat; - this.Stream = stream; this.Temperature = temperature; - this.Thread = thread; - this.ToolChoice = toolChoice; - this.ToolResources = toolResources; - this.Tools = tools; this.TopP = topP; + this.Stream = stream; + this.MaxPromptTokens = maxPromptTokens; + this.MaxCompletionTokens = maxCompletionTokens; this.TruncationStrategy = truncationStrategy; + this.ToolChoice = toolChoice; + this.ParallelToolCalls = parallelToolCalls; + this.ResponseFormat = responseFormat; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesCodeInterpreter.g.cs index 29e0dc4c..8e6c0491 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadAndRunRequestToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class CreateThreadAndRunRequestToolResourcesCodeInterprete /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesFileSearch.g.cs index 8a12247e..e97bace4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestToolResourcesFileSearch.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadAndRunRequestToolResourcesFileSearch { /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } @@ -24,7 +24,7 @@ public sealed partial class CreateThreadAndRunRequestToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.Json.g.cs deleted file mode 100644 index 0d91897e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadAndRunRequestWithoutStream - { - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStream; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.g.cs deleted file mode 100644 index 12b495cc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStream.g.cs +++ /dev/null @@ -1,241 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadAndRunRequestWithoutStream - { - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AssistantId { get; set; } - - /// - /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { get; set; } - - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] - public int? MaxCompletionTokens { get; set; } - - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] - public int? MaxPromptTokens { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } - - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } - - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } - - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("thread")] - public global::tryAGI.OpenAI.CreateThreadRequest? Thread { get; set; } - - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter))] - public global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? ToolChoice { 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. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources? ToolResources { get; set; } - - /// - /// 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; } - - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } - - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] - public global::tryAGI.OpenAI.TruncationObject? TruncationStrategy { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to execute this run. - /// - /// - /// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. - /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// Options to create a new thread. If no thread is provided when running a
- /// request, an empty thread will be created. - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// 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. - /// - /// - /// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadAndRunRequestWithoutStream( - string assistantId, - string? instructions, - int? maxCompletionTokens, - int? maxPromptTokens, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.AnyOf? model, - bool? parallelToolCalls, - global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat, - double? temperature, - global::tryAGI.OpenAI.CreateThreadRequest? thread, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption? toolChoice, - global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources? toolResources, - global::System.Collections.Generic.IList? tools, - double? topP, - global::tryAGI.OpenAI.TruncationObject? truncationStrategy) - { - this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); - this.Instructions = instructions; - this.MaxCompletionTokens = maxCompletionTokens; - this.MaxPromptTokens = maxPromptTokens; - this.Metadata = metadata; - this.Model = model; - this.ParallelToolCalls = parallelToolCalls; - this.ResponseFormat = responseFormat; - this.Temperature = temperature; - this.Thread = thread; - this.ToolChoice = toolChoice; - this.ToolResources = toolResources; - this.Tools = tools; - this.TopP = topP; - this.TruncationStrategy = truncationStrategy; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadAndRunRequestWithoutStream() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamModel.g.cs deleted file mode 100644 index 1d70de28..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamModel.g.cs +++ /dev/null @@ -1,267 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public enum CreateThreadAndRunRequestWithoutStreamModel - { - /// - /// - /// - Gpt5, - /// - /// - /// - Gpt5Mini, - /// - /// - /// - Gpt5Nano, - /// - /// - /// - Gpt520250807, - /// - /// - /// - Gpt5Mini20250807, - /// - /// - /// - Gpt5Nano20250807, - /// - /// - /// - Gpt41, - /// - /// - /// - Gpt41Mini, - /// - /// - /// - Gpt41Nano, - /// - /// - /// - Gpt4120250414, - /// - /// - /// - Gpt41Mini20250414, - /// - /// - /// - Gpt41Nano20250414, - /// - /// - /// - Gpt4o, - /// - /// - /// - Gpt4o20241120, - /// - /// - /// - Gpt4o20240806, - /// - /// - /// - Gpt4o20240513, - /// - /// - /// - Gpt4oMini, - /// - /// - /// - Gpt4oMini20240718, - /// - /// - /// - Gpt45Preview, - /// - /// - /// - Gpt45Preview20250227, - /// - /// - /// - Gpt4Turbo, - /// - /// - /// - Gpt4Turbo20240409, - /// - /// - /// - Gpt40125Preview, - /// - /// - /// - Gpt4TurboPreview, - /// - /// - /// - Gpt41106Preview, - /// - /// - /// - Gpt4VisionPreview, - /// - /// - /// - Gpt4, - /// - /// - /// - Gpt40314, - /// - /// - /// - Gpt40613, - /// - /// - /// - Gpt432k, - /// - /// - /// - Gpt432k0314, - /// - /// - /// - Gpt432k0613, - /// - /// - /// - Gpt35Turbo, - /// - /// - /// - Gpt35Turbo16k, - /// - /// - /// - Gpt35Turbo0613, - /// - /// - /// - Gpt35Turbo1106, - /// - /// - /// - Gpt35Turbo0125, - /// - /// - /// - Gpt35Turbo16k0613, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateThreadAndRunRequestWithoutStreamModelExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateThreadAndRunRequestWithoutStreamModel value) - { - return value switch - { - CreateThreadAndRunRequestWithoutStreamModel.Gpt5 => "gpt-5", - CreateThreadAndRunRequestWithoutStreamModel.Gpt5Mini => "gpt-5-mini", - CreateThreadAndRunRequestWithoutStreamModel.Gpt5Nano => "gpt-5-nano", - CreateThreadAndRunRequestWithoutStreamModel.Gpt520250807 => "gpt-5-2025-08-07", - CreateThreadAndRunRequestWithoutStreamModel.Gpt5Mini20250807 => "gpt-5-mini-2025-08-07", - CreateThreadAndRunRequestWithoutStreamModel.Gpt5Nano20250807 => "gpt-5-nano-2025-08-07", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41 => "gpt-4.1", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41Mini => "gpt-4.1-mini", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41Nano => "gpt-4.1-nano", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4120250414 => "gpt-4.1-2025-04-14", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41Mini20250414 => "gpt-4.1-mini-2025-04-14", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41Nano20250414 => "gpt-4.1-nano-2025-04-14", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4o => "gpt-4o", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20241120 => "gpt-4o-2024-11-20", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20240806 => "gpt-4o-2024-08-06", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20240513 => "gpt-4o-2024-05-13", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4oMini => "gpt-4o-mini", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4oMini20240718 => "gpt-4o-mini-2024-07-18", - CreateThreadAndRunRequestWithoutStreamModel.Gpt45Preview => "gpt-4.5-preview", - CreateThreadAndRunRequestWithoutStreamModel.Gpt45Preview20250227 => "gpt-4.5-preview-2025-02-27", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4Turbo => "gpt-4-turbo", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4Turbo20240409 => "gpt-4-turbo-2024-04-09", - CreateThreadAndRunRequestWithoutStreamModel.Gpt40125Preview => "gpt-4-0125-preview", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4TurboPreview => "gpt-4-turbo-preview", - CreateThreadAndRunRequestWithoutStreamModel.Gpt41106Preview => "gpt-4-1106-preview", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4VisionPreview => "gpt-4-vision-preview", - CreateThreadAndRunRequestWithoutStreamModel.Gpt4 => "gpt-4", - CreateThreadAndRunRequestWithoutStreamModel.Gpt40314 => "gpt-4-0314", - CreateThreadAndRunRequestWithoutStreamModel.Gpt40613 => "gpt-4-0613", - CreateThreadAndRunRequestWithoutStreamModel.Gpt432k => "gpt-4-32k", - CreateThreadAndRunRequestWithoutStreamModel.Gpt432k0314 => "gpt-4-32k-0314", - CreateThreadAndRunRequestWithoutStreamModel.Gpt432k0613 => "gpt-4-32k-0613", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo => "gpt-3.5-turbo", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo16k => "gpt-3.5-turbo-16k", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo0613 => "gpt-3.5-turbo-0613", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo1106 => "gpt-3.5-turbo-1106", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo0125 => "gpt-3.5-turbo-0125", - CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo16k0613 => "gpt-3.5-turbo-16k-0613", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateThreadAndRunRequestWithoutStreamModel? ToEnum(string value) - { - return value switch - { - "gpt-5" => CreateThreadAndRunRequestWithoutStreamModel.Gpt5, - "gpt-5-mini" => CreateThreadAndRunRequestWithoutStreamModel.Gpt5Mini, - "gpt-5-nano" => CreateThreadAndRunRequestWithoutStreamModel.Gpt5Nano, - "gpt-5-2025-08-07" => CreateThreadAndRunRequestWithoutStreamModel.Gpt520250807, - "gpt-5-mini-2025-08-07" => CreateThreadAndRunRequestWithoutStreamModel.Gpt5Mini20250807, - "gpt-5-nano-2025-08-07" => CreateThreadAndRunRequestWithoutStreamModel.Gpt5Nano20250807, - "gpt-4.1" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41, - "gpt-4.1-mini" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41Mini, - "gpt-4.1-nano" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41Nano, - "gpt-4.1-2025-04-14" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4120250414, - "gpt-4.1-mini-2025-04-14" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41Mini20250414, - "gpt-4.1-nano-2025-04-14" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41Nano20250414, - "gpt-4o" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4o, - "gpt-4o-2024-11-20" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20241120, - "gpt-4o-2024-08-06" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20240806, - "gpt-4o-2024-05-13" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4o20240513, - "gpt-4o-mini" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4oMini, - "gpt-4o-mini-2024-07-18" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4oMini20240718, - "gpt-4.5-preview" => CreateThreadAndRunRequestWithoutStreamModel.Gpt45Preview, - "gpt-4.5-preview-2025-02-27" => CreateThreadAndRunRequestWithoutStreamModel.Gpt45Preview20250227, - "gpt-4-turbo" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4Turbo, - "gpt-4-turbo-2024-04-09" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4Turbo20240409, - "gpt-4-0125-preview" => CreateThreadAndRunRequestWithoutStreamModel.Gpt40125Preview, - "gpt-4-turbo-preview" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4TurboPreview, - "gpt-4-1106-preview" => CreateThreadAndRunRequestWithoutStreamModel.Gpt41106Preview, - "gpt-4-vision-preview" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4VisionPreview, - "gpt-4" => CreateThreadAndRunRequestWithoutStreamModel.Gpt4, - "gpt-4-0314" => CreateThreadAndRunRequestWithoutStreamModel.Gpt40314, - "gpt-4-0613" => CreateThreadAndRunRequestWithoutStreamModel.Gpt40613, - "gpt-4-32k" => CreateThreadAndRunRequestWithoutStreamModel.Gpt432k, - "gpt-4-32k-0314" => CreateThreadAndRunRequestWithoutStreamModel.Gpt432k0314, - "gpt-4-32k-0613" => CreateThreadAndRunRequestWithoutStreamModel.Gpt432k0613, - "gpt-3.5-turbo" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo, - "gpt-3.5-turbo-16k" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo16k, - "gpt-3.5-turbo-0613" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo0613, - "gpt-3.5-turbo-1106" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo1106, - "gpt-3.5-turbo-0125" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo0125, - "gpt-3.5-turbo-16k-0613" => CreateThreadAndRunRequestWithoutStreamModel.Gpt35Turbo16k0613, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.Json.g.cs deleted file mode 100644 index 7e568cd8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResources - { - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResources; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.g.cs deleted file mode 100644 index 5aa0b97f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResources.g.cs +++ /dev/null @@ -1,52 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// 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. - /// - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResources - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadAndRunRequestWithoutStreamToolResources( - global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadAndRunRequestWithoutStreamToolResources() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.Json.g.cs deleted file mode 100644 index bccf2018..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter - { - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.g.cs deleted file mode 100644 index 04df5f04..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter - { - /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] - public global::System.Collections.Generic.IList? FileIds { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter( - global::System.Collections.Generic.IList? fileIds) - { - this.FileIds = fileIds; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadAndRunRequestWithoutStreamToolResourcesCodeInterpreter() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.Json.g.cs deleted file mode 100644 index a8732346..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch - { - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.g.cs deleted file mode 100644 index 9e376689..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch - { - /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] - public global::System.Collections.Generic.IList? VectorStoreIds { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch( - global::System.Collections.Generic.IList? vectorStoreIds) - { - this.VectorStoreIds = vectorStoreIds; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadAndRunRequestWithoutStreamToolResourcesFileSearch() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequest.g.cs index 4e01f404..6b3708c3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequest.g.cs @@ -10,26 +10,22 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadRequest { /// - /// A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. + /// A list of [messages](/docs/api-reference/messages) to start the thread with. /// [global::System.Text.Json.Serialization.JsonPropertyName("messages")] public global::System.Collections.Generic.IList? Messages { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public global::tryAGI.OpenAI.CreateThreadRequestToolResources2? ToolResources { get; set; } /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.CreateThreadRequestToolResources? ToolResources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,29 +37,21 @@ public sealed partial class CreateThreadRequest /// Initializes a new instance of the class. /// /// - /// A list of [messages](https://platform.openai.com/docs/api-reference/messages) to start the thread with. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// A list of [messages](/docs/api-reference/messages) to start the thread with. /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateThreadRequest( global::System.Collections.Generic.IList? messages, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.CreateThreadRequestToolResources? toolResources) + global::tryAGI.OpenAI.CreateThreadRequestToolResources2? toolResources, + global::System.Collections.Generic.Dictionary? metadata) { this.Messages = messages; - this.Metadata = metadata; this.ToolResources = toolResources; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources.g.cs index 807186b6..8a0ce8ee 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// /// public sealed partial class CreateThreadRequestToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadRequestToolResources( - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadRequestToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.Json.g.cs new file mode 100644 index 00000000..42bb86c0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateThreadRequestToolResources2 + { + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.g.cs new file mode 100644 index 00000000..2d68714e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// + public sealed partial class CreateThreadRequestToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateThreadRequestToolResources2( + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateThreadRequestToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesCodeInterpreter.g.cs index d2fd6837..64be174e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadRequestToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class CreateThreadRequestToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearch.g.cs index f3da616b..d10351f6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearch.g.cs @@ -9,13 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadRequestToolResourcesFileSearch { /// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } /// - /// A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. + /// A helper to create a [vector store](/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_stores")] public global::System.Collections.Generic.IList? VectorStores { get; set; } @@ -30,10 +30,10 @@ public sealed partial class CreateThreadRequestToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// /// - /// A helper to create a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. + /// A helper to create a [vector store](/docs/api-reference/vector-stores/object) with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs index 3fb72791..ffef232a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStore.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,24 +11,20 @@ namespace tryAGI.OpenAI public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStore { /// - /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + /// A list of [file](/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyJsonConverter))] - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] - public global::System.Collections.Generic.IList? FileIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -40,29 +38,23 @@ public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStor /// /// Initializes a new instance of the class. /// - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. - /// /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + /// A list of [file](/docs/api-reference/files) IDs to add to the vector store. For vector stores created before Nov 2025, there can be a maximum of 10,000 files in a vector store. For vector stores created starting in Nov 2025, the limit is 100,000,000 files. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateThreadRequestToolResourcesFileSearchVectorStore( - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? chunkingStrategy, global::System.Collections.Generic.IList? fileIds, + global::tryAGI.OpenAI.OneOf? chunkingStrategy, global::System.Collections.Generic.Dictionary? metadata) { - this.ChunkingStrategy = chunkingStrategy; this.FileIds = fileIds; + this.ChunkingStrategy = chunkingStrategy; this.Metadata = metadata; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs deleted file mode 100644 index 1b82df1e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs deleted file mode 100644 index 7ce90d49..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.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 - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 value) => new CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy((global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; - - /// - /// - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 value) => new CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy((global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; - - /// - /// - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) - { - Value2 = value; - } - - /// - /// - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..134f6676 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy; + } + + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs new file mode 100644 index 00000000..34b9e065 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + /// + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy + { + /// + /// Always `auto`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `auto`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy( + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategy() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs new file mode 100644 index 00000000..c5033d36 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `auto`. + /// + public enum CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType value) + { + return value switch + { + CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType? ToEnum(string value) + { + return value switch + { + "auto" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyAutoChunkingStrategyType.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs deleted file mode 100644 index 133a7c83..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs deleted file mode 100644 index d7fa2751..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..bf4d11d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy; + } + + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs new file mode 100644 index 00000000..c1da3054 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy + { + /// + /// Always `static`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeJsonConverter))] + public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("static")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic Static { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `static`. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy( + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic @static, + global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType type) + { + this.Static = @static ?? throw new global::System.ArgumentNullException(nameof(@static)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategy() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs new file mode 100644 index 00000000..d5490fe8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic + { + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic; + } + + /// + /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs new file mode 100644 index 00000000..5fc56d20 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic + { + /// + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxChunkSizeTokens { get; set; } + + /// + /// The number of tokens that overlap between chunks. The default value is `400`.
+ /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ChunkOverlapTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// + /// + /// The number of tokens that overlap between chunks. The default value is `400`.
+ /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic( + int maxChunkSizeTokens, + int chunkOverlapTokens) + { + this.MaxChunkSizeTokens = maxChunkSizeTokens; + this.ChunkOverlapTokens = chunkOverlapTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyStatic() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs new file mode 100644 index 00000000..ccfa5979 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `static`. + /// + public enum CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType + { + /// + /// + /// + Static, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType value) + { + return value switch + { + CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.Static => "static", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType? ToEnum(string value) + { + return value switch + { + "static" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyStaticChunkingStrategyType.Static, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs deleted file mode 100644 index 473f3ca5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs deleted file mode 100644 index dae8731c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. - /// - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1 - { - /// - /// Always `auto`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Always `auto`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1( - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs deleted file mode 100644 index f1b0a880..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `auto`. - /// - public enum CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type - { - /// - /// - /// - Auto, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type value) - { - return value switch - { - CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.Auto => "auto", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? ToEnum(string value) - { - return value switch - { - "auto" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type.Auto, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs deleted file mode 100644 index a01451a1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs deleted file mode 100644 index 15430a39..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2.g.cs +++ /dev/null @@ -1,56 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2 - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("static")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static Static { get; set; } - - /// - /// Always `static`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Always `static`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2( - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static @static, - global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type type) - { - this.Static = @static ?? throw new global::System.ArgumentNullException(nameof(@static)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs deleted file mode 100644 index 0841247d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static - { - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static; - } - - /// - /// 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::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs deleted file mode 100644 index a11b9cce..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static - { - /// - /// The number of tokens that overlap between chunks. The default value is `400`.
- /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkOverlapTokens { get; set; } - - /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int MaxChunkSizeTokens { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The number of tokens that overlap between chunks. The default value is `400`.
- /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. - /// - /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static( - int chunkOverlapTokens, - int maxChunkSizeTokens) - { - this.ChunkOverlapTokens = chunkOverlapTokens; - this.MaxChunkSizeTokens = maxChunkSizeTokens; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs deleted file mode 100644 index fa1cdf43..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `static`. - /// - public enum CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type - { - /// - /// - /// - Static, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type value) - { - return value switch - { - CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.Static => "static", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? ToEnum(string value) - { - return value switch - { - "static" => CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type.Static, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequest.g.cs index 0a54a281..1cb854f2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequest.g.cs @@ -10,12 +10,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateTranscriptionRequest { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - public object? ChunkingStrategy { get; set; } - /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// @@ -31,23 +25,7 @@ public sealed partial class CreateTranscriptionRequest public required string Filename { get; set; } /// - /// Additional information to include in the transcription response.
- /// `logprobs` will return the log probabilities of the tokens in the
- /// response to understand the model's confidence in the transcription.
- /// `logprobs` only works with response_format set to `json` and only with
- /// the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } - - /// - /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("language")] - public string? Language { get; set; } - - /// - /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).
+ /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
/// Example: gpt-4o-transcribe ///
/// gpt-4o-transcribe @@ -57,30 +35,25 @@ public sealed partial class CreateTranscriptionRequest public required global::tryAGI.OpenAI.AnyOf Model { get; set; } /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. + /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. /// [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] public string? Prompt { get; set; } /// - /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
+ /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// Default Value: json ///
[global::System.Text.Json.Serialization.JsonPropertyName("response_format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AudioResponseFormatJsonConverter))] public global::tryAGI.OpenAI.AudioResponseFormat? ResponseFormat { get; set; } - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
- /// for more information.
- /// Note: Streaming is not supported for the `whisper-1` model and will be ignored.
- /// Default Value: false - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("stream")] - public bool? Stream { get; set; } - /// /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
/// Default Value: 0 @@ -88,13 +61,48 @@ public sealed partial class CreateTranscriptionRequest [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public double? Temperature { get; set; } + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } + /// /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
/// Default Value: [segment] ///
[global::System.Text.Json.Serialization.JsonPropertyName("timestamp_granularities")] public global::System.Collections.Generic.IList? TimestampGranularities { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] + public global::tryAGI.OpenAI.AnyOf? ChunkingStrategy { get; set; } + + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("known_speaker_names")] + public global::System.Collections.Generic.IList? KnownSpeakerNames { get; set; } + + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("known_speaker_references")] + public global::System.Collections.Generic.IList? KnownSpeakerReferences { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -104,50 +112,50 @@ public sealed partial class CreateTranscriptionRequest /// /// Initializes a new instance of the class. /// - /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// /// /// The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// - /// - /// Additional information to include in the transcription response.
- /// `logprobs` will return the log probabilities of the tokens in the
- /// response to understand the model's confidence in the transcription.
- /// `logprobs` only works with response_format set to `json` and only with
- /// the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`. + /// + /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
+ /// Example: gpt-4o-transcribe /// /// /// The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency. /// - /// - /// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).
- /// Example: gpt-4o-transcribe - /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should match the audio language. This field is not supported when using `gpt-4o-transcribe-diarize`. /// /// - /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
+ /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`. For `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and `diarized_json`, with `diarized_json` required to receive speaker annotations.
/// Default Value: json /// - /// - /// If set to true, the model response data will be streamed to the client
- /// as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
- /// See the [Streaming section of the Speech-to-Text guide](https://platform.openai.com/docs/guides/speech-to-text?lang=curl#streaming-transcriptions)
- /// for more information.
- /// Note: Streaming is not supported for the `whisper-1` model and will be ignored.
- /// Default Value: false - /// /// /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
/// Default Value: 0 /// + /// + /// Additional information to include in the transcription response.
+ /// `logprobs` will return the log probabilities of the tokens in the
+ /// response to understand the model's confidence in the transcription.
+ /// `logprobs` only works with response_format set to `json` and only with
+ /// the models `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is not supported when using `gpt-4o-transcribe-diarize`. + /// /// /// The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
+ /// This option is not available for `gpt-4o-transcribe-diarize`.
/// Default Value: [segment] /// + /// + /// + /// + /// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported. + /// + /// + /// Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)) that contain known speaker references matching `known_speaker_names[]`. Each sample must be between 2 and 10 seconds, and can use any of the same input audio formats supported by `file`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -155,26 +163,30 @@ public CreateTranscriptionRequest( byte[] file, string filename, global::tryAGI.OpenAI.AnyOf model, - object? chunkingStrategy, - global::System.Collections.Generic.IList? include, string? language, string? prompt, global::tryAGI.OpenAI.AudioResponseFormat? responseFormat, - bool? stream, double? temperature, - global::System.Collections.Generic.IList? timestampGranularities) + global::System.Collections.Generic.IList? include, + global::System.Collections.Generic.IList? timestampGranularities, + bool? stream, + global::tryAGI.OpenAI.AnyOf? chunkingStrategy, + global::System.Collections.Generic.IList? knownSpeakerNames, + global::System.Collections.Generic.IList? knownSpeakerReferences) { this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Model = model; - this.ChunkingStrategy = chunkingStrategy; - this.Include = include; this.Language = language; this.Prompt = prompt; this.ResponseFormat = responseFormat; - this.Stream = stream; this.Temperature = temperature; + this.Include = include; this.TimestampGranularities = timestampGranularities; + this.Stream = stream; + this.ChunkingStrategy = chunkingStrategy; + this.KnownSpeakerNames = knownSpeakerNames; + this.KnownSpeakerReferences = knownSpeakerReferences; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..c327b4e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateTranscriptionRequestChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy; + } + + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategy; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.g.cs new file mode 100644 index 00000000..5918e476 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategy.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateTranscriptionRequestChunkingStrategy + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs new file mode 100644 index 00000000..04f5f81d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestChunkingStrategyVariant1.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Automatically set chunking parameters based on the audio. Must be set to `"auto"`.
+ /// Default Value: auto + ///
+ public enum CreateTranscriptionRequestChunkingStrategyVariant1 + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateTranscriptionRequestChunkingStrategyVariant1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateTranscriptionRequestChunkingStrategyVariant1 value) + { + return value switch + { + CreateTranscriptionRequestChunkingStrategyVariant1.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateTranscriptionRequestChunkingStrategyVariant1? ToEnum(string value) + { + return value switch + { + "auto" => CreateTranscriptionRequestChunkingStrategyVariant1.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestModel.g.cs index 7d08f390..57e5c445 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestModel.g.cs @@ -20,6 +20,14 @@ public enum CreateTranscriptionRequestModel /// ///
Gpt4oMiniTranscribe, + /// + /// + /// + Gpt4oMiniTranscribe20251215, + /// + /// + /// + Gpt4oTranscribeDiarize, } /// @@ -37,6 +45,8 @@ public static string ToValueString(this CreateTranscriptionRequestModel value) CreateTranscriptionRequestModel.Whisper1 => "whisper-1", CreateTranscriptionRequestModel.Gpt4oTranscribe => "gpt-4o-transcribe", CreateTranscriptionRequestModel.Gpt4oMiniTranscribe => "gpt-4o-mini-transcribe", + CreateTranscriptionRequestModel.Gpt4oMiniTranscribe20251215 => "gpt-4o-mini-transcribe-2025-12-15", + CreateTranscriptionRequestModel.Gpt4oTranscribeDiarize => "gpt-4o-transcribe-diarize", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,6 +60,8 @@ public static string ToValueString(this CreateTranscriptionRequestModel value) "whisper-1" => CreateTranscriptionRequestModel.Whisper1, "gpt-4o-transcribe" => CreateTranscriptionRequestModel.Gpt4oTranscribe, "gpt-4o-mini-transcribe" => CreateTranscriptionRequestModel.Gpt4oMiniTranscribe, + "gpt-4o-mini-transcribe-2025-12-15" => CreateTranscriptionRequestModel.Gpt4oMiniTranscribe20251215, + "gpt-4o-transcribe-diarize" => CreateTranscriptionRequestModel.Gpt4oTranscribeDiarize, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.Json.g.cs new file mode 100644 index 00000000..807fbff8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateTranscriptionRequestStream + { + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionRequestStream? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateTranscriptionRequestStream), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionRequestStream; + } + + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionRequestStream? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateTranscriptionRequestStream), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionRequestStream; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.g.cs new file mode 100644 index 00000000..192f1338 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionRequestStream.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateTranscriptionRequestStream + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.Json.g.cs new file mode 100644 index 00000000..a1981f52 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateTranscriptionResponseDiarizedJson + { + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson; + } + + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJson; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.g.cs new file mode 100644 index 00000000..aa0025b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJson.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations. + /// + public sealed partial class CreateTranscriptionResponseDiarizedJson + { + /// + /// The type of task that was run. Always `transcribe`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("task")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonTaskJsonConverter))] + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask Task { get; set; } + + /// + /// Duration of the input audio in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Duration { get; set; } + + /// + /// The concatenated transcript text for the entire audio input. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Segments of the transcript annotated with timestamps and speaker labels. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Segments { get; set; } + + /// + /// Token or duration usage statistics for the request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseDiarizedJsonUsageJsonConverter))] + public global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage? Usage { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of task that was run. Always `transcribe`. + /// + /// + /// Duration of the input audio in seconds. + /// + /// + /// The concatenated transcript text for the entire audio input. + /// + /// + /// Segments of the transcript annotated with timestamps and speaker labels. + /// + /// + /// Token or duration usage statistics for the request. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTranscriptionResponseDiarizedJson( + double duration, + string text, + global::System.Collections.Generic.IList segments, + global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonTask task, + global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage? usage) + { + this.Duration = duration; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Segments = segments ?? throw new global::System.ArgumentNullException(nameof(segments)); + this.Task = task; + this.Usage = usage; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTranscriptionResponseDiarizedJson() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonTask.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonTask.g.cs new file mode 100644 index 00000000..52143638 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonTask.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of task that was run. Always `transcribe`. + /// + public enum CreateTranscriptionResponseDiarizedJsonTask + { + /// + /// + /// + Transcribe, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateTranscriptionResponseDiarizedJsonTaskExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateTranscriptionResponseDiarizedJsonTask value) + { + return value switch + { + CreateTranscriptionResponseDiarizedJsonTask.Transcribe => "transcribe", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateTranscriptionResponseDiarizedJsonTask? ToEnum(string value) + { + return value switch + { + "transcribe" => CreateTranscriptionResponseDiarizedJsonTask.Transcribe, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.Json.g.cs new file mode 100644 index 00000000..93728554 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct CreateTranscriptionResponseDiarizedJsonUsage + { + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage?; + } + + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsage?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.g.cs new file mode 100644 index 00000000..8183d674 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsage.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Token or duration usage statistics for the request. + /// + public readonly partial struct CreateTranscriptionResponseDiarizedJsonUsage : global::System.IEquatable + { + /// + /// Usage statistics for models billed by token usage. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TranscriptTextUsageTokens? Tokens { get; init; } +#else + public global::tryAGI.OpenAI.TranscriptTextUsageTokens? Tokens { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tokens))] +#endif + public bool IsTokens => Tokens != null; + + /// + /// Usage statistics for models billed by audio input duration. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Duration { get; init; } +#else + public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Duration { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Duration))] +#endif + public bool IsDuration => Duration != null; + /// + /// + /// + public static implicit operator CreateTranscriptionResponseDiarizedJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageTokens value) => new CreateTranscriptionResponseDiarizedJsonUsage((global::tryAGI.OpenAI.TranscriptTextUsageTokens?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TranscriptTextUsageTokens?(CreateTranscriptionResponseDiarizedJsonUsage @this) => @this.Tokens; + + /// + /// + /// + public CreateTranscriptionResponseDiarizedJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageTokens? value) + { + Tokens = value; + } + + /// + /// + /// + public static implicit operator CreateTranscriptionResponseDiarizedJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageDuration value) => new CreateTranscriptionResponseDiarizedJsonUsage((global::tryAGI.OpenAI.TranscriptTextUsageDuration?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TranscriptTextUsageDuration?(CreateTranscriptionResponseDiarizedJsonUsage @this) => @this.Duration; + + /// + /// + /// + public CreateTranscriptionResponseDiarizedJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageDuration? value) + { + Duration = value; + } + + /// + /// + /// + public CreateTranscriptionResponseDiarizedJsonUsage( + global::tryAGI.OpenAI.TranscriptTextUsageTokens? tokens, + global::tryAGI.OpenAI.TranscriptTextUsageDuration? duration + ) + { + Tokens = tokens; + Duration = duration; + } + + /// + /// + /// + public object? Object => + Duration as object ?? + Tokens as object + ; + + /// + /// + /// + public override string? ToString() => + Tokens?.ToString() ?? + Duration?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsTokens && !IsDuration || !IsTokens && IsDuration; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? tokens = null, + global::System.Func? duration = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTokens && tokens != null) + { + return tokens(Tokens!); + } + else if (IsDuration && duration != null) + { + return duration(Duration!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? tokens = null, + global::System.Action? duration = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTokens) + { + tokens?.Invoke(Tokens!); + } + else if (IsDuration) + { + duration?.Invoke(Duration!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Tokens, + typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), + Duration, + typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CreateTranscriptionResponseDiarizedJsonUsage other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tokens, other.Tokens) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Duration, other.Duration) + ; + } + + /// + /// + /// + public static bool operator ==(CreateTranscriptionResponseDiarizedJsonUsage obj1, CreateTranscriptionResponseDiarizedJsonUsage obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CreateTranscriptionResponseDiarizedJsonUsage obj1, CreateTranscriptionResponseDiarizedJsonUsage obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CreateTranscriptionResponseDiarizedJsonUsage o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.Json.g.cs new file mode 100644 index 00000000..5faa0dca --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateTranscriptionResponseDiarizedJsonUsageDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.g.cs new file mode 100644 index 00000000..2b1ab9e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseDiarizedJsonUsageDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateTranscriptionResponseDiarizedJsonUsageDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateTranscriptionResponseDiarizedJsonUsageDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateTranscriptionResponseDiarizedJsonUsageDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJson.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJson.g.cs index ba53d8fe..8d0914ab 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJson.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJson.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,12 +10,6 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateTranscriptionResponseJson { - /// - /// The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } - /// /// The transcribed text. /// @@ -21,12 +17,18 @@ public sealed partial class CreateTranscriptionResponseJson [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } + /// + /// The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } + /// /// Token usage statistics for the request. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateTranscriptionResponseJsonUsageJsonConverter))] - public global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage? Usage { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Usage { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,12 +39,12 @@ public sealed partial class CreateTranscriptionResponseJson /// /// Initializes a new instance of the class. /// - /// - /// The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array. - /// /// /// The transcribed text. /// + /// + /// The log probabilities of the tokens in the transcription. Only returned with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added to the `include` array. + /// /// /// Token usage statistics for the request. /// @@ -52,7 +54,7 @@ public sealed partial class CreateTranscriptionResponseJson public CreateTranscriptionResponseJson( string text, global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage? usage) + global::tryAGI.OpenAI.OneOf? usage) { this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.Logprobs = logprobs; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonLogprob.g.cs index c5d4f795..0bf386ac 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonLogprob.g.cs @@ -9,10 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class CreateTranscriptionResponseJsonLogprob { /// - /// The bytes of the token. + /// The token in the transcription. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] - public global::System.Collections.Generic.IList? Bytes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + public string? Token { get; set; } /// /// The log probability of the token. @@ -21,10 +21,10 @@ public sealed partial class CreateTranscriptionResponseJsonLogprob public double? Logprob { get; set; } /// - /// The token in the transcription. + /// The bytes of the token. /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] - public string? Token { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + public global::System.Collections.Generic.IList? Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -35,26 +35,26 @@ public sealed partial class CreateTranscriptionResponseJsonLogprob /// /// Initializes a new instance of the class. /// - /// - /// The bytes of the token. + /// + /// The token in the transcription. /// /// /// The log probability of the token. /// - /// - /// The token in the transcription. + /// + /// The bytes of the token. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateTranscriptionResponseJsonLogprob( - global::System.Collections.Generic.IList? bytes, + string? token, double? logprob, - string? token) + global::System.Collections.Generic.IList? bytes) { - this.Bytes = bytes; - this.Logprob = logprob; this.Token = token; + this.Logprob = logprob; + this.Bytes = bytes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.Json.g.cs deleted file mode 100644 index f674c309..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct CreateTranscriptionResponseJsonUsage - { - /// - /// 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::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage?; - } - - /// - /// 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::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsage?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.g.cs deleted file mode 100644 index 7c2f0ac3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsage.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Token usage statistics for the request. - /// - public readonly partial struct CreateTranscriptionResponseJsonUsage : global::System.IEquatable - { - /// - /// Usage statistics for models billed by token usage. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.TranscriptTextUsageTokens? TranscriptTextTokens { get; init; } -#else - public global::tryAGI.OpenAI.TranscriptTextUsageTokens? TranscriptTextTokens { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TranscriptTextTokens))] -#endif - public bool IsTranscriptTextTokens => TranscriptTextTokens != null; - - /// - /// - /// - public static implicit operator CreateTranscriptionResponseJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageTokens value) => new CreateTranscriptionResponseJsonUsage((global::tryAGI.OpenAI.TranscriptTextUsageTokens?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.TranscriptTextUsageTokens?(CreateTranscriptionResponseJsonUsage @this) => @this.TranscriptTextTokens; - - /// - /// - /// - public CreateTranscriptionResponseJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageTokens? value) - { - TranscriptTextTokens = value; - } - - /// - /// Usage statistics for models billed by audio input duration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.TranscriptTextUsageDuration? TranscriptTextDuration { get; init; } -#else - public global::tryAGI.OpenAI.TranscriptTextUsageDuration? TranscriptTextDuration { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TranscriptTextDuration))] -#endif - public bool IsTranscriptTextDuration => TranscriptTextDuration != null; - - /// - /// - /// - public static implicit operator CreateTranscriptionResponseJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageDuration value) => new CreateTranscriptionResponseJsonUsage((global::tryAGI.OpenAI.TranscriptTextUsageDuration?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.TranscriptTextUsageDuration?(CreateTranscriptionResponseJsonUsage @this) => @this.TranscriptTextDuration; - - /// - /// - /// - public CreateTranscriptionResponseJsonUsage(global::tryAGI.OpenAI.TranscriptTextUsageDuration? value) - { - TranscriptTextDuration = value; - } - - /// - /// - /// - public CreateTranscriptionResponseJsonUsage( - global::tryAGI.OpenAI.TranscriptTextUsageTokens? transcriptTextTokens, - global::tryAGI.OpenAI.TranscriptTextUsageDuration? transcriptTextDuration - ) - { - TranscriptTextTokens = transcriptTextTokens; - TranscriptTextDuration = transcriptTextDuration; - } - - /// - /// - /// - public object? Object => - TranscriptTextDuration as object ?? - TranscriptTextTokens as object - ; - - /// - /// - /// - public override string? ToString() => - TranscriptTextTokens?.ToString() ?? - TranscriptTextDuration?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsTranscriptTextTokens || IsTranscriptTextDuration; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? transcriptTextTokens = null, - global::System.Func? transcriptTextDuration = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsTranscriptTextTokens && transcriptTextTokens != null) - { - return transcriptTextTokens(TranscriptTextTokens!); - } - else if (IsTranscriptTextDuration && transcriptTextDuration != null) - { - return transcriptTextDuration(TranscriptTextDuration!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? transcriptTextTokens = null, - global::System.Action? transcriptTextDuration = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsTranscriptTextTokens) - { - transcriptTextTokens?.Invoke(TranscriptTextTokens!); - } - else if (IsTranscriptTextDuration) - { - transcriptTextDuration?.Invoke(TranscriptTextDuration!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - TranscriptTextTokens, - typeof(global::tryAGI.OpenAI.TranscriptTextUsageTokens), - TranscriptTextDuration, - typeof(global::tryAGI.OpenAI.TranscriptTextUsageDuration), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(CreateTranscriptionResponseJsonUsage other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(TranscriptTextTokens, other.TranscriptTextTokens) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TranscriptTextDuration, other.TranscriptTextDuration) - ; - } - - /// - /// - /// - public static bool operator ==(CreateTranscriptionResponseJsonUsage obj1, CreateTranscriptionResponseJsonUsage obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(CreateTranscriptionResponseJsonUsage obj1, CreateTranscriptionResponseJsonUsage obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is CreateTranscriptionResponseJsonUsage o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.Json.g.cs deleted file mode 100644 index 7ba89ab5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CreateTranscriptionResponseJsonUsageDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateTranscriptionResponseJsonUsageDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.g.cs deleted file mode 100644 index 506cd279..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseJsonUsageDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CreateTranscriptionResponseJsonUsageDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateTranscriptionResponseJsonUsageDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateTranscriptionResponseJsonUsageDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseStreamEvent.g.cs index 2df1d8bb..7ff47235 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseStreamEvent.g.cs @@ -10,7 +10,24 @@ namespace tryAGI.OpenAI public readonly partial struct CreateTranscriptionResponseStreamEvent : global::System.IEquatable { /// - /// Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + /// Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TranscriptTextSegmentEvent? TranscriptTextSegment { get; init; } +#else + public global::tryAGI.OpenAI.TranscriptTextSegmentEvent? TranscriptTextSegment { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TranscriptTextSegment))] +#endif + public bool IsTranscriptTextSegment => TranscriptTextSegment != null; + + /// + /// Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.TranscriptTextDeltaEvent? TranscriptTextDelta { get; init; } @@ -26,40 +43,57 @@ namespace tryAGI.OpenAI #endif public bool IsTranscriptTextDelta => TranscriptTextDelta != null; + /// + /// Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TranscriptTextDoneEvent? TranscriptTextDone { get; init; } +#else + public global::tryAGI.OpenAI.TranscriptTextDoneEvent? TranscriptTextDone { get; } +#endif + /// /// /// - public static implicit operator CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextDeltaEvent value) => new CreateTranscriptionResponseStreamEvent((global::tryAGI.OpenAI.TranscriptTextDeltaEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TranscriptTextDone))] +#endif + public bool IsTranscriptTextDone => TranscriptTextDone != null; + /// + /// + /// + public static implicit operator CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextSegmentEvent value) => new CreateTranscriptionResponseStreamEvent((global::tryAGI.OpenAI.TranscriptTextSegmentEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.TranscriptTextDeltaEvent?(CreateTranscriptionResponseStreamEvent @this) => @this.TranscriptTextDelta; + public static implicit operator global::tryAGI.OpenAI.TranscriptTextSegmentEvent?(CreateTranscriptionResponseStreamEvent @this) => @this.TranscriptTextSegment; /// /// /// - public CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextDeltaEvent? value) + public CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextSegmentEvent? value) { - TranscriptTextDelta = value; + TranscriptTextSegment = value; } /// - /// Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.TranscriptTextDoneEvent? TranscriptTextDone { get; init; } -#else - public global::tryAGI.OpenAI.TranscriptTextDoneEvent? TranscriptTextDone { get; } -#endif + public static implicit operator CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextDeltaEvent value) => new CreateTranscriptionResponseStreamEvent((global::tryAGI.OpenAI.TranscriptTextDeltaEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TranscriptTextDone))] -#endif - public bool IsTranscriptTextDone => TranscriptTextDone != null; + public static implicit operator global::tryAGI.OpenAI.TranscriptTextDeltaEvent?(CreateTranscriptionResponseStreamEvent @this) => @this.TranscriptTextDelta; + + /// + /// + /// + public CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTextDeltaEvent? value) + { + TranscriptTextDelta = value; + } /// /// @@ -83,10 +117,12 @@ public CreateTranscriptionResponseStreamEvent(global::tryAGI.OpenAI.TranscriptTe /// /// public CreateTranscriptionResponseStreamEvent( + global::tryAGI.OpenAI.TranscriptTextSegmentEvent? transcriptTextSegment, global::tryAGI.OpenAI.TranscriptTextDeltaEvent? transcriptTextDelta, global::tryAGI.OpenAI.TranscriptTextDoneEvent? transcriptTextDone ) { + TranscriptTextSegment = transcriptTextSegment; TranscriptTextDelta = transcriptTextDelta; TranscriptTextDone = transcriptTextDone; } @@ -96,13 +132,15 @@ public CreateTranscriptionResponseStreamEvent( /// public object? Object => TranscriptTextDone as object ?? - TranscriptTextDelta as object + TranscriptTextDelta as object ?? + TranscriptTextSegment as object ; /// /// /// public override string? ToString() => + TranscriptTextSegment?.ToString() ?? TranscriptTextDelta?.ToString() ?? TranscriptTextDone?.ToString() ; @@ -112,13 +150,14 @@ TranscriptTextDelta as object /// public bool Validate() { - return IsTranscriptTextDelta || IsTranscriptTextDone; + return IsTranscriptTextSegment || IsTranscriptTextDelta || IsTranscriptTextDone; } /// /// /// public TResult? Match( + global::System.Func? transcriptTextSegment = null, global::System.Func? transcriptTextDelta = null, global::System.Func? transcriptTextDone = null, bool validate = true) @@ -128,7 +167,11 @@ public bool Validate() Validate(); } - if (IsTranscriptTextDelta && transcriptTextDelta != null) + if (IsTranscriptTextSegment && transcriptTextSegment != null) + { + return transcriptTextSegment(TranscriptTextSegment!); + } + else if (IsTranscriptTextDelta && transcriptTextDelta != null) { return transcriptTextDelta(TranscriptTextDelta!); } @@ -144,6 +187,7 @@ public bool Validate() /// /// public void Match( + global::System.Action? transcriptTextSegment = null, global::System.Action? transcriptTextDelta = null, global::System.Action? transcriptTextDone = null, bool validate = true) @@ -153,7 +197,11 @@ public void Match( Validate(); } - if (IsTranscriptTextDelta) + if (IsTranscriptTextSegment) + { + transcriptTextSegment?.Invoke(TranscriptTextSegment!); + } + else if (IsTranscriptTextDelta) { transcriptTextDelta?.Invoke(TranscriptTextDelta!); } @@ -170,6 +218,8 @@ public override int GetHashCode() { var fields = new object?[] { + TranscriptTextSegment, + typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), TranscriptTextDelta, typeof(global::tryAGI.OpenAI.TranscriptTextDeltaEvent), TranscriptTextDone, @@ -190,6 +240,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateTranscriptionResponseStreamEvent other) { return + global::System.Collections.Generic.EqualityComparer.Default.Equals(TranscriptTextSegment, other.TranscriptTextSegment) && global::System.Collections.Generic.EqualityComparer.Default.Equals(TranscriptTextDelta, other.TranscriptTextDelta) && global::System.Collections.Generic.EqualityComparer.Default.Equals(TranscriptTextDone, other.TranscriptTextDone) ; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseVerboseJson.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseVerboseJson.g.cs index d6046d33..39b881be 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseVerboseJson.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranscriptionResponseVerboseJson.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class CreateTranscriptionResponseVerboseJson { - /// - /// The duration of the input audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Duration { get; set; } - /// /// The language of the input audio. /// @@ -23,10 +16,11 @@ public sealed partial class CreateTranscriptionResponseVerboseJson public required string Language { get; set; } /// - /// Segments of the transcribed text and their corresponding details. + /// The duration of the input audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("segments")] - public global::System.Collections.Generic.IList? Segments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("duration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Duration { get; set; } /// /// The transcribed text. @@ -35,18 +29,24 @@ public sealed partial class CreateTranscriptionResponseVerboseJson [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } - /// - /// Usage statistics for models billed by audio input duration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("usage")] - public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Usage { get; set; } - /// /// Extracted words and their corresponding timestamps. /// [global::System.Text.Json.Serialization.JsonPropertyName("words")] public global::System.Collections.Generic.IList? Words { get; set; } + /// + /// Segments of the transcribed text and their corresponding details. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segments")] + public global::System.Collections.Generic.IList? Segments { get; set; } + + /// + /// Usage statistics for models billed by audio input duration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::tryAGI.OpenAI.TranscriptTextUsageDuration? Usage { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,41 +56,41 @@ public sealed partial class CreateTranscriptionResponseVerboseJson /// /// Initializes a new instance of the class. /// - /// - /// The duration of the input audio. - /// /// /// The language of the input audio. /// - /// - /// Segments of the transcribed text and their corresponding details. + /// + /// The duration of the input audio. /// /// /// The transcribed text. /// - /// - /// Usage statistics for models billed by audio input duration. - /// /// /// Extracted words and their corresponding timestamps. /// + /// + /// Segments of the transcribed text and their corresponding details. + /// + /// + /// Usage statistics for models billed by audio input duration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateTranscriptionResponseVerboseJson( - double duration, string language, + double duration, string text, + global::System.Collections.Generic.IList? words, global::System.Collections.Generic.IList? segments, - global::tryAGI.OpenAI.TranscriptTextUsageDuration? usage, - global::System.Collections.Generic.IList? words) + global::tryAGI.OpenAI.TranscriptTextUsageDuration? usage) { - this.Duration = duration; this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); + this.Duration = duration; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Words = words; this.Segments = segments; this.Usage = usage; - this.Words = words; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationRequest.g.cs index f0e8899c..ed5757a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationRequest.g.cs @@ -35,7 +35,7 @@ public sealed partial class CreateTranslationRequest public required global::tryAGI.OpenAI.AnyOf Model { get; set; } /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should be in English. /// [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] public string? Prompt { get; set; } @@ -75,7 +75,7 @@ public sealed partial class CreateTranslationRequest /// Example: whisper-1 /// /// - /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting) should be in English. + /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should be in English. /// /// /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationResponseVerboseJson.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationResponseVerboseJson.g.cs index 5442c755..8f88ff07 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationResponseVerboseJson.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateTranslationResponseVerboseJson.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class CreateTranslationResponseVerboseJson { - /// - /// The duration of the input audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Duration { get; set; } - /// /// The language of the output translation (always `english`). /// @@ -23,10 +16,11 @@ public sealed partial class CreateTranslationResponseVerboseJson public required string Language { get; set; } /// - /// Segments of the translated text and their corresponding details. + /// The duration of the input audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("segments")] - public global::System.Collections.Generic.IList? Segments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("duration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Duration { get; set; } /// /// The translated text. @@ -35,6 +29,12 @@ public sealed partial class CreateTranslationResponseVerboseJson [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } + /// + /// Segments of the translated text and their corresponding details. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segments")] + public global::System.Collections.Generic.IList? Segments { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,29 +44,29 @@ public sealed partial class CreateTranslationResponseVerboseJson /// /// Initializes a new instance of the class. /// - /// - /// The duration of the input audio. - /// /// /// The language of the output translation (always `english`). /// - /// - /// Segments of the translated text and their corresponding details. + /// + /// The duration of the input audio. /// /// /// The translated text. /// + /// + /// Segments of the translated text and their corresponding details. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateTranslationResponseVerboseJson( - double duration, string language, + double duration, string text, global::System.Collections.Generic.IList? segments) { - this.Duration = duration; this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); + this.Duration = duration; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.Segments = segments; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequest.g.cs index 6cbc6c7d..8dd88e79 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequest.g.cs @@ -9,41 +9,43 @@ namespace tryAGI.OpenAI public sealed partial class CreateUploadRequest { /// - /// The number of bytes in the file you are uploading. + /// The name of the file to upload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Bytes { get; set; } + public required string Filename { get; set; } /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. + /// The intended purpose of the uploaded file.
+ /// See the [documentation on File
+ /// purposes](/docs/api-reference/files/create#files-create-purpose). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.FileExpirationAfter? ExpiresAfter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("purpose")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateUploadRequestPurposeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CreateUploadRequestPurpose Purpose { get; set; } /// - /// The name of the file to upload. + /// The number of bytes in the file you are uploading. /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } + public required int Bytes { get; set; } /// /// The MIME type of the file.
- /// This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. + /// This must fall within the supported MIME types for your file purpose. See
+ /// the supported MIME types for assistants and vision. ///
[global::System.Text.Json.Serialization.JsonPropertyName("mime_type")] [global::System.Text.Json.Serialization.JsonRequired] public required string MimeType { get; set; } /// - /// The intended purpose of the uploaded file.
- /// See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("purpose")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CreateUploadRequestPurposeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CreateUploadRequestPurpose Purpose { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.FileExpirationAfter? ExpiresAfter { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,37 +56,39 @@ public sealed partial class CreateUploadRequest /// /// Initializes a new instance of the class. /// - /// - /// The number of bytes in the file you are uploading. - /// - /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The name of the file to upload. /// + /// + /// The intended purpose of the uploaded file.
+ /// See the [documentation on File
+ /// purposes](/docs/api-reference/files/create#files-create-purpose). + /// + /// + /// The number of bytes in the file you are uploading. + /// /// /// The MIME type of the file.
- /// This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. + /// This must fall within the supported MIME types for your file purpose. See
+ /// the supported MIME types for assistants and vision. /// - /// - /// The intended purpose of the uploaded file.
- /// See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateUploadRequest( - int bytes, string filename, - string mimeType, global::tryAGI.OpenAI.CreateUploadRequestPurpose purpose, + int bytes, + string mimeType, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter) { - this.Bytes = bytes; this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); this.Purpose = purpose; + this.Bytes = bytes; + this.MimeType = mimeType ?? throw new global::System.ArgumentNullException(nameof(mimeType)); this.ExpiresAfter = expiresAfter; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequestPurpose.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequestPurpose.g.cs index a05b2c1f..e451112e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequestPurpose.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateUploadRequestPurpose.g.cs @@ -5,7 +5,8 @@ namespace tryAGI.OpenAI { /// /// The intended purpose of the uploaded file.
- /// See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + /// See the [documentation on File
+ /// purposes](/docs/api-reference/files/create#files-create-purpose). ///
public enum CreateUploadRequestPurpose { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequest.g.cs index b759e32d..1f0d1628 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequest.g.cs @@ -9,28 +9,29 @@ namespace tryAGI.OpenAI public sealed partial class CreateVectorStoreFileBatchRequest { /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] - public object? Attributes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("files")] + public global::System.Collections.Generic.IList? Files { get; set; } /// - /// 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. + /// 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::tryAGI.OpenAI.JsonConverters.ChunkingStrategyRequestParamJsonConverter))] public global::tryAGI.OpenAI.ChunkingStrategyRequestParam? ChunkingStrategy { get; set; } /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList FileIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] + public object? Attributes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,30 +42,29 @@ public sealed partial class CreateVectorStoreFileBatchRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. /// - /// - /// 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. + /// + /// A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. /// - /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateVectorStoreFileBatchRequest( - global::System.Collections.Generic.IList fileIds, - object? attributes, - global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy) + global::System.Collections.Generic.IList? fileIds, + global::System.Collections.Generic.IList? files, + global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy, + object? attributes) { - this.FileIds = fileIds ?? throw new global::System.ArgumentNullException(nameof(fileIds)); - this.Attributes = attributes; + this.FileIds = fileIds; + this.Files = files; this.ChunkingStrategy = chunkingStrategy; + this.Attributes = attributes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.Json.g.cs new file mode 100644 index 00000000..533d56fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVectorStoreFileBatchRequestVariant1 + { + /// + /// 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::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1; + } + + /// + /// 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::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.g.cs new file mode 100644 index 00000000..a454a311 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant1.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateVectorStoreFileBatchRequestVariant1 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.Json.g.cs new file mode 100644 index 00000000..d4b54836 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVectorStoreFileBatchRequestVariant2 + { + /// + /// 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::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2; + } + + /// + /// 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::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequestVariant2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.g.cs new file mode 100644 index 00000000..6848f016 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileBatchRequestVariant2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateVectorStoreFileBatchRequestVariant2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileRequest.g.cs index 46620fea..853ed6ba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreFileRequest.g.cs @@ -9,28 +9,24 @@ namespace tryAGI.OpenAI public sealed partial class CreateVectorStoreFileRequest { /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] - public object? Attributes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } /// - /// 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. + /// 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::tryAGI.OpenAI.JsonConverters.ChunkingStrategyRequestParamJsonConverter))] public global::tryAGI.OpenAI.ChunkingStrategyRequestParam? ChunkingStrategy { get; set; } /// - /// A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] + public object? Attributes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,30 +37,24 @@ public sealed partial class CreateVectorStoreFileRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. /// /// - /// 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. - /// - /// - /// A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateVectorStoreFileRequest( string fileId, - object? attributes, - global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy) + global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy, + object? attributes) { this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - this.Attributes = attributes; this.ChunkingStrategy = chunkingStrategy; + this.Attributes = attributes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreRequest.g.cs index 657c93d7..5946f0a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVectorStoreRequest.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,11 +11,22 @@ namespace tryAGI.OpenAI 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. + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChunkingStrategyRequestParamJsonConverter))] - public global::tryAGI.OpenAI.ChunkingStrategyRequestParam? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// The name of the vector store. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// A description for the vector store. Can be used to describe the vector store's purpose. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// /// The expiration policy for a vector store. @@ -22,27 +35,18 @@ public sealed partial class CreateVectorStoreRequest public global::tryAGI.OpenAI.VectorStoreExpirationAfter? ExpiresAfter { get; set; } /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + /// 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("file_ids")] - public global::System.Collections.Generic.IList? FileIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - /// - /// The name of the vector store. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,40 +56,39 @@ public sealed partial class CreateVectorStoreRequest /// /// Initializes a new instance of the class. /// - /// - /// 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. - /// - /// - /// The expiration policy for a vector store. - /// /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. /// /// /// The name of the vector store. /// + /// + /// A description for the vector store. Can be used to describe the vector store's purpose. + /// + /// + /// The expiration policy for a vector store. + /// + /// + /// 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. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateVectorStoreRequest( - global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy, - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter, global::System.Collections.Generic.IList? fileIds, - global::System.Collections.Generic.Dictionary? metadata, - string? name) + string? name, + string? description, + global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter, + global::tryAGI.OpenAI.OneOf? chunkingStrategy, + global::System.Collections.Generic.Dictionary? metadata) { - this.ChunkingStrategy = chunkingStrategy; - this.ExpiresAfter = expiresAfter; this.FileIds = fileIds; - this.Metadata = metadata; this.Name = name; + this.Description = description; + this.ExpiresAfter = expiresAfter; + this.ChunkingStrategy = chunkingStrategy; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.Json.g.cs new file mode 100644 index 00000000..b67212b0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVideoBody + { + /// + /// 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::tryAGI.OpenAI.CreateVideoBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVideoBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVideoBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateVideoBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVideoBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVideoBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.g.cs new file mode 100644 index 00000000..58c58c06 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoBody.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters for creating a new video generation job. + /// + public sealed partial class CreateVideoBody + { + /// + /// The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoModelJsonConverter))] + public global::tryAGI.OpenAI.VideoModel? Model { get; set; } + + /// + /// Text prompt that describes the video to generate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// Optional multipart reference asset that guides generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_reference")] + public byte[]? InputReference { get; set; } + + /// + /// Optional multipart reference asset that guides generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_referencename")] + public string? InputReferencename { get; set; } + + /// + /// Optional JSON-safe image reference that guides generation. Provide exactly one of `image_url` or `file_id`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_reference")] + public global::tryAGI.OpenAI.ImageRefParam2? ImageReference { get; set; } + + /// + /// Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoSecondsJsonConverter))] + public global::tryAGI.OpenAI.VideoSeconds? Seconds { get; set; } + + /// + /// Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoSizeJsonConverter))] + public global::tryAGI.OpenAI.VideoSize? Size { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`. + /// + /// + /// Text prompt that describes the video to generate. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional JSON-safe image reference that guides generation. Provide exactly one of `image_url` or `file_id`. + /// + /// + /// Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + /// + /// + /// Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVideoBody( + string prompt, + global::tryAGI.OpenAI.VideoModel? model, + byte[]? inputReference, + string? inputReferencename, + global::tryAGI.OpenAI.ImageRefParam2? imageReference, + global::tryAGI.OpenAI.VideoSeconds? seconds, + global::tryAGI.OpenAI.VideoSize? size) + { + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.Model = model; + this.InputReference = inputReference; + this.InputReferencename = inputReferencename; + this.ImageReference = imageReference; + this.Seconds = seconds; + this.Size = size; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVideoBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.Json.g.cs new file mode 100644 index 00000000..0a11ed78 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVideoRemixBody + { + /// + /// 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::tryAGI.OpenAI.CreateVideoRemixBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVideoRemixBody), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVideoRemixBody; + } + + /// + /// 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::tryAGI.OpenAI.CreateVideoRemixBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVideoRemixBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVideoRemixBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.g.cs new file mode 100644 index 00000000..8909b5f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVideoRemixBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters for remixing an existing generated video. + /// + public sealed partial class CreateVideoRemixBody + { + /// + /// Updated text prompt that directs the remix generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Updated text prompt that directs the remix generation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVideoRemixBody( + string prompt) + { + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVideoRemixBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.Json.g.cs new file mode 100644 index 00000000..f428f43a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVoiceConsentRequest + { + /// + /// 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::tryAGI.OpenAI.CreateVoiceConsentRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVoiceConsentRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVoiceConsentRequest; + } + + /// + /// 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::tryAGI.OpenAI.CreateVoiceConsentRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVoiceConsentRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVoiceConsentRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.g.cs new file mode 100644 index 00000000..30d49478 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceConsentRequest.g.cs @@ -0,0 +1,90 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateVoiceConsentRequest + { + /// + /// The label to use for this consent recording. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("recording")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] Recording { get; set; } + + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("recordingname")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Recordingname { get; set; } + + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Language { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The label to use for this consent recording. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceConsentRequest( + string name, + byte[] recording, + string recordingname, + string language) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Recording = recording ?? throw new global::System.ArgumentNullException(nameof(recording)); + this.Recordingname = recordingname ?? throw new global::System.ArgumentNullException(nameof(recordingname)); + this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceConsentRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.Json.g.cs new file mode 100644 index 00000000..47079b3c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CreateVoiceRequest + { + /// + /// 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::tryAGI.OpenAI.CreateVoiceRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CreateVoiceRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.CreateVoiceRequest; + } + + /// + /// 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::tryAGI.OpenAI.CreateVoiceRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CreateVoiceRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CreateVoiceRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.g.cs new file mode 100644 index 00000000..03928bac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateVoiceRequest.g.cs @@ -0,0 +1,90 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CreateVoiceRequest + { + /// + /// The name of the new voice. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio_sample")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] AudioSample { get; set; } + + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio_samplename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AudioSamplename { get; set; } + + /// + /// The consent recording ID (for example, `cons_1234`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("consent")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Consent { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the new voice. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The sample audio recording file. Maximum size is 10 MiB.
+ /// Supported MIME types:
+ /// `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`, `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`. + /// + /// + /// The consent recording ID (for example, `cons_1234`). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateVoiceRequest( + string name, + byte[] audioSample, + string audioSamplename, + string consent) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.AudioSample = audioSample ?? throw new global::System.ArgumentNullException(nameof(audioSample)); + this.AudioSamplename = audioSamplename ?? throw new global::System.ArgumentNullException(nameof(audioSamplename)); + this.Consent = consent ?? throw new global::System.ArgumentNullException(nameof(consent)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateVoiceRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.Json.g.cs new file mode 100644 index 00000000..7348db79 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomGrammarFormatParam + { + /// + /// 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::tryAGI.OpenAI.CustomGrammarFormatParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomGrammarFormatParam; + } + + /// + /// 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::tryAGI.OpenAI.CustomGrammarFormatParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomGrammarFormatParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.g.cs new file mode 100644 index 00000000..4f016938 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParam.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A grammar defined by the user. + /// + public sealed partial class CustomGrammarFormatParam + { + /// + /// Grammar format. Always `grammar`.
+ /// Default Value: grammar + ///
+ /// global::tryAGI.OpenAI.CustomGrammarFormatParamType.Grammar + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomGrammarFormatParamTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomGrammarFormatParamType Type { get; set; } = global::tryAGI.OpenAI.CustomGrammarFormatParamType.Grammar; + + /// + /// The syntax of the grammar definition. One of `lark` or `regex`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("syntax")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GrammarSyntax1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.GrammarSyntax1 Syntax { get; set; } + + /// + /// The grammar definition. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("definition")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Definition { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Grammar format. Always `grammar`.
+ /// Default Value: grammar + /// + /// + /// The syntax of the grammar definition. One of `lark` or `regex`. + /// + /// + /// The grammar definition. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomGrammarFormatParam( + global::tryAGI.OpenAI.GrammarSyntax1 syntax, + string definition, + global::tryAGI.OpenAI.CustomGrammarFormatParamType type = global::tryAGI.OpenAI.CustomGrammarFormatParamType.Grammar) + { + this.Syntax = syntax; + this.Definition = definition ?? throw new global::System.ArgumentNullException(nameof(definition)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomGrammarFormatParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParamType.g.cs new file mode 100644 index 00000000..71058f7b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomGrammarFormatParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Grammar format. Always `grammar`.
+ /// Default Value: grammar + ///
+ public enum CustomGrammarFormatParamType + { + /// + /// + /// + Grammar, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomGrammarFormatParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomGrammarFormatParamType value) + { + return value switch + { + CustomGrammarFormatParamType.Grammar => "grammar", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomGrammarFormatParamType? ToEnum(string value) + { + return value switch + { + "grammar" => CustomGrammarFormatParamType.Grammar, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.Json.g.cs new file mode 100644 index 00000000..fca96346 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomTextFormatParam + { + /// + /// 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::tryAGI.OpenAI.CustomTextFormatParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomTextFormatParam), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomTextFormatParam; + } + + /// + /// 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::tryAGI.OpenAI.CustomTextFormatParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomTextFormatParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomTextFormatParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.g.cs new file mode 100644 index 00000000..77643cd5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Unconstrained free-form text. + /// + public sealed partial class CustomTextFormatParam + { + /// + /// Unconstrained text format. Always `text`.
+ /// Default Value: text + ///
+ /// global::tryAGI.OpenAI.CustomTextFormatParamType.Text + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomTextFormatParamTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomTextFormatParamType Type { get; set; } = global::tryAGI.OpenAI.CustomTextFormatParamType.Text; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unconstrained text format. Always `text`.
+ /// Default Value: text + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomTextFormatParam( + global::tryAGI.OpenAI.CustomTextFormatParamType type = global::tryAGI.OpenAI.CustomTextFormatParamType.Text) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomTextFormatParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParamType.g.cs new file mode 100644 index 00000000..2c3f8fc4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTextFormatParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Unconstrained text format. Always `text`.
+ /// Default Value: text + ///
+ public enum CustomTextFormatParamType + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomTextFormatParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomTextFormatParamType value) + { + return value switch + { + CustomTextFormatParamType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomTextFormatParamType? ToEnum(string value) + { + return value switch + { + "text" => CustomTextFormatParamType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.Json.g.cs deleted file mode 100644 index 0ae14f65..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomTool - { - /// - /// 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::tryAGI.OpenAI.CustomTool? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomTool), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomTool; - } - - /// - /// 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::tryAGI.OpenAI.CustomTool? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomTool), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomTool; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.g.cs deleted file mode 100644 index 5e67bc84..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomTool.g.cs +++ /dev/null @@ -1,82 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A custom tool that processes input using a specified format. Learn more about
- /// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools). - ///
- public sealed partial class CustomTool - { - /// - /// Optional description of the custom tool, used to provide more context. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// The input format for the custom tool. Default is unconstrained text. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FormatJsonConverter))] - public global::tryAGI.OpenAI.Format? Format { get; set; } - - /// - /// The name of the custom tool, used to identify it in tool calls. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// The type of the custom tool. Always `custom`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolTypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolType 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Optional description of the custom tool, used to provide more context. - /// - /// - /// The input format for the custom tool. Default is unconstrained text. - /// - /// - /// The name of the custom tool, used to identify it in tool calls. - /// - /// - /// The type of the custom tool. Always `custom`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomTool( - string name, - string? description, - global::tryAGI.OpenAI.Format? format, - global::tryAGI.OpenAI.CustomToolType type) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description; - this.Format = format; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomTool() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCall.g.cs index df49c897..44dc376a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCall.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class CustomToolCall { /// - /// An identifier used to map this custom tool call to a tool call output. + /// The type of the custom tool call. Always `custom_tool_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomToolCallType Type { get; set; } /// /// The unique ID of the custom tool call in the OpenAI platform. @@ -22,11 +22,17 @@ public sealed partial class CustomToolCall public string? Id { get; set; } /// - /// The input for the custom tool call generated by the model. + /// An identifier used to map this custom tool call to a tool call output. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { get; set; } + public required string CallId { get; set; } + + /// + /// The namespace of the custom tool being called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("namespace")] + public string? Namespace { get; set; } /// /// The name of the custom tool being called. @@ -36,11 +42,11 @@ public sealed partial class CustomToolCall public required string Name { get; set; } /// - /// The type of the custom tool call. Always `custom_tool_call`. + /// The input for the custom tool call generated by the model. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Input { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,36 +57,41 @@ public sealed partial class CustomToolCall /// /// Initializes a new instance of the class. /// - /// - /// An identifier used to map this custom tool call to a tool call output. + /// + /// The type of the custom tool call. Always `custom_tool_call`. /// /// /// The unique ID of the custom tool call in the OpenAI platform. /// - /// - /// The input for the custom tool call generated by the model. + /// + /// An identifier used to map this custom tool call to a tool call output. + /// + /// + /// The namespace of the custom tool being called. /// /// /// The name of the custom tool being called. /// - /// - /// The type of the custom tool call. Always `custom_tool_call`. + /// + /// The input for the custom tool call generated by the model. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CustomToolCall( string callId, - string input, string name, + string input, + global::tryAGI.OpenAI.CustomToolCallType type, string? id, - global::tryAGI.OpenAI.CustomToolCallType type) + string? @namespace) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Id = id; + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Type = type; + this.Id = id; + this.Namespace = @namespace; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCallOutput.g.cs index 3716a412..ab80d147 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCallOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolCallOutput.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,11 +11,11 @@ namespace tryAGI.OpenAI public sealed partial class CustomToolCallOutput { /// - /// The call ID, used to map this custom tool call output to a custom tool call. + /// The type of the custom tool call output. Always `custom_tool_call_output`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomToolCallOutputType Type { get; set; } /// /// The unique ID of the custom tool call output in the OpenAI platform. @@ -22,18 +24,20 @@ public sealed partial class CustomToolCallOutput public string? Id { get; set; } /// - /// The output from the custom tool call generated by your code. + /// The call ID, used to map this custom tool call output to a custom tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Output { get; set; } + public required string CallId { get; set; } /// - /// The type of the custom tool call output. Always `custom_tool_call_output`. + /// The output from the custom tool call generated by your code.
+ /// Can be a string or an list of output content. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolCallOutputTypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolCallOutputType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf> Output { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,31 +48,32 @@ public sealed partial class CustomToolCallOutput /// /// Initializes a new instance of the class. /// - /// - /// The call ID, used to map this custom tool call output to a custom tool call. + /// + /// The type of the custom tool call output. Always `custom_tool_call_output`. /// /// /// The unique ID of the custom tool call output in the OpenAI platform. /// - /// - /// The output from the custom tool call generated by your code. + /// + /// The call ID, used to map this custom tool call output to a custom tool call. /// - /// - /// The type of the custom tool call output. Always `custom_tool_call_output`. + /// + /// The output from the custom tool call generated by your code.
+ /// Can be a string or an list of output content. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CustomToolCallOutput( string callId, - string output, - string? id, - global::tryAGI.OpenAI.CustomToolCallOutputType type) + global::tryAGI.OpenAI.OneOf> output, + global::tryAGI.OpenAI.CustomToolCallOutputType type, + string? id) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); - this.Id = id; + this.Output = output; this.Type = type; + this.Id = id; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletions.g.cs index 7a9bbddc..57035552 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletions.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class CustomToolChatCompletions { - /// - /// Properties of the custom tool. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("custom")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustom Custom { get; set; } - /// /// The type of the custom tool. Always `custom`. /// @@ -22,6 +15,13 @@ public sealed partial class CustomToolChatCompletions [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsTypeJsonConverter))] public global::tryAGI.OpenAI.CustomToolChatCompletionsType Type { get; set; } + /// + /// Properties of the custom tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("custom")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustom Custom { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class CustomToolChatCompletions /// /// Initializes a new instance of the class. /// - /// - /// Properties of the custom tool. - /// /// /// The type of the custom tool. Always `custom`. /// + /// + /// Properties of the custom tool. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustom.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustom.g.cs index ca4943db..547efaec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustom.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustom.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,6 +10,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class CustomToolChatCompletionsCustom { + /// + /// The name of the custom tool, used to identify it in tool calls. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + /// /// Optional description of the custom tool, used to provide more context. /// @@ -18,15 +27,8 @@ public sealed partial class CustomToolChatCompletionsCustom /// The input format for the custom tool. Default is unconstrained text. ///
[global::System.Text.Json.Serialization.JsonPropertyName("format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.Format2JsonConverter))] - public global::tryAGI.OpenAI.Format2? Format { get; set; } - - /// - /// The name of the custom tool, used to identify it in tool calls. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Format { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,22 +39,22 @@ public sealed partial class CustomToolChatCompletionsCustom /// /// Initializes a new instance of the class. /// + /// + /// The name of the custom tool, used to identify it in tool calls. + /// /// /// Optional description of the custom tool, used to provide more context. /// /// /// The input format for the custom tool. Default is unconstrained text. /// - /// - /// The name of the custom tool, used to identify it in tool calls. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CustomToolChatCompletionsCustom( string name, string? description, - global::tryAGI.OpenAI.Format2? format) + global::tryAGI.OpenAI.OneOf? format) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Description = description; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.Json.g.cs deleted file mode 100644 index d5281b20..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolChatCompletionsCustomFormatDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.g.cs deleted file mode 100644 index 00c4c234..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CustomToolChatCompletionsCustomFormatDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolChatCompletionsCustomFormatDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolChatCompletionsCustomFormatDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.Json.g.cs new file mode 100644 index 00000000..cd9a45fd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomToolChatCompletionsCustomFormatGrammarFormat + { + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat; + } + + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.g.cs new file mode 100644 index 00000000..9db820a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormat.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A grammar defined by the user. + /// + public sealed partial class CustomToolChatCompletionsCustomFormatGrammarFormat + { + /// + /// Grammar format. Always `grammar`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType Type { get; set; } + + /// + /// Your chosen grammar. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("grammar")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar Grammar { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Grammar format. Always `grammar`. + /// + /// + /// Your chosen grammar. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomToolChatCompletionsCustomFormatGrammarFormat( + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar grammar, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatType type) + { + this.Grammar = grammar ?? throw new global::System.ArgumentNullException(nameof(grammar)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomToolChatCompletionsCustomFormatGrammarFormat() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.Json.g.cs new file mode 100644 index 00000000..308d55a7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomToolChatCompletionsCustomFormatGrammarFormatGrammar + { + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar; + } + + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.g.cs new file mode 100644 index 00000000..389a88e1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammar.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Your chosen grammar. + /// + public sealed partial class CustomToolChatCompletionsCustomFormatGrammarFormatGrammar + { + /// + /// The grammar definition. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("definition")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Definition { get; set; } + + /// + /// The syntax of the grammar definition. One of `lark` or `regex`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("syntax")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax Syntax { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The grammar definition. + /// + /// + /// The syntax of the grammar definition. One of `lark` or `regex`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomToolChatCompletionsCustomFormatGrammarFormatGrammar( + string definition, + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax syntax) + { + this.Definition = definition ?? throw new global::System.ArgumentNullException(nameof(definition)); + this.Syntax = syntax; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomToolChatCompletionsCustomFormatGrammarFormatGrammar() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs new file mode 100644 index 00000000..e3fbf796 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The syntax of the grammar definition. One of `lark` or `regex`. + /// + public enum CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax + { + /// + /// + /// + Lark, + /// + /// + /// + Regex, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntaxExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax value) + { + return value switch + { + CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.Lark => "lark", + CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.Regex => "regex", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax? ToEnum(string value) + { + return value switch + { + "lark" => CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.Lark, + "regex" => CustomToolChatCompletionsCustomFormatGrammarFormatGrammarSyntax.Regex, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs new file mode 100644 index 00000000..f668e4c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatGrammarFormatType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Grammar format. Always `grammar`. + /// + public enum CustomToolChatCompletionsCustomFormatGrammarFormatType + { + /// + /// + /// + Grammar, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomToolChatCompletionsCustomFormatGrammarFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomToolChatCompletionsCustomFormatGrammarFormatType value) + { + return value switch + { + CustomToolChatCompletionsCustomFormatGrammarFormatType.Grammar => "grammar", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomToolChatCompletionsCustomFormatGrammarFormatType? ToEnum(string value) + { + return value switch + { + "grammar" => CustomToolChatCompletionsCustomFormatGrammarFormatType.Grammar, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.Json.g.cs new file mode 100644 index 00000000..7db6efe5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomToolChatCompletionsCustomFormatTextFormat + { + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat; + } + + /// + /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.g.cs new file mode 100644 index 00000000..39625c4c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormat.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Unconstrained free-form text. + /// + public sealed partial class CustomToolChatCompletionsCustomFormatTextFormat + { + /// + /// Unconstrained text format. Always `text`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatTextFormatTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unconstrained text format. Always `text`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomToolChatCompletionsCustomFormatTextFormat( + global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatTextFormatType type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomToolChatCompletionsCustomFormatTextFormat() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs new file mode 100644 index 00000000..51dc40b5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatTextFormatType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Unconstrained text format. Always `text`. + /// + public enum CustomToolChatCompletionsCustomFormatTextFormatType + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomToolChatCompletionsCustomFormatTextFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomToolChatCompletionsCustomFormatTextFormatType value) + { + return value switch + { + CustomToolChatCompletionsCustomFormatTextFormatType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomToolChatCompletionsCustomFormatTextFormatType? ToEnum(string value) + { + return value switch + { + "text" => CustomToolChatCompletionsCustomFormatTextFormatType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.Json.g.cs deleted file mode 100644 index 5ad39c55..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolChatCompletionsCustomFormatVariant1 - { - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.g.cs deleted file mode 100644 index 149887c0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Unconstrained free-form text. - /// - public sealed partial class CustomToolChatCompletionsCustomFormatVariant1 - { - /// - /// Unconstrained text format. Always `text`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Unconstrained text format. Always `text`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolChatCompletionsCustomFormatVariant1( - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1Type type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolChatCompletionsCustomFormatVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs deleted file mode 100644 index 2e3d230a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Unconstrained text format. Always `text`. - /// - public enum CustomToolChatCompletionsCustomFormatVariant1Type - { - /// - /// - /// - Text, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolChatCompletionsCustomFormatVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolChatCompletionsCustomFormatVariant1Type value) - { - return value switch - { - CustomToolChatCompletionsCustomFormatVariant1Type.Text => "text", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolChatCompletionsCustomFormatVariant1Type? ToEnum(string value) - { - return value switch - { - "text" => CustomToolChatCompletionsCustomFormatVariant1Type.Text, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.Json.g.cs deleted file mode 100644 index 312863a1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolChatCompletionsCustomFormatVariant2 - { - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.g.cs deleted file mode 100644 index 97c660d8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A grammar defined by the user. - /// - public sealed partial class CustomToolChatCompletionsCustomFormatVariant2 - { - /// - /// Your chosen grammar. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("grammar")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar Grammar { get; set; } - - /// - /// Grammar format. Always `grammar`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Your chosen grammar. - /// - /// - /// Grammar format. Always `grammar`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolChatCompletionsCustomFormatVariant2( - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar grammar, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Type type) - { - this.Grammar = grammar ?? throw new global::System.ArgumentNullException(nameof(grammar)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolChatCompletionsCustomFormatVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.Json.g.cs deleted file mode 100644 index 6d4d2621..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolChatCompletionsCustomFormatVariant2Grammar - { - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2Grammar; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.g.cs deleted file mode 100644 index adeada57..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Grammar.g.cs +++ /dev/null @@ -1,59 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Your chosen grammar. - /// - public sealed partial class CustomToolChatCompletionsCustomFormatVariant2Grammar - { - /// - /// The grammar definition. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("definition")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Definition { get; set; } - - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("syntax")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax Syntax { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The grammar definition. - /// - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolChatCompletionsCustomFormatVariant2Grammar( - string definition, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax syntax) - { - this.Definition = definition ?? throw new global::System.ArgumentNullException(nameof(definition)); - this.Syntax = syntax; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolChatCompletionsCustomFormatVariant2Grammar() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs deleted file mode 100644 index 2c3931d1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// - public enum CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax - { - /// - /// - /// - Lark, - /// - /// - /// - Regex, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolChatCompletionsCustomFormatVariant2GrammarSyntaxExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax value) - { - return value switch - { - CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.Lark => "lark", - CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.Regex => "regex", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax? ToEnum(string value) - { - return value switch - { - "lark" => CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.Lark, - "regex" => CustomToolChatCompletionsCustomFormatVariant2GrammarSyntax.Regex, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs deleted file mode 100644 index bde60e1d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolChatCompletionsCustomFormatVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Grammar format. Always `grammar`. - /// - public enum CustomToolChatCompletionsCustomFormatVariant2Type - { - /// - /// - /// - Grammar, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolChatCompletionsCustomFormatVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolChatCompletionsCustomFormatVariant2Type value) - { - return value switch - { - CustomToolChatCompletionsCustomFormatVariant2Type.Grammar => "grammar", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolChatCompletionsCustomFormatVariant2Type? ToEnum(string value) - { - return value switch - { - "grammar" => CustomToolChatCompletionsCustomFormatVariant2Type.Grammar, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.Json.g.cs deleted file mode 100644 index bb4c27ad..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolFormatDiscriminator - { - /// - /// 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::tryAGI.OpenAI.CustomToolFormatDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolFormatDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolFormatDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolFormatDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolFormatDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolFormatDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.g.cs deleted file mode 100644 index 9970c18a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class CustomToolFormatDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolFormatDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolFormatDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.Json.g.cs deleted file mode 100644 index a0eb0210..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolFormatVariant1 - { - /// - /// 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::tryAGI.OpenAI.CustomToolFormatVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolFormatVariant1; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolFormatVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolFormatVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolFormatVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.g.cs deleted file mode 100644 index 95eed049..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Unconstrained free-form text. - /// - public sealed partial class CustomToolFormatVariant1 - { - /// - /// Unconstrained text format. Always `text`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolFormatVariant1Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Unconstrained text format. Always `text`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolFormatVariant1( - global::tryAGI.OpenAI.CustomToolFormatVariant1Type type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolFormatVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1Type.g.cs deleted file mode 100644 index ddb13e75..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Unconstrained text format. Always `text`. - /// - public enum CustomToolFormatVariant1Type - { - /// - /// - /// - Text, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolFormatVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolFormatVariant1Type value) - { - return value switch - { - CustomToolFormatVariant1Type.Text => "text", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolFormatVariant1Type? ToEnum(string value) - { - return value switch - { - "text" => CustomToolFormatVariant1Type.Text, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.Json.g.cs deleted file mode 100644 index bd0d91ce..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class CustomToolFormatVariant2 - { - /// - /// 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::tryAGI.OpenAI.CustomToolFormatVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolFormatVariant2; - } - - /// - /// 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::tryAGI.OpenAI.CustomToolFormatVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolFormatVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.g.cs deleted file mode 100644 index c7c9c7c7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2.g.cs +++ /dev/null @@ -1,71 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A grammar defined by the user. - /// - public sealed partial class CustomToolFormatVariant2 - { - /// - /// The grammar definition. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("definition")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Definition { get; set; } - - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("syntax")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2SyntaxJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax Syntax { get; set; } - - /// - /// Grammar format. Always `grammar`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolFormatVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.CustomToolFormatVariant2Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The grammar definition. - /// - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// - /// - /// Grammar format. Always `grammar`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CustomToolFormatVariant2( - string definition, - global::tryAGI.OpenAI.CustomToolFormatVariant2Syntax syntax, - global::tryAGI.OpenAI.CustomToolFormatVariant2Type type) - { - this.Definition = definition ?? throw new global::System.ArgumentNullException(nameof(definition)); - this.Syntax = syntax; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomToolFormatVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Syntax.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Syntax.g.cs deleted file mode 100644 index 920e5224..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Syntax.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The syntax of the grammar definition. One of `lark` or `regex`. - /// - public enum CustomToolFormatVariant2Syntax - { - /// - /// - /// - Lark, - /// - /// - /// - Regex, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolFormatVariant2SyntaxExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolFormatVariant2Syntax value) - { - return value switch - { - CustomToolFormatVariant2Syntax.Lark => "lark", - CustomToolFormatVariant2Syntax.Regex => "regex", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolFormatVariant2Syntax? ToEnum(string value) - { - return value switch - { - "lark" => CustomToolFormatVariant2Syntax.Lark, - "regex" => CustomToolFormatVariant2Syntax.Regex, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Type.g.cs deleted file mode 100644 index 7b30e7ee..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolFormatVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Grammar format. Always `grammar`. - /// - public enum CustomToolFormatVariant2Type - { - /// - /// - /// - Grammar, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolFormatVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolFormatVariant2Type value) - { - return value switch - { - CustomToolFormatVariant2Type.Grammar => "grammar", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolFormatVariant2Type? ToEnum(string value) - { - return value switch - { - "grammar" => CustomToolFormatVariant2Type.Grammar, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.Json.g.cs new file mode 100644 index 00000000..53285419 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomToolParam + { + /// + /// 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::tryAGI.OpenAI.CustomToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolParam; + } + + /// + /// 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::tryAGI.OpenAI.CustomToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.g.cs new file mode 100644 index 00000000..1534ff4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParam.g.cs @@ -0,0 +1,95 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + /// + public sealed partial class CustomToolParam + { + /// + /// The type of the custom tool. Always `custom`.
+ /// Default Value: custom + ///
+ /// global::tryAGI.OpenAI.CustomToolParamType.Custom + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.CustomToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.CustomToolParamType Type { get; set; } = global::tryAGI.OpenAI.CustomToolParamType.Custom; + + /// + /// The name of the custom tool, used to identify it in tool calls. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Optional description of the custom tool, used to provide more context. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// The input format for the custom tool. Default is unconstrained text. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.Format2JsonConverter))] + public global::tryAGI.OpenAI.Format2? Format { get; set; } + + /// + /// Whether this tool should be deferred and discovered via tool search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("defer_loading")] + public bool? DeferLoading { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the custom tool. Always `custom`.
+ /// Default Value: custom + /// + /// + /// The name of the custom tool, used to identify it in tool calls. + /// + /// + /// Optional description of the custom tool, used to provide more context. + /// + /// + /// The input format for the custom tool. Default is unconstrained text. + /// + /// + /// Whether this tool should be deferred and discovered via tool search. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomToolParam( + string name, + string? description, + global::tryAGI.OpenAI.Format2? format, + bool? deferLoading, + global::tryAGI.OpenAI.CustomToolParamType type = global::tryAGI.OpenAI.CustomToolParamType.Custom) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Type = type; + this.Description = description; + this.Format = format; + this.DeferLoading = deferLoading; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.Json.g.cs new file mode 100644 index 00000000..db0fdcd5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class CustomToolParamFormatDiscriminator + { + /// + /// 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::tryAGI.OpenAI.CustomToolParamFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.CustomToolParamFormatDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.CustomToolParamFormatDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.CustomToolParamFormatDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.CustomToolParamFormatDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.CustomToolParamFormatDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.g.cs new file mode 100644 index 00000000..e80bfeea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamFormatDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class CustomToolParamFormatDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CustomToolParamFormatDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public CustomToolParamFormatDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamType.g.cs new file mode 100644 index 00000000..bc3a6b4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the custom tool. Always `custom`.
+ /// Default Value: custom + ///
+ public enum CustomToolParamType + { + /// + /// + /// + Custom, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomToolParamType value) + { + return value switch + { + CustomToolParamType.Custom => "custom", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomToolParamType? ToEnum(string value) + { + return value switch + { + "custom" => CustomToolParamType.Custom, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolType.g.cs deleted file mode 100644 index fc01a35a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CustomToolType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of the custom tool. Always `custom`. - /// - public enum CustomToolType - { - /// - /// - /// - Custom, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomToolTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomToolType value) - { - return value switch - { - CustomToolType.Custom => "custom", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomToolType? ToEnum(string value) - { - return value switch - { - "custom" => CustomToolType.Custom, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteAssistantResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteAssistantResponse.g.cs index 3498c784..ec8898e3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteAssistantResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteAssistantResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteAssistantResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteAssistantResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteAssistantResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteAssistantResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteCertificateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteCertificateResponse.g.cs index 6daa1680..6dfc24dc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteCertificateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteCertificateResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class DeleteCertificateResponse { - /// - /// The ID of the certificate that was deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The object type, must be `certificate.deleted`. /// @@ -22,6 +15,13 @@ public sealed partial class DeleteCertificateResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeleteCertificateResponseObjectJsonConverter))] public global::tryAGI.OpenAI.DeleteCertificateResponseObject Object { get; set; } + /// + /// The ID of the certificate that was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class DeleteCertificateResponse /// /// Initializes a new instance of the class. /// - /// - /// The ID of the certificate that was deleted. - /// /// /// The object type, must be `certificate.deleted`. /// + /// + /// The ID of the certificate that was deleted. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalResponse.g.cs index 179899c4..ba317f53 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI ///
public sealed partial class DeleteEvalResponse { + /// + /// Example: eval.deleted + /// + /// eval.deleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// Example: true /// @@ -24,14 +32,6 @@ public sealed partial class DeleteEvalResponse [global::System.Text.Json.Serialization.JsonRequired] public required string EvalId { get; set; } - /// - /// Example: eval.deleted - /// - /// eval.deleted - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,26 +41,26 @@ public sealed partial class DeleteEvalResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: eval.deleted + /// /// /// Example: true /// /// /// Example: eval_abc123 /// - /// - /// Example: eval.deleted - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteEvalResponse( + string @object, bool deleted, - string evalId, - string @object) + string evalId) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Deleted = deleted; this.EvalId = evalId ?? throw new global::System.ArgumentNullException(nameof(evalId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalRunResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalRunResponse.g.cs index 83aed400..421419c5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalRunResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteEvalRunResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class DeleteEvalRunResponse { - /// - /// Example: true - /// - /// true - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - public bool? Deleted { get; set; } - /// /// Example: eval.run.deleted /// @@ -22,6 +15,13 @@ public sealed partial class DeleteEvalRunResponse [global::System.Text.Json.Serialization.JsonPropertyName("object")] public string? Object { get; set; } + /// + /// Example: true + /// + /// true + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + public bool? Deleted { get; set; } + /// /// Example: evalrun_677469f564d48190807532a852da3afb /// @@ -38,12 +38,12 @@ public sealed partial class DeleteEvalRunResponse /// /// Initializes a new instance of the class. /// - /// - /// Example: true - /// /// /// Example: eval.run.deleted /// + /// + /// Example: true + /// /// /// Example: evalrun_677469f564d48190807532a852da3afb /// @@ -51,12 +51,12 @@ public sealed partial class DeleteEvalRunResponse [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteEvalRunResponse( - bool? deleted, string? @object, + bool? deleted, string? runId) { - this.Deleted = deleted; this.Object = @object; + this.Deleted = deleted; this.RunId = runId; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFileResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFileResponse.g.cs index c326c3bb..f9959479 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFileResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFileResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class DeleteFileResponse { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } - /// /// /// @@ -29,6 +22,13 @@ public sealed partial class DeleteFileResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeleteFileResponseObjectJsonConverter))] public global::tryAGI.OpenAI.DeleteFileResponseObject Object { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,19 +38,19 @@ public sealed partial class DeleteFileResponse /// /// Initializes a new instance of the class. /// - /// /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteFileResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteFileResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFineTuningCheckpointPermissionResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFineTuningCheckpointPermissionResponse.g.cs index 186d9c93..760987a9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFineTuningCheckpointPermissionResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteFineTuningCheckpointPermissionResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class DeleteFineTuningCheckpointPermissionResponse { - /// - /// Whether the fine-tuned model checkpoint permission was successfully deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } - /// /// The ID of the fine-tuned model checkpoint permission that was deleted. /// @@ -29,6 +22,13 @@ public sealed partial class DeleteFineTuningCheckpointPermissionResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeleteFineTuningCheckpointPermissionResponseObjectJsonConverter))] public global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponseObject Object { get; set; } + /// + /// Whether the fine-tuned model checkpoint permission was successfully deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class DeleteFineTuningCheckpointPermissionResponse /// /// Initializes a new instance of the class. /// - /// - /// Whether the fine-tuned model checkpoint permission was successfully deleted. - /// /// /// The ID of the fine-tuned model checkpoint permission that was deleted. /// /// /// The object type, which is always "checkpoint.permission". /// + /// + /// Whether the fine-tuned model checkpoint permission was successfully deleted. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteFineTuningCheckpointPermissionResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteMessageResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteMessageResponse.g.cs index 52a66e9f..d64b65a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteMessageResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteMessageResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteMessageResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteMessageResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteMessageResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteMessageResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteModelResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteModelResponse.g.cs index a9dce9b8..5f71ca35 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteModelResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteModelResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteModelResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteModelResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteModelResponse( - bool deleted, string id, + bool deleted, string @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteThreadResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteThreadResponse.g.cs index c2c51d80..acdfadd6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteThreadResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteThreadResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteThreadResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteThreadResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteThreadResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteThreadResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreFileResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreFileResponse.g.cs index 936a88d5..73f5a997 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreFileResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreFileResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteVectorStoreFileResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteVectorStoreFileResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteVectorStoreFileResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteVectorStoreFileResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreResponse.g.cs index 5b4fbaf1..e505c97c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeleteVectorStoreResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class DeleteVectorStoreResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + public required string Id { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required bool Deleted { get; set; } /// /// @@ -38,19 +38,19 @@ public sealed partial class DeleteVectorStoreResponse /// /// Initializes a new instance of the class. /// - /// /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DeleteVectorStoreResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.DeleteVectorStoreResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversation.g.cs index 09ed9e74..978edda6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversation.g.cs @@ -25,7 +25,6 @@ namespace tryAGI.OpenAI [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Resource))] #endif public bool IsResource => Resource != null; - /// /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversationResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversationResource.g.cs index 6426ef46..13c82f46 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversationResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedConversationResource.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class DeletedConversationResource { + /// + /// Default Value: conversation.deleted + /// + /// global::tryAGI.OpenAI.DeletedConversationResourceObject.ConversationDeleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedConversationResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.DeletedConversationResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedConversationResourceObject.ConversationDeleted; + /// /// /// @@ -22,14 +30,6 @@ public sealed partial class DeletedConversationResource [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } - /// - /// Default Value: conversation.deleted - /// - /// global::tryAGI.OpenAI.DeletedConversationResourceObject.ConversationDeleted - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedConversationResourceObjectJsonConverter))] - public global::tryAGI.OpenAI.DeletedConversationResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedConversationResourceObject.ConversationDeleted; - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,11 +39,11 @@ public sealed partial class DeletedConversationResource /// /// Initializes a new instance of the class. /// - /// - /// /// /// Default Value: conversation.deleted /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.Json.g.cs new file mode 100644 index 00000000..6266e443 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DeletedRoleAssignmentResource + { + /// + /// 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::tryAGI.OpenAI.DeletedRoleAssignmentResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DeletedRoleAssignmentResource), + jsonSerializerContext) as global::tryAGI.OpenAI.DeletedRoleAssignmentResource; + } + + /// + /// 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::tryAGI.OpenAI.DeletedRoleAssignmentResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DeletedRoleAssignmentResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DeletedRoleAssignmentResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.g.cs new file mode 100644 index 00000000..47fa4f19 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedRoleAssignmentResource.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after unassigning a role. + /// + public sealed partial class DeletedRoleAssignmentResource + { + /// + /// Identifier for the deleted assignment, such as `group.role.deleted` or `user.role.deleted`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + + /// + /// Whether the assignment was removed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the deleted assignment, such as `group.role.deleted` or `user.role.deleted`. + /// + /// + /// Whether the assignment was removed. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeletedRoleAssignmentResource( + string @object, + bool deleted) + { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.Deleted = deleted; + } + + /// + /// Initializes a new instance of the class. + /// + public DeletedRoleAssignmentResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.Json.g.cs new file mode 100644 index 00000000..7ad1aca9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DeletedSkillResource + { + /// + /// 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::tryAGI.OpenAI.DeletedSkillResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DeletedSkillResource), + jsonSerializerContext) as global::tryAGI.OpenAI.DeletedSkillResource; + } + + /// + /// 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::tryAGI.OpenAI.DeletedSkillResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DeletedSkillResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DeletedSkillResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.g.cs new file mode 100644 index 00000000..0fb0e97a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResource.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class DeletedSkillResource + { + /// + /// Default Value: skill.deleted + /// + /// global::tryAGI.OpenAI.DeletedSkillResourceObject.SkillDeleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.DeletedSkillResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedSkillResourceObject.SkillDeleted; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: skill.deleted + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeletedSkillResource( + bool deleted, + string id, + global::tryAGI.OpenAI.DeletedSkillResourceObject @object = global::tryAGI.OpenAI.DeletedSkillResourceObject.SkillDeleted) + { + this.Deleted = deleted; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public DeletedSkillResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResourceObject.g.cs new file mode 100644 index 00000000..951487ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: skill.deleted + /// + public enum DeletedSkillResourceObject + { + /// + /// + /// + SkillDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DeletedSkillResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DeletedSkillResourceObject value) + { + return value switch + { + DeletedSkillResourceObject.SkillDeleted => "skill.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DeletedSkillResourceObject? ToEnum(string value) + { + return value switch + { + "skill.deleted" => DeletedSkillResourceObject.SkillDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.Json.g.cs new file mode 100644 index 00000000..0fecea0f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DeletedSkillVersionResource + { + /// + /// 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::tryAGI.OpenAI.DeletedSkillVersionResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DeletedSkillVersionResource), + jsonSerializerContext) as global::tryAGI.OpenAI.DeletedSkillVersionResource; + } + + /// + /// 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::tryAGI.OpenAI.DeletedSkillVersionResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DeletedSkillVersionResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DeletedSkillVersionResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.g.cs new file mode 100644 index 00000000..4d7cbcbb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResource.g.cs @@ -0,0 +1,79 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class DeletedSkillVersionResource + { + /// + /// Default Value: skill.version.deleted + /// + /// global::tryAGI.OpenAI.DeletedSkillVersionResourceObject.SkillVersionDeleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedSkillVersionResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.DeletedSkillVersionResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedSkillVersionResourceObject.SkillVersionDeleted; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The deleted skill version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Version { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: skill.version.deleted + /// + /// + /// + /// + /// The deleted skill version. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeletedSkillVersionResource( + bool deleted, + string id, + string version, + global::tryAGI.OpenAI.DeletedSkillVersionResourceObject @object = global::tryAGI.OpenAI.DeletedSkillVersionResourceObject.SkillVersionDeleted) + { + this.Deleted = deleted; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public DeletedSkillVersionResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResourceObject.g.cs new file mode 100644 index 00000000..a22a6f93 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedSkillVersionResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: skill.version.deleted + /// + public enum DeletedSkillVersionResourceObject + { + /// + /// + /// + SkillVersionDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DeletedSkillVersionResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DeletedSkillVersionResourceObject value) + { + return value switch + { + DeletedSkillVersionResourceObject.SkillVersionDeleted => "skill.version.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DeletedSkillVersionResourceObject? ToEnum(string value) + { + return value switch + { + "skill.version.deleted" => DeletedSkillVersionResourceObject.SkillVersionDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.Json.g.cs new file mode 100644 index 00000000..d8a12c5d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DeletedThreadResource + { + /// + /// 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::tryAGI.OpenAI.DeletedThreadResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DeletedThreadResource), + jsonSerializerContext) as global::tryAGI.OpenAI.DeletedThreadResource; + } + + /// + /// 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::tryAGI.OpenAI.DeletedThreadResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DeletedThreadResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DeletedThreadResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.g.cs new file mode 100644 index 00000000..b9e21fa9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResource.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after deleting a thread. + /// + public sealed partial class DeletedThreadResource + { + /// + /// Identifier of the deleted thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread.deleted`.
+ /// Default Value: chatkit.thread.deleted + ///
+ /// global::tryAGI.OpenAI.DeletedThreadResourceObject.ChatkitThreadDeleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedThreadResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.DeletedThreadResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedThreadResourceObject.ChatkitThreadDeleted; + + /// + /// Indicates that the thread has been deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the deleted thread. + /// + /// + /// Type discriminator that is always `chatkit.thread.deleted`.
+ /// Default Value: chatkit.thread.deleted + /// + /// + /// Indicates that the thread has been deleted. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeletedThreadResource( + string id, + bool deleted, + global::tryAGI.OpenAI.DeletedThreadResourceObject @object = global::tryAGI.OpenAI.DeletedThreadResourceObject.ChatkitThreadDeleted) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public DeletedThreadResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResourceObject.g.cs new file mode 100644 index 00000000..cd6cb34f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedThreadResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread.deleted`.
+ /// Default Value: chatkit.thread.deleted + ///
+ public enum DeletedThreadResourceObject + { + /// + /// + /// + ChatkitThreadDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DeletedThreadResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DeletedThreadResourceObject value) + { + return value switch + { + DeletedThreadResourceObject.ChatkitThreadDeleted => "chatkit.thread.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DeletedThreadResourceObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread.deleted" => DeletedThreadResourceObject.ChatkitThreadDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.Json.g.cs new file mode 100644 index 00000000..24502252 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DeletedVideoResource + { + /// + /// 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::tryAGI.OpenAI.DeletedVideoResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DeletedVideoResource), + jsonSerializerContext) as global::tryAGI.OpenAI.DeletedVideoResource; + } + + /// + /// 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::tryAGI.OpenAI.DeletedVideoResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DeletedVideoResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DeletedVideoResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.g.cs new file mode 100644 index 00000000..a3a4df3c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResource.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after deleting a video. + /// + public sealed partial class DeletedVideoResource + { + /// + /// The object type that signals the deletion response.
+ /// Default Value: video.deleted + ///
+ /// global::tryAGI.OpenAI.DeletedVideoResourceObject.VideoDeleted + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DeletedVideoResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.DeletedVideoResourceObject Object { get; set; } = global::tryAGI.OpenAI.DeletedVideoResourceObject.VideoDeleted; + + /// + /// Indicates that the video resource was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } + + /// + /// Identifier of the deleted video. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The object type that signals the deletion response.
+ /// Default Value: video.deleted + /// + /// + /// Indicates that the video resource was deleted. + /// + /// + /// Identifier of the deleted video. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeletedVideoResource( + bool deleted, + string id, + global::tryAGI.OpenAI.DeletedVideoResourceObject @object = global::tryAGI.OpenAI.DeletedVideoResourceObject.VideoDeleted) + { + this.Deleted = deleted; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public DeletedVideoResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResourceObject.g.cs new file mode 100644 index 00000000..606ab99c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DeletedVideoResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type that signals the deletion response.
+ /// Default Value: video.deleted + ///
+ public enum DeletedVideoResourceObject + { + /// + /// + /// + VideoDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DeletedVideoResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DeletedVideoResourceObject value) + { + return value switch + { + DeletedVideoResourceObject.VideoDeleted => "video.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DeletedVideoResourceObject? ToEnum(string value) + { + return value switch + { + "video.deleted" => DeletedVideoResourceObject.VideoDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs index 1a992b5c..9b87defe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs @@ -20,6 +20,10 @@ public enum DetailEnum /// ///
Auto, + /// + /// + /// + Original, } /// @@ -37,6 +41,7 @@ public static string ToValueString(this DetailEnum value) DetailEnum.Low => "low", DetailEnum.High => "high", DetailEnum.Auto => "auto", + DetailEnum.Original => "original", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,6 +55,7 @@ public static string ToValueString(this DetailEnum value) "low" => DetailEnum.Low, "high" => DetailEnum.High, "auto" => DetailEnum.Auto, + "original" => DetailEnum.Original, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEvent.g.cs index 322e935a..542fc8d2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEvent.g.cs @@ -11,16 +11,16 @@ public sealed partial class DoneEvent /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataJsonConverter))] - public global::tryAGI.OpenAI.DoneEventData Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("event")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventJsonConverter))] + public global::tryAGI.OpenAI.DoneEventEvent Event { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventEventJsonConverter))] - public global::tryAGI.OpenAI.DoneEventEvent Event { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoneEventDataJsonConverter))] + public global::tryAGI.OpenAI.DoneEventData Data { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,17 +31,17 @@ public sealed partial class DoneEvent /// /// Initializes a new instance of the class. /// - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public DoneEvent( - global::tryAGI.OpenAI.DoneEventData data, - global::tryAGI.OpenAI.DoneEventEvent @event) + global::tryAGI.OpenAI.DoneEventEvent @event, + global::tryAGI.OpenAI.DoneEventData data) { - this.Data = data; this.Event = @event; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEventData.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEventData.g.cs index f2419d20..b97c96db 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEventData.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoneEventData.g.cs @@ -11,7 +11,7 @@ public enum DoneEventData /// /// /// - DONE, + done, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this DoneEventData value) { return value switch { - DoneEventData.DONE => "[DONE]", + DoneEventData.done => "[DONE]", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this DoneEventData value) { return value switch { - "[DONE]" => DoneEventData.DONE, + "[DONE]" => DoneEventData.done, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.Json.g.cs deleted file mode 100644 index 8e624922..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class DoubleClick - { - /// - /// 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::tryAGI.OpenAI.DoubleClick? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.DoubleClick), - jsonSerializerContext) as global::tryAGI.OpenAI.DoubleClick; - } - - /// - /// 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::tryAGI.OpenAI.DoubleClick? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.DoubleClick), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DoubleClick; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.g.cs deleted file mode 100644 index fff56407..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClick.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A double click action. - /// - public sealed partial class DoubleClick - { - /// - /// Specifies the event type. For a double click action, this property is
- /// always set to `double_click`.
- /// Default Value: double_click - ///
- /// global::tryAGI.OpenAI.DoubleClickType.DoubleClick - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickTypeJsonConverter))] - public global::tryAGI.OpenAI.DoubleClickType Type { get; set; } = global::tryAGI.OpenAI.DoubleClickType.DoubleClick; - - /// - /// The x-coordinate where the double click occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int X { get; set; } - - /// - /// The y-coordinate where the double click occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Y { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Specifies the event type. For a double click action, this property is
- /// always set to `double_click`.
- /// Default Value: double_click - /// - /// - /// The x-coordinate where the double click occurred. - /// - /// - /// The y-coordinate where the double click occurred. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public DoubleClick( - int x, - int y, - global::tryAGI.OpenAI.DoubleClickType type = global::tryAGI.OpenAI.DoubleClickType.DoubleClick) - { - this.X = x; - this.Y = y; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public DoubleClick() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.Json.g.cs new file mode 100644 index 00000000..067ab3a7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DoubleClickAction + { + /// + /// 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::tryAGI.OpenAI.DoubleClickAction? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DoubleClickAction), + jsonSerializerContext) as global::tryAGI.OpenAI.DoubleClickAction; + } + + /// + /// 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::tryAGI.OpenAI.DoubleClickAction? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DoubleClickAction), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DoubleClickAction; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.g.cs new file mode 100644 index 00000000..eb9d606b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickAction.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A double click action. + /// + public sealed partial class DoubleClickAction + { + /// + /// Specifies the event type. For a double click action, this property is always set to `double_click`.
+ /// Default Value: double_click + ///
+ /// global::tryAGI.OpenAI.DoubleClickActionType.DoubleClick + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DoubleClickActionTypeJsonConverter))] + public global::tryAGI.OpenAI.DoubleClickActionType Type { get; set; } = global::tryAGI.OpenAI.DoubleClickActionType.DoubleClick; + + /// + /// The x-coordinate where the double click occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate where the double click occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a double click action, this property is always set to `double_click`.
+ /// Default Value: double_click + /// + /// + /// The x-coordinate where the double click occurred. + /// + /// + /// The y-coordinate where the double click occurred. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DoubleClickAction( + int x, + int y, + global::tryAGI.OpenAI.DoubleClickActionType type = global::tryAGI.OpenAI.DoubleClickActionType.DoubleClick) + { + this.X = x; + this.Y = y; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public DoubleClickAction() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickActionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickActionType.g.cs new file mode 100644 index 00000000..94b4686e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickActionType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a double click action, this property is always set to `double_click`.
+ /// Default Value: double_click + ///
+ public enum DoubleClickActionType + { + /// + /// + /// + DoubleClick, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DoubleClickActionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DoubleClickActionType value) + { + return value switch + { + DoubleClickActionType.DoubleClick => "double_click", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DoubleClickActionType? ToEnum(string value) + { + return value switch + { + "double_click" => DoubleClickActionType.DoubleClick, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickType.g.cs deleted file mode 100644 index 1d0bf697..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DoubleClickType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a double click action, this property is
- /// always set to `double_click`.
- /// Default Value: double_click - ///
- public enum DoubleClickType - { - /// - /// - /// - DoubleClick, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class DoubleClickTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this DoubleClickType value) - { - return value switch - { - DoubleClickType.DoubleClick => "double_click", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static DoubleClickType? ToEnum(string value) - { - return value switch - { - "double_click" => DoubleClickType.DoubleClick, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.Json.g.cs deleted file mode 100644 index c42d2e56..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Drag - { - /// - /// 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::tryAGI.OpenAI.Drag? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Drag), - jsonSerializerContext) as global::tryAGI.OpenAI.Drag; - } - - /// - /// 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::tryAGI.OpenAI.Drag? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Drag), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Drag; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.g.cs deleted file mode 100644 index c9d8a52e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Drag.g.cs +++ /dev/null @@ -1,77 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A drag action. - /// - public sealed partial class Drag - { - /// - /// An array of coordinates representing the path of the drag action. Coordinates will appear as an array
- /// of objects, eg
- /// ```
- /// [
- /// { x: 100, y: 200 },
- /// { x: 200, y: 300 }
- /// ]
- /// ``` - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("path")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Path { get; set; } - - /// - /// Specifies the event type. For a drag action, this property is
- /// always set to `drag`.
- /// Default Value: drag - ///
- /// global::tryAGI.OpenAI.DragType.Drag - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DragTypeJsonConverter))] - public global::tryAGI.OpenAI.DragType Type { get; set; } = global::tryAGI.OpenAI.DragType.Drag; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An array of coordinates representing the path of the drag action. Coordinates will appear as an array
- /// of objects, eg
- /// ```
- /// [
- /// { x: 100, y: 200 },
- /// { x: 200, y: 300 }
- /// ]
- /// ``` - /// - /// - /// Specifies the event type. For a drag action, this property is
- /// always set to `drag`.
- /// Default Value: drag - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Drag( - global::System.Collections.Generic.IList path, - global::tryAGI.OpenAI.DragType type = global::tryAGI.OpenAI.DragType.Drag) - { - this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Drag() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.Json.g.cs new file mode 100644 index 00000000..ff3854b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DragParam + { + /// + /// 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::tryAGI.OpenAI.DragParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DragParam), + jsonSerializerContext) as global::tryAGI.OpenAI.DragParam; + } + + /// + /// 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::tryAGI.OpenAI.DragParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DragParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DragParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.g.cs new file mode 100644 index 00000000..b7e9cc7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParam.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A drag action. + /// + public sealed partial class DragParam + { + /// + /// Specifies the event type. For a drag action, this property is always set to `drag`.
+ /// Default Value: drag + ///
+ /// global::tryAGI.OpenAI.DragParamType.Drag + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.DragParamTypeJsonConverter))] + public global::tryAGI.OpenAI.DragParamType Type { get; set; } = global::tryAGI.OpenAI.DragParamType.Drag; + + /// + /// An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
+ /// ```
+ /// [
+ /// { x: 100, y: 200 },
+ /// { x: 200, y: 300 }
+ /// ]
+ /// ``` + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Path { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a drag action, this property is always set to `drag`.
+ /// Default Value: drag + /// + /// + /// An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
+ /// ```
+ /// [
+ /// { x: 100, y: 200 },
+ /// { x: 200, y: 300 }
+ /// ]
+ /// ``` + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DragParam( + global::System.Collections.Generic.IList path, + global::tryAGI.OpenAI.DragParamType type = global::tryAGI.OpenAI.DragParamType.Drag) + { + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public DragParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParamType.g.cs new file mode 100644 index 00000000..58168783 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a drag action, this property is always set to `drag`.
+ /// Default Value: drag + ///
+ public enum DragParamType + { + /// + /// + /// + Drag, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DragParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DragParamType value) + { + return value switch + { + DragParamType.Drag => "drag", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DragParamType? ToEnum(string value) + { + return value switch + { + "drag" => DragParamType.Drag, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.Json.g.cs new file mode 100644 index 00000000..731c211e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class DragPoint + { + /// + /// 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::tryAGI.OpenAI.DragPoint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.DragPoint), + jsonSerializerContext) as global::tryAGI.OpenAI.DragPoint; + } + + /// + /// 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::tryAGI.OpenAI.DragPoint? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.DragPoint), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.DragPoint; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.g.cs new file mode 100644 index 00000000..e7150692 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragPoint.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`. + /// + public sealed partial class DragPoint + { + /// + /// The x-coordinate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The x-coordinate. + /// + /// + /// The y-coordinate. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DragPoint( + int x, + int y) + { + this.X = x; + this.Y = y; + } + + /// + /// Initializes a new instance of the class. + /// + public DragPoint() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragType.g.cs deleted file mode 100644 index 3a4496ab..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DragType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a drag action, this property is
- /// always set to `drag`.
- /// Default Value: drag - ///
- public enum DragType - { - /// - /// - /// - Drag, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class DragTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this DragType value) - { - return value switch - { - DragType.Drag => "drag", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static DragType? ToEnum(string value) - { - return value switch - { - "drag" => DragType.Drag, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessage.g.cs index c33b956b..488405e2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessage.g.cs @@ -14,23 +14,29 @@ namespace tryAGI.OpenAI ///
public sealed partial class EasyInputMessage { + /// + /// The role of the message input. One of `user`, `assistant`, `system`, or
+ /// `developer`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.EasyInputMessageRole Role { get; set; } + /// /// Text, image, or audio input to the model, used to generate a response.
/// Can also contain previous assistant responses. ///
[global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } /// - /// The role of the message input. One of `user`, `assistant`, `system`, or
- /// `developer`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EasyInputMessageRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EasyInputMessageRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("phase")] + public global::tryAGI.OpenAI.MessagePhase? Phase { get; set; } /// /// The type of the message input. Always `message`. @@ -48,14 +54,15 @@ public sealed partial class EasyInputMessage /// /// Initializes a new instance of the class. /// - /// - /// Text, image, or audio input to the model, used to generate a response.
- /// Can also contain previous assistant responses. - /// /// /// The role of the message input. One of `user`, `assistant`, `system`, or
/// `developer`. /// + /// + /// Text, image, or audio input to the model, used to generate a response.
+ /// Can also contain previous assistant responses. + /// + /// /// /// The type of the message input. Always `message`. /// @@ -63,12 +70,14 @@ public sealed partial class EasyInputMessage [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EasyInputMessage( - global::tryAGI.OpenAI.AnyOf> content, global::tryAGI.OpenAI.EasyInputMessageRole role, + global::tryAGI.OpenAI.OneOf> content, + global::tryAGI.OpenAI.MessagePhase? phase, global::tryAGI.OpenAI.EasyInputMessageType? type) { - this.Content = content; this.Role = role; + this.Content = content; + this.Phase = phase; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.Json.g.cs new file mode 100644 index 00000000..bdc9ba6c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EasyInputMessagePhase + { + /// + /// 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::tryAGI.OpenAI.EasyInputMessagePhase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EasyInputMessagePhase), + jsonSerializerContext) as global::tryAGI.OpenAI.EasyInputMessagePhase; + } + + /// + /// 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::tryAGI.OpenAI.EasyInputMessagePhase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EasyInputMessagePhase), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EasyInputMessagePhase; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.g.cs new file mode 100644 index 00000000..ff6a806b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EasyInputMessagePhase.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EasyInputMessagePhase + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.Json.g.cs new file mode 100644 index 00000000..28d8b0b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParam + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParam), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParam; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.g.cs new file mode 100644 index 00000000..7f316f02 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParam.g.cs @@ -0,0 +1,260 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// JSON request body for image edits.
+ /// Use `images` (array of `ImageRefParam`) instead of multipart `image` uploads.
+ /// You can reference images via external URLs, data URLs, or uploaded file IDs.
+ /// JSON edits support GPT image models only; DALL-E edits require multipart (`dall-e-2` only). + ///
+ public sealed partial class EditImageBodyJsonParam + { + /// + /// The model to use for image editing.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 + ///
+ /// gpt-image-1.5 + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + + /// + /// Input image references to edit.
+ /// For GPT image models, you can provide up to 16 images. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("images")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Images { get; set; } + + /// + /// Reference an input image by either URL or uploaded file ID.
+ /// Provide exactly one of `image_url` or `file_id`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mask")] + public global::tryAGI.OpenAI.ImageRefParam? Mask { get; set; } + + /// + /// A text description of the desired image edit.
+ /// Example: Add a watercolor effect and keep the subject centered + ///
+ /// Add a watercolor effect and keep the subject centered + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// The number of edited images to generate.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ /// 1 + [global::System.Text.Json.Serialization.JsonPropertyName("n")] + public int? N { get; set; } + + /// + /// Output quality for GPT image models.
+ /// Default Value: auto
+ /// Example: high + ///
+ /// high + [global::System.Text.Json.Serialization.JsonPropertyName("quality")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2? Quality { get; set; } + + /// + /// Controls fidelity to the original input image(s). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_fidelity")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2? InputFidelity { get; set; } + + /// + /// Requested output image size.
+ /// Default Value: auto
+ /// Example: 1024x1024 + ///
+ /// 1024x1024 + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamSize2? Size { get; set; } + + /// + /// A unique identifier representing your end-user, which can help OpenAI
+ /// monitor and detect abuse.
+ /// Example: user-1234 + ///
+ /// user-1234 + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + public string? User { get; set; } + + /// + /// Output image format. Supported for GPT image models.
+ /// Default Value: png
+ /// Example: png + ///
+ /// png + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2? OutputFormat { get; set; } + + /// + /// Compression level for `jpeg` or `webp` output.
+ /// Example: 100 + ///
+ /// 100 + [global::System.Text.Json.Serialization.JsonPropertyName("output_compression")] + public int? OutputCompression { get; set; } + + /// + /// Moderation level for GPT image models.
+ /// Default Value: auto
+ /// Example: auto + ///
+ /// auto + [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2? Moderation { get; set; } + + /// + /// Background behavior for generated image output.
+ /// Default Value: auto
+ /// Example: transparent + ///
+ /// transparent + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + public global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2? Background { get; set; } + + /// + /// Stream partial image results as events.
+ /// Default Value: false
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] + public int? PartialImages { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The model to use for image editing.
+ /// Default Value: gpt-image-1.5
+ /// Example: gpt-image-1.5 + /// + /// + /// Input image references to edit.
+ /// For GPT image models, you can provide up to 16 images. + /// + /// + /// Reference an input image by either URL or uploaded file ID.
+ /// Provide exactly one of `image_url` or `file_id`. + /// + /// + /// A text description of the desired image edit.
+ /// Example: Add a watercolor effect and keep the subject centered + /// + /// + /// The number of edited images to generate.
+ /// Default Value: 1
+ /// Example: 1 + /// + /// + /// Output quality for GPT image models.
+ /// Default Value: auto
+ /// Example: high + /// + /// + /// Controls fidelity to the original input image(s). + /// + /// + /// Requested output image size.
+ /// Default Value: auto
+ /// Example: 1024x1024 + /// + /// + /// A unique identifier representing your end-user, which can help OpenAI
+ /// monitor and detect abuse.
+ /// Example: user-1234 + /// + /// + /// Output image format. Supported for GPT image models.
+ /// Default Value: png
+ /// Example: png + /// + /// + /// Compression level for `jpeg` or `webp` output.
+ /// Example: 100 + /// + /// + /// Moderation level for GPT image models.
+ /// Default Value: auto
+ /// Example: auto + /// + /// + /// Background behavior for generated image output.
+ /// Default Value: auto
+ /// Example: transparent + /// + /// + /// Stream partial image results as events.
+ /// Default Value: false
+ /// Example: false + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EditImageBodyJsonParam( + global::System.Collections.Generic.IList images, + string prompt, + global::tryAGI.OpenAI.AnyOf? model, + global::tryAGI.OpenAI.ImageRefParam? mask, + int? n, + global::tryAGI.OpenAI.EditImageBodyJsonParamQuality2? quality, + global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity2? inputFidelity, + global::tryAGI.OpenAI.EditImageBodyJsonParamSize2? size, + string? user, + global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat2? outputFormat, + int? outputCompression, + global::tryAGI.OpenAI.EditImageBodyJsonParamModeration2? moderation, + global::tryAGI.OpenAI.EditImageBodyJsonParamBackground2? background, + bool? stream, + int? partialImages) + { + this.Images = images ?? throw new global::System.ArgumentNullException(nameof(images)); + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.Model = model; + this.Mask = mask; + this.N = n; + this.Quality = quality; + this.InputFidelity = inputFidelity; + this.Size = size; + this.User = user; + this.OutputFormat = outputFormat; + this.OutputCompression = outputCompression; + this.Moderation = moderation; + this.Background = background; + this.Stream = stream; + this.PartialImages = partialImages; + } + + /// + /// Initializes a new instance of the class. + /// + public EditImageBodyJsonParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.Json.g.cs new file mode 100644 index 00000000..92ec6e05 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamBackground + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamBackground? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamBackground), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamBackground; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamBackground? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamBackground), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamBackground; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.g.cs new file mode 100644 index 00000000..78a8a6c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Background behavior for generated image output.
+ /// Default Value: auto
+ /// Example: transparent + ///
+ public sealed partial class EditImageBodyJsonParamBackground + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground2.g.cs new file mode 100644 index 00000000..dab17384 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamBackground2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamBackground2 + { + /// + /// + /// + Transparent, + /// + /// + /// + Opaque, + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamBackground2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamBackground2 value) + { + return value switch + { + EditImageBodyJsonParamBackground2.Transparent => "transparent", + EditImageBodyJsonParamBackground2.Opaque => "opaque", + EditImageBodyJsonParamBackground2.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamBackground2? ToEnum(string value) + { + return value switch + { + "transparent" => EditImageBodyJsonParamBackground2.Transparent, + "opaque" => EditImageBodyJsonParamBackground2.Opaque, + "auto" => EditImageBodyJsonParamBackground2.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.Json.g.cs new file mode 100644 index 00000000..0e17f22a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamInputFidelity + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamInputFidelity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.g.cs new file mode 100644 index 00000000..0f441773 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls fidelity to the original input image(s). + /// + public sealed partial class EditImageBodyJsonParamInputFidelity + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity2.g.cs new file mode 100644 index 00000000..ae015c05 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamInputFidelity2.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamInputFidelity2 + { + /// + /// + /// + High, + /// + /// + /// + Low, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamInputFidelity2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamInputFidelity2 value) + { + return value switch + { + EditImageBodyJsonParamInputFidelity2.High => "high", + EditImageBodyJsonParamInputFidelity2.Low => "low", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamInputFidelity2? ToEnum(string value) + { + return value switch + { + "high" => EditImageBodyJsonParamInputFidelity2.High, + "low" => EditImageBodyJsonParamInputFidelity2.Low, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModel.g.cs new file mode 100644 index 00000000..99b83e54 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModel.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamModel + { + /// + /// + /// + GptImage15, + /// + /// + /// + GptImage1, + /// + /// + /// + GptImage1Mini, + /// + /// + /// + ChatgptImageLatest, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamModelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamModel value) + { + return value switch + { + EditImageBodyJsonParamModel.GptImage15 => "gpt-image-1.5", + EditImageBodyJsonParamModel.GptImage1 => "gpt-image-1", + EditImageBodyJsonParamModel.GptImage1Mini => "gpt-image-1-mini", + EditImageBodyJsonParamModel.ChatgptImageLatest => "chatgpt-image-latest", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamModel? ToEnum(string value) + { + return value switch + { + "gpt-image-1.5" => EditImageBodyJsonParamModel.GptImage15, + "gpt-image-1" => EditImageBodyJsonParamModel.GptImage1, + "gpt-image-1-mini" => EditImageBodyJsonParamModel.GptImage1Mini, + "chatgpt-image-latest" => EditImageBodyJsonParamModel.ChatgptImageLatest, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.Json.g.cs new file mode 100644 index 00000000..ff04ed0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamModeration + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamModeration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamModeration), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamModeration; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamModeration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamModeration), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamModeration; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.g.cs new file mode 100644 index 00000000..57e5406f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Moderation level for GPT image models.
+ /// Default Value: auto
+ /// Example: auto + ///
+ public sealed partial class EditImageBodyJsonParamModeration + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration2.g.cs new file mode 100644 index 00000000..686f72b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamModeration2.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamModeration2 + { + /// + /// + /// + Low, + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamModeration2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamModeration2 value) + { + return value switch + { + EditImageBodyJsonParamModeration2.Low => "low", + EditImageBodyJsonParamModeration2.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamModeration2? ToEnum(string value) + { + return value switch + { + "low" => EditImageBodyJsonParamModeration2.Low, + "auto" => EditImageBodyJsonParamModeration2.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.Json.g.cs new file mode 100644 index 00000000..6e572c73 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamN + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamN? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamN), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamN; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamN? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamN), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamN; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.g.cs new file mode 100644 index 00000000..30326654 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamN.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The number of edited images to generate.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ public sealed partial class EditImageBodyJsonParamN + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.Json.g.cs new file mode 100644 index 00000000..d2c9a9dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamOutputCompression + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamOutputCompression; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.g.cs new file mode 100644 index 00000000..5d1170c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputCompression.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Compression level for `jpeg` or `webp` output.
+ /// Example: 100 + ///
+ public sealed partial class EditImageBodyJsonParamOutputCompression + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.Json.g.cs new file mode 100644 index 00000000..2fbb9221 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamOutputFormat + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamOutputFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.g.cs new file mode 100644 index 00000000..56780255 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Output image format. Supported for GPT image models.
+ /// Default Value: png
+ /// Example: png + ///
+ public sealed partial class EditImageBodyJsonParamOutputFormat + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat2.g.cs new file mode 100644 index 00000000..55ed9840 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamOutputFormat2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamOutputFormat2 + { + /// + /// + /// + Png, + /// + /// + /// + Jpeg, + /// + /// + /// + Webp, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamOutputFormat2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamOutputFormat2 value) + { + return value switch + { + EditImageBodyJsonParamOutputFormat2.Png => "png", + EditImageBodyJsonParamOutputFormat2.Jpeg => "jpeg", + EditImageBodyJsonParamOutputFormat2.Webp => "webp", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamOutputFormat2? ToEnum(string value) + { + return value switch + { + "png" => EditImageBodyJsonParamOutputFormat2.Png, + "jpeg" => EditImageBodyJsonParamOutputFormat2.Jpeg, + "webp" => EditImageBodyJsonParamOutputFormat2.Webp, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.Json.g.cs new file mode 100644 index 00000000..71b6fc9b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamQuality + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamQuality? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamQuality), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamQuality; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamQuality? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamQuality), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamQuality; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.g.cs new file mode 100644 index 00000000..72ae2314 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Output quality for GPT image models.
+ /// Default Value: auto
+ /// Example: high + ///
+ public sealed partial class EditImageBodyJsonParamQuality + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality2.g.cs new file mode 100644 index 00000000..5d50edc9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamQuality2.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamQuality2 + { + /// + /// + /// + Low, + /// + /// + /// + Medium, + /// + /// + /// + High, + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamQuality2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamQuality2 value) + { + return value switch + { + EditImageBodyJsonParamQuality2.Low => "low", + EditImageBodyJsonParamQuality2.Medium => "medium", + EditImageBodyJsonParamQuality2.High => "high", + EditImageBodyJsonParamQuality2.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamQuality2? ToEnum(string value) + { + return value switch + { + "low" => EditImageBodyJsonParamQuality2.Low, + "medium" => EditImageBodyJsonParamQuality2.Medium, + "high" => EditImageBodyJsonParamQuality2.High, + "auto" => EditImageBodyJsonParamQuality2.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.Json.g.cs new file mode 100644 index 00000000..ac077d7b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EditImageBodyJsonParamSize + { + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamSize? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamSize), + jsonSerializerContext) as global::tryAGI.OpenAI.EditImageBodyJsonParamSize; + } + + /// + /// 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::tryAGI.OpenAI.EditImageBodyJsonParamSize? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EditImageBodyJsonParamSize), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EditImageBodyJsonParamSize; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.g.cs new file mode 100644 index 00000000..c83bcce3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Requested output image size.
+ /// Default Value: auto
+ /// Example: 1024x1024 + ///
+ public sealed partial class EditImageBodyJsonParamSize + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize2.g.cs new file mode 100644 index 00000000..7910a63c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EditImageBodyJsonParamSize2.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum EditImageBodyJsonParamSize2 + { + /// + /// + /// + Auto, + /// + /// + /// + x1024x1024, + /// + /// + /// + x1536x1024, + /// + /// + /// + x1024x1536, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EditImageBodyJsonParamSize2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EditImageBodyJsonParamSize2 value) + { + return value switch + { + EditImageBodyJsonParamSize2.Auto => "auto", + EditImageBodyJsonParamSize2.x1024x1024 => "1024x1024", + EditImageBodyJsonParamSize2.x1536x1024 => "1536x1024", + EditImageBodyJsonParamSize2.x1024x1536 => "1024x1536", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EditImageBodyJsonParamSize2? ToEnum(string value) + { + return value switch + { + "auto" => EditImageBodyJsonParamSize2.Auto, + "1024x1024" => EditImageBodyJsonParamSize2.x1024x1024, + "1536x1024" => EditImageBodyJsonParamSize2.x1536x1024, + "1024x1536" => EditImageBodyJsonParamSize2.x1024x1536, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Embedding.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Embedding.g.cs index 4b63e808..7dc12667 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Embedding.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Embedding.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class Embedding { /// - /// The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). + /// The index of the embedding in the list of embeddings. /// - [global::System.Text.Json.Serialization.JsonPropertyName("embedding")] + [global::System.Text.Json.Serialization.JsonPropertyName("index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Embedding1 { get; set; } + public required int Index { get; set; } /// - /// The index of the embedding in the list of embeddings. + /// The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). /// - [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonPropertyName("embedding")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Index { get; set; } + public required global::System.Collections.Generic.IList Embedding1 { get; set; } /// /// The object type, which is always "embedding". @@ -38,12 +38,12 @@ public sealed partial class Embedding /// /// Initializes a new instance of the class. /// - /// - /// The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). - /// /// /// The index of the embedding in the list of embeddings. /// + /// + /// The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). + /// /// /// The object type, which is always "embedding". /// @@ -51,12 +51,12 @@ public sealed partial class Embedding [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Embedding( - global::System.Collections.Generic.IList embedding1, int index, + global::System.Collections.Generic.IList embedding1, global::tryAGI.OpenAI.EmbeddingObject @object) { - this.Embedding1 = embedding1 ?? throw new global::System.ArgumentNullException(nameof(embedding1)); this.Index = index; + this.Embedding1 = embedding1 ?? throw new global::System.ArgumentNullException(nameof(embedding1)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.Json.g.cs new file mode 100644 index 00000000..1aa8978c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EmptyModelParam + { + /// + /// 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::tryAGI.OpenAI.EmptyModelParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EmptyModelParam), + jsonSerializerContext) as global::tryAGI.OpenAI.EmptyModelParam; + } + + /// + /// 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::tryAGI.OpenAI.EmptyModelParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EmptyModelParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EmptyModelParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.g.cs new file mode 100644 index 00000000..431a9052 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EmptyModelParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EmptyModelParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.Json.g.cs new file mode 100644 index 00000000..151634cc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct EnvironmentVariant1 + { + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EnvironmentVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.EnvironmentVariant1?; + } + + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EnvironmentVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EnvironmentVariant1?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.g.cs new file mode 100644 index 00000000..0b0d4e95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant1.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct EnvironmentVariant1 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerAutoParam? ContainerAuto { get; init; } +#else + public global::tryAGI.OpenAI.ContainerAutoParam? ContainerAuto { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerAuto))] +#endif + public bool IsContainerAuto => ContainerAuto != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalEnvironmentParam? Local { get; init; } +#else + public global::tryAGI.OpenAI.LocalEnvironmentParam? Local { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Local))] +#endif + public bool IsLocal => Local != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerReferenceParam? ContainerReference { get; init; } +#else + public global::tryAGI.OpenAI.ContainerReferenceParam? ContainerReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerReference))] +#endif + public bool IsContainerReference => ContainerReference != null; + /// + /// + /// + public static implicit operator EnvironmentVariant1(global::tryAGI.OpenAI.ContainerAutoParam value) => new EnvironmentVariant1((global::tryAGI.OpenAI.ContainerAutoParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerAutoParam?(EnvironmentVariant1 @this) => @this.ContainerAuto; + + /// + /// + /// + public EnvironmentVariant1(global::tryAGI.OpenAI.ContainerAutoParam? value) + { + ContainerAuto = value; + } + + /// + /// + /// + public static implicit operator EnvironmentVariant1(global::tryAGI.OpenAI.LocalEnvironmentParam value) => new EnvironmentVariant1((global::tryAGI.OpenAI.LocalEnvironmentParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalEnvironmentParam?(EnvironmentVariant1 @this) => @this.Local; + + /// + /// + /// + public EnvironmentVariant1(global::tryAGI.OpenAI.LocalEnvironmentParam? value) + { + Local = value; + } + + /// + /// + /// + public static implicit operator EnvironmentVariant1(global::tryAGI.OpenAI.ContainerReferenceParam value) => new EnvironmentVariant1((global::tryAGI.OpenAI.ContainerReferenceParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerReferenceParam?(EnvironmentVariant1 @this) => @this.ContainerReference; + + /// + /// + /// + public EnvironmentVariant1(global::tryAGI.OpenAI.ContainerReferenceParam? value) + { + ContainerReference = value; + } + + /// + /// + /// + public EnvironmentVariant1( + global::tryAGI.OpenAI.ContainerAutoParam? containerAuto, + global::tryAGI.OpenAI.LocalEnvironmentParam? local, + global::tryAGI.OpenAI.ContainerReferenceParam? containerReference + ) + { + ContainerAuto = containerAuto; + Local = local; + ContainerReference = containerReference; + } + + /// + /// + /// + public object? Object => + ContainerReference as object ?? + Local as object ?? + ContainerAuto as object + ; + + /// + /// + /// + public override string? ToString() => + ContainerAuto?.ToString() ?? + Local?.ToString() ?? + ContainerReference?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsContainerAuto && !IsLocal && !IsContainerReference || !IsContainerAuto && IsLocal && !IsContainerReference || !IsContainerAuto && !IsLocal && IsContainerReference; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? containerAuto = null, + global::System.Func? local = null, + global::System.Func? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsContainerAuto && containerAuto != null) + { + return containerAuto(ContainerAuto!); + } + else if (IsLocal && local != null) + { + return local(Local!); + } + else if (IsContainerReference && containerReference != null) + { + return containerReference(ContainerReference!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? containerAuto = null, + global::System.Action? local = null, + global::System.Action? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsContainerAuto) + { + containerAuto?.Invoke(ContainerAuto!); + } + else if (IsLocal) + { + local?.Invoke(Local!); + } + else if (IsContainerReference) + { + containerReference?.Invoke(ContainerReference!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ContainerAuto, + typeof(global::tryAGI.OpenAI.ContainerAutoParam), + Local, + typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), + ContainerReference, + typeof(global::tryAGI.OpenAI.ContainerReferenceParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(EnvironmentVariant1 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerAuto, other.ContainerAuto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Local, other.Local) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerReference, other.ContainerReference) + ; + } + + /// + /// + /// + public static bool operator ==(EnvironmentVariant1 obj1, EnvironmentVariant1 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(EnvironmentVariant1 obj1, EnvironmentVariant1 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is EnvironmentVariant1 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.Json.g.cs new file mode 100644 index 00000000..d5adbd75 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct EnvironmentVariant12 + { + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant12? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EnvironmentVariant12), + jsonSerializerContext) as global::tryAGI.OpenAI.EnvironmentVariant12?; + } + + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant12? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EnvironmentVariant12), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EnvironmentVariant12?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.g.cs new file mode 100644 index 00000000..b875a3e6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant12.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct EnvironmentVariant12 : global::System.IEquatable + { + /// + /// Represents the use of a local environment to perform shell actions. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalEnvironmentResource? Local { get; init; } +#else + public global::tryAGI.OpenAI.LocalEnvironmentResource? Local { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Local))] +#endif + public bool IsLocal => Local != null; + + /// + /// Represents a container created with /v1/containers. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerReferenceResource? ContainerReference { get; init; } +#else + public global::tryAGI.OpenAI.ContainerReferenceResource? ContainerReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerReference))] +#endif + public bool IsContainerReference => ContainerReference != null; + /// + /// + /// + public static implicit operator EnvironmentVariant12(global::tryAGI.OpenAI.LocalEnvironmentResource value) => new EnvironmentVariant12((global::tryAGI.OpenAI.LocalEnvironmentResource?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalEnvironmentResource?(EnvironmentVariant12 @this) => @this.Local; + + /// + /// + /// + public EnvironmentVariant12(global::tryAGI.OpenAI.LocalEnvironmentResource? value) + { + Local = value; + } + + /// + /// + /// + public static implicit operator EnvironmentVariant12(global::tryAGI.OpenAI.ContainerReferenceResource value) => new EnvironmentVariant12((global::tryAGI.OpenAI.ContainerReferenceResource?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerReferenceResource?(EnvironmentVariant12 @this) => @this.ContainerReference; + + /// + /// + /// + public EnvironmentVariant12(global::tryAGI.OpenAI.ContainerReferenceResource? value) + { + ContainerReference = value; + } + + /// + /// + /// + public EnvironmentVariant12( + global::tryAGI.OpenAI.LocalEnvironmentResource? local, + global::tryAGI.OpenAI.ContainerReferenceResource? containerReference + ) + { + Local = local; + ContainerReference = containerReference; + } + + /// + /// + /// + public object? Object => + ContainerReference as object ?? + Local as object + ; + + /// + /// + /// + public override string? ToString() => + Local?.ToString() ?? + ContainerReference?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsLocal && !IsContainerReference || !IsLocal && IsContainerReference; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? local = null, + global::System.Func? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLocal && local != null) + { + return local(Local!); + } + else if (IsContainerReference && containerReference != null) + { + return containerReference(ContainerReference!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? local = null, + global::System.Action? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLocal) + { + local?.Invoke(Local!); + } + else if (IsContainerReference) + { + containerReference?.Invoke(ContainerReference!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Local, + typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), + ContainerReference, + typeof(global::tryAGI.OpenAI.ContainerReferenceResource), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(EnvironmentVariant12 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Local, other.Local) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerReference, other.ContainerReference) + ; + } + + /// + /// + /// + public static bool operator ==(EnvironmentVariant12 obj1, EnvironmentVariant12 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(EnvironmentVariant12 obj1, EnvironmentVariant12 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is EnvironmentVariant12 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.Json.g.cs new file mode 100644 index 00000000..1ba63ffd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct EnvironmentVariant13 + { + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant13? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EnvironmentVariant13), + jsonSerializerContext) as global::tryAGI.OpenAI.EnvironmentVariant13?; + } + + /// + /// 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::tryAGI.OpenAI.EnvironmentVariant13? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EnvironmentVariant13), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EnvironmentVariant13?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.g.cs new file mode 100644 index 00000000..3a13099a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EnvironmentVariant13.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The environment to execute the shell commands in. + /// + public readonly partial struct EnvironmentVariant13 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalEnvironmentParam? Local { get; init; } +#else + public global::tryAGI.OpenAI.LocalEnvironmentParam? Local { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Local))] +#endif + public bool IsLocal => Local != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerReferenceParam? ContainerReference { get; init; } +#else + public global::tryAGI.OpenAI.ContainerReferenceParam? ContainerReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContainerReference))] +#endif + public bool IsContainerReference => ContainerReference != null; + /// + /// + /// + public static implicit operator EnvironmentVariant13(global::tryAGI.OpenAI.LocalEnvironmentParam value) => new EnvironmentVariant13((global::tryAGI.OpenAI.LocalEnvironmentParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalEnvironmentParam?(EnvironmentVariant13 @this) => @this.Local; + + /// + /// + /// + public EnvironmentVariant13(global::tryAGI.OpenAI.LocalEnvironmentParam? value) + { + Local = value; + } + + /// + /// + /// + public static implicit operator EnvironmentVariant13(global::tryAGI.OpenAI.ContainerReferenceParam value) => new EnvironmentVariant13((global::tryAGI.OpenAI.ContainerReferenceParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerReferenceParam?(EnvironmentVariant13 @this) => @this.ContainerReference; + + /// + /// + /// + public EnvironmentVariant13(global::tryAGI.OpenAI.ContainerReferenceParam? value) + { + ContainerReference = value; + } + + /// + /// + /// + public EnvironmentVariant13( + global::tryAGI.OpenAI.LocalEnvironmentParam? local, + global::tryAGI.OpenAI.ContainerReferenceParam? containerReference + ) + { + Local = local; + ContainerReference = containerReference; + } + + /// + /// + /// + public object? Object => + ContainerReference as object ?? + Local as object + ; + + /// + /// + /// + public override string? ToString() => + Local?.ToString() ?? + ContainerReference?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsLocal && !IsContainerReference || !IsLocal && IsContainerReference; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? local = null, + global::System.Func? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLocal && local != null) + { + return local(Local!); + } + else if (IsContainerReference && containerReference != null) + { + return containerReference(ContainerReference!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? local = null, + global::System.Action? containerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLocal) + { + local?.Invoke(Local!); + } + else if (IsContainerReference) + { + containerReference?.Invoke(ContainerReference!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Local, + typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), + ContainerReference, + typeof(global::tryAGI.OpenAI.ContainerReferenceParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(EnvironmentVariant13 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Local, other.Local) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContainerReference, other.ContainerReference) + ; + } + + /// + /// + /// + public static bool operator ==(EnvironmentVariant13 obj1, EnvironmentVariant13 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(EnvironmentVariant13 obj1, EnvironmentVariant13 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is EnvironmentVariant13 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.Json.g.cs new file mode 100644 index 00000000..b8e05d4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Error2 + { + /// + /// 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::tryAGI.OpenAI.Error2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Error2), + jsonSerializerContext) as global::tryAGI.OpenAI.Error2; + } + + /// + /// 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::tryAGI.OpenAI.Error2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Error2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Error2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.g.cs new file mode 100644 index 00000000..ef77367d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Error2.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An error that occurred while generating the response. + /// + public sealed partial class Error2 + { + /// + /// A machine-readable error code that was returned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Code { get; set; } + + /// + /// A human-readable description of the error that was returned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A machine-readable error code that was returned. + /// + /// + /// A human-readable description of the error that was returned. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Error2( + string code, + string message) + { + this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public Error2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.Json.g.cs new file mode 100644 index 00000000..2135d55b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ErrorCode + { + /// + /// 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::tryAGI.OpenAI.ErrorCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ErrorCode), + jsonSerializerContext) as global::tryAGI.OpenAI.ErrorCode; + } + + /// + /// 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::tryAGI.OpenAI.ErrorCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ErrorCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ErrorCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.g.cs new file mode 100644 index 00000000..1d2b867a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ErrorCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorEvent.g.cs index 1c48a95e..6b403948 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorEvent.g.cs @@ -4,23 +4,23 @@ namespace tryAGI.OpenAI { /// - /// Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. + /// Occurs when an [error](/docs/guides/error-codes#api-errors) occurs. This can happen due to an internal server error or a timeout. /// public sealed partial class ErrorEvent { /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.Error Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("event")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ErrorEventEventJsonConverter))] + public global::tryAGI.OpenAI.ErrorEventEvent Event { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ErrorEventEventJsonConverter))] - public global::tryAGI.OpenAI.ErrorEventEvent Event { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Error Data { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,8 +31,8 @@ public sealed partial class ErrorEvent /// /// Initializes a new instance of the class. /// - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.Json.g.cs new file mode 100644 index 00000000..c1271e3e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ErrorParam + { + /// + /// 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::tryAGI.OpenAI.ErrorParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ErrorParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ErrorParam; + } + + /// + /// 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::tryAGI.OpenAI.ErrorParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ErrorParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ErrorParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.g.cs new file mode 100644 index 00000000..4bf7a604 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ErrorParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ErrorParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Eval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Eval.g.cs index 97e61d1e..c57017d4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Eval.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Eval.g.cs @@ -16,20 +16,13 @@ namespace tryAGI.OpenAI public sealed partial class Eval { /// - /// The Unix timestamp (in seconds) for when the eval was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Configuration of data sources used in runs of the evaluation. + /// The object type.
+ /// Default Value: eval ///
- [global::System.Text.Json.Serialization.JsonPropertyName("data_source_config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalDataSourceConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalDataSourceConfig DataSourceConfig { get; set; } + /// global::tryAGI.OpenAI.EvalObject.Eval + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalObject Object { get; set; } = global::tryAGI.OpenAI.EvalObject.Eval; /// /// Unique identifier for the evaluation. @@ -38,17 +31,6 @@ public sealed partial class Eval [global::System.Text.Json.Serialization.JsonRequired] public required string Id { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } - /// /// The name of the evaluation.
/// Example: Chatbot effectiveness Evaluation @@ -59,20 +41,35 @@ public sealed partial class Eval public required string Name { get; set; } /// - /// The object type.
- /// Default Value: eval + /// Configuration of data sources used in runs of the evaluation. ///
- /// global::tryAGI.OpenAI.EvalObject.Eval - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalObject Object { get; set; } = global::tryAGI.OpenAI.EvalObject.Eval; + [global::System.Text.Json.Serialization.JsonPropertyName("data_source_config")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf DataSourceConfig { get; set; } /// - /// A list of testing criteria. + /// A list of testing criteria.
+ /// Default Value: eval ///
[global::System.Text.Json.Serialization.JsonPropertyName("testing_criteria")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> TestingCriteria { get; set; } + public required global::System.Collections.Generic.IList> TestingCriteria { get; set; } + + /// + /// The Unix timestamp (in seconds) for when the eval was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -83,51 +80,46 @@ public sealed partial class Eval /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the eval was created. - /// - /// - /// Configuration of data sources used in runs of the evaluation. + /// + /// The object type.
+ /// Default Value: eval /// /// /// Unique identifier for the evaluation. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the evaluation.
/// Example: Chatbot effectiveness Evaluation /// - /// - /// The object type.
- /// Default Value: eval + /// + /// Configuration of data sources used in runs of the evaluation. /// /// - /// A list of testing criteria. + /// A list of testing criteria.
+ /// Default Value: eval /// + /// + /// The Unix timestamp (in seconds) for when the eval was created. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Eval( - global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.EvalDataSourceConfig dataSourceConfig, string id, - global::System.Collections.Generic.Dictionary? metadata, string name, - global::System.Collections.Generic.IList> testingCriteria, + global::tryAGI.OpenAI.OneOf dataSourceConfig, + global::System.Collections.Generic.IList> testingCriteria, + global::System.DateTimeOffset createdAt, + global::System.Collections.Generic.Dictionary? metadata, global::tryAGI.OpenAI.EvalObject @object = global::tryAGI.OpenAI.EvalObject.Eval) { - this.CreatedAt = createdAt; - this.DataSourceConfig = dataSourceConfig; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.DataSourceConfig = dataSourceConfig; this.TestingCriteria = testingCriteria ?? throw new global::System.ArgumentNullException(nameof(testingCriteria)); + this.CreatedAt = createdAt; + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfig.g.cs index 254f0820..330f9b5f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfig.g.cs @@ -11,14 +11,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalCustomDataSourceConfig { - /// - /// The json schema for the run data source items.
- /// Learn how to build JSON schemas [here](https://json-schema.org/). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("schema")] - [global::System.Text.Json.Serialization.JsonRequired] - public required object Schema { get; set; } - /// /// The type of data source. Always `custom`.
/// Default Value: custom @@ -28,6 +20,42 @@ public sealed partial class EvalCustomDataSourceConfig [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalCustomDataSourceConfigTypeJsonConverter))] public global::tryAGI.OpenAI.EvalCustomDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.EvalCustomDataSourceConfigType.Custom; + /// + /// The json schema for the run data source items.
+ /// Learn how to build JSON schemas [here](https://json-schema.org/).
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "item": {
+ /// "type": "object",
+ /// "properties": {
+ /// "label": {"type": "string"},
+ /// },
+ /// "required": ["label"]
+ /// }
+ /// },
+ /// "required": ["item"]
+ /// } + ///
+ /// + /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "item": {
+ /// "type": "object",
+ /// "properties": {
+ /// "label": {"type": "string"},
+ /// },
+ /// "required": ["label"]
+ /// }
+ /// },
+ /// "required": ["item"]
+ /// } + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("schema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Schema { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,14 +65,27 @@ public sealed partial class EvalCustomDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// The json schema for the run data source items.
- /// Learn how to build JSON schemas [here](https://json-schema.org/). - /// /// /// The type of data source. Always `custom`.
/// Default Value: custom /// + /// + /// The json schema for the run data source items.
+ /// Learn how to build JSON schemas [here](https://json-schema.org/).
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "item": {
+ /// "type": "object",
+ /// "properties": {
+ /// "label": {"type": "string"},
+ /// },
+ /// "required": ["label"]
+ /// }
+ /// },
+ /// "required": ["item"]
+ /// } + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfigSchema.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfigSchema.g.cs index e2d7e94b..50473f29 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfigSchema.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalCustomDataSourceConfigSchema.g.cs @@ -5,7 +5,20 @@ namespace tryAGI.OpenAI { /// /// The json schema for the run data source items.
- /// Learn how to build JSON schemas [here](https://json-schema.org/). + /// Learn how to build JSON schemas [here](https://json-schema.org/).
+ /// Example: {
+ /// "type": "object",
+ /// "properties": {
+ /// "item": {
+ /// "type": "object",
+ /// "properties": {
+ /// "label": {"type": "string"},
+ /// },
+ /// "required": ["label"]
+ /// }
+ /// },
+ /// "required": ["item"]
+ /// } ///
public sealed partial class EvalCustomDataSourceConfigSchema { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.Json.g.cs deleted file mode 100644 index 7420a4a6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct EvalDataSourceConfig - { - /// - /// 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::tryAGI.OpenAI.EvalDataSourceConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalDataSourceConfig), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalDataSourceConfig?; - } - - /// - /// 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::tryAGI.OpenAI.EvalDataSourceConfig? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalDataSourceConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalDataSourceConfig?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.g.cs deleted file mode 100644 index d49deb03..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfig.g.cs +++ /dev/null @@ -1,280 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Configuration of data sources used in runs of the evaluation. - /// - public readonly partial struct EvalDataSourceConfig : global::System.IEquatable - { - /// - /// A CustomDataSourceConfig which specifies the schema of your `item` and optionally `sample` namespaces.
- /// The response schema defines the shape of the data that will be:
- /// - Used to define your testing criteria and
- /// - What data is required when creating a run - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalCustomDataSourceConfig? Custom { get; init; } -#else - public global::tryAGI.OpenAI.EvalCustomDataSourceConfig? Custom { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] -#endif - public bool IsCustom => Custom != null; - - /// - /// - /// - public static implicit operator EvalDataSourceConfig(global::tryAGI.OpenAI.EvalCustomDataSourceConfig value) => new EvalDataSourceConfig((global::tryAGI.OpenAI.EvalCustomDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalCustomDataSourceConfig?(EvalDataSourceConfig @this) => @this.Custom; - - /// - /// - /// - public EvalDataSourceConfig(global::tryAGI.OpenAI.EvalCustomDataSourceConfig? value) - { - Custom = value; - } - - /// - /// A LogsDataSourceConfig which specifies the metadata property of your logs query.
- /// This is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.
- /// The schema returned by this data source config is used to defined what variables are available in your evals.
- /// `item` and `sample` are both defined when using this data source config. - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalLogsDataSourceConfig? Logs { get; init; } -#else - public global::tryAGI.OpenAI.EvalLogsDataSourceConfig? 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 EvalDataSourceConfig(global::tryAGI.OpenAI.EvalLogsDataSourceConfig value) => new EvalDataSourceConfig((global::tryAGI.OpenAI.EvalLogsDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalLogsDataSourceConfig?(EvalDataSourceConfig @this) => @this.Logs; - - /// - /// - /// - public EvalDataSourceConfig(global::tryAGI.OpenAI.EvalLogsDataSourceConfig? value) - { - Logs = value; - } - - /// - /// Deprecated in favor of LogsDataSourceConfig. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? StoredCompletions { get; init; } -#else - public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? StoredCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StoredCompletions))] -#endif - public bool IsStoredCompletions => StoredCompletions != null; - - /// - /// - /// - public static implicit operator EvalDataSourceConfig(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig value) => new EvalDataSourceConfig((global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig?(EvalDataSourceConfig @this) => @this.StoredCompletions; - - /// - /// - /// - public EvalDataSourceConfig(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? value) - { - StoredCompletions = value; - } - - /// - /// - /// - public EvalDataSourceConfig( - global::tryAGI.OpenAI.EvalCustomDataSourceConfig? custom, - global::tryAGI.OpenAI.EvalLogsDataSourceConfig? logs, - global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig? storedCompletions - ) - { - Custom = custom; - Logs = logs; - StoredCompletions = storedCompletions; - } - - /// - /// - /// - public object? Object => - StoredCompletions as object ?? - Logs as object ?? - Custom as object - ; - - /// - /// - /// - public override string? ToString() => - Custom?.ToString() ?? - Logs?.ToString() ?? - StoredCompletions?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCustom || IsLogs || IsStoredCompletions; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? custom = null, - global::System.Func? logs = null, - global::System.Func? storedCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCustom && custom != null) - { - return custom(Custom!); - } - else if (IsLogs && logs != null) - { - return logs(Logs!); - } - else if (IsStoredCompletions && storedCompletions != null) - { - return storedCompletions(StoredCompletions!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? custom = null, - global::System.Action? logs = null, - global::System.Action? storedCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCustom) - { - custom?.Invoke(Custom!); - } - else if (IsLogs) - { - logs?.Invoke(Logs!); - } - else if (IsStoredCompletions) - { - storedCompletions?.Invoke(StoredCompletions!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Custom, - typeof(global::tryAGI.OpenAI.EvalCustomDataSourceConfig), - Logs, - typeof(global::tryAGI.OpenAI.EvalLogsDataSourceConfig), - StoredCompletions, - typeof(global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfig), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(EvalDataSourceConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Logs, other.Logs) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StoredCompletions, other.StoredCompletions) - ; - } - - /// - /// - /// - public static bool operator ==(EvalDataSourceConfig obj1, EvalDataSourceConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(EvalDataSourceConfig obj1, EvalDataSourceConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is EvalDataSourceConfig o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.Json.g.cs deleted file mode 100644 index 0e7ecc1c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class EvalDataSourceConfigDiscriminator - { - /// - /// 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::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalDataSourceConfigDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.g.cs deleted file mode 100644 index 1e4bad3f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalDataSourceConfigDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class EvalDataSourceConfigDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvalDataSourceConfigDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public EvalDataSourceConfigDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderLabelModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderLabelModel.g.cs index 7d0b0e9f..ca9b9622 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderLabelModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderLabelModel.g.cs @@ -14,19 +14,18 @@ namespace tryAGI.OpenAI /// in the evaluation. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderLabelModel? Value1 { get; init; } + public global::tryAGI.OpenAI.GraderLabelModel? LabelModelGrader { get; init; } #else - public global::tryAGI.OpenAI.GraderLabelModel? Value1 { get; } + public global::tryAGI.OpenAI.GraderLabelModel? LabelModelGrader { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LabelModelGrader))] #endif - public bool IsValue1 => Value1 != null; - + public bool IsLabelModelGrader => LabelModelGrader != null; /// /// /// @@ -35,28 +34,28 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator global::tryAGI.OpenAI.GraderLabelModel?(EvalGraderLabelModel @this) => @this.Value1; + public static implicit operator global::tryAGI.OpenAI.GraderLabelModel?(EvalGraderLabelModel @this) => @this.LabelModelGrader; /// /// /// public EvalGraderLabelModel(global::tryAGI.OpenAI.GraderLabelModel? value) { - Value1 = value; + LabelModelGrader = value; } /// /// /// public object? Object => - Value1 as object + LabelModelGrader as object ; /// /// /// public override string? ToString() => - Value1?.ToString() + LabelModelGrader?.ToString() ; /// @@ -64,14 +63,14 @@ Value1 as object /// public bool Validate() { - return IsValue1; + return IsLabelModelGrader; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? labelModelGrader = null, bool validate = true) { if (validate) @@ -79,9 +78,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsLabelModelGrader && labelModelGrader != null) { - return value1(Value1!); + return labelModelGrader(LabelModelGrader!); } return default(TResult); @@ -91,7 +90,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? labelModelGrader = null, bool validate = true) { if (validate) @@ -99,9 +98,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsLabelModelGrader) { - value1?.Invoke(Value1!); + labelModelGrader?.Invoke(LabelModelGrader!); } } @@ -112,7 +111,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + LabelModelGrader, typeof(global::tryAGI.OpenAI.GraderLabelModel), }; const int offset = unchecked((int)2166136261); @@ -130,7 +129,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EvalGraderLabelModel other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + global::System.Collections.Generic.EqualityComparer.Default.Equals(LabelModelGrader, other.LabelModelGrader) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderPython.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderPython.g.cs index 8d3975a7..e206159c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderPython.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderPython.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// A PythonGrader object that runs a python script on the input. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderPython? Value1 { get; init; } + public global::tryAGI.OpenAI.GraderPython? PythonGrader { get; init; } #else - public global::tryAGI.OpenAI.GraderPython? Value1 { get; } + public global::tryAGI.OpenAI.GraderPython? PythonGrader { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PythonGrader))] #endif - public bool IsValue1 => Value1 != null; + public bool IsPythonGrader => PythonGrader != null; /// /// /// - public static implicit operator EvalGraderPython(global::tryAGI.OpenAI.GraderPython value) => new EvalGraderPython((global::tryAGI.OpenAI.GraderPython?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.GraderPython?(EvalGraderPython @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public EvalGraderPython(global::tryAGI.OpenAI.GraderPython? value) - { - Value1 = value; - } + public static implicit operator EvalGraderPython(global::tryAGI.OpenAI.GraderPython value) => new EvalGraderPython((global::tryAGI.OpenAI.GraderPython?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderPythonVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.GraderPython?(EvalGraderPython @this) => @this.PythonGrader; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public EvalGraderPython(global::tryAGI.OpenAI.GraderPython? value) + { + PythonGrader = value; + } /// /// @@ -83,11 +82,11 @@ public EvalGraderPython(global::tryAGI.OpenAI.EvalGraderPythonVariant2? value) /// /// public EvalGraderPython( - global::tryAGI.OpenAI.GraderPython? value1, + global::tryAGI.OpenAI.GraderPython? pythonGrader, global::tryAGI.OpenAI.EvalGraderPythonVariant2? value2 ) { - Value1 = value1; + PythonGrader = pythonGrader; Value2 = value2; } @@ -96,14 +95,14 @@ public EvalGraderPython( ///
public object? Object => Value2 as object ?? - Value1 as object + PythonGrader as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + PythonGrader?.ToString() ?? Value2?.ToString() ; @@ -112,14 +111,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsPythonGrader && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? pythonGrader = null, global::System.Func? value2 = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsPythonGrader && pythonGrader != null) { - return value1(Value1!); + return pythonGrader(PythonGrader!); } else if (IsValue2 && value2 != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? pythonGrader = null, global::System.Action? value2 = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsPythonGrader) { - value1?.Invoke(Value1!); + pythonGrader?.Invoke(PythonGrader!); } else if (IsValue2) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + PythonGrader, typeof(global::tryAGI.OpenAI.GraderPython), Value2, typeof(global::tryAGI.OpenAI.EvalGraderPythonVariant2), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EvalGraderPython other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PythonGrader, other.PythonGrader) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderScoreModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderScoreModel.g.cs index a4ff9ef1..dab4855d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderScoreModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderScoreModel.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// A ScoreModelGrader object that uses a model to assign a score to the input. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderScoreModel? Value1 { get; init; } + public global::tryAGI.OpenAI.GraderScoreModel? ScoreModelGrader { get; init; } #else - public global::tryAGI.OpenAI.GraderScoreModel? Value1 { get; } + public global::tryAGI.OpenAI.GraderScoreModel? ScoreModelGrader { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScoreModelGrader))] #endif - public bool IsValue1 => Value1 != null; + public bool IsScoreModelGrader => ScoreModelGrader != null; /// /// /// - public static implicit operator EvalGraderScoreModel(global::tryAGI.OpenAI.GraderScoreModel value) => new EvalGraderScoreModel((global::tryAGI.OpenAI.GraderScoreModel?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.GraderScoreModel?(EvalGraderScoreModel @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public EvalGraderScoreModel(global::tryAGI.OpenAI.GraderScoreModel? value) - { - Value1 = value; - } + public static implicit operator EvalGraderScoreModel(global::tryAGI.OpenAI.GraderScoreModel value) => new EvalGraderScoreModel((global::tryAGI.OpenAI.GraderScoreModel?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.GraderScoreModel?(EvalGraderScoreModel @this) => @this.ScoreModelGrader; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public EvalGraderScoreModel(global::tryAGI.OpenAI.GraderScoreModel? value) + { + ScoreModelGrader = value; + } /// /// @@ -83,11 +82,11 @@ public EvalGraderScoreModel(global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? /// /// public EvalGraderScoreModel( - global::tryAGI.OpenAI.GraderScoreModel? value1, + global::tryAGI.OpenAI.GraderScoreModel? scoreModelGrader, global::tryAGI.OpenAI.EvalGraderScoreModelVariant2? value2 ) { - Value1 = value1; + ScoreModelGrader = scoreModelGrader; Value2 = value2; } @@ -96,14 +95,14 @@ public EvalGraderScoreModel( ///
public object? Object => Value2 as object ?? - Value1 as object + ScoreModelGrader as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + ScoreModelGrader?.ToString() ?? Value2?.ToString() ; @@ -112,14 +111,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsScoreModelGrader && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? scoreModelGrader = null, global::System.Func? value2 = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsScoreModelGrader && scoreModelGrader != null) { - return value1(Value1!); + return scoreModelGrader(ScoreModelGrader!); } else if (IsValue2 && value2 != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? scoreModelGrader = null, global::System.Action? value2 = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsScoreModelGrader) { - value1?.Invoke(Value1!); + scoreModelGrader?.Invoke(ScoreModelGrader!); } else if (IsValue2) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ScoreModelGrader, typeof(global::tryAGI.OpenAI.GraderScoreModel), Value2, typeof(global::tryAGI.OpenAI.EvalGraderScoreModelVariant2), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EvalGraderScoreModel other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ScoreModelGrader, other.ScoreModelGrader) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderStringCheck.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderStringCheck.g.cs index 8d8bc2b4..496bb1aa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderStringCheck.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderStringCheck.g.cs @@ -13,19 +13,18 @@ namespace tryAGI.OpenAI /// A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderStringCheck? Value1 { get; init; } + public global::tryAGI.OpenAI.GraderStringCheck? StringCheckGrader { get; init; } #else - public global::tryAGI.OpenAI.GraderStringCheck? Value1 { get; } + public global::tryAGI.OpenAI.GraderStringCheck? StringCheckGrader { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StringCheckGrader))] #endif - public bool IsValue1 => Value1 != null; - + public bool IsStringCheckGrader => StringCheckGrader != null; /// /// /// @@ -34,28 +33,28 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator global::tryAGI.OpenAI.GraderStringCheck?(EvalGraderStringCheck @this) => @this.Value1; + public static implicit operator global::tryAGI.OpenAI.GraderStringCheck?(EvalGraderStringCheck @this) => @this.StringCheckGrader; /// /// /// public EvalGraderStringCheck(global::tryAGI.OpenAI.GraderStringCheck? value) { - Value1 = value; + StringCheckGrader = value; } /// /// /// public object? Object => - Value1 as object + StringCheckGrader as object ; /// /// /// public override string? ToString() => - Value1?.ToString() + StringCheckGrader?.ToString() ; /// @@ -63,14 +62,14 @@ Value1 as object /// public bool Validate() { - return IsValue1; + return IsStringCheckGrader; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? stringCheckGrader = null, bool validate = true) { if (validate) @@ -78,9 +77,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsStringCheckGrader && stringCheckGrader != null) { - return value1(Value1!); + return stringCheckGrader(StringCheckGrader!); } return default(TResult); @@ -90,7 +89,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? stringCheckGrader = null, bool validate = true) { if (validate) @@ -98,9 +97,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsStringCheckGrader) { - value1?.Invoke(Value1!); + stringCheckGrader?.Invoke(StringCheckGrader!); } } @@ -111,7 +110,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + StringCheckGrader, typeof(global::tryAGI.OpenAI.GraderStringCheck), }; const int offset = unchecked((int)2166136261); @@ -129,7 +128,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EvalGraderStringCheck other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + global::System.Collections.Generic.EqualityComparer.Default.Equals(StringCheckGrader, other.StringCheckGrader) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderTextSimilarity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderTextSimilarity.g.cs index 89e14478..17e1ff8e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderTextSimilarity.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalGraderTextSimilarity.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// A TextSimilarityGrader object which grades text based on similarity metrics. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderTextSimilarity? Value1 { get; init; } + public global::tryAGI.OpenAI.GraderTextSimilarity? TextSimilarityGrader { get; init; } #else - public global::tryAGI.OpenAI.GraderTextSimilarity? Value1 { get; } + public global::tryAGI.OpenAI.GraderTextSimilarity? TextSimilarityGrader { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextSimilarityGrader))] #endif - public bool IsValue1 => Value1 != null; + public bool IsTextSimilarityGrader => TextSimilarityGrader != null; /// /// /// - public static implicit operator EvalGraderTextSimilarity(global::tryAGI.OpenAI.GraderTextSimilarity value) => new EvalGraderTextSimilarity((global::tryAGI.OpenAI.GraderTextSimilarity?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.GraderTextSimilarity?(EvalGraderTextSimilarity @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public EvalGraderTextSimilarity(global::tryAGI.OpenAI.GraderTextSimilarity? value) - { - Value1 = value; - } + public static implicit operator EvalGraderTextSimilarity(global::tryAGI.OpenAI.GraderTextSimilarity value) => new EvalGraderTextSimilarity((global::tryAGI.OpenAI.GraderTextSimilarity?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.GraderTextSimilarity?(EvalGraderTextSimilarity @this) => @this.TextSimilarityGrader; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public EvalGraderTextSimilarity(global::tryAGI.OpenAI.GraderTextSimilarity? value) + { + TextSimilarityGrader = value; + } /// /// @@ -83,11 +82,11 @@ public EvalGraderTextSimilarity(global::tryAGI.OpenAI.EvalGraderTextSimilarityVa /// /// public EvalGraderTextSimilarity( - global::tryAGI.OpenAI.GraderTextSimilarity? value1, + global::tryAGI.OpenAI.GraderTextSimilarity? textSimilarityGrader, global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2? value2 ) { - Value1 = value1; + TextSimilarityGrader = textSimilarityGrader; Value2 = value2; } @@ -96,14 +95,14 @@ public EvalGraderTextSimilarity( ///
public object? Object => Value2 as object ?? - Value1 as object + TextSimilarityGrader as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + TextSimilarityGrader?.ToString() ?? Value2?.ToString() ; @@ -112,14 +111,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsTextSimilarityGrader && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? textSimilarityGrader = null, global::System.Func? value2 = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsTextSimilarityGrader && textSimilarityGrader != null) { - return value1(Value1!); + return textSimilarityGrader(TextSimilarityGrader!); } else if (IsValue2 && value2 != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? textSimilarityGrader = null, global::System.Action? value2 = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsTextSimilarityGrader) { - value1?.Invoke(Value1!); + textSimilarityGrader?.Invoke(TextSimilarityGrader!); } else if (IsValue2) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + TextSimilarityGrader, typeof(global::tryAGI.OpenAI.GraderTextSimilarity), Value2, typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarityVariant2), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EvalGraderTextSimilarity other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextSimilarityGrader, other.TextSimilarityGrader) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItem.g.cs index 4430a8c1..feced9aa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItem.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace tryAGI.OpenAI @@ -14,14 +12,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalItem { - /// - /// Inputs to the model - can contain template strings. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Content { get; set; } - /// /// The role of the message input. One of `user`, `assistant`, `system`, or
/// `developer`. @@ -31,6 +21,14 @@ public sealed partial class EvalItem [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.EvalItemRole Role { get; set; } + /// + /// Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.EvalItemContent Content { get; set; } + /// /// The type of the message input. Always `message`. /// @@ -47,13 +45,13 @@ public sealed partial class EvalItem /// /// Initializes a new instance of the class. /// - /// - /// Inputs to the model - can contain template strings. - /// /// /// The role of the message input. One of `user`, `assistant`, `system`, or
/// `developer`. /// + /// + /// Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items. + /// /// /// The type of the message input. Always `message`. /// @@ -61,12 +59,12 @@ public sealed partial class EvalItem [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalItem( - global::tryAGI.OpenAI.AnyOf content, global::tryAGI.OpenAI.EvalItemRole role, + global::tryAGI.OpenAI.EvalItemContent content, global::tryAGI.OpenAI.EvalItemType? type) { - this.Content = content; this.Role = role; + this.Content = content; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.Json.g.cs new file mode 100644 index 00000000..95d5edd6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct EvalItemContent + { + /// + /// 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::tryAGI.OpenAI.EvalItemContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalItemContent), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemContent?; + } + + /// + /// 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::tryAGI.OpenAI.EvalItemContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalItemContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemContent?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.g.cs new file mode 100644 index 00000000..426814e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContent.g.cs @@ -0,0 +1,204 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items. + /// + public readonly partial struct EvalItemContent : global::System.IEquatable + { + /// + /// A single content item: input text, output text, input image, or input audio. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalItemContentItem? EvalContentItem { get; init; } +#else + public global::tryAGI.OpenAI.EvalItemContentItem? EvalContentItem { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalContentItem))] +#endif + public bool IsEvalContentItem => EvalContentItem != null; + + /// + /// A list of inputs, each of which may be either an input text, output text, input
+ /// image, or input audio object. + ///
+#if NET6_0_OR_GREATER + public global::System.Collections.Generic.IList? AnArrayOfInputText,OutputText,InputImage,AndInputAudio { get; init; } +#else + public global::System.Collections.Generic.IList? AnArrayOfInputText,OutputText,InputImage,AndInputAudio { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AnArrayOfInputText,OutputText,InputImage,AndInputAudio))] +#endif + public bool IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio => AnArrayOfInputText,OutputText,InputImage,AndInputAudio != null; + /// + /// + /// + public static implicit operator EvalItemContent(global::tryAGI.OpenAI.EvalItemContentItem value) => new EvalItemContent((global::tryAGI.OpenAI.EvalItemContentItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.EvalItemContentItem?(EvalItemContent @this) => @this.EvalContentItem; + + /// + /// + /// + public EvalItemContent(global::tryAGI.OpenAI.EvalItemContentItem? value) + { + EvalContentItem = value; + } + + /// + /// + /// + public EvalItemContent( + global::tryAGI.OpenAI.EvalItemContentItem? evalContentItem, + global::System.Collections.Generic.IList? anArrayOfInputText,OutputText,InputImage,AndInputAudio + ) + { + EvalContentItem = evalContentItem; + AnArrayOfInputText,OutputText,InputImage,AndInputAudio = anArrayOfInputText,OutputText,InputImage,AndInputAudio; + } + + /// + /// + /// + public object? Object => + AnArrayOfInputText,OutputText,InputImage,AndInputAudio as object ?? + EvalContentItem as object + ; + + /// + /// + /// + public override string? ToString() => + EvalContentItem?.ToString() ?? + AnArrayOfInputText,OutputText,InputImage,AndInputAudio?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsEvalContentItem && !IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio || !IsEvalContentItem && IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? evalContentItem = null, + global::System.Func?, TResult>? anArrayOfInputText,OutputText,InputImage,AndInputAudio = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsEvalContentItem && evalContentItem != null) + { + return evalContentItem(EvalContentItem!); + } + else if (IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio && anArrayOfInputText,OutputText,InputImage,AndInputAudio != null) + { + return anArrayOfInputText,OutputText,InputImage,AndInputAudio(AnArrayOfInputText,OutputText,InputImage,AndInputAudio!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? evalContentItem = null, + global::System.Action?>? anArrayOfInputText,OutputText,InputImage,AndInputAudio = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsEvalContentItem) + { + evalContentItem?.Invoke(EvalContentItem!); + } + else if (IsAnArrayOfInputText,OutputText,InputImage,AndInputAudio) + { + anArrayOfInputText,OutputText,InputImage,AndInputAudio?.Invoke(AnArrayOfInputText,OutputText,InputImage,AndInputAudio!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + EvalContentItem, + typeof(global::tryAGI.OpenAI.EvalItemContentItem), + AnArrayOfInputText,OutputText,InputImage,AndInputAudio, + typeof(global::System.Collections.Generic.IList), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(EvalItemContent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalContentItem, other.EvalContentItem) && + global::System.Collections.Generic.EqualityComparer?>.Default.Equals(AnArrayOfInputText,OutputText,InputImage,AndInputAudio, other.AnArrayOfInputText,OutputText,InputImage,AndInputAudio) + ; + } + + /// + /// + /// + public static bool operator ==(EvalItemContent obj1, EvalItemContent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(EvalItemContent obj1, EvalItemContent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is EvalItemContent o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.Json.g.cs new file mode 100644 index 00000000..6a168eb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct EvalItemContentItem + { + /// + /// 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::tryAGI.OpenAI.EvalItemContentItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalItemContentItem), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemContentItem?; + } + + /// + /// 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::tryAGI.OpenAI.EvalItemContentItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalItemContentItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemContentItem?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.g.cs new file mode 100644 index 00000000..4c6bb7e1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentItem.g.cs @@ -0,0 +1,377 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A single content item: input text, output text, input image, or input audio. + /// + public readonly partial struct EvalItemContentItem : global::System.IEquatable + { + /// + /// A text input to the model. + /// +#if NET6_0_OR_GREATER + public string? TextInput { get; init; } +#else + public string? TextInput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextInput))] +#endif + public bool IsTextInput => TextInput != null; + + /// + /// A text input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputTextContent? InputText { get; init; } +#else + public global::tryAGI.OpenAI.InputTextContent? InputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] +#endif + public bool IsInputText => InputText != null; + + /// + /// A text output from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalItemContentOutputText? OutputText { get; init; } +#else + public global::tryAGI.OpenAI.EvalItemContentOutputText? OutputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputText))] +#endif + public bool IsOutputText => OutputText != null; + + /// + /// An image input block used within EvalItem content arrays. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.EvalItemInputImage? InputImage { get; init; } +#else + public global::tryAGI.OpenAI.EvalItemInputImage? InputImage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] +#endif + public bool IsInputImage => InputImage != null; + + /// + /// An audio input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputAudio? InputAudio { get; init; } +#else + public global::tryAGI.OpenAI.InputAudio? InputAudio { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudio))] +#endif + public bool IsInputAudio => InputAudio != null; + /// + /// + /// + public static implicit operator EvalItemContentItem(string value) => new EvalItemContentItem((string?)value); + + /// + /// + /// + public static implicit operator string?(EvalItemContentItem @this) => @this.TextInput; + + /// + /// + /// + public EvalItemContentItem(string? value) + { + TextInput = value; + } + + /// + /// + /// + public static implicit operator EvalItemContentItem(global::tryAGI.OpenAI.InputTextContent value) => new EvalItemContentItem((global::tryAGI.OpenAI.InputTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputTextContent?(EvalItemContentItem @this) => @this.InputText; + + /// + /// + /// + public EvalItemContentItem(global::tryAGI.OpenAI.InputTextContent? value) + { + InputText = value; + } + + /// + /// + /// + public static implicit operator EvalItemContentItem(global::tryAGI.OpenAI.EvalItemContentOutputText value) => new EvalItemContentItem((global::tryAGI.OpenAI.EvalItemContentOutputText?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.EvalItemContentOutputText?(EvalItemContentItem @this) => @this.OutputText; + + /// + /// + /// + public EvalItemContentItem(global::tryAGI.OpenAI.EvalItemContentOutputText? value) + { + OutputText = value; + } + + /// + /// + /// + public static implicit operator EvalItemContentItem(global::tryAGI.OpenAI.EvalItemInputImage value) => new EvalItemContentItem((global::tryAGI.OpenAI.EvalItemInputImage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.EvalItemInputImage?(EvalItemContentItem @this) => @this.InputImage; + + /// + /// + /// + public EvalItemContentItem(global::tryAGI.OpenAI.EvalItemInputImage? value) + { + InputImage = value; + } + + /// + /// + /// + public static implicit operator EvalItemContentItem(global::tryAGI.OpenAI.InputAudio value) => new EvalItemContentItem((global::tryAGI.OpenAI.InputAudio?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputAudio?(EvalItemContentItem @this) => @this.InputAudio; + + /// + /// + /// + public EvalItemContentItem(global::tryAGI.OpenAI.InputAudio? value) + { + InputAudio = value; + } + + /// + /// + /// + public EvalItemContentItem( + string? textInput, + global::tryAGI.OpenAI.InputTextContent? inputText, + global::tryAGI.OpenAI.EvalItemContentOutputText? outputText, + global::tryAGI.OpenAI.EvalItemInputImage? inputImage, + global::tryAGI.OpenAI.InputAudio? inputAudio + ) + { + TextInput = textInput; + InputText = inputText; + OutputText = outputText; + InputImage = inputImage; + InputAudio = inputAudio; + } + + /// + /// + /// + public object? Object => + InputAudio as object ?? + InputImage as object ?? + OutputText as object ?? + InputText as object ?? + TextInput as object + ; + + /// + /// + /// + public override string? ToString() => + TextInput?.ToString() ?? + InputText?.ToString() ?? + OutputText?.ToString() ?? + InputImage?.ToString() ?? + InputAudio?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsTextInput && !IsInputText && !IsOutputText && !IsInputImage && !IsInputAudio || !IsTextInput && IsInputText && !IsOutputText && !IsInputImage && !IsInputAudio || !IsTextInput && !IsInputText && IsOutputText && !IsInputImage && !IsInputAudio || !IsTextInput && !IsInputText && !IsOutputText && IsInputImage && !IsInputAudio || !IsTextInput && !IsInputText && !IsOutputText && !IsInputImage && IsInputAudio; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? textInput = null, + global::System.Func? inputText = null, + global::System.Func? outputText = null, + global::System.Func? inputImage = null, + global::System.Func? inputAudio = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTextInput && textInput != null) + { + return textInput(TextInput!); + } + else if (IsInputText && inputText != null) + { + return inputText(InputText!); + } + else if (IsOutputText && outputText != null) + { + return outputText(OutputText!); + } + else if (IsInputImage && inputImage != null) + { + return inputImage(InputImage!); + } + else if (IsInputAudio && inputAudio != null) + { + return inputAudio(InputAudio!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? textInput = null, + global::System.Action? inputText = null, + global::System.Action? outputText = null, + global::System.Action? inputImage = null, + global::System.Action? inputAudio = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTextInput) + { + textInput?.Invoke(TextInput!); + } + else if (IsInputText) + { + inputText?.Invoke(InputText!); + } + else if (IsOutputText) + { + outputText?.Invoke(OutputText!); + } + else if (IsInputImage) + { + inputImage?.Invoke(InputImage!); + } + else if (IsInputAudio) + { + inputAudio?.Invoke(InputAudio!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + TextInput, + typeof(string), + InputText, + typeof(global::tryAGI.OpenAI.InputTextContent), + OutputText, + typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), + InputImage, + typeof(global::tryAGI.OpenAI.EvalItemInputImage), + InputAudio, + typeof(global::tryAGI.OpenAI.InputAudio), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(EvalItemContentItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextInput, other.TextInput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputText, other.OutputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputAudio, other.InputAudio) + ; + } + + /// + /// + /// + public static bool operator ==(EvalItemContentItem obj1, EvalItemContentItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(EvalItemContentItem obj1, EvalItemContentItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is EvalItemContentItem o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.Json.g.cs new file mode 100644 index 00000000..c5a95399 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalItemContentOutputText + { + /// + /// 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::tryAGI.OpenAI.EvalItemContentOutputText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemContentOutputText; + } + + /// + /// 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::tryAGI.OpenAI.EvalItemContentOutputText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalItemContentOutputText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemContentOutputText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.g.cs new file mode 100644 index 00000000..97fc6614 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputText.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A text output from the model. + /// + public sealed partial class EvalItemContentOutputText + { + /// + /// The type of the output text. Always `output_text`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentOutputTextTypeJsonConverter))] + public global::tryAGI.OpenAI.EvalItemContentOutputTextType Type { get; set; } + + /// + /// The text output from the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the output text. Always `output_text`. + /// + /// + /// The text output from the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EvalItemContentOutputText( + string text, + global::tryAGI.OpenAI.EvalItemContentOutputTextType type) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public EvalItemContentOutputText() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputTextType.g.cs new file mode 100644 index 00000000..44f57ab1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentOutputTextType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the output text. Always `output_text`. + /// + public enum EvalItemContentOutputTextType + { + /// + /// + /// + OutputText, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EvalItemContentOutputTextTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EvalItemContentOutputTextType value) + { + return value switch + { + EvalItemContentOutputTextType.OutputText => "output_text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EvalItemContentOutputTextType? ToEnum(string value) + { + return value switch + { + "output_text" => EvalItemContentOutputTextType.OutputText, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.Json.g.cs deleted file mode 100644 index dc0c6510..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class EvalItemContentVariant3 - { - /// - /// 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::tryAGI.OpenAI.EvalItemContentVariant3? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalItemContentVariant3), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemContentVariant3; - } - - /// - /// 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::tryAGI.OpenAI.EvalItemContentVariant3? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalItemContentVariant3), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemContentVariant3; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.g.cs deleted file mode 100644 index 5fcb80d1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A text output from the model. - /// - public sealed partial class EvalItemContentVariant3 - { - /// - /// The text output from the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// The type of the output text. Always `output_text`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant3TypeJsonConverter))] - public global::tryAGI.OpenAI.EvalItemContentVariant3Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The text output from the model. - /// - /// - /// The type of the output text. Always `output_text`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvalItemContentVariant3( - string text, - global::tryAGI.OpenAI.EvalItemContentVariant3Type type) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public EvalItemContentVariant3() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3Type.g.cs deleted file mode 100644 index ed90568f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant3Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of the output text. Always `output_text`. - /// - public enum EvalItemContentVariant3Type - { - /// - /// - /// - OutputText, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class EvalItemContentVariant3TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this EvalItemContentVariant3Type value) - { - return value switch - { - EvalItemContentVariant3Type.OutputText => "output_text", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static EvalItemContentVariant3Type? ToEnum(string value) - { - return value switch - { - "output_text" => EvalItemContentVariant3Type.OutputText, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.Json.g.cs deleted file mode 100644 index 4417cb2d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class EvalItemContentVariant4 - { - /// - /// 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::tryAGI.OpenAI.EvalItemContentVariant4? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalItemContentVariant4), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemContentVariant4; - } - - /// - /// 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::tryAGI.OpenAI.EvalItemContentVariant4? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalItemContentVariant4), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemContentVariant4; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.g.cs deleted file mode 100644 index cdd84b26..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// An image input to the model. - /// - public sealed partial class EvalItemContentVariant4 - { - /// - /// The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("detail")] - public string? Detail { get; set; } - - /// - /// The URL of the image input. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ImageUrl { get; set; } - - /// - /// The type of the image input. Always `input_image`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemContentVariant4TypeJsonConverter))] - public global::tryAGI.OpenAI.EvalItemContentVariant4Type 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. - /// - /// - /// The URL of the image input. - /// - /// - /// The type of the image input. Always `input_image`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvalItemContentVariant4( - string imageUrl, - string? detail, - global::tryAGI.OpenAI.EvalItemContentVariant4Type type) - { - this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); - this.Detail = detail; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public EvalItemContentVariant4() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4Type.g.cs deleted file mode 100644 index f685b375..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemContentVariant4Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of the image input. Always `input_image`. - /// - public enum EvalItemContentVariant4Type - { - /// - /// - /// - InputImage, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class EvalItemContentVariant4TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this EvalItemContentVariant4Type value) - { - return value switch - { - EvalItemContentVariant4Type.InputImage => "input_image", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static EvalItemContentVariant4Type? ToEnum(string value) - { - return value switch - { - "input_image" => EvalItemContentVariant4Type.InputImage, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.Json.g.cs new file mode 100644 index 00000000..4dea49a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalItemInputImage + { + /// + /// 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::tryAGI.OpenAI.EvalItemInputImage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalItemInputImage), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalItemInputImage; + } + + /// + /// 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::tryAGI.OpenAI.EvalItemInputImage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalItemInputImage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalItemInputImage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.g.cs new file mode 100644 index 00000000..43ff3208 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImage.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An image input block used within EvalItem content arrays. + /// + public sealed partial class EvalItemInputImage + { + /// + /// The type of the image input. Always `input_image`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalItemInputImageTypeJsonConverter))] + public global::tryAGI.OpenAI.EvalItemInputImageType Type { get; set; } + + /// + /// The URL of the image input. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ImageUrl { get; set; } + + /// + /// The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + public string? Detail { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the image input. Always `input_image`. + /// + /// + /// The URL of the image input. + /// + /// + /// The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EvalItemInputImage( + string imageUrl, + global::tryAGI.OpenAI.EvalItemInputImageType type, + string? detail) + { + this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); + this.Type = type; + this.Detail = detail; + } + + /// + /// Initializes a new instance of the class. + /// + public EvalItemInputImage() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImageType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImageType.g.cs new file mode 100644 index 00000000..2736637c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalItemInputImageType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the image input. Always `input_image`. + /// + public enum EvalItemInputImageType + { + /// + /// + /// + InputImage, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EvalItemInputImageTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EvalItemInputImageType value) + { + return value switch + { + EvalItemInputImageType.InputImage => "input_image", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EvalItemInputImageType? ToEnum(string value) + { + return value switch + { + "input_image" => EvalItemInputImageType.InputImage, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileContentSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileContentSource.g.cs index c350d616..3d525b82 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileContentSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileContentSource.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalJsonlFileContentSource { - /// - /// The content of the jsonl file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The type of jsonl source. Always `file_content`.
/// Default Value: file_content @@ -24,6 +17,13 @@ public sealed partial class EvalJsonlFileContentSource [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileContentSourceTypeJsonConverter))] public global::tryAGI.OpenAI.EvalJsonlFileContentSourceType Type { get; set; } = global::tryAGI.OpenAI.EvalJsonlFileContentSourceType.FileContent; + /// + /// The content of the jsonl file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class EvalJsonlFileContentSource /// /// Initializes a new instance of the class. /// - /// - /// The content of the jsonl file. - /// /// /// The type of jsonl source. Always `file_content`.
/// Default Value: file_content /// + /// + /// The content of the jsonl file. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileIdSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileIdSource.g.cs index 4143d2f4..bb7bec2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileIdSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalJsonlFileIdSource.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalJsonlFileIdSource { - /// - /// The identifier of the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The type of jsonl source. Always `file_id`.
/// Default Value: file_id @@ -24,6 +17,13 @@ public sealed partial class EvalJsonlFileIdSource [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalJsonlFileIdSourceTypeJsonConverter))] public global::tryAGI.OpenAI.EvalJsonlFileIdSourceType Type { get; set; } = global::tryAGI.OpenAI.EvalJsonlFileIdSourceType.FileId; + /// + /// The identifier of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class EvalJsonlFileIdSource /// /// Initializes a new instance of the class. /// - /// - /// The identifier of the file. - /// /// /// The type of jsonl source. Always `file_id`.
/// Default Value: file_id /// + /// + /// The identifier of the file. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalList.g.cs index c1b30790..b8075c9d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalList.g.cs @@ -8,6 +8,15 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalList { + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.EvalListObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalListObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalListObject Object { get; set; } = global::tryAGI.OpenAI.EvalListObject.List; + /// /// An array of eval objects. /// @@ -22,13 +31,6 @@ public sealed partial class EvalList [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Indicates whether there are more evals available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The identifier of the last eval in the data array. /// @@ -37,13 +39,11 @@ public sealed partial class EvalList public required string LastId { get; set; } /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// Indicates whether there are more evals available. ///
- /// global::tryAGI.OpenAI.EvalListObject.List - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalListObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalListObject Object { get; set; } = global::tryAGI.OpenAI.EvalListObject.List; + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,21 +54,21 @@ public sealed partial class EvalList /// /// Initializes a new instance of the class. /// + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + /// /// /// An array of eval objects. /// /// /// The identifier of the first eval in the data array. /// - /// - /// Indicates whether there are more evals available. - /// /// /// The identifier of the last eval in the data array. /// - /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// + /// Indicates whether there are more evals available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -76,14 +76,14 @@ public sealed partial class EvalList public EvalList( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.EvalListObject @object = global::tryAGI.OpenAI.EvalListObject.List) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalLogsDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalLogsDataSourceConfig.g.cs index 2dde198c..4153d433 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalLogsDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalLogsDataSourceConfig.g.cs @@ -12,11 +12,16 @@ namespace tryAGI.OpenAI public sealed partial class EvalLogsDataSourceConfig { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The type of data source. Always `logs`.
+ /// Default Value: logs + ///
+ /// global::tryAGI.OpenAI.EvalLogsDataSourceConfigType.Logs + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalLogsDataSourceConfigTypeJsonConverter))] + public global::tryAGI.OpenAI.EvalLogsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.EvalLogsDataSourceConfigType.Logs; + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -29,15 +34,6 @@ public sealed partial class EvalLogsDataSourceConfig [global::System.Text.Json.Serialization.JsonRequired] public required object Schema { get; set; } - /// - /// The type of data source. Always `logs`.
- /// Default Value: logs - ///
- /// global::tryAGI.OpenAI.EvalLogsDataSourceConfigType.Logs - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalLogsDataSourceConfigTypeJsonConverter))] - public global::tryAGI.OpenAI.EvalLogsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.EvalLogsDataSourceConfigType.Logs; - /// /// Additional properties that are not explicitly defined in the schema /// @@ -47,21 +43,15 @@ public sealed partial class EvalLogsDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The type of data source. Always `logs`.
+ /// Default Value: logs /// + /// /// /// The json schema for the run data source items.
/// Learn how to build JSON schemas [here](https://json-schema.org/). /// - /// - /// The type of data source. Always `logs`.
- /// Default Value: logs - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -71,8 +61,8 @@ public EvalLogsDataSourceConfig( global::tryAGI.OpenAI.EvalLogsDataSourceConfigType type = global::tryAGI.OpenAI.EvalLogsDataSourceConfigType.Logs) { this.Schema = schema ?? throw new global::System.ArgumentNullException(nameof(schema)); - this.Metadata = metadata; this.Type = type; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSource.g.cs index 4844554d..b2cc9b90 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSource.g.cs @@ -9,71 +9,71 @@ namespace tryAGI.OpenAI public sealed partial class EvalResponsesSource { /// - /// Only include items created after this timestamp (inclusive). This is a query parameter used to select responses. + /// The type of run data source. Always `responses`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_after")] - public int? CreatedAfter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalResponsesSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.EvalResponsesSourceType Type { get; set; } /// - /// Only include items created before this timestamp (inclusive). This is a query parameter used to select responses. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_before")] - public int? CreatedBefore { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { get; set; } /// - /// Optional string to search the 'instructions' field. This is a query parameter used to select responses. + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("instructions_search")] public string? InstructionsSearch { get; set; } /// - /// Metadata filter for the responses. This is a query parameter used to select responses. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public object? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_after")] + public int? CreatedAfter { get; set; } /// - /// The name of the model to find responses for. This is a query parameter used to select responses. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_before")] + public int? CreatedBefore { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - public object? ReasoningEffort { get; set; } + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } /// - /// Sampling temperature. This is a query parameter used to select responses. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public double? Temperature { get; set; } /// - /// List of tool names. This is a query parameter used to select responses. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } - - /// - /// Nucleus sampling parameter. This is a query parameter used to select responses. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] public double? TopP { get; set; } /// - /// The type of run data source. Always `responses`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalResponsesSourceTypeJsonConverter))] - public global::tryAGI.OpenAI.EvalResponsesSourceType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("users")] + public global::System.Collections.Generic.IList? Users { get; set; } /// - /// List of user identifiers. This is a query parameter used to select responses. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("users")] - public global::System.Collections.Generic.IList? Users { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -84,64 +84,46 @@ public sealed partial class EvalResponsesSource /// /// Initializes a new instance of the class. /// - /// - /// Only include items created after this timestamp (inclusive). This is a query parameter used to select responses. - /// - /// - /// Only include items created before this timestamp (inclusive). This is a query parameter used to select responses. - /// - /// - /// Optional string to search the 'instructions' field. This is a query parameter used to select responses. - /// - /// - /// Metadata filter for the responses. This is a query parameter used to select responses. - /// - /// - /// The name of the model to find responses for. This is a query parameter used to select responses. - /// - /// - /// - /// Sampling temperature. This is a query parameter used to select responses. - /// - /// - /// List of tool names. This is a query parameter used to select responses. - /// - /// - /// Nucleus sampling parameter. This is a query parameter used to select responses. - /// /// /// The type of run data source. Always `responses`. /// - /// - /// List of user identifiers. This is a query parameter used to select responses. - /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalResponsesSource( - int? createdAfter, - int? createdBefore, - string? instructionsSearch, + global::tryAGI.OpenAI.EvalResponsesSourceType type, object? metadata, string? model, - object? reasoningEffort, + string? instructionsSearch, + int? createdAfter, + int? createdBefore, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, double? temperature, - global::System.Collections.Generic.IList? tools, double? topP, - global::tryAGI.OpenAI.EvalResponsesSourceType type, - global::System.Collections.Generic.IList? users) + global::System.Collections.Generic.IList? users, + global::System.Collections.Generic.IList? tools) { - this.CreatedAfter = createdAfter; - this.CreatedBefore = createdBefore; - this.InstructionsSearch = instructionsSearch; + this.Type = type; this.Metadata = metadata; this.Model = model; + this.InstructionsSearch = instructionsSearch; + this.CreatedAfter = createdAfter; + this.CreatedBefore = createdBefore; this.ReasoningEffort = reasoningEffort; this.Temperature = temperature; - this.Tools = tools; this.TopP = topP; - this.Type = type; this.Users = users; + this.Tools = tools; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.Json.g.cs new file mode 100644 index 00000000..1d3ef94f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceCreatedAfter + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceCreatedAfter; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.g.cs new file mode 100644 index 00000000..ff58491c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedAfter.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceCreatedAfter + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.Json.g.cs new file mode 100644 index 00000000..34c6743c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceCreatedBefore + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceCreatedBefore; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.g.cs new file mode 100644 index 00000000..6ce53eb0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceCreatedBefore.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceCreatedBefore + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.Json.g.cs new file mode 100644 index 00000000..4ad1598c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceInstructionsSearch + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceInstructionsSearch; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.g.cs new file mode 100644 index 00000000..8a2eb26b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceInstructionsSearch.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceInstructionsSearch + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata.g.cs index dc720d37..63aa2d2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Metadata filter for the responses. This is a query parameter used to select responses. + /// /// public sealed partial class EvalResponsesSourceMetadata { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.Json.g.cs new file mode 100644 index 00000000..9e252017 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceMetadata2 + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceMetadata2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceMetadata2), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceMetadata2; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceMetadata2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceMetadata2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceMetadata2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.g.cs new file mode 100644 index 00000000..8d8ff91f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceMetadata2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Metadata filter for the responses. This is a query parameter used to select responses. + /// + public sealed partial class EvalResponsesSourceMetadata2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.Json.g.cs new file mode 100644 index 00000000..9534d7da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceModel + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceModel), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceModel; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.g.cs new file mode 100644 index 00000000..f5d92e43 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.Json.g.cs new file mode 100644 index 00000000..97cf7ac0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceReasoningEffort + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceReasoningEffort; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.g.cs new file mode 100644 index 00000000..3f657e18 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceReasoningEffort.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceReasoningEffort + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.Json.g.cs new file mode 100644 index 00000000..5adf0b61 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceTemperature + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceTemperature; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.g.cs new file mode 100644 index 00000000..1aad9ddc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.Json.g.cs new file mode 100644 index 00000000..073f3894 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceTools + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTools? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTools), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceTools; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTools? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTools), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceTools; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.g.cs new file mode 100644 index 00000000..21465b1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTools.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceTools + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.Json.g.cs new file mode 100644 index 00000000..7e7d107c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceTopP + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceTopP; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.g.cs new file mode 100644 index 00000000..133babaf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.Json.g.cs new file mode 100644 index 00000000..bff0075e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalResponsesSourceUsers + { + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceUsers? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceUsers), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalResponsesSourceUsers; + } + + /// + /// 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::tryAGI.OpenAI.EvalResponsesSourceUsers? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalResponsesSourceUsers), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalResponsesSourceUsers; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.g.cs new file mode 100644 index 00000000..7e6569b7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalResponsesSourceUsers.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalResponsesSourceUsers + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRun.g.cs index 873cdc23..b4e70226 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRun.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRun.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,27 +11,20 @@ namespace tryAGI.OpenAI public sealed partial class EvalRun { /// - /// Unix timestamp (in seconds) when the evaluation run was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - - /// - /// Information about the run's data source. + /// The type of the object. Always "eval.run".
+ /// Default Value: eval.run ///
- [global::System.Text.Json.Serialization.JsonPropertyName("data_source")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunDataSourceJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalRunDataSource DataSource { get; set; } + /// global::tryAGI.OpenAI.EvalRunObject.EvalRun + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalRunObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunObject.EvalRun; /// - /// An object representing an error response from the Eval API. + /// Unique identifier for the evaluation run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalApiError Error { get; set; } + public required string Id { get; set; } /// /// The identifier of the associated evaluation. @@ -39,22 +34,11 @@ public sealed partial class EvalRun public required string EvalId { get; set; } /// - /// Unique identifier for the evaluation run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The status of the evaluation run. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } + public required string Status { get; set; } /// /// The model that is evaluated, if applicable. @@ -71,13 +55,26 @@ public sealed partial class EvalRun public required string Name { get; set; } /// - /// The type of the object. Always "eval.run".
- /// Default Value: eval.run + /// Unix timestamp (in seconds) when the evaluation run was created. ///
- /// global::tryAGI.OpenAI.EvalRunObject.EvalRun - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalRunObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunObject.EvalRun; + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The URL to the rendered evaluation run report on the UI dashboard. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("report_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ReportUrl { get; set; } + + /// + /// Counters summarizing the outcomes of the evaluation run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("result_counts")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.EvalRunResultCounts ResultCounts { get; set; } /// /// Usage statistics for each model during the evaluation run. @@ -94,25 +91,26 @@ public sealed partial class EvalRun public required global::System.Collections.Generic.IList PerTestingCriteriaResults { get; set; } /// - /// The URL to the rendered evaluation run report on the UI dashboard. + /// Information about the run's data source. /// - [global::System.Text.Json.Serialization.JsonPropertyName("report_url")] + [global::System.Text.Json.Serialization.JsonPropertyName("data_source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string ReportUrl { get; set; } + public required global::tryAGI.OpenAI.OneOf DataSource { get; set; } /// - /// Counters summarizing the outcomes of the evaluation run. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("result_counts")] + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalRunResultCounts ResultCounts { get; set; } + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// The status of the evaluation run. + /// An object representing an error response from the Eval API. /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonPropertyName("error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Status { get; set; } + public required global::tryAGI.OpenAI.EvalApiError Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -123,27 +121,18 @@ public sealed partial class EvalRun /// /// Initializes a new instance of the class. /// - /// - /// Unix timestamp (in seconds) when the evaluation run was created. - /// - /// - /// Information about the run's data source. + /// + /// The type of the object. Always "eval.run".
+ /// Default Value: eval.run /// - /// - /// An object representing an error response from the Eval API. + /// + /// Unique identifier for the evaluation run. /// /// /// The identifier of the associated evaluation. /// - /// - /// Unique identifier for the evaluation run. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The status of the evaluation run. /// /// /// The model that is evaluated, if applicable. @@ -151,9 +140,14 @@ public sealed partial class EvalRun /// /// The name of the evaluation run. /// - /// - /// The type of the object. Always "eval.run".
- /// Default Value: eval.run + /// + /// Unix timestamp (in seconds) when the evaluation run was created. + /// + /// + /// The URL to the rendered evaluation run report on the UI dashboard. + /// + /// + /// Counters summarizing the outcomes of the evaluation run. /// /// /// Usage statistics for each model during the evaluation run. @@ -161,47 +155,45 @@ public sealed partial class EvalRun /// /// Results per testing criteria applied during the evaluation run. /// - /// - /// The URL to the rendered evaluation run report on the UI dashboard. - /// - /// - /// Counters summarizing the outcomes of the evaluation run. + /// + /// Information about the run's data source. /// - /// - /// The status of the evaluation run. + /// + /// + /// An object representing an error response from the Eval API. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRun( - global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.EvalRunDataSource dataSource, - global::tryAGI.OpenAI.EvalApiError error, - string evalId, string id, - global::System.Collections.Generic.Dictionary? metadata, + string evalId, + string status, string model, string name, - global::System.Collections.Generic.IList perModelUsage, - global::System.Collections.Generic.IList perTestingCriteriaResults, + global::System.DateTimeOffset createdAt, string reportUrl, global::tryAGI.OpenAI.EvalRunResultCounts resultCounts, - string status, + global::System.Collections.Generic.IList perModelUsage, + global::System.Collections.Generic.IList perTestingCriteriaResults, + global::tryAGI.OpenAI.OneOf dataSource, + global::System.Collections.Generic.Dictionary? metadata, + global::tryAGI.OpenAI.EvalApiError error, global::tryAGI.OpenAI.EvalRunObject @object = global::tryAGI.OpenAI.EvalRunObject.EvalRun) { - this.CreatedAt = createdAt; - this.DataSource = dataSource; - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); - this.EvalId = evalId ?? throw new global::System.ArgumentNullException(nameof(evalId)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.EvalId = evalId ?? throw new global::System.ArgumentNullException(nameof(evalId)); + this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.PerModelUsage = perModelUsage ?? throw new global::System.ArgumentNullException(nameof(perModelUsage)); - this.PerTestingCriteriaResults = perTestingCriteriaResults ?? throw new global::System.ArgumentNullException(nameof(perTestingCriteriaResults)); + this.CreatedAt = createdAt; this.ReportUrl = reportUrl ?? throw new global::System.ArgumentNullException(nameof(reportUrl)); this.ResultCounts = resultCounts ?? throw new global::System.ArgumentNullException(nameof(resultCounts)); - this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); + this.PerModelUsage = perModelUsage ?? throw new global::System.ArgumentNullException(nameof(perModelUsage)); + this.PerTestingCriteriaResults = perTestingCriteriaResults ?? throw new global::System.ArgumentNullException(nameof(perTestingCriteriaResults)); + this.DataSource = dataSource; + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.Json.g.cs deleted file mode 100644 index c8a77d3a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct EvalRunDataSource - { - /// - /// 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::tryAGI.OpenAI.EvalRunDataSource? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalRunDataSource), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalRunDataSource?; - } - - /// - /// 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::tryAGI.OpenAI.EvalRunDataSource? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalRunDataSource), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalRunDataSource?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.g.cs deleted file mode 100644 index 1e1f22c9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSource.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Information about the run's data source. - /// - public readonly partial struct EvalRunDataSource : global::System.IEquatable - { - /// - /// A JsonlRunDataSource object with that specifies a JSONL file that matches the eval - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? CreateJsonl { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? CreateJsonl { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateJsonl))] -#endif - public bool IsCreateJsonl => CreateJsonl != null; - - /// - /// - /// - public static implicit operator EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource value) => new EvalRunDataSource((global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource?(EvalRunDataSource @this) => @this.CreateJsonl; - - /// - /// - /// - public EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? value) - { - CreateJsonl = value; - } - - /// - /// A CompletionsRunDataSource object describing a model sampling configuration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? CreateCompletions { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? CreateCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateCompletions))] -#endif - public bool IsCreateCompletions => CreateCompletions != null; - - /// - /// - /// - public static implicit operator EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource value) => new EvalRunDataSource((global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource?(EvalRunDataSource @this) => @this.CreateCompletions; - - /// - /// - /// - public EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? value) - { - CreateCompletions = value; - } - - /// - /// A ResponsesRunDataSource object describing a model sampling configuration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? CreateResponses { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? CreateResponses { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateResponses))] -#endif - public bool IsCreateResponses => CreateResponses != null; - - /// - /// - /// - public static implicit operator EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource value) => new EvalRunDataSource((global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource?(EvalRunDataSource @this) => @this.CreateResponses; - - /// - /// - /// - public EvalRunDataSource(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? value) - { - CreateResponses = value; - } - - /// - /// - /// - public EvalRunDataSource( - global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource? createJsonl, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource? createCompletions, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource? createResponses - ) - { - CreateJsonl = createJsonl; - CreateCompletions = createCompletions; - CreateResponses = createResponses; - } - - /// - /// - /// - public object? Object => - CreateResponses as object ?? - CreateCompletions as object ?? - CreateJsonl as object - ; - - /// - /// - /// - public override string? ToString() => - CreateJsonl?.ToString() ?? - CreateCompletions?.ToString() ?? - CreateResponses?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCreateJsonl || IsCreateCompletions || IsCreateResponses; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? createJsonl = null, - global::System.Func? createCompletions = null, - global::System.Func? createResponses = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCreateJsonl && createJsonl != null) - { - return createJsonl(CreateJsonl!); - } - else if (IsCreateCompletions && createCompletions != null) - { - return createCompletions(CreateCompletions!); - } - else if (IsCreateResponses && createResponses != null) - { - return createResponses(CreateResponses!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? createJsonl = null, - global::System.Action? createCompletions = null, - global::System.Action? createResponses = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCreateJsonl) - { - createJsonl?.Invoke(CreateJsonl!); - } - else if (IsCreateCompletions) - { - createCompletions?.Invoke(CreateCompletions!); - } - else if (IsCreateResponses) - { - createResponses?.Invoke(CreateResponses!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - CreateJsonl, - typeof(global::tryAGI.OpenAI.CreateEvalJsonlRunDataSource), - CreateCompletions, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSource), - CreateResponses, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSource), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(EvalRunDataSource other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateJsonl, other.CreateJsonl) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateCompletions, other.CreateCompletions) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateResponses, other.CreateResponses) - ; - } - - /// - /// - /// - public static bool operator ==(EvalRunDataSource obj1, EvalRunDataSource obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(EvalRunDataSource obj1, EvalRunDataSource obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is EvalRunDataSource o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.Json.g.cs deleted file mode 100644 index f957fe7f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class EvalRunDataSourceDiscriminator - { - /// - /// 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::tryAGI.OpenAI.EvalRunDataSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.EvalRunDataSourceDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.EvalRunDataSourceDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.EvalRunDataSourceDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.EvalRunDataSourceDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalRunDataSourceDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.g.cs deleted file mode 100644 index f4317a74..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunDataSourceDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class EvalRunDataSourceDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvalRunDataSourceDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public EvalRunDataSourceDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunList.g.cs index fe78b38d..c88b8640 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunList.g.cs @@ -8,6 +8,15 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalRunList { + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.EvalRunListObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunListObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalRunListObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunListObject.List; + /// /// An array of eval run objects. /// @@ -22,13 +31,6 @@ public sealed partial class EvalRunList [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Indicates whether there are more evals available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The identifier of the last eval run in the data array. /// @@ -37,13 +39,11 @@ public sealed partial class EvalRunList public required string LastId { get; set; } /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// Indicates whether there are more evals available. ///
- /// global::tryAGI.OpenAI.EvalRunListObject.List - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunListObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalRunListObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunListObject.List; + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,21 +54,21 @@ public sealed partial class EvalRunList /// /// Initializes a new instance of the class. /// + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + /// /// /// An array of eval run objects. /// /// /// The identifier of the first eval run in the data array. /// - /// - /// Indicates whether there are more evals available. - /// /// /// The identifier of the last eval run in the data array. /// - /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// + /// Indicates whether there are more evals available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -76,14 +76,14 @@ public sealed partial class EvalRunList public EvalRunList( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.EvalRunListObject @object = global::tryAGI.OpenAI.EvalRunListObject.List) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItem.g.cs index 80194ad5..850613ad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItem.g.cs @@ -9,26 +9,27 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunOutputItem { /// - /// Unix timestamp (in seconds) when the evaluation run was created. + /// The type of the object. Always "eval.run.output_item".
+ /// Default Value: eval.run.output_item ///
- [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + /// global::tryAGI.OpenAI.EvalRunOutputItemObject.EvalRunOutputItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunOutputItemObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalRunOutputItemObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunOutputItemObject.EvalRunOutputItem; /// - /// Details of the input data source item. + /// Unique identifier for the evaluation run output item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("datasource_item")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required object DatasourceItem { get; set; } + public required string Id { get; set; } /// - /// The identifier for the data source item. + /// The identifier of the evaluation run associated with this output item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("datasource_item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int DatasourceItemId { get; set; } + public required string RunId { get; set; } /// /// The identifier of the evaluation group. @@ -38,48 +39,47 @@ public sealed partial class EvalRunOutputItem public required string EvalId { get; set; } /// - /// Unique identifier for the evaluation run output item. + /// Unix timestamp (in seconds) when the evaluation run was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The type of the object. Always "eval.run.output_item".
- /// Default Value: eval.run.output_item + /// The status of the evaluation run. ///
- /// global::tryAGI.OpenAI.EvalRunOutputItemObject.EvalRunOutputItem - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunOutputItemObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalRunOutputItemObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunOutputItemObject.EvalRunOutputItem; + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Status { get; set; } /// - /// A list of grader results for this output item. + /// The identifier for the data source item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonPropertyName("datasource_item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Results { get; set; } + public required int DatasourceItemId { get; set; } /// - /// The identifier of the evaluation run associated with this output item. + /// Details of the input data source item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("datasource_item")] [global::System.Text.Json.Serialization.JsonRequired] - public required string RunId { get; set; } + public required object DatasourceItem { get; set; } /// - /// A sample containing the input and output of the evaluation run. + /// A list of grader results for this output item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sample")] + [global::System.Text.Json.Serialization.JsonPropertyName("results")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalRunOutputItemSample Sample { get; set; } + public required global::System.Collections.Generic.IList Results { get; set; } /// - /// The status of the evaluation run. + /// A sample containing the input and output of the evaluation run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonPropertyName("sample")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Status { get; set; } + public required global::tryAGI.OpenAI.EvalRunOutputItemSample Sample { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -90,61 +90,61 @@ public sealed partial class EvalRunOutputItem /// /// Initializes a new instance of the class. /// - /// - /// Unix timestamp (in seconds) when the evaluation run was created. + /// + /// The type of the object. Always "eval.run.output_item".
+ /// Default Value: eval.run.output_item /// - /// - /// Details of the input data source item. + /// + /// Unique identifier for the evaluation run output item. /// - /// - /// The identifier for the data source item. + /// + /// The identifier of the evaluation run associated with this output item. /// /// /// The identifier of the evaluation group. /// - /// - /// Unique identifier for the evaluation run output item. + /// + /// Unix timestamp (in seconds) when the evaluation run was created. /// - /// - /// The type of the object. Always "eval.run.output_item".
- /// Default Value: eval.run.output_item + /// + /// The status of the evaluation run. + /// + /// + /// The identifier for the data source item. + /// + /// + /// Details of the input data source item. /// /// /// A list of grader results for this output item. /// - /// - /// The identifier of the evaluation run associated with this output item. - /// /// /// A sample containing the input and output of the evaluation run. /// - /// - /// The status of the evaluation run. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItem( + string id, + string runId, + string evalId, global::System.DateTimeOffset createdAt, - object datasourceItem, + string status, int datasourceItemId, - string evalId, - string id, + object datasourceItem, global::System.Collections.Generic.IList results, - string runId, global::tryAGI.OpenAI.EvalRunOutputItemSample sample, - string status, global::tryAGI.OpenAI.EvalRunOutputItemObject @object = global::tryAGI.OpenAI.EvalRunOutputItemObject.EvalRunOutputItem) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.RunId = runId ?? throw new global::System.ArgumentNullException(nameof(runId)); + this.EvalId = evalId ?? throw new global::System.ArgumentNullException(nameof(evalId)); this.CreatedAt = createdAt; - this.DatasourceItem = datasourceItem ?? throw new global::System.ArgumentNullException(nameof(datasourceItem)); + this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); this.DatasourceItemId = datasourceItemId; - this.EvalId = evalId ?? throw new global::System.ArgumentNullException(nameof(evalId)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.DatasourceItem = datasourceItem ?? throw new global::System.ArgumentNullException(nameof(datasourceItem)); this.Results = results ?? throw new global::System.ArgumentNullException(nameof(results)); - this.RunId = runId ?? throw new global::System.ArgumentNullException(nameof(runId)); this.Sample = sample ?? throw new global::System.ArgumentNullException(nameof(sample)); - this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemList.g.cs index 27ab8356..20e15938 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemList.g.cs @@ -8,6 +8,15 @@ namespace tryAGI.OpenAI ///
public sealed partial class EvalRunOutputItemList { + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.EvalRunOutputItemListObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunOutputItemListObjectJsonConverter))] + public global::tryAGI.OpenAI.EvalRunOutputItemListObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunOutputItemListObject.List; + /// /// An array of eval run output item objects. /// @@ -22,13 +31,6 @@ public sealed partial class EvalRunOutputItemList [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Indicates whether there are more eval run output items available. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// The identifier of the last eval run output item in the data array. /// @@ -37,13 +39,11 @@ public sealed partial class EvalRunOutputItemList public required string LastId { get; set; } /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// Indicates whether there are more eval run output items available. ///
- /// global::tryAGI.OpenAI.EvalRunOutputItemListObject.List - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalRunOutputItemListObjectJsonConverter))] - public global::tryAGI.OpenAI.EvalRunOutputItemListObject Object { get; set; } = global::tryAGI.OpenAI.EvalRunOutputItemListObject.List; + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,21 +54,21 @@ public sealed partial class EvalRunOutputItemList /// /// Initializes a new instance of the class. /// + /// + /// The type of this object. It is always set to "list".
+ /// Default Value: list + /// /// /// An array of eval run output item objects. /// /// /// The identifier of the first eval run output item in the data array. /// - /// - /// Indicates whether there are more eval run output items available. - /// /// /// The identifier of the last eval run output item in the data array. /// - /// - /// The type of this object. It is always set to "list".
- /// Default Value: list + /// + /// Indicates whether there are more eval run output items available. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -76,14 +76,14 @@ public sealed partial class EvalRunOutputItemList public EvalRunOutputItemList( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.EvalRunOutputItemListObject @object = global::tryAGI.OpenAI.EvalRunOutputItemListObject.List) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResult.g.cs index 279b5ea5..e35a15f8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResult.g.cs @@ -16,17 +16,10 @@ public sealed partial class EvalRunOutputItemResult public required string Name { get; set; } /// - /// Whether the grader considered the output a pass. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// Optional sample or intermediate data produced by the grader. + /// The grader type (for example, "string-check-grader"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("sample")] - public object? Sample { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } /// /// The numeric score produced by the grader. @@ -36,10 +29,17 @@ public sealed partial class EvalRunOutputItemResult public required double Score { get; set; } /// - /// The grader type (for example, "string-check-grader"). + /// Whether the grader considered the output a pass. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("passed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Passed { get; set; } + + /// + /// Optional sample or intermediate data produced by the grader. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sample")] + public object? Sample { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,33 +53,33 @@ public sealed partial class EvalRunOutputItemResult /// /// The name of the grader. /// + /// + /// The grader type (for example, "string-check-grader"). + /// + /// + /// The numeric score produced by the grader. + /// /// /// Whether the grader considered the output a pass. /// /// /// Optional sample or intermediate data produced by the grader. /// - /// - /// The numeric score produced by the grader. - /// - /// - /// The grader type (for example, "string-check-grader"). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItemResult( string name, - bool passed, double score, - object? sample, - string? type) + bool passed, + string? type, + object? sample) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Passed = passed; this.Score = score; - this.Sample = sample; + this.Passed = passed; this.Type = type; + this.Sample = sample; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.Json.g.cs new file mode 100644 index 00000000..f1d3982a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalRunOutputItemResultSample2 + { + /// + /// 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::tryAGI.OpenAI.EvalRunOutputItemResultSample2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalRunOutputItemResultSample2), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalRunOutputItemResultSample2; + } + + /// + /// 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::tryAGI.OpenAI.EvalRunOutputItemResultSample2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalRunOutputItemResultSample2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalRunOutputItemResultSample2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.g.cs new file mode 100644 index 00000000..ac0ae8fd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalRunOutputItemResultSample2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSample.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSample.g.cs index 6b4eab08..e2d5a4d3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSample.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSample.g.cs @@ -9,32 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunOutputItemSample { /// - /// An object representing an error response from the Eval API. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalApiError Error { get; set; } - - /// - /// The reason why the sample generation was finished. + /// An array of input messages. /// - [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FinishReason { get; set; } + public required global::System.Collections.Generic.IList Input { get; set; } /// - /// An array of input messages. + /// An array of output messages. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonPropertyName("output")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Input { get; set; } + public required global::System.Collections.Generic.IList Output { get; set; } /// - /// The maximum number of tokens allowed for completion. + /// The reason why the sample generation was finished. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] [global::System.Text.Json.Serialization.JsonRequired] - public required int MaxCompletionTokens { get; set; } + public required string FinishReason { get; set; } /// /// The model used for generating the sample. @@ -44,18 +37,18 @@ public sealed partial class EvalRunOutputItemSample public required string Model { get; set; } /// - /// An array of output messages. + /// Token usage details for the sample. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Output { get; set; } + public required global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage Usage { get; set; } /// - /// The seed used for generating the sample. + /// An object representing an error response from the Eval API. /// - [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + [global::System.Text.Json.Serialization.JsonPropertyName("error")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Seed { get; set; } + public required global::tryAGI.OpenAI.EvalApiError Error { get; set; } /// /// The sampling temperature used. @@ -64,6 +57,13 @@ public sealed partial class EvalRunOutputItemSample [global::System.Text.Json.Serialization.JsonRequired] public required double Temperature { get; set; } + /// + /// The maximum number of tokens allowed for completion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxCompletionTokens { get; set; } + /// /// The top_p value used for sampling. /// @@ -72,11 +72,11 @@ public sealed partial class EvalRunOutputItemSample public required double TopP { get; set; } /// - /// Token usage details for the sample. + /// The seed used for generating the sample. /// - [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage Usage { get; set; } + public required int Seed { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -87,61 +87,61 @@ public sealed partial class EvalRunOutputItemSample /// /// Initializes a new instance of the class. /// - /// - /// An object representing an error response from the Eval API. - /// - /// - /// The reason why the sample generation was finished. - /// /// /// An array of input messages. /// - /// - /// The maximum number of tokens allowed for completion. + /// + /// An array of output messages. + /// + /// + /// The reason why the sample generation was finished. /// /// /// The model used for generating the sample. /// - /// - /// An array of output messages. + /// + /// Token usage details for the sample. /// - /// - /// The seed used for generating the sample. + /// + /// An object representing an error response from the Eval API. /// /// /// The sampling temperature used. /// + /// + /// The maximum number of tokens allowed for completion. + /// /// /// The top_p value used for sampling. /// - /// - /// Token usage details for the sample. + /// + /// The seed used for generating the sample. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItemSample( - global::tryAGI.OpenAI.EvalApiError error, - string finishReason, global::System.Collections.Generic.IList input, - int maxCompletionTokens, - string model, global::System.Collections.Generic.IList output, - int seed, + string finishReason, + string model, + global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage usage, + global::tryAGI.OpenAI.EvalApiError error, double temperature, + int maxCompletionTokens, double topP, - global::tryAGI.OpenAI.EvalRunOutputItemSampleUsage usage) + int seed) { - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); - this.FinishReason = finishReason ?? throw new global::System.ArgumentNullException(nameof(finishReason)); this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); - this.MaxCompletionTokens = maxCompletionTokens; - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); - this.Seed = seed; + this.FinishReason = finishReason ?? throw new global::System.ArgumentNullException(nameof(finishReason)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Temperature = temperature; + this.MaxCompletionTokens = maxCompletionTokens; this.TopP = topP; - this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); + this.Seed = seed; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleInputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleInputItem.g.cs index fe780d2d..d2ddd91a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleInputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleInputItem.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunOutputItemSampleInputItem { /// - /// The content of the message. + /// The role of the message sender (e.g., system, user, developer). /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonPropertyName("role")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } + public required string Role { get; set; } /// - /// The role of the message sender (e.g., system, user, developer). + /// The content of the message. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonPropertyName("content")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Role { get; set; } + public required string Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class EvalRunOutputItemSampleInputItem /// /// Initializes a new instance of the class. /// - /// - /// The content of the message. - /// /// /// The role of the message sender (e.g., system, user, developer). /// + /// + /// The content of the message. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItemSampleInputItem( - string content, - string role) + string role, + string content) { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleOutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleOutputItem.g.cs index 99a54a85..3ecb91a3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleOutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleOutputItem.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class EvalRunOutputItemSampleOutputItem { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public string? Content { get; set; } - /// /// The role of the message (e.g. "system", "assistant", "user"). /// [global::System.Text.Json.Serialization.JsonPropertyName("role")] public string? Role { get; set; } + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public string? Content { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class EvalRunOutputItemSampleOutputItem /// /// Initializes a new instance of the class. /// - /// - /// The content of the message. - /// /// /// The role of the message (e.g. "system", "assistant", "user"). /// + /// + /// The content of the message. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItemSampleOutputItem( - string? content, - string? role) + string? role, + string? content) { - this.Content = content; this.Role = role; + this.Content = content; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleUsage.g.cs index ff6acf96..1b4bdb11 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemSampleUsage.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunOutputItemSampleUsage { /// - /// The number of tokens retrieved from cache. + /// The total number of tokens used. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int CachedTokens { get; set; } + public required int TotalTokens { get; set; } /// /// The number of completion tokens generated. @@ -30,11 +30,11 @@ public sealed partial class EvalRunOutputItemSampleUsage public required int PromptTokens { get; set; } /// - /// The total number of tokens used. + /// The number of tokens retrieved from cache. /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { get; set; } + public required int CachedTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,8 +45,8 @@ public sealed partial class EvalRunOutputItemSampleUsage /// /// Initializes a new instance of the class. /// - /// - /// The number of tokens retrieved from cache. + /// + /// The total number of tokens used. /// /// /// The number of completion tokens generated. @@ -54,22 +54,22 @@ public sealed partial class EvalRunOutputItemSampleUsage /// /// The number of prompt tokens used. /// - /// - /// The total number of tokens used. + /// + /// The number of tokens retrieved from cache. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunOutputItemSampleUsage( - int cachedTokens, + int totalTokens, int completionTokens, int promptTokens, - int totalTokens) + int cachedTokens) { - this.CachedTokens = cachedTokens; + this.TotalTokens = totalTokens; this.CompletionTokens = completionTokens; this.PromptTokens = promptTokens; - this.TotalTokens = totalTokens; + this.CachedTokens = cachedTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerModelUsageItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerModelUsageItem.g.cs index 0339fded..d23f97e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerModelUsageItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerModelUsageItem.g.cs @@ -9,18 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunPerModelUsageItem { /// - /// The number of tokens retrieved from cache. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CachedTokens { get; set; } - - /// - /// The number of completion tokens generated. + /// The name of the model. /// - [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] [global::System.Text.Json.Serialization.JsonRequired] - public required int CompletionTokens { get; set; } + public required string ModelName { get; set; } /// /// The number of invocations. @@ -30,18 +23,18 @@ public sealed partial class EvalRunPerModelUsageItem public required int InvocationCount { get; set; } /// - /// The name of the model. + /// The number of prompt tokens used. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ModelName { get; set; } + public required int PromptTokens { get; set; } /// - /// The number of prompt tokens used. + /// The number of completion tokens generated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int PromptTokens { get; set; } + public required int CompletionTokens { get; set; } /// /// The total number of tokens used. @@ -50,6 +43,13 @@ public sealed partial class EvalRunPerModelUsageItem [global::System.Text.Json.Serialization.JsonRequired] public required int TotalTokens { get; set; } + /// + /// The number of tokens retrieved from cache. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CachedTokens { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,41 +59,41 @@ public sealed partial class EvalRunPerModelUsageItem /// /// Initializes a new instance of the class. /// - /// - /// The number of tokens retrieved from cache. - /// - /// - /// The number of completion tokens generated. + /// + /// The name of the model. /// /// /// The number of invocations. /// - /// - /// The name of the model. - /// /// /// The number of prompt tokens used. /// + /// + /// The number of completion tokens generated. + /// /// /// The total number of tokens used. /// + /// + /// The number of tokens retrieved from cache. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunPerModelUsageItem( - int cachedTokens, - int completionTokens, - int invocationCount, string modelName, + int invocationCount, int promptTokens, - int totalTokens) + int completionTokens, + int totalTokens, + int cachedTokens) { - this.CachedTokens = cachedTokens; - this.CompletionTokens = completionTokens; - this.InvocationCount = invocationCount; this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.InvocationCount = invocationCount; this.PromptTokens = promptTokens; + this.CompletionTokens = completionTokens; this.TotalTokens = totalTokens; + this.CachedTokens = cachedTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerTestingCriteriaResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerTestingCriteriaResult.g.cs index 1423e174..fadfb8e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerTestingCriteriaResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunPerTestingCriteriaResult.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class EvalRunPerTestingCriteriaResult { /// - /// Number of tests failed for this criteria. + /// A description of the testing criteria. /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed")] + [global::System.Text.Json.Serialization.JsonPropertyName("testing_criteria")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Failed { get; set; } + public required string TestingCriteria { get; set; } /// /// Number of tests passed for this criteria. @@ -23,11 +23,11 @@ public sealed partial class EvalRunPerTestingCriteriaResult public required int Passed { get; set; } /// - /// A description of the testing criteria. + /// Number of tests failed for this criteria. /// - [global::System.Text.Json.Serialization.JsonPropertyName("testing_criteria")] + [global::System.Text.Json.Serialization.JsonPropertyName("failed")] [global::System.Text.Json.Serialization.JsonRequired] - public required string TestingCriteria { get; set; } + public required int Failed { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +38,26 @@ public sealed partial class EvalRunPerTestingCriteriaResult /// /// Initializes a new instance of the class. /// - /// - /// Number of tests failed for this criteria. + /// + /// A description of the testing criteria. /// /// /// Number of tests passed for this criteria. /// - /// - /// A description of the testing criteria. + /// + /// Number of tests failed for this criteria. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunPerTestingCriteriaResult( - int failed, + string testingCriteria, int passed, - string testingCriteria) + int failed) { - this.Failed = failed; - this.Passed = passed; this.TestingCriteria = testingCriteria ?? throw new global::System.ArgumentNullException(nameof(testingCriteria)); + this.Passed = passed; + this.Failed = failed; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunResultCounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunResultCounts.g.cs index 4aae5f7f..5e852e92 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunResultCounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunResultCounts.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class EvalRunResultCounts { + /// + /// Total number of executed output items. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Total { get; set; } + /// /// Number of output items that resulted in an error. /// @@ -29,13 +36,6 @@ public sealed partial class EvalRunResultCounts [global::System.Text.Json.Serialization.JsonRequired] public required int Passed { get; set; } - /// - /// Total number of executed output items. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("total")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Total { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class EvalRunResultCounts /// /// Initializes a new instance of the class. /// + /// + /// Total number of executed output items. + /// /// /// Number of output items that resulted in an error. /// @@ -54,22 +57,19 @@ public sealed partial class EvalRunResultCounts /// /// Number of output items that passed the evaluation. /// - /// - /// Total number of executed output items. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalRunResultCounts( + int total, int errored, int failed, - int passed, - int total) + int passed) { + this.Total = total; this.Errored = errored; this.Failed = failed; this.Passed = passed; - this.Total = total; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsDataSourceConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsDataSourceConfig.g.cs index 76493855..49d0c23a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsDataSourceConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsDataSourceConfig.g.cs @@ -10,11 +10,17 @@ namespace tryAGI.OpenAI public sealed partial class EvalStoredCompletionsDataSourceConfig { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The type of data source. Always `stored_completions`.
+ /// Default Value: stored_completions + ///
+ /// global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType.StoredCompletions + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsDataSourceConfigTypeJsonConverter))] + [global::System.Obsolete("This property marked as deprecated.")] + public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType.StoredCompletions; + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Obsolete("This property marked as deprecated.")] @@ -29,16 +35,6 @@ public sealed partial class EvalStoredCompletionsDataSourceConfig [global::System.Obsolete("This property marked as deprecated.")] public required object Schema { get; set; } - /// - /// The type of data source. Always `stored_completions`.
- /// Default Value: stored_completions - ///
- /// global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType.StoredCompletions - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsDataSourceConfigTypeJsonConverter))] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType Type { get; set; } = global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType.StoredCompletions; - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,21 +44,15 @@ public sealed partial class EvalStoredCompletionsDataSourceConfig /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The type of data source. Always `stored_completions`.
+ /// Default Value: stored_completions /// + /// /// /// The json schema for the run data source items.
/// Learn how to build JSON schemas [here](https://json-schema.org/). /// - /// - /// The type of data source. Always `stored_completions`.
- /// Default Value: stored_completions - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -72,8 +62,8 @@ public EvalStoredCompletionsDataSourceConfig( global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType type = global::tryAGI.OpenAI.EvalStoredCompletionsDataSourceConfigType.StoredCompletions) { this.Schema = schema ?? throw new global::System.ArgumentNullException(nameof(schema)); - this.Metadata = metadata; this.Type = type; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSource.g.cs index 097cf1d3..9402b442 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSource.g.cs @@ -9,49 +9,43 @@ namespace tryAGI.OpenAI public sealed partial class EvalStoredCompletionsSource { /// - /// An optional Unix timestamp to filter items created after this time. + /// The type of source. Always `stored_completions`.
+ /// Default Value: stored_completions ///
- [global::System.Text.Json.Serialization.JsonPropertyName("created_after")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CreatedAfter { get; set; } + /// global::tryAGI.OpenAI.EvalStoredCompletionsSourceType.StoredCompletions + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.EvalStoredCompletionsSourceType Type { get; set; } = global::tryAGI.OpenAI.EvalStoredCompletionsSourceType.StoredCompletions; /// - /// An optional Unix timestamp to filter items created before this time. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_before")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CreatedBefore { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// An optional maximum number of items to return. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("limit")] - public int? Limit { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_after")] + public global::System.DateTimeOffset? CreatedAfter { get; set; } /// - /// An optional model to filter by (e.g., 'gpt-4o'). + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_before")] + public global::System.DateTimeOffset? CreatedBefore { get; set; } /// - /// The type of source. Always `stored_completions`.
- /// Default Value: stored_completions + /// ///
- /// global::tryAGI.OpenAI.EvalStoredCompletionsSourceType.StoredCompletions - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.EvalStoredCompletionsSourceTypeJsonConverter))] - public global::tryAGI.OpenAI.EvalStoredCompletionsSourceType Type { get; set; } = global::tryAGI.OpenAI.EvalStoredCompletionsSourceType.StoredCompletions; + [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -62,46 +56,32 @@ public sealed partial class EvalStoredCompletionsSource /// /// Initializes a new instance of the class. /// - /// - /// An optional Unix timestamp to filter items created after this time. - /// - /// - /// An optional Unix timestamp to filter items created before this time. - /// - /// - /// An optional maximum number of items to return. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// An optional model to filter by (e.g., 'gpt-4o'). - /// /// /// The type of source. Always `stored_completions`.
/// Default Value: stored_completions /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public EvalStoredCompletionsSource( + global::System.Collections.Generic.Dictionary? metadata, + string? model, global::System.DateTimeOffset? createdAfter, global::System.DateTimeOffset? createdBefore, int? limit, - global::System.Collections.Generic.Dictionary? metadata, - string? model, global::tryAGI.OpenAI.EvalStoredCompletionsSourceType type = global::tryAGI.OpenAI.EvalStoredCompletionsSourceType.StoredCompletions) { + this.Type = type; + this.Metadata = metadata; + this.Model = model; this.CreatedAfter = createdAfter; this.CreatedBefore = createdBefore; this.Limit = limit; - this.Metadata = metadata; - this.Model = model; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.Json.g.cs new file mode 100644 index 00000000..e1cd120a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalStoredCompletionsSourceCreatedAfter + { + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter; + } + + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedAfter; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.g.cs new file mode 100644 index 00000000..a8764845 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedAfter.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalStoredCompletionsSourceCreatedAfter + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.Json.g.cs new file mode 100644 index 00000000..94b725b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalStoredCompletionsSourceCreatedBefore + { + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore; + } + + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceCreatedBefore; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.g.cs new file mode 100644 index 00000000..0fe14480 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceCreatedBefore.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalStoredCompletionsSourceCreatedBefore + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.Json.g.cs new file mode 100644 index 00000000..8e7ca9b7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalStoredCompletionsSourceLimit + { + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit; + } + + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceLimit; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.g.cs new file mode 100644 index 00000000..077535f1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceLimit.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalStoredCompletionsSourceLimit + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.Json.g.cs new file mode 100644 index 00000000..1c2a57ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class EvalStoredCompletionsSourceModel + { + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceModel), + jsonSerializerContext) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceModel; + } + + /// + /// 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::tryAGI.OpenAI.EvalStoredCompletionsSourceModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSourceModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.EvalStoredCompletionsSourceModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.g.cs new file mode 100644 index 00000000..dcd40940 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalStoredCompletionsSourceModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class EvalStoredCompletionsSourceModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.Json.g.cs new file mode 100644 index 00000000..a01751ab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ExpiresAfterParam + { + /// + /// 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::tryAGI.OpenAI.ExpiresAfterParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ExpiresAfterParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ExpiresAfterParam; + } + + /// + /// 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::tryAGI.OpenAI.ExpiresAfterParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ExpiresAfterParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ExpiresAfterParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.g.cs new file mode 100644 index 00000000..d9ff7731 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParam.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls when the session expires relative to an anchor timestamp. + /// + public sealed partial class ExpiresAfterParam + { + /// + /// Base timestamp used to calculate expiration. Currently fixed to `created_at`.
+ /// Default Value: created_at + ///
+ /// global::tryAGI.OpenAI.ExpiresAfterParamAnchor.CreatedAt + [global::System.Text.Json.Serialization.JsonPropertyName("anchor")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ExpiresAfterParamAnchorJsonConverter))] + public global::tryAGI.OpenAI.ExpiresAfterParamAnchor Anchor { get; set; } = global::tryAGI.OpenAI.ExpiresAfterParamAnchor.CreatedAt; + + /// + /// Number of seconds after the anchor when the session expires. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Seconds { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Base timestamp used to calculate expiration. Currently fixed to `created_at`.
+ /// Default Value: created_at + /// + /// + /// Number of seconds after the anchor when the session expires. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ExpiresAfterParam( + int seconds, + global::tryAGI.OpenAI.ExpiresAfterParamAnchor anchor = global::tryAGI.OpenAI.ExpiresAfterParamAnchor.CreatedAt) + { + this.Seconds = seconds; + this.Anchor = anchor; + } + + /// + /// Initializes a new instance of the class. + /// + public ExpiresAfterParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParamAnchor.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParamAnchor.g.cs new file mode 100644 index 00000000..56b83076 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ExpiresAfterParamAnchor.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Base timestamp used to calculate expiration. Currently fixed to `created_at`.
+ /// Default Value: created_at + ///
+ public enum ExpiresAfterParamAnchor + { + /// + /// + /// + CreatedAt, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ExpiresAfterParamAnchorExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ExpiresAfterParamAnchor value) + { + return value switch + { + ExpiresAfterParamAnchor.CreatedAt => "created_at", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ExpiresAfterParamAnchor? ToEnum(string value) + { + return value switch + { + "created_at" => ExpiresAfterParamAnchor.CreatedAt, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.Json.g.cs new file mode 100644 index 00000000..f8a07dfd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileAnnotation + { + /// + /// 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::tryAGI.OpenAI.FileAnnotation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileAnnotation), + jsonSerializerContext) as global::tryAGI.OpenAI.FileAnnotation; + } + + /// + /// 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::tryAGI.OpenAI.FileAnnotation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileAnnotation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileAnnotation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.g.cs new file mode 100644 index 00000000..fa5c41fe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotation.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Annotation that references an uploaded file. + /// + public sealed partial class FileAnnotation + { + /// + /// Type discriminator that is always `file` for this annotation.
+ /// Default Value: file + ///
+ /// global::tryAGI.OpenAI.FileAnnotationType.File + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationTypeJsonConverter))] + public global::tryAGI.OpenAI.FileAnnotationType Type { get; set; } = global::tryAGI.OpenAI.FileAnnotationType.File; + + /// + /// File attachment referenced by the annotation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FileAnnotationSource Source { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `file` for this annotation.
+ /// Default Value: file + /// + /// + /// File attachment referenced by the annotation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FileAnnotation( + global::tryAGI.OpenAI.FileAnnotationSource source, + global::tryAGI.OpenAI.FileAnnotationType type = global::tryAGI.OpenAI.FileAnnotationType.File) + { + this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FileAnnotation() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.Json.g.cs new file mode 100644 index 00000000..3c63c3c0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileAnnotationSource + { + /// + /// 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::tryAGI.OpenAI.FileAnnotationSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileAnnotationSource), + jsonSerializerContext) as global::tryAGI.OpenAI.FileAnnotationSource; + } + + /// + /// 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::tryAGI.OpenAI.FileAnnotationSource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileAnnotationSource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileAnnotationSource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.g.cs new file mode 100644 index 00000000..5e743a8b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSource.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Attachment source referenced by an annotation. + /// + public sealed partial class FileAnnotationSource + { + /// + /// Type discriminator that is always `file`.
+ /// Default Value: file + ///
+ /// global::tryAGI.OpenAI.FileAnnotationSourceType.File + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileAnnotationSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.FileAnnotationSourceType Type { get; set; } = global::tryAGI.OpenAI.FileAnnotationSourceType.File; + + /// + /// Filename referenced by the annotation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `file`.
+ /// Default Value: file + /// + /// + /// Filename referenced by the annotation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FileAnnotationSource( + string filename, + global::tryAGI.OpenAI.FileAnnotationSourceType type = global::tryAGI.OpenAI.FileAnnotationSourceType.File) + { + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FileAnnotationSource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSourceType.g.cs new file mode 100644 index 00000000..f8f01876 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationSourceType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `file`.
+ /// Default Value: file + ///
+ public enum FileAnnotationSourceType + { + /// + /// + /// + File, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileAnnotationSourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileAnnotationSourceType value) + { + return value switch + { + FileAnnotationSourceType.File => "file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileAnnotationSourceType? ToEnum(string value) + { + return value switch + { + "file" => FileAnnotationSourceType.File, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationType.g.cs new file mode 100644 index 00000000..dc8f48ac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileAnnotationType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `file` for this annotation.
+ /// Default Value: file + ///
+ public enum FileAnnotationType + { + /// + /// + /// + File, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileAnnotationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileAnnotationType value) + { + return value switch + { + FileAnnotationType.File => "file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileAnnotationType? ToEnum(string value) + { + return value switch + { + "file" => FileAnnotationType.File, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody.g.cs index ea4f93ff..3b347ad0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody.g.cs @@ -9,18 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class FileCitationBody { /// - /// The ID of the file. + /// The type of the file citation. Always `file_citation`.
+ /// Default Value: file_citation ///
- [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } + /// global::tryAGI.OpenAI.FileCitationBodyType.FileCitation + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeJsonConverter))] + public global::tryAGI.OpenAI.FileCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.FileCitationBodyType.FileCitation; /// - /// The filename of the file cited. + /// The ID of the file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } + public required string FileId { get; set; } /// /// The index of the file in the list of files. @@ -30,13 +32,11 @@ public sealed partial class FileCitationBody public required int Index { get; set; } /// - /// The type of the file citation. Always `file_citation`.
- /// Default Value: file_citation + /// The filename of the file cited. ///
- /// global::tryAGI.OpenAI.FileCitationBodyType.FileCitation - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileCitationBodyTypeJsonConverter))] - public global::tryAGI.OpenAI.FileCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.FileCitationBodyType.FileCitation; + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -47,31 +47,31 @@ public sealed partial class FileCitationBody /// /// Initializes a new instance of the class. /// + /// + /// The type of the file citation. Always `file_citation`.
+ /// Default Value: file_citation + /// /// /// The ID of the file. /// - /// - /// The filename of the file cited. - /// /// /// The index of the file in the list of files. /// - /// - /// The type of the file citation. Always `file_citation`.
- /// Default Value: file_citation + /// + /// The filename of the file cited. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FileCitationBody( string fileId, - string filename, int index, + string filename, global::tryAGI.OpenAI.FileCitationBodyType type = global::tryAGI.OpenAI.FileCitationBodyType.FileCitation) { this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Index = index; + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileDetailEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileDetailEnum.g.cs new file mode 100644 index 00000000..d6ef2dcd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileDetailEnum.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum FileDetailEnum + { + /// + /// + /// + High, + /// + /// + /// + Low, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileDetailEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileDetailEnum value) + { + return value switch + { + FileDetailEnum.High => "high", + FileDetailEnum.Low => "low", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileDetailEnum? ToEnum(string value) + { + return value switch + { + "high" => FileDetailEnum.High, + "low" => FileDetailEnum.Low, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileInputDetail.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileInputDetail.g.cs new file mode 100644 index 00000000..1c400e2c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileInputDetail.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum FileInputDetail + { + /// + /// + /// + Low, + /// + /// + /// + High, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileInputDetailExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileInputDetail value) + { + return value switch + { + FileInputDetail.Low => "low", + FileInputDetail.High => "high", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileInputDetail? ToEnum(string value) + { + return value switch + { + "low" => FileInputDetail.Low, + "high" => FileInputDetail.High, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePath.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePath.g.cs index 79cf5ec7..33f77a62 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePath.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePath.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class FilePath { + /// + /// The type of the file path. Always `file_path`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeJsonConverter))] + public global::tryAGI.OpenAI.FilePathType Type { get; set; } + /// /// The ID of the file. /// @@ -22,13 +29,6 @@ public sealed partial class FilePath [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// The type of the file path. Always `file_path`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FilePathTypeJsonConverter))] - public global::tryAGI.OpenAI.FilePathType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,15 +38,15 @@ public sealed partial class FilePath /// /// Initializes a new instance of the class. /// + /// + /// The type of the file path. Always `file_path`. + /// /// /// The ID of the file. /// /// /// The index of the file in the list of files. /// - /// - /// The type of the file path. Always `file_path`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePurpose.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePurpose.g.cs deleted file mode 100644 index 4276bd6a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FilePurpose.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The intended purpose of the uploaded file. One of: - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - public enum FilePurpose - { - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - Assistants, - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - Batch, - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - FineTune, - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - Vision, - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - UserData, - /// - /// - `assistants`: Used in the Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`: Flexible file type for any purpose - `evals`: Used for eval data sets - /// - Evals, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class FilePurposeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this FilePurpose value) - { - return value switch - { - FilePurpose.Assistants => "assistants", - FilePurpose.Batch => "batch", - FilePurpose.FineTune => "fine-tune", - FilePurpose.Vision => "vision", - FilePurpose.UserData => "user_data", - FilePurpose.Evals => "evals", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static FilePurpose? ToEnum(string value) - { - return value switch - { - "assistants" => FilePurpose.Assistants, - "batch" => FilePurpose.Batch, - "fine-tune" => FilePurpose.FineTune, - "vision" => FilePurpose.Vision, - "user_data" => FilePurpose.UserData, - "evals" => FilePurpose.Evals, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchRankingOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchRankingOptions.g.cs index b94df02a..b8a297b1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchRankingOptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchRankingOptions.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// /// The ranking options for the file search. If not specified, the file search tool will use the `auto` ranker and a score_threshold of 0.
- /// See the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. + /// See the [file search tool documentation](/docs/assistants/tools/file-search#customizing-file-search-settings) for more information. ///
public sealed partial class FileSearchRankingOptions { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchTool.g.cs index 1fcaeea6..e0b0166e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchTool.g.cs @@ -9,10 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class FileSearchTool { /// - /// + /// The type of the file search tool. Always `file_search`.
+ /// Default Value: file_search ///
- [global::System.Text.Json.Serialization.JsonPropertyName("filters")] - public object? Filters { get; set; } + /// global::tryAGI.OpenAI.FileSearchToolType.FileSearch + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeJsonConverter))] + public global::tryAGI.OpenAI.FileSearchToolType Type { get; set; } = global::tryAGI.OpenAI.FileSearchToolType.FileSearch; + + /// + /// The IDs of the vector stores to search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList VectorStoreIds { get; set; } /// /// The maximum number of results to return. This number should be between 1 and 50 inclusive. @@ -21,26 +31,16 @@ public sealed partial class FileSearchTool public int? MaxNumResults { get; set; } /// - /// + /// Ranking options for search. /// [global::System.Text.Json.Serialization.JsonPropertyName("ranking_options")] public global::tryAGI.OpenAI.RankingOptions? RankingOptions { get; set; } /// - /// The type of the file search tool. Always `file_search`.
- /// Default Value: file_search - ///
- /// global::tryAGI.OpenAI.FileSearchToolType.FileSearch - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolTypeJsonConverter))] - public global::tryAGI.OpenAI.FileSearchToolType Type { get; set; } = global::tryAGI.OpenAI.FileSearchToolType.FileSearch; - - /// - /// The IDs of the vector stores to search. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList VectorStoreIds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("filters")] + public global::tryAGI.OpenAI.Filters2? Filters { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,11 +51,6 @@ public sealed partial class FileSearchTool /// /// Initializes a new instance of the class. /// - /// - /// - /// The maximum number of results to return. This number should be between 1 and 50 inclusive. - /// - /// /// /// The type of the file search tool. Always `file_search`.
/// Default Value: file_search @@ -63,21 +58,28 @@ public sealed partial class FileSearchTool /// /// The IDs of the vector stores to search. /// + /// + /// The maximum number of results to return. This number should be between 1 and 50 inclusive. + /// + /// + /// Ranking options for search. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FileSearchTool( global::System.Collections.Generic.IList vectorStoreIds, - object? filters, int? maxNumResults, global::tryAGI.OpenAI.RankingOptions? rankingOptions, + global::tryAGI.OpenAI.Filters2? filters, global::tryAGI.OpenAI.FileSearchToolType type = global::tryAGI.OpenAI.FileSearchToolType.FileSearch) { this.VectorStoreIds = vectorStoreIds ?? throw new global::System.ArgumentNullException(nameof(vectorStoreIds)); - this.Filters = filters; + this.Type = type; this.MaxNumResults = maxNumResults; this.RankingOptions = rankingOptions; - this.Type = type; + this.Filters = filters; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCall.g.cs index 9f1bb69b..9deff186 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCall.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// /// The results of a file search tool call. See the
- /// [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + /// [file search guide](/docs/guides/tools-file-search) for more information. ///
public sealed partial class FileSearchToolCall { @@ -17,17 +17,11 @@ public sealed partial class FileSearchToolCall public required string Id { get; set; } /// - /// The queries used to search for files. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("queries")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Queries { get; set; } - - /// - /// The results of the file search tool call. + /// The type of the file search tool call. Always `file_search_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("results")] - public global::System.Collections.Generic.IList? Results { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.FileSearchToolCallType Type { get; set; } /// /// The status of the file search tool call. One of `in_progress`,
@@ -39,11 +33,17 @@ public sealed partial class FileSearchToolCall public required global::tryAGI.OpenAI.FileSearchToolCallStatus Status { get; set; } /// - /// The type of the file search tool call. Always `file_search_call`. + /// The queries used to search for files. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileSearchToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.FileSearchToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("queries")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Queries { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("results")] + public global::System.Collections.Generic.IList? Results { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,34 +57,32 @@ public sealed partial class FileSearchToolCall /// /// The unique ID of the file search tool call. /// - /// - /// The queries used to search for files. - /// - /// - /// The results of the file search tool call. + /// + /// The type of the file search tool call. Always `file_search_call`. /// /// /// The status of the file search tool call. One of `in_progress`,
/// `searching`, `incomplete` or `failed`, /// - /// - /// The type of the file search tool call. Always `file_search_call`. + /// + /// The queries used to search for files. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FileSearchToolCall( string id, - global::System.Collections.Generic.IList queries, global::tryAGI.OpenAI.FileSearchToolCallStatus status, - global::System.Collections.Generic.IList? results, - global::tryAGI.OpenAI.FileSearchToolCallType type) + global::System.Collections.Generic.IList queries, + global::tryAGI.OpenAI.FileSearchToolCallType type, + global::System.Collections.Generic.IList? results) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Queries = queries ?? throw new global::System.ArgumentNullException(nameof(queries)); this.Status = status; - this.Results = results; + this.Queries = queries ?? throw new global::System.ArgumentNullException(nameof(queries)); this.Type = type; + this.Results = results; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.Json.g.cs deleted file mode 100644 index 3b637af6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FileSearchToolCallResult - { - /// - /// 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::tryAGI.OpenAI.FileSearchToolCallResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FileSearchToolCallResult), - jsonSerializerContext) as global::tryAGI.OpenAI.FileSearchToolCallResult; - } - - /// - /// 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::tryAGI.OpenAI.FileSearchToolCallResult? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FileSearchToolCallResult), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileSearchToolCallResult; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.g.cs deleted file mode 100644 index 395a28c2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResult.g.cs +++ /dev/null @@ -1,97 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class FileSearchToolCallResult - { - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] - public object? Attributes { get; set; } - - /// - /// The unique ID of the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - - /// - /// The name of the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] - public string? Filename { get; set; } - - /// - /// The relevance score of the file - a value between 0 and 1. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - public float? Score { get; set; } - - /// - /// The text that was retrieved from the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// - /// - /// The unique ID of the file. - /// - /// - /// The name of the file. - /// - /// - /// The relevance score of the file - a value between 0 and 1. - /// - /// - /// The text that was retrieved from the file. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FileSearchToolCallResult( - object? attributes, - string? fileId, - string? filename, - float? score, - string? text) - { - this.Attributes = attributes; - this.FileId = fileId; - this.Filename = filename; - this.Score = score; - this.Text = text; - } - - /// - /// Initializes a new instance of the class. - /// - public FileSearchToolCallResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.Json.g.cs new file mode 100644 index 00000000..c9d6703e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileSearchToolCallResults + { + /// + /// 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::tryAGI.OpenAI.FileSearchToolCallResults? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileSearchToolCallResults), + jsonSerializerContext) as global::tryAGI.OpenAI.FileSearchToolCallResults; + } + + /// + /// 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::tryAGI.OpenAI.FileSearchToolCallResults? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileSearchToolCallResults), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileSearchToolCallResults; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.g.cs new file mode 100644 index 00000000..16c55263 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResults.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FileSearchToolCallResults + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.Json.g.cs new file mode 100644 index 00000000..e7d34760 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileSearchToolCallResultsVariant1Item + { + /// + /// 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::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item), + jsonSerializerContext) as global::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item; + } + + /// + /// 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::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileSearchToolCallResultsVariant1Item; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.g.cs new file mode 100644 index 00000000..a4d9e17c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolCallResultsVariant1Item.g.cs @@ -0,0 +1,87 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FileSearchToolCallResultsVariant1Item + { + /// + /// The unique ID of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + + /// + /// The text that was retrieved from the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// The name of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + public string? Filename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] + public object? Attributes { get; set; } + + /// + /// The relevance score of the file - a value between 0 and 1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("score")] + public float? Score { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique ID of the file. + /// + /// + /// The text that was retrieved from the file. + /// + /// + /// The name of the file. + /// + /// + /// + /// The relevance score of the file - a value between 0 and 1. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FileSearchToolCallResultsVariant1Item( + string? fileId, + string? text, + string? filename, + object? attributes, + float? score) + { + this.FileId = fileId; + this.Text = text; + this.Filename = filename; + this.Attributes = attributes; + this.Score = score; + } + + /// + /// Initializes a new instance of the class. + /// + public FileSearchToolCallResultsVariant1Item() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.Json.g.cs new file mode 100644 index 00000000..7e94fe72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileSearchToolFilters + { + /// + /// 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::tryAGI.OpenAI.FileSearchToolFilters? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileSearchToolFilters), + jsonSerializerContext) as global::tryAGI.OpenAI.FileSearchToolFilters; + } + + /// + /// 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::tryAGI.OpenAI.FileSearchToolFilters? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileSearchToolFilters), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileSearchToolFilters; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.g.cs new file mode 100644 index 00000000..d61aa68e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileSearchToolFilters.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FileSearchToolFilters + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.Json.g.cs new file mode 100644 index 00000000..3dabef86 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FileUploadParam + { + /// + /// 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::tryAGI.OpenAI.FileUploadParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FileUploadParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FileUploadParam; + } + + /// + /// 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::tryAGI.OpenAI.FileUploadParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FileUploadParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FileUploadParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.g.cs new file mode 100644 index 00000000..9b707afa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileUploadParam.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls whether users can upload files. + /// + public sealed partial class FileUploadParam + { + /// + /// Enable uploads for this session. Defaults to false. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + /// + /// Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is the maximum allowable size. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_file_size")] + public int? MaxFileSize { get; set; } + + /// + /// Maximum number of files that can be uploaded to the session. Defaults to 10. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_files")] + public int? MaxFiles { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Enable uploads for this session. Defaults to false. + /// + /// + /// Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is the maximum allowable size. + /// + /// + /// Maximum number of files that can be uploaded to the session. Defaults to 10. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FileUploadParam( + bool? enabled, + int? maxFileSize, + int? maxFiles) + { + this.Enabled = enabled; + this.MaxFileSize = maxFileSize; + this.MaxFiles = maxFiles; + } + + /// + /// Initializes a new instance of the class. + /// + public FileUploadParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.Json.g.cs deleted file mode 100644 index 33c60626..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Filters - { - /// - /// 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::tryAGI.OpenAI.Filters? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Filters), - jsonSerializerContext) as global::tryAGI.OpenAI.Filters?; - } - - /// - /// 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::tryAGI.OpenAI.Filters? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Filters), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Filters?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.g.cs deleted file mode 100644 index b3d93de7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct Filters : global::System.IEquatable - { - /// - /// A filter used to compare a specified attribute key to a given value using a defined comparison operation. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; init; } -#else - public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComparisonFilter))] -#endif - public bool IsComparisonFilter => ComparisonFilter != null; - - /// - /// - /// - public static implicit operator Filters(global::tryAGI.OpenAI.ComparisonFilter value) => new Filters((global::tryAGI.OpenAI.ComparisonFilter?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ComparisonFilter?(Filters @this) => @this.ComparisonFilter; - - /// - /// - /// - public Filters(global::tryAGI.OpenAI.ComparisonFilter? value) - { - ComparisonFilter = value; - } - - /// - /// Combine multiple filters using `and` or `or`. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CompoundFilter? CompoundFilter { get; init; } -#else - public global::tryAGI.OpenAI.CompoundFilter? CompoundFilter { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompoundFilter))] -#endif - public bool IsCompoundFilter => CompoundFilter != null; - - /// - /// - /// - public static implicit operator Filters(global::tryAGI.OpenAI.CompoundFilter value) => new Filters((global::tryAGI.OpenAI.CompoundFilter?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CompoundFilter?(Filters @this) => @this.CompoundFilter; - - /// - /// - /// - public Filters(global::tryAGI.OpenAI.CompoundFilter? value) - { - CompoundFilter = value; - } - - /// - /// - /// - public Filters( - global::tryAGI.OpenAI.ComparisonFilter? comparisonFilter, - global::tryAGI.OpenAI.CompoundFilter? compoundFilter - ) - { - ComparisonFilter = comparisonFilter; - CompoundFilter = compoundFilter; - } - - /// - /// - /// - public object? Object => - CompoundFilter as object ?? - ComparisonFilter as object - ; - - /// - /// - /// - public override string? ToString() => - ComparisonFilter?.ToString() ?? - CompoundFilter?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsComparisonFilter || IsCompoundFilter; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? comparisonFilter = null, - global::System.Func? compoundFilter = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsComparisonFilter && comparisonFilter != null) - { - return comparisonFilter(ComparisonFilter!); - } - else if (IsCompoundFilter && compoundFilter != null) - { - return compoundFilter(CompoundFilter!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? comparisonFilter = null, - global::System.Action? compoundFilter = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsComparisonFilter) - { - comparisonFilter?.Invoke(ComparisonFilter!); - } - else if (IsCompoundFilter) - { - compoundFilter?.Invoke(CompoundFilter!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ComparisonFilter, - typeof(global::tryAGI.OpenAI.ComparisonFilter), - CompoundFilter, - typeof(global::tryAGI.OpenAI.CompoundFilter), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Filters other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComparisonFilter, other.ComparisonFilter) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CompoundFilter, other.CompoundFilter) - ; - } - - /// - /// - /// - public static bool operator ==(Filters obj1, Filters obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Filters obj1, Filters obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Filters o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.Json.g.cs new file mode 100644 index 00000000..d4bd2d8f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct Filters2 + { + /// + /// 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::tryAGI.OpenAI.Filters2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Filters2), + jsonSerializerContext) as global::tryAGI.OpenAI.Filters2?; + } + + /// + /// 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::tryAGI.OpenAI.Filters2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Filters2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Filters2?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.g.cs new file mode 100644 index 00000000..7ab89670 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Filters2.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct Filters2 : global::System.IEquatable + { + /// + /// A filter used to compare a specified attribute key to a given value using a defined comparison operation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; init; } +#else + public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComparisonFilter))] +#endif + public bool IsComparisonFilter => ComparisonFilter != null; + + /// + /// Combine multiple filters using `and` or `or`. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CompoundFilter? CompoundFilter { get; init; } +#else + public global::tryAGI.OpenAI.CompoundFilter? CompoundFilter { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompoundFilter))] +#endif + public bool IsCompoundFilter => CompoundFilter != null; + /// + /// + /// + public static implicit operator Filters2(global::tryAGI.OpenAI.ComparisonFilter value) => new Filters2((global::tryAGI.OpenAI.ComparisonFilter?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComparisonFilter?(Filters2 @this) => @this.ComparisonFilter; + + /// + /// + /// + public Filters2(global::tryAGI.OpenAI.ComparisonFilter? value) + { + ComparisonFilter = value; + } + + /// + /// + /// + public static implicit operator Filters2(global::tryAGI.OpenAI.CompoundFilter value) => new Filters2((global::tryAGI.OpenAI.CompoundFilter?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CompoundFilter?(Filters2 @this) => @this.CompoundFilter; + + /// + /// + /// + public Filters2(global::tryAGI.OpenAI.CompoundFilter? value) + { + CompoundFilter = value; + } + + /// + /// + /// + public Filters2( + global::tryAGI.OpenAI.ComparisonFilter? comparisonFilter, + global::tryAGI.OpenAI.CompoundFilter? compoundFilter + ) + { + ComparisonFilter = comparisonFilter; + CompoundFilter = compoundFilter; + } + + /// + /// + /// + public object? Object => + CompoundFilter as object ?? + ComparisonFilter as object + ; + + /// + /// + /// + public override string? ToString() => + ComparisonFilter?.ToString() ?? + CompoundFilter?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsComparisonFilter || IsCompoundFilter; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? comparisonFilter = null, + global::System.Func? compoundFilter = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsComparisonFilter && comparisonFilter != null) + { + return comparisonFilter(ComparisonFilter!); + } + else if (IsCompoundFilter && compoundFilter != null) + { + return compoundFilter(CompoundFilter!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? comparisonFilter = null, + global::System.Action? compoundFilter = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsComparisonFilter) + { + comparisonFilter?.Invoke(ComparisonFilter!); + } + else if (IsCompoundFilter) + { + compoundFilter?.Invoke(CompoundFilter!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ComparisonFilter, + typeof(global::tryAGI.OpenAI.ComparisonFilter), + CompoundFilter, + typeof(global::tryAGI.OpenAI.CompoundFilter), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Filters2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComparisonFilter, other.ComparisonFilter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CompoundFilter, other.CompoundFilter) + ; + } + + /// + /// + /// + public static bool operator ==(Filters2 obj1, Filters2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Filters2 obj1, Filters2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Filters2 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.Json.g.cs new file mode 100644 index 00000000..1e5d15c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct FiltersItem + { + /// + /// 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::tryAGI.OpenAI.FiltersItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FiltersItem), + jsonSerializerContext) as global::tryAGI.OpenAI.FiltersItem?; + } + + /// + /// 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::tryAGI.OpenAI.FiltersItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FiltersItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FiltersItem?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.g.cs new file mode 100644 index 00000000..9ed16be4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FiltersItem.g.cs @@ -0,0 +1,203 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct FiltersItem : global::System.IEquatable + { + /// + /// A filter used to compare a specified attribute key to a given value using a defined comparison operation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; init; } +#else + public global::tryAGI.OpenAI.ComparisonFilter? ComparisonFilter { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComparisonFilter))] +#endif + public bool IsComparisonFilter => ComparisonFilter != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public object? Value2 { get; init; } +#else + public object? 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 FiltersItem(global::tryAGI.OpenAI.ComparisonFilter value) => new FiltersItem((global::tryAGI.OpenAI.ComparisonFilter?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComparisonFilter?(FiltersItem @this) => @this.ComparisonFilter; + + /// + /// + /// + public FiltersItem(global::tryAGI.OpenAI.ComparisonFilter? value) + { + ComparisonFilter = value; + } + + /// + /// + /// + public FiltersItem( + global::tryAGI.OpenAI.ComparisonFilter? comparisonFilter, + object? value2 + ) + { + ComparisonFilter = comparisonFilter; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + ComparisonFilter as object + ; + + /// + /// + /// + public override string? ToString() => + ComparisonFilter?.ToString() ?? + Value2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsComparisonFilter && !IsValue2 || !IsComparisonFilter && IsValue2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? comparisonFilter = null, + global::System.Func? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsComparisonFilter && comparisonFilter != null) + { + return comparisonFilter(ComparisonFilter!); + } + else if (IsValue2 && value2 != null) + { + return value2(Value2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? comparisonFilter = null, + global::System.Action? value2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsComparisonFilter) + { + comparisonFilter?.Invoke(ComparisonFilter!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ComparisonFilter, + typeof(global::tryAGI.OpenAI.ComparisonFilter), + Value2, + typeof(object), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(FiltersItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComparisonFilter, other.ComparisonFilter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(FiltersItem obj1, FiltersItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(FiltersItem obj1, FiltersItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is FiltersItem o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessage.g.cs index d5bbf8b4..37a3c9c6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessage.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Value1 { get; init; } + public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? AssistantMessage1 { get; init; } #else - public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Value1 { get; } + public global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? AssistantMessage1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsAssistantMessage1 => AssistantMessage1 != null; /// - /// + /// Messages sent by the model in response to user messages. /// - public static implicit operator FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1 value) => new FineTuneChatCompletionRequestAssistantMessage((global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? AssistantMessage2 { get; init; } +#else + public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? AssistantMessage2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1?(FineTuneChatCompletionRequestAssistantMessage @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage2))] +#endif + public bool IsAssistantMessage2 => AssistantMessage2 != null; /// /// /// - public FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? value) - { - Value1 = value; - } + public static implicit operator FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage value) => new FineTuneChatCompletionRequestAssistantMessage((global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage?)value); /// - /// Messages sent by the model in response to user messages. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage?(FineTuneChatCompletionRequestAssistantMessage @this) => @this.AssistantMessage1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? value) + { + AssistantMessage1 = value; + } /// /// @@ -69,42 +68,42 @@ public FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.FineT /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?(FineTuneChatCompletionRequestAssistantMessage @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage?(FineTuneChatCompletionRequestAssistantMessage @this) => @this.AssistantMessage2; /// /// /// public FineTuneChatCompletionRequestAssistantMessage(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? value) { - Value2 = value; + AssistantMessage2 = value; } /// /// /// public FineTuneChatCompletionRequestAssistantMessage( - global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? value1, - global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? value2 + global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? assistantMessage1, + global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage? assistantMessage2 ) { - Value1 = value1; - Value2 = value2; + AssistantMessage1 = assistantMessage1; + AssistantMessage2 = assistantMessage2; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + AssistantMessage2 as object ?? + AssistantMessage1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + AssistantMessage1?.ToString() ?? + AssistantMessage2?.ToString() ; /// @@ -112,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsAssistantMessage1 && IsAssistantMessage2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? assistantMessage1 = null, + global::System.Func? assistantMessage2 = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsAssistantMessage1 && assistantMessage1 != null) { - return value1(Value1!); + return assistantMessage1(AssistantMessage1!); } - else if (IsValue2 && value2 != null) + else if (IsAssistantMessage2 && assistantMessage2 != null) { - return value2(Value2!); + return assistantMessage2(AssistantMessage2!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? assistantMessage1 = null, + global::System.Action? assistantMessage2 = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsAssistantMessage1) { - value1?.Invoke(Value1!); + assistantMessage1?.Invoke(AssistantMessage1!); } - else if (IsValue2) + else if (IsAssistantMessage2) { - value2?.Invoke(Value2!); + assistantMessage2?.Invoke(AssistantMessage2!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, - typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), - Value2, + AssistantMessage1, + typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), + AssistantMessage2, typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(FineTuneChatCompletionRequestAssistantMessage 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(AssistantMessage1, other.AssistantMessage1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage2, other.AssistantMessage2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.Json.g.cs new file mode 100644 index 00000000..28ba50d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuneChatCompletionRequestAssistantMessageAssistantMessage + { + /// + /// 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::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage; + } + + /// + /// 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::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageAssistantMessage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.g.cs new file mode 100644 index 00000000..635a7b0f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageAssistantMessage.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuneChatCompletionRequestAssistantMessageAssistantMessage + { + /// + /// Controls whether the assistant message is trained against (0 or 1) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("weight")] + public int? Weight { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Controls whether the assistant message is trained against (0 or 1) + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FineTuneChatCompletionRequestAssistantMessageAssistantMessage( + int? weight) + { + this.Weight = weight; + } + + /// + /// Initializes a new instance of the class. + /// + public FineTuneChatCompletionRequestAssistantMessageAssistantMessage() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.Json.g.cs deleted file mode 100644 index 595dfa66..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTuneChatCompletionRequestAssistantMessageVariant1 - { - /// - /// 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::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1; - } - - /// - /// 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::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.g.cs deleted file mode 100644 index 8acb36d6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatCompletionRequestAssistantMessageVariant1.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class FineTuneChatCompletionRequestAssistantMessageVariant1 - { - /// - /// Controls whether the assistant message is trained against (0 or 1) - /// - [global::System.Text.Json.Serialization.JsonPropertyName("weight")] - public int? Weight { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Controls whether the assistant message is trained against (0 or 1) - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTuneChatCompletionRequestAssistantMessageVariant1( - int? weight) - { - this.Weight = weight; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTuneChatCompletionRequestAssistantMessageVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.Json.g.cs deleted file mode 100644 index 50c447c2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTuneChatRequestInput - { - /// - /// 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::tryAGI.OpenAI.FineTuneChatRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTuneChatRequestInput), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTuneChatRequestInput; - } - - /// - /// 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::tryAGI.OpenAI.FineTuneChatRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTuneChatRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuneChatRequestInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.g.cs deleted file mode 100644 index 7663ed7a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneChatRequestInput.g.cs +++ /dev/null @@ -1,76 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The per-line training example of a fine-tuning input file for chat models using the supervised method.
- /// Input messages may contain text or image content only. Audio and file input messages
- /// are not currently supported for fine-tuning. - ///
- public sealed partial class FineTuneChatRequestInput - { - /// - /// A list of functions the model may generate JSON inputs for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("functions")] - [global::System.Obsolete("This property marked as deprecated.")] - public global::System.Collections.Generic.IList? Functions { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - public global::System.Collections.Generic.IList>? Messages { get; set; } - - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } - - /// - /// A list of tools the model may generate JSON inputs for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - /// - /// A list of tools the model may generate JSON inputs for. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTuneChatRequestInput( - global::System.Collections.Generic.IList>? messages, - bool? parallelToolCalls, - global::System.Collections.Generic.IList? tools) - { - this.Messages = messages; - this.ParallelToolCalls = parallelToolCalls; - this.Tools = tools; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTuneChatRequestInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneDPOHyperparameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneDPOHyperparameters.g.cs index e15581e3..d2bb949e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneDPOHyperparameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneDPOHyperparameters.g.cs @@ -11,34 +11,36 @@ namespace tryAGI.OpenAI public sealed partial class FineTuneDPOHyperparameters { /// - /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
+ /// The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
/// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? BatchSize { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("beta")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Beta { get; set; } /// - /// The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model. + /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("beta")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Beta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? BatchSize { get; set; } /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? LearningRateMultiplier { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? LearningRateMultiplier { get; set; } /// /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
/// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? NEpochs { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? NEpochs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,15 +51,17 @@ public sealed partial class FineTuneDPOHyperparameters /// /// Initializes a new instance of the class. /// + /// + /// The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
+ /// Default Value: auto + /// /// /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
/// Default Value: auto /// - /// - /// The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model. - /// /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto /// /// /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
@@ -67,13 +71,13 @@ public sealed partial class FineTuneDPOHyperparameters [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuneDPOHyperparameters( - global::tryAGI.OpenAI.AnyOf? batchSize, - global::tryAGI.OpenAI.AnyOf? beta, - global::tryAGI.OpenAI.AnyOf? learningRateMultiplier, - global::tryAGI.OpenAI.AnyOf? nEpochs) + global::tryAGI.OpenAI.OneOf? beta, + global::tryAGI.OpenAI.OneOf? batchSize, + global::tryAGI.OpenAI.OneOf? learningRateMultiplier, + global::tryAGI.OpenAI.OneOf? nEpochs) { - this.BatchSize = batchSize; this.Beta = beta; + this.BatchSize = batchSize; this.LearningRateMultiplier = learningRateMultiplier; this.NEpochs = nEpochs; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneMethod.g.cs index f93a40b6..609c777e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneMethod.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneMethod.g.cs @@ -9,16 +9,12 @@ namespace tryAGI.OpenAI public sealed partial class FineTuneMethod { /// - /// Configuration for the DPO fine-tuning method. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("dpo")] - public global::tryAGI.OpenAI.FineTuneDPOMethod? Dpo { get; set; } - - /// - /// Configuration for the reinforcement fine-tuning method. + /// The type of method. Is either `supervised`, `dpo`, or `reinforcement`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("reinforcement")] - public global::tryAGI.OpenAI.FineTuneReinforcementMethod? Reinforcement { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FineTuneMethodType Type { get; set; } /// /// Configuration for the supervised fine-tuning method. @@ -27,12 +23,16 @@ public sealed partial class FineTuneMethod public global::tryAGI.OpenAI.FineTuneSupervisedMethod? Supervised { get; set; } /// - /// The type of method. Is either `supervised`, `dpo`, or `reinforcement`. + /// Configuration for the DPO fine-tuning method. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneMethodTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FineTuneMethodType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("dpo")] + public global::tryAGI.OpenAI.FineTuneDPOMethod? Dpo { get; set; } + + /// + /// Configuration for the reinforcement fine-tuning method. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reinforcement")] + public global::tryAGI.OpenAI.FineTuneReinforcementMethod? Reinforcement { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -43,31 +43,31 @@ public sealed partial class FineTuneMethod /// /// Initializes a new instance of the class. /// + /// + /// The type of method. Is either `supervised`, `dpo`, or `reinforcement`. + /// + /// + /// Configuration for the supervised fine-tuning method. + /// /// /// Configuration for the DPO fine-tuning method. /// /// /// Configuration for the reinforcement fine-tuning method. /// - /// - /// Configuration for the supervised fine-tuning method. - /// - /// - /// The type of method. Is either `supervised`, `dpo`, or `reinforcement`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuneMethod( global::tryAGI.OpenAI.FineTuneMethodType type, + global::tryAGI.OpenAI.FineTuneSupervisedMethod? supervised, global::tryAGI.OpenAI.FineTuneDPOMethod? dpo, - global::tryAGI.OpenAI.FineTuneReinforcementMethod? reinforcement, - global::tryAGI.OpenAI.FineTuneSupervisedMethod? supervised) + global::tryAGI.OpenAI.FineTuneReinforcementMethod? reinforcement) { this.Type = type; + this.Supervised = supervised; this.Dpo = dpo; this.Reinforcement = reinforcement; - this.Supervised = supervised; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.Json.g.cs deleted file mode 100644 index 6c8f18e5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTunePreferenceRequestInput - { - /// - /// 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::tryAGI.OpenAI.FineTunePreferenceRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTunePreferenceRequestInput), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTunePreferenceRequestInput; - } - - /// - /// 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::tryAGI.OpenAI.FineTunePreferenceRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTunePreferenceRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTunePreferenceRequestInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.g.cs deleted file mode 100644 index 38c71b44..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInput.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The per-line training example of a fine-tuning input file for chat models using the dpo method.
- /// Input messages may contain text or image content only. Audio and file input messages
- /// are not currently supported for fine-tuning. - ///
- public sealed partial class FineTunePreferenceRequestInput - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - public global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput? Input { get; set; } - - /// - /// The non-preferred completion message for the output. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("non_preferred_output")] - public global::System.Collections.Generic.IList>? NonPreferredOutput { get; set; } - - /// - /// The preferred completion message for the output. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("preferred_output")] - public global::System.Collections.Generic.IList>? PreferredOutput { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// The non-preferred completion message for the output. - /// - /// - /// The preferred completion message for the output. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTunePreferenceRequestInput( - global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput? input, - global::System.Collections.Generic.IList>? nonPreferredOutput, - global::System.Collections.Generic.IList>? preferredOutput) - { - this.Input = input; - this.NonPreferredOutput = nonPreferredOutput; - this.PreferredOutput = preferredOutput; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTunePreferenceRequestInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.Json.g.cs deleted file mode 100644 index 4f5704fc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTunePreferenceRequestInputInput - { - /// - /// 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::tryAGI.OpenAI.FineTunePreferenceRequestInputInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput; - } - - /// - /// 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::tryAGI.OpenAI.FineTunePreferenceRequestInputInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTunePreferenceRequestInputInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.g.cs deleted file mode 100644 index 2e9176a8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTunePreferenceRequestInputInput.g.cs +++ /dev/null @@ -1,67 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class FineTunePreferenceRequestInputInput - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - public global::System.Collections.Generic.IList>? Messages { get; set; } - - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] - public bool? ParallelToolCalls { get; set; } - - /// - /// A list of tools the model may generate JSON inputs for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. - /// - /// - /// A list of tools the model may generate JSON inputs for. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTunePreferenceRequestInputInput( - global::System.Collections.Generic.IList>? messages, - bool? parallelToolCalls, - global::System.Collections.Generic.IList? tools) - { - this.Messages = messages; - this.ParallelToolCalls = parallelToolCalls; - this.Tools = tools; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTunePreferenceRequestInputInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementHyperparameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementHyperparameters.g.cs index 0500713d..b9631a4a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementHyperparameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementHyperparameters.g.cs @@ -15,54 +15,56 @@ public sealed partial class FineTuneReinforcementHyperparameters /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? BatchSize { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? BatchSize { get; set; } /// - /// Multiplier on amount of compute used for exploring search space during training. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("compute_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ComputeMultiplier { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? LearningRateMultiplier { get; set; } /// - /// The number of training steps between evaluation runs.
+ /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
/// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("eval_interval")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? EvalInterval { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? NEpochs { get; set; } /// - /// Number of evaluation samples to generate per training step.
- /// Default Value: auto + /// Level of reasoning effort.
+ /// Default Value: default ///
- [global::System.Text.Json.Serialization.JsonPropertyName("eval_samples")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? EvalSamples { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersReasoningEffortJsonConverter))] + public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? ReasoningEffort { get; set; } /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Multiplier on amount of compute used for exploring search space during training.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? LearningRateMultiplier { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("compute_multiplier")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ComputeMultiplier { get; set; } /// - /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
+ /// The number of training steps between evaluation runs.
/// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? NEpochs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("eval_interval")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? EvalInterval { get; set; } /// - /// Level of reasoning effort.
- /// Default Value: default + /// Number of evaluation samples to generate per training step.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuneReinforcementHyperparametersReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("eval_samples")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? EvalSamples { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -77,19 +79,9 @@ public sealed partial class FineTuneReinforcementHyperparameters /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
/// Default Value: auto /// - /// - /// Multiplier on amount of compute used for exploring search space during training. - /// - /// - /// The number of training steps between evaluation runs.
- /// Default Value: auto - /// - /// - /// Number of evaluation samples to generate per training step.
- /// Default Value: auto - /// /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto /// /// /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
@@ -99,25 +91,37 @@ public sealed partial class FineTuneReinforcementHyperparameters /// Level of reasoning effort.
/// Default Value: default /// + /// + /// Multiplier on amount of compute used for exploring search space during training.
+ /// Default Value: auto + /// + /// + /// The number of training steps between evaluation runs.
+ /// Default Value: auto + /// + /// + /// Number of evaluation samples to generate per training step.
+ /// Default Value: auto + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuneReinforcementHyperparameters( - global::tryAGI.OpenAI.AnyOf? batchSize, - global::tryAGI.OpenAI.AnyOf? computeMultiplier, - global::tryAGI.OpenAI.AnyOf? evalInterval, - global::tryAGI.OpenAI.AnyOf? evalSamples, - global::tryAGI.OpenAI.AnyOf? learningRateMultiplier, - global::tryAGI.OpenAI.AnyOf? nEpochs, - global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? reasoningEffort) + global::tryAGI.OpenAI.OneOf? batchSize, + global::tryAGI.OpenAI.OneOf? learningRateMultiplier, + global::tryAGI.OpenAI.OneOf? nEpochs, + global::tryAGI.OpenAI.FineTuneReinforcementHyperparametersReasoningEffort? reasoningEffort, + global::tryAGI.OpenAI.OneOf? computeMultiplier, + global::tryAGI.OpenAI.OneOf? evalInterval, + global::tryAGI.OpenAI.OneOf? evalSamples) { this.BatchSize = batchSize; - this.ComputeMultiplier = computeMultiplier; - this.EvalInterval = evalInterval; - this.EvalSamples = evalSamples; this.LearningRateMultiplier = learningRateMultiplier; this.NEpochs = nEpochs; this.ReasoningEffort = reasoningEffort; + this.ComputeMultiplier = computeMultiplier; + this.EvalInterval = evalInterval; + this.EvalSamples = evalSamples; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementMethod.g.cs index 5633e5b9..80cdad85 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementMethod.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementMethod.g.cs @@ -14,9 +14,9 @@ public sealed partial class FineTuneReinforcementMethod /// The grader used for the fine-tuning job. /// [global::System.Text.Json.Serialization.JsonPropertyName("grader")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Grader { get; set; } + public required global::tryAGI.OpenAI.OneOf Grader { get; set; } /// /// The hyperparameters used for the reinforcement fine-tuning job. @@ -43,7 +43,7 @@ public sealed partial class FineTuneReinforcementMethod [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuneReinforcementMethod( - global::tryAGI.OpenAI.AnyOf grader, + global::tryAGI.OpenAI.OneOf grader, global::tryAGI.OpenAI.FineTuneReinforcementHyperparameters? hyperparameters) { this.Grader = grader; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.Json.g.cs deleted file mode 100644 index 0d3d3e0b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTuneReinforcementRequestInput - { - /// - /// 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::tryAGI.OpenAI.FineTuneReinforcementRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTuneReinforcementRequestInput), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTuneReinforcementRequestInput; - } - - /// - /// 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::tryAGI.OpenAI.FineTuneReinforcementRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTuneReinforcementRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuneReinforcementRequestInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.g.cs deleted file mode 100644 index 80d21e61..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneReinforcementRequestInput.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Per-line training example for reinforcement fine-tuning. Note that `messages` and `tools` are the only reserved keywords.
- /// Any other arbitrary key-value data can be included on training datapoints and will be available to reference during grading under the `{{ item.XXX }}` template variable.
- /// Input messages may contain text or image content only. Audio and file input messages
- /// are not currently supported for fine-tuning. - ///
- public sealed partial class FineTuneReinforcementRequestInput - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Messages { get; set; } - - /// - /// A list of tools the model may generate JSON inputs for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// A list of tools the model may generate JSON inputs for. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTuneReinforcementRequestInput( - global::System.Collections.Generic.IList> messages, - global::System.Collections.Generic.IList? tools) - { - this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); - this.Tools = tools; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTuneReinforcementRequestInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneSupervisedHyperparameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneSupervisedHyperparameters.g.cs index 4f5c8f49..fe770030 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneSupervisedHyperparameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuneSupervisedHyperparameters.g.cs @@ -15,23 +15,24 @@ public sealed partial class FineTuneSupervisedHyperparameters /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? BatchSize { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? BatchSize { get; set; } /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? LearningRateMultiplier { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? LearningRateMultiplier { get; set; } /// /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
/// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? NEpochs { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? NEpochs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -47,7 +48,8 @@ public sealed partial class FineTuneSupervisedHyperparameters /// Default Value: auto /// /// - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting. + /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
+ /// Default Value: auto /// /// /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
@@ -57,9 +59,9 @@ public sealed partial class FineTuneSupervisedHyperparameters [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuneSupervisedHyperparameters( - global::tryAGI.OpenAI.AnyOf? batchSize, - global::tryAGI.OpenAI.AnyOf? learningRateMultiplier, - global::tryAGI.OpenAI.AnyOf? nEpochs) + global::tryAGI.OpenAI.OneOf? batchSize, + global::tryAGI.OpenAI.OneOf? learningRateMultiplier, + global::tryAGI.OpenAI.OneOf? nEpochs) { this.BatchSize = batchSize; this.LearningRateMultiplier = learningRateMultiplier; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningCheckpointPermission.g.cs index 2b422b39..df8c822f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningCheckpointPermission.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningCheckpointPermission.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class FineTuningCheckpointPermission { + /// + /// The permission identifier, which can be referenced in the API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The Unix timestamp (in seconds) for when the permission was created. /// @@ -17,11 +24,11 @@ public sealed partial class FineTuningCheckpointPermission public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The permission identifier, which can be referenced in the API endpoints. + /// The project identifier that the permission is for. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string ProjectId { get; set; } /// /// The object type, which is always "checkpoint.permission". @@ -30,13 +37,6 @@ public sealed partial class FineTuningCheckpointPermission [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningCheckpointPermissionObjectJsonConverter))] public global::tryAGI.OpenAI.FineTuningCheckpointPermissionObject Object { get; set; } - /// - /// The project identifier that the permission is for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ProjectId { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -46,29 +46,29 @@ public sealed partial class FineTuningCheckpointPermission /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the permission was created. - /// /// /// The permission identifier, which can be referenced in the API endpoints. /// - /// - /// The object type, which is always "checkpoint.permission". + /// + /// The Unix timestamp (in seconds) for when the permission was created. /// /// /// The project identifier that the permission is for. /// + /// + /// The object type, which is always "checkpoint.permission". + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningCheckpointPermission( - global::System.DateTimeOffset createdAt, string id, + global::System.DateTimeOffset createdAt, string projectId, global::tryAGI.OpenAI.FineTuningCheckpointPermissionObject @object) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; this.ProjectId = projectId ?? throw new global::System.ArgumentNullException(nameof(projectId)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandb.g.cs index 953a2e8a..fde6e3d1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandb.g.cs @@ -11,26 +11,25 @@ namespace tryAGI.OpenAI public sealed partial class FineTuningIntegrationWandb { /// - /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
- /// like associated with the run. If not set, the default entity for the registered WandB API key is used. + /// The name of the project that the new run will be created under.
+ /// Example: my-wandb-project ///
- [global::System.Text.Json.Serialization.JsonPropertyName("entity")] - public string? Entity { get; set; } + /// my-wandb-project + [global::System.Text.Json.Serialization.JsonPropertyName("project")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Project { get; set; } /// - /// A display name to set for the run. If not set, we will use the Job ID as the name. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } /// - /// The name of the project that the new run will be created under.
- /// Example: my-wandb-project + /// ///
- /// my-wandb-project - [global::System.Text.Json.Serialization.JsonPropertyName("project")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Project { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("entity")] + public string? Entity { get; set; } /// /// A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some
@@ -48,17 +47,12 @@ public sealed partial class FineTuningIntegrationWandb /// /// Initializes a new instance of the class. /// - /// - /// The entity to use for the run. This allows you to set the team or username of the WandB user that you would
- /// like associated with the run. If not set, the default entity for the registered WandB API key is used. - /// - /// - /// A display name to set for the run. If not set, we will use the Job ID as the name. - /// /// /// The name of the project that the new run will be created under.
/// Example: my-wandb-project /// + /// + /// /// /// A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some
/// default tags are generated by OpenAI: "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". @@ -68,13 +62,13 @@ public sealed partial class FineTuningIntegrationWandb #endif public FineTuningIntegrationWandb( string project, - string? entity, string? name, + string? entity, global::System.Collections.Generic.IList? tags) { this.Project = project ?? throw new global::System.ArgumentNullException(nameof(project)); - this.Entity = entity; this.Name = name; + this.Entity = entity; this.Tags = tags; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.Json.g.cs new file mode 100644 index 00000000..7bb5aeab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningIntegrationWandbEntity + { + /// + /// 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::tryAGI.OpenAI.FineTuningIntegrationWandbEntity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningIntegrationWandbEntity), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningIntegrationWandbEntity; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningIntegrationWandbEntity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningIntegrationWandbEntity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningIntegrationWandbEntity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.g.cs new file mode 100644 index 00000000..fc66feb2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbEntity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningIntegrationWandbEntity + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.Json.g.cs new file mode 100644 index 00000000..0401a75e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningIntegrationWandbName + { + /// + /// 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::tryAGI.OpenAI.FineTuningIntegrationWandbName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningIntegrationWandbName), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningIntegrationWandbName; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningIntegrationWandbName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningIntegrationWandbName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningIntegrationWandbName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.g.cs new file mode 100644 index 00000000..9693d038 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningIntegrationWandbName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningIntegrationWandbName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJob.g.cs index a05f456c..8f202d8e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJob.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class FineTuningJob { + /// + /// The object identifier, which can be referenced in the API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The Unix timestamp (in seconds) for when the fine-tuning job was created. /// @@ -17,31 +24,23 @@ public sealed partial class FineTuningJob public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("error")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FineTuningJobError? Error { get; set; } + public required global::tryAGI.OpenAI.FineTuningJobError2? Error { get; set; } /// - /// The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("estimated_finish")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? EstimatedFinish { get; set; } - - /// - /// The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("fine_tuned_model")] [global::System.Text.Json.Serialization.JsonRequired] public required string? FineTunedModel { get; set; } /// - /// The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("finished_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTimeOffset? FinishedAt { get; set; } @@ -52,35 +51,6 @@ public sealed partial class FineTuningJob [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.FineTuningJobHyperparameters Hyperparameters { get; set; } - /// - /// The object identifier, which can be referenced in the API endpoints. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// A list of integrations to enable for this fine-tuning job. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("integrations")] - public global::System.Collections.Generic.IList? Integrations { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The method used for fine-tuning. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("method")] - public global::tryAGI.OpenAI.FineTuneMethod? Method { get; set; } - /// /// The base model that is being fine-tuned. /// @@ -103,19 +73,12 @@ public sealed partial class FineTuningJob public required string OrganizationId { get; set; } /// - /// The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + /// The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents). /// [global::System.Text.Json.Serialization.JsonPropertyName("result_files")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList ResultFiles { get; set; } - /// - /// The seed used for the fine-tuning job. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Seed { get; set; } - /// /// The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. /// @@ -125,26 +88,57 @@ public sealed partial class FineTuningJob public required global::tryAGI.OpenAI.FineTuningJobStatus Status { get; set; } /// - /// The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("trained_tokens")] [global::System.Text.Json.Serialization.JsonRequired] public required int? TrainedTokens { get; set; } /// - /// The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + /// The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents). /// [global::System.Text.Json.Serialization.JsonPropertyName("training_file")] [global::System.Text.Json.Serialization.JsonRequired] public required string TrainingFile { get; set; } /// - /// The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("validation_file")] [global::System.Text.Json.Serialization.JsonRequired] public required string? ValidationFile { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("integrations")] + public global::System.Collections.Generic.IList? Integrations { get; set; } + + /// + /// The seed used for the fine-tuning job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Seed { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("estimated_finish")] + public global::System.DateTimeOffset? EstimatedFinish { get; set; } + + /// + /// The method used for fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("method")] + public global::tryAGI.OpenAI.FineTuneMethod? Method { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -154,40 +148,18 @@ public sealed partial class FineTuningJob /// /// Initializes a new instance of the class. /// + /// + /// The object identifier, which can be referenced in the API endpoints. + /// /// /// The Unix timestamp (in seconds) for when the fine-tuning job was created. /// - /// - /// For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. - /// - /// - /// The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running. - /// - /// - /// The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running. - /// - /// - /// The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running. - /// + /// + /// + /// /// /// The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs. /// - /// - /// The object identifier, which can be referenced in the API endpoints. - /// - /// - /// A list of integrations to enable for this fine-tuning job. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The method used for fine-tuning. - /// /// /// The base model that is being fine-tuned. /// @@ -198,66 +170,68 @@ public sealed partial class FineTuningJob /// The organization that owns the fine-tuning job. /// /// - /// The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). - /// - /// - /// The seed used for the fine-tuning job. + /// The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents). /// /// /// The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. /// - /// - /// The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running. - /// + /// /// - /// The file ID used for training. You can retrieve the training data with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + /// The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents). /// - /// - /// The file ID used for validation. You can retrieve the validation results with the [Files API](https://platform.openai.com/docs/api-reference/files/retrieve-contents). + /// + /// + /// + /// The seed used for the fine-tuning job. /// + /// + /// + /// The method used for fine-tuning. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningJob( + string id, global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.FineTuningJobError? error, + global::tryAGI.OpenAI.FineTuningJobError2? error, string? fineTunedModel, global::System.DateTimeOffset? finishedAt, global::tryAGI.OpenAI.FineTuningJobHyperparameters hyperparameters, - string id, string model, string organizationId, global::System.Collections.Generic.IList resultFiles, - int seed, global::tryAGI.OpenAI.FineTuningJobStatus status, int? trainedTokens, string trainingFile, string? validationFile, + int seed, + global::tryAGI.OpenAI.FineTuningJobObject @object, + global::System.Collections.Generic.IList? integrations, global::System.DateTimeOffset? estimatedFinish, - global::System.Collections.Generic.IList? integrations, - global::System.Collections.Generic.Dictionary? metadata, global::tryAGI.OpenAI.FineTuneMethod? method, - global::tryAGI.OpenAI.FineTuningJobObject @object) + global::System.Collections.Generic.Dictionary? metadata) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.FineTunedModel = fineTunedModel ?? throw new global::System.ArgumentNullException(nameof(fineTunedModel)); - this.FinishedAt = finishedAt; + this.FinishedAt = finishedAt ?? throw new global::System.ArgumentNullException(nameof(finishedAt)); this.Hyperparameters = hyperparameters ?? throw new global::System.ArgumentNullException(nameof(hyperparameters)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.OrganizationId = organizationId ?? throw new global::System.ArgumentNullException(nameof(organizationId)); this.ResultFiles = resultFiles ?? throw new global::System.ArgumentNullException(nameof(resultFiles)); - this.Seed = seed; this.Status = status; - this.TrainedTokens = trainedTokens; + this.TrainedTokens = trainedTokens ?? throw new global::System.ArgumentNullException(nameof(trainedTokens)); this.TrainingFile = trainingFile ?? throw new global::System.ArgumentNullException(nameof(trainingFile)); this.ValidationFile = validationFile ?? throw new global::System.ArgumentNullException(nameof(validationFile)); - this.EstimatedFinish = estimatedFinish; + this.Seed = seed; + this.Object = @object; this.Integrations = integrations; - this.Metadata = metadata; + this.EstimatedFinish = estimatedFinish; this.Method = method; - this.Object = @object; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpoint.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpoint.g.cs index 694de621..e2cb8ef7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpoint.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpoint.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class FineTuningJobCheckpoint { + /// + /// The checkpoint identifier, which can be referenced in the API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The Unix timestamp (in seconds) for when the checkpoint was created. /// @@ -24,25 +31,25 @@ public sealed partial class FineTuningJobCheckpoint public required string FineTunedModelCheckpoint { get; set; } /// - /// The name of the fine-tuning job that this checkpoint was created from. + /// The step number that the checkpoint was created at. /// - [global::System.Text.Json.Serialization.JsonPropertyName("fine_tuning_job_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("step_number")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FineTuningJobId { get; set; } + public required int StepNumber { get; set; } /// - /// The checkpoint identifier, which can be referenced in the API endpoints. + /// Metrics at the step number during the fine-tuning job. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics Metrics { get; set; } /// - /// Metrics at the step number during the fine-tuning job. + /// The name of the fine-tuning job that this checkpoint was created from. /// - [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + [global::System.Text.Json.Serialization.JsonPropertyName("fine_tuning_job_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics Metrics { get; set; } + public required string FineTuningJobId { get; set; } /// /// The object type, which is always "fine_tuning.job.checkpoint". @@ -51,13 +58,6 @@ public sealed partial class FineTuningJobCheckpoint [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobCheckpointObjectJsonConverter))] public global::tryAGI.OpenAI.FineTuningJobCheckpointObject Object { get; set; } - /// - /// The step number that the checkpoint was created at. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("step_number")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int StepNumber { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -67,45 +67,45 @@ public sealed partial class FineTuningJobCheckpoint /// /// Initializes a new instance of the class. /// + /// + /// The checkpoint identifier, which can be referenced in the API endpoints. + /// /// /// The Unix timestamp (in seconds) for when the checkpoint was created. /// /// /// The name of the fine-tuned checkpoint model that is created. /// - /// - /// The name of the fine-tuning job that this checkpoint was created from. - /// - /// - /// The checkpoint identifier, which can be referenced in the API endpoints. + /// + /// The step number that the checkpoint was created at. /// /// /// Metrics at the step number during the fine-tuning job. /// + /// + /// The name of the fine-tuning job that this checkpoint was created from. + /// /// /// The object type, which is always "fine_tuning.job.checkpoint". /// - /// - /// The step number that the checkpoint was created at. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningJobCheckpoint( + string id, global::System.DateTimeOffset createdAt, string fineTunedModelCheckpoint, - string fineTuningJobId, - string id, - global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics metrics, int stepNumber, + global::tryAGI.OpenAI.FineTuningJobCheckpointMetrics metrics, + string fineTuningJobId, global::tryAGI.OpenAI.FineTuningJobCheckpointObject @object) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; this.FineTunedModelCheckpoint = fineTunedModelCheckpoint ?? throw new global::System.ArgumentNullException(nameof(fineTunedModelCheckpoint)); - this.FineTuningJobId = fineTuningJobId ?? throw new global::System.ArgumentNullException(nameof(fineTuningJobId)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Metrics = metrics ?? throw new global::System.ArgumentNullException(nameof(metrics)); this.StepNumber = stepNumber; + this.Metrics = metrics ?? throw new global::System.ArgumentNullException(nameof(metrics)); + this.FineTuningJobId = fineTuningJobId ?? throw new global::System.ArgumentNullException(nameof(fineTuningJobId)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpointMetrics.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpointMetrics.g.cs index f253b04b..d866aefb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpointMetrics.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobCheckpointMetrics.g.cs @@ -8,18 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class FineTuningJobCheckpointMetrics { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("full_valid_loss")] - public double? FullValidLoss { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("full_valid_mean_token_accuracy")] - public double? FullValidMeanTokenAccuracy { get; set; } - /// /// /// @@ -50,6 +38,18 @@ public sealed partial class FineTuningJobCheckpointMetrics [global::System.Text.Json.Serialization.JsonPropertyName("valid_mean_token_accuracy")] public double? ValidMeanTokenAccuracy { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("full_valid_loss")] + public double? FullValidLoss { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("full_valid_mean_token_accuracy")] + public double? FullValidMeanTokenAccuracy { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,32 +59,32 @@ public sealed partial class FineTuningJobCheckpointMetrics /// /// Initializes a new instance of the class. /// - /// - /// /// /// /// /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningJobCheckpointMetrics( - double? fullValidLoss, - double? fullValidMeanTokenAccuracy, double? step, double? trainLoss, double? trainMeanTokenAccuracy, double? validLoss, - double? validMeanTokenAccuracy) + double? validMeanTokenAccuracy, + double? fullValidLoss, + double? fullValidMeanTokenAccuracy) { - this.FullValidLoss = fullValidLoss; - this.FullValidMeanTokenAccuracy = fullValidMeanTokenAccuracy; this.Step = step; this.TrainLoss = trainLoss; this.TrainMeanTokenAccuracy = trainMeanTokenAccuracy; this.ValidLoss = validLoss; this.ValidMeanTokenAccuracy = validMeanTokenAccuracy; + this.FullValidLoss = fullValidLoss; + this.FullValidMeanTokenAccuracy = fullValidMeanTokenAccuracy; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError.g.cs index 1b2f416a..fd1498d0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError.g.cs @@ -4,67 +4,15 @@ namespace tryAGI.OpenAI { /// - /// For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. + /// /// public sealed partial class FineTuningJobError { - /// - /// A machine-readable error code. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Code { get; set; } - - /// - /// A human-readable error message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { get; set; } - - /// - /// The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("param")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string? Param { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A machine-readable error code. - /// - /// - /// A human-readable error message. - /// - /// - /// The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTuningJobError( - string code, - string message, - string? param) - { - this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - this.Param = param ?? throw new global::System.ArgumentNullException(nameof(param)); - } - - /// - /// Initializes a new instance of the class. - /// - public FineTuningJobError() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.Json.g.cs new file mode 100644 index 00000000..93ec54e1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobError2 + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobError2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobError2), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobError2; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobError2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobError2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobError2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.g.cs new file mode 100644 index 00000000..6f401116 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobError2.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. + /// + public sealed partial class FineTuningJobError2 + { + /// + /// A machine-readable error code. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Code { get; set; } + + /// + /// A human-readable error message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("param")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Param { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A machine-readable error code. + /// + /// + /// A human-readable error message. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FineTuningJobError2( + string code, + string message, + string? param) + { + this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.Param = param ?? throw new global::System.ArgumentNullException(nameof(param)); + } + + /// + /// Initializes a new instance of the class. + /// + public FineTuningJobError2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.Json.g.cs new file mode 100644 index 00000000..a57bdb9b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobErrorParam + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobErrorParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobErrorParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobErrorParam; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobErrorParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobErrorParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobErrorParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.g.cs new file mode 100644 index 00000000..33653fce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobErrorParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobErrorParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.Json.g.cs new file mode 100644 index 00000000..fff77fec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobEstimatedFinish + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobEstimatedFinish? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobEstimatedFinish), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobEstimatedFinish; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobEstimatedFinish? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobEstimatedFinish), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobEstimatedFinish; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.g.cs new file mode 100644 index 00000000..aeb5bc6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEstimatedFinish.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobEstimatedFinish + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEvent.g.cs index 29bfa1e1..66a5ee4f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobEvent.g.cs @@ -9,18 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class FineTuningJobEvent { /// - /// The Unix timestamp (in seconds) for when the fine-tuning job was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - - /// - /// The data associated with the event. + /// The object type, which is always "fine_tuning.job.event". /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public object? Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventObjectJsonConverter))] + public global::tryAGI.OpenAI.FineTuningJobEventObject Object { get; set; } /// /// The object identifier. @@ -29,6 +22,14 @@ public sealed partial class FineTuningJobEvent [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The Unix timestamp (in seconds) for when the fine-tuning job was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + /// /// The log level of the event. /// @@ -44,13 +45,6 @@ public sealed partial class FineTuningJobEvent [global::System.Text.Json.Serialization.JsonRequired] public required string Message { get; set; } - /// - /// The object type, which is always "fine_tuning.job.event". - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventObjectJsonConverter))] - public global::tryAGI.OpenAI.FineTuningJobEventObject Object { get; set; } - /// /// The type of event. /// @@ -58,6 +52,12 @@ public sealed partial class FineTuningJobEvent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FineTuningJobEventTypeJsonConverter))] public global::tryAGI.OpenAI.FineTuningJobEventType? Type { get; set; } + /// + /// The data associated with the event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public object? Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -67,46 +67,46 @@ public sealed partial class FineTuningJobEvent /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the fine-tuning job was created. - /// - /// - /// The data associated with the event. + /// + /// The object type, which is always "fine_tuning.job.event". /// /// /// The object identifier. /// + /// + /// The Unix timestamp (in seconds) for when the fine-tuning job was created. + /// /// /// The log level of the event. /// /// /// The message of the event. /// - /// - /// The object type, which is always "fine_tuning.job.event". - /// /// /// The type of event. /// + /// + /// The data associated with the event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningJobEvent( - global::System.DateTimeOffset createdAt, string id, + global::System.DateTimeOffset createdAt, global::tryAGI.OpenAI.FineTuningJobEventLevel level, string message, - object? data, global::tryAGI.OpenAI.FineTuningJobEventObject @object, - global::tryAGI.OpenAI.FineTuningJobEventType? type) + global::tryAGI.OpenAI.FineTuningJobEventType? type, + object? data) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; this.Level = level; this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - this.Data = data; this.Object = @object; this.Type = type; + this.Data = data; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.Json.g.cs new file mode 100644 index 00000000..09a42a64 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobFineTunedModel + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobFineTunedModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobFineTunedModel), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobFineTunedModel; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobFineTunedModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobFineTunedModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobFineTunedModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.g.cs new file mode 100644 index 00000000..56e45a4f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFineTunedModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobFineTunedModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.Json.g.cs new file mode 100644 index 00000000..0d0c3674 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobFinishedAt + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobFinishedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobFinishedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobFinishedAt; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobFinishedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobFinishedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobFinishedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.g.cs new file mode 100644 index 00000000..0c5046d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobFinishedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobFinishedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparameters.g.cs index bac21e6c..00dda5a7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparameters.g.cs @@ -14,15 +14,16 @@ public sealed partial class FineTuningJobHyperparameters /// /// [global::System.Text.Json.Serialization.JsonPropertyName("batch_size")] - public object? BatchSize { get; set; } + public global::tryAGI.OpenAI.OneOf? BatchSize { get; set; } /// /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
- /// overfitting. + /// overfitting.
+ /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("learning_rate_multiplier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? LearningRateMultiplier { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? LearningRateMultiplier { get; set; } /// /// The number of epochs to train the model for. An epoch refers to one full cycle
@@ -30,8 +31,8 @@ public sealed partial class FineTuningJobHyperparameters /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("n_epochs")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? NEpochs { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? NEpochs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,7 +46,8 @@ public sealed partial class FineTuningJobHyperparameters /// /// /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
- /// overfitting. + /// overfitting.
+ /// Default Value: auto /// /// /// The number of epochs to train the model for. An epoch refers to one full cycle
@@ -56,9 +58,9 @@ public sealed partial class FineTuningJobHyperparameters [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FineTuningJobHyperparameters( - object? batchSize, - global::tryAGI.OpenAI.AnyOf? learningRateMultiplier, - global::tryAGI.OpenAI.AnyOf? nEpochs) + global::tryAGI.OpenAI.OneOf? batchSize, + global::tryAGI.OpenAI.OneOf? learningRateMultiplier, + global::tryAGI.OpenAI.OneOf? nEpochs) { this.BatchSize = batchSize; this.LearningRateMultiplier = learningRateMultiplier; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.Json.g.cs new file mode 100644 index 00000000..82c219a0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobHyperparametersBatchSize + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobHyperparametersBatchSize; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.g.cs new file mode 100644 index 00000000..06642af2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSize.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobHyperparametersBatchSize + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSizeVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSizeVariant1.g.cs new file mode 100644 index 00000000..5ac1d112 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobHyperparametersBatchSizeVariant1.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum FineTuningJobHyperparametersBatchSizeVariant1 + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FineTuningJobHyperparametersBatchSizeVariant1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FineTuningJobHyperparametersBatchSizeVariant1 value) + { + return value switch + { + FineTuningJobHyperparametersBatchSizeVariant1.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FineTuningJobHyperparametersBatchSizeVariant1? ToEnum(string value) + { + return value switch + { + "auto" => FineTuningJobHyperparametersBatchSizeVariant1.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.Json.g.cs deleted file mode 100644 index 9c4a9149..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class FineTuningJobIntegrationDiscriminator - { - /// - /// 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::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobIntegrationDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.g.cs deleted file mode 100644 index 9b6aadf7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrationDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class FineTuningJobIntegrationDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public FineTuningJobIntegrationDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public FineTuningJobIntegrationDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.Json.g.cs new file mode 100644 index 00000000..fd185f46 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobIntegrations + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobIntegrations? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobIntegrations), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobIntegrations; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobIntegrations? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobIntegrations), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobIntegrations; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.g.cs new file mode 100644 index 00000000..8d5b2833 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobIntegrations.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobIntegrations + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.Json.g.cs new file mode 100644 index 00000000..de838f9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobTrainedTokens + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobTrainedTokens? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobTrainedTokens), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobTrainedTokens; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobTrainedTokens? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobTrainedTokens), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobTrainedTokens; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.g.cs new file mode 100644 index 00000000..7c299d03 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobTrainedTokens.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobTrainedTokens + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.Json.g.cs new file mode 100644 index 00000000..524a39ea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FineTuningJobValidationFile + { + /// + /// 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::tryAGI.OpenAI.FineTuningJobValidationFile? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FineTuningJobValidationFile), + jsonSerializerContext) as global::tryAGI.OpenAI.FineTuningJobValidationFile; + } + + /// + /// 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::tryAGI.OpenAI.FineTuningJobValidationFile? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FineTuningJobValidationFile), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FineTuningJobValidationFile; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.g.cs new file mode 100644 index 00000000..736c4879 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FineTuningJobValidationFile.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FineTuningJobValidationFile + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.Json.g.cs deleted file mode 100644 index 261fb3d9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Format - { - /// - /// 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::tryAGI.OpenAI.Format? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Format), - jsonSerializerContext) as global::tryAGI.OpenAI.Format?; - } - - /// - /// 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::tryAGI.OpenAI.Format? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Format), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Format?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.g.cs deleted file mode 100644 index ed861009..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The input format for the custom tool. Default is unconstrained text. - /// - public readonly partial struct Format : global::System.IEquatable - { - /// - /// Unconstrained free-form text. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolFormatVariant1? Value1 { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolFormatVariant1? 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 Format(global::tryAGI.OpenAI.CustomToolFormatVariant1 value) => new Format((global::tryAGI.OpenAI.CustomToolFormatVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CustomToolFormatVariant1?(Format @this) => @this.Value1; - - /// - /// - /// - public Format(global::tryAGI.OpenAI.CustomToolFormatVariant1? value) - { - Value1 = value; - } - - /// - /// A grammar defined by the user. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolFormatVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolFormatVariant2? 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 Format(global::tryAGI.OpenAI.CustomToolFormatVariant2 value) => new Format((global::tryAGI.OpenAI.CustomToolFormatVariant2?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CustomToolFormatVariant2?(Format @this) => @this.Value2; - - /// - /// - /// - public Format(global::tryAGI.OpenAI.CustomToolFormatVariant2? value) - { - Value2 = value; - } - - /// - /// - /// - public Format( - global::tryAGI.OpenAI.CustomToolFormatVariant1? value1, - global::tryAGI.OpenAI.CustomToolFormatVariant2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.CustomToolFormatVariant1), - Value2, - typeof(global::tryAGI.OpenAI.CustomToolFormatVariant2), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Format 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 ==(Format obj1, Format obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Format obj1, Format obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Format o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format2.g.cs index bb0d6d0e..68dd94fd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Format2.g.cs @@ -13,98 +13,97 @@ namespace tryAGI.OpenAI /// Unconstrained free-form text. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? Value1 { get; init; } + public global::tryAGI.OpenAI.CustomTextFormatParam? Text { get; init; } #else - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? Value1 { get; } + public global::tryAGI.OpenAI.CustomTextFormatParam? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsValue1 => Value1 != null; + public bool IsText => Text != null; /// - /// + /// A grammar defined by the user. /// - public static implicit operator Format2(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1 value) => new Format2((global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomGrammarFormatParam? Grammar { get; init; } +#else + public global::tryAGI.OpenAI.CustomGrammarFormatParam? Grammar { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1?(Format2 @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Grammar))] +#endif + public bool IsGrammar => Grammar != null; /// /// /// - public Format2(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? value) - { - Value1 = value; - } + public static implicit operator Format2(global::tryAGI.OpenAI.CustomTextFormatParam value) => new Format2((global::tryAGI.OpenAI.CustomTextFormatParam?)value); /// - /// A grammar defined by the user. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.CustomTextFormatParam?(Format2 @this) => @this.Text; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public Format2(global::tryAGI.OpenAI.CustomTextFormatParam? value) + { + Text = value; + } /// /// /// - public static implicit operator Format2(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2 value) => new Format2((global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2?)value); + public static implicit operator Format2(global::tryAGI.OpenAI.CustomGrammarFormatParam value) => new Format2((global::tryAGI.OpenAI.CustomGrammarFormatParam?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2?(Format2 @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.CustomGrammarFormatParam?(Format2 @this) => @this.Grammar; /// /// /// - public Format2(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? value) + public Format2(global::tryAGI.OpenAI.CustomGrammarFormatParam? value) { - Value2 = value; + Grammar = value; } /// /// /// public Format2( - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1? value1, - global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2? value2 + global::tryAGI.OpenAI.CustomTextFormatParam? text, + global::tryAGI.OpenAI.CustomGrammarFormatParam? grammar ) { - Value1 = value1; - Value2 = value2; + Text = text; + Grammar = grammar; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + Grammar as object ?? + Text as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Text?.ToString() ?? + Grammar?.ToString() ; /// @@ -112,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2; + return IsText && !IsGrammar || !IsText && IsGrammar; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? text = null, + global::System.Func? grammar = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsText && text != null) { - return value1(Value1!); + return text(Text!); } - else if (IsValue2 && value2 != null) + else if (IsGrammar && grammar != null) { - return value2(Value2!); + return grammar(Grammar!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? text = null, + global::System.Action? grammar = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsText) { - value1?.Invoke(Value1!); + text?.Invoke(Text!); } - else if (IsValue2) + else if (IsGrammar) { - value2?.Invoke(Value2!); + grammar?.Invoke(Grammar!); } } @@ -170,10 +169,10 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant1), - Value2, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletionsCustomFormatVariant2), + Text, + typeof(global::tryAGI.OpenAI.CustomTextFormatParam), + Grammar, + typeof(global::tryAGI.OpenAI.CustomGrammarFormatParam), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Format2 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(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Grammar, other.Grammar) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.Json.g.cs new file mode 100644 index 00000000..c4b58d07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct FunctionAndCustomToolCallOutput + { + /// + /// 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::tryAGI.OpenAI.FunctionAndCustomToolCallOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput?; + } + + /// + /// 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::tryAGI.OpenAI.FunctionAndCustomToolCallOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionAndCustomToolCallOutput?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.g.cs new file mode 100644 index 00000000..b21ce3c5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutput.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct FunctionAndCustomToolCallOutput : global::System.IEquatable + { + /// + /// A text input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputTextContent? InputText { get; init; } +#else + public global::tryAGI.OpenAI.InputTextContent? InputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] +#endif + public bool IsInputText => InputText != null; + + /// + /// An image input to the model. Learn about [image inputs](/docs/guides/vision). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; init; } +#else + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] +#endif + public bool IsInputImage => InputImage != null; + + /// + /// A file input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; init; } +#else + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputFile))] +#endif + public bool IsInputFile => InputFile != null; + /// + /// + /// + public static implicit operator FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputTextContent value) => new FunctionAndCustomToolCallOutput((global::tryAGI.OpenAI.InputTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputTextContent?(FunctionAndCustomToolCallOutput @this) => @this.InputText; + + /// + /// + /// + public FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputTextContent? value) + { + InputText = value; + } + + /// + /// + /// + public static implicit operator FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputImageContent value) => new FunctionAndCustomToolCallOutput((global::tryAGI.OpenAI.InputImageContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputImageContent?(FunctionAndCustomToolCallOutput @this) => @this.InputImage; + + /// + /// + /// + public FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputImageContent? value) + { + InputImage = value; + } + + /// + /// + /// + public static implicit operator FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputFileContent value) => new FunctionAndCustomToolCallOutput((global::tryAGI.OpenAI.InputFileContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputFileContent?(FunctionAndCustomToolCallOutput @this) => @this.InputFile; + + /// + /// + /// + public FunctionAndCustomToolCallOutput(global::tryAGI.OpenAI.InputFileContent? value) + { + InputFile = value; + } + + /// + /// + /// + public FunctionAndCustomToolCallOutput( + global::tryAGI.OpenAI.InputTextContent? inputText, + global::tryAGI.OpenAI.InputImageContent? inputImage, + global::tryAGI.OpenAI.InputFileContent? inputFile + ) + { + InputText = inputText; + InputImage = inputImage; + InputFile = inputFile; + } + + /// + /// + /// + public object? Object => + InputFile as object ?? + InputImage as object ?? + InputText as object + ; + + /// + /// + /// + public override string? ToString() => + InputText?.ToString() ?? + InputImage?.ToString() ?? + InputFile?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsInputText && !IsInputImage && !IsInputFile || !IsInputText && IsInputImage && !IsInputFile || !IsInputText && !IsInputImage && IsInputFile; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? inputText = null, + global::System.Func? inputImage = null, + global::System.Func? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText && inputText != null) + { + return inputText(InputText!); + } + else if (IsInputImage && inputImage != null) + { + return inputImage(InputImage!); + } + else if (IsInputFile && inputFile != null) + { + return inputFile(InputFile!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? inputText = null, + global::System.Action? inputImage = null, + global::System.Action? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText) + { + inputText?.Invoke(InputText!); + } + else if (IsInputImage) + { + inputImage?.Invoke(InputImage!); + } + else if (IsInputFile) + { + inputFile?.Invoke(InputFile!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + InputText, + typeof(global::tryAGI.OpenAI.InputTextContent), + InputImage, + typeof(global::tryAGI.OpenAI.InputImageContent), + InputFile, + typeof(global::tryAGI.OpenAI.InputFileContent), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(FunctionAndCustomToolCallOutput other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputFile, other.InputFile) + ; + } + + /// + /// + /// + public static bool operator ==(FunctionAndCustomToolCallOutput obj1, FunctionAndCustomToolCallOutput obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(FunctionAndCustomToolCallOutput obj1, FunctionAndCustomToolCallOutput obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is FunctionAndCustomToolCallOutput o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.Json.g.cs new file mode 100644 index 00000000..96c1b49d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionAndCustomToolCallOutputDiscriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionAndCustomToolCallOutputDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.g.cs new file mode 100644 index 00000000..a6598ce7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionAndCustomToolCallOutputDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionAndCustomToolCallOutputDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionAndCustomToolCallOutputDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionAndCustomToolCallOutputDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParam.g.cs index 688e62b5..baf84edc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParam.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,6 +10,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class FunctionCallOutputItemParam { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + /// /// The unique ID of the function tool call generated by the model. /// @@ -16,34 +24,27 @@ public sealed partial class FunctionCallOutputItemParam public required string CallId { get; set; } /// - /// The unique ID of the function tool call output. Populated when this item is returned via API.
- /// Example: fc_123 + /// The type of the function tool call output. Always `function_call_output`.
+ /// Default Value: function_call_output ///
- /// fc_123 - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } + /// global::tryAGI.OpenAI.FunctionCallOutputItemParamType.FunctionCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionCallOutputItemParamType.FunctionCallOutput; /// - /// + /// Text, image, or file output of the function tool call. /// [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Output { get; set; } + public required global::tryAGI.OpenAI.OneOf> Output { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("status")] - public object? Status { get; set; } - - /// - /// The type of the function tool call output. Always `function_call_output`.
- /// Default Value: function_call_output - ///
- /// global::tryAGI.OpenAI.FunctionCallOutputItemParamType.FunctionCallOutput - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputItemParamTypeJsonConverter))] - public global::tryAGI.OpenAI.FunctionCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionCallOutputItemParamType.FunctionCallOutput; + public global::tryAGI.OpenAI.FunctionCallItemStatus? Status { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,34 +55,33 @@ public sealed partial class FunctionCallOutputItemParam /// /// Initializes a new instance of the class. /// + /// /// /// The unique ID of the function tool call generated by the model. /// - /// - /// The unique ID of the function tool call output. Populated when this item is returned via API.
- /// Example: fc_123 - /// - /// - /// /// /// The type of the function tool call output. Always `function_call_output`.
/// Default Value: function_call_output /// + /// + /// Text, image, or file output of the function tool call. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FunctionCallOutputItemParam( string callId, - string output, + global::tryAGI.OpenAI.OneOf> output, string? id, - object? status, + global::tryAGI.OpenAI.FunctionCallItemStatus? status, global::tryAGI.OpenAI.FunctionCallOutputItemParamType type = global::tryAGI.OpenAI.FunctionCallOutputItemParamType.FunctionCallOutput) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.Output = output; this.Id = id; - this.Status = status; this.Type = type; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.Json.g.cs new file mode 100644 index 00000000..c3c077e4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionCallOutputItemParamId + { + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionCallOutputItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionCallOutputItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.g.cs new file mode 100644 index 00000000..33faf1ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionCallOutputItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.Json.g.cs new file mode 100644 index 00000000..66ba153f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionCallOutputItemParamOutputVariant2ItemDiscriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.g.cs new file mode 100644 index 00000000..74c645d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamOutputVariant2ItemDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionCallOutputItemParamOutputVariant2ItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionCallOutputItemParamOutputVariant2ItemDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionCallOutputItemParamOutputVariant2ItemDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.Json.g.cs new file mode 100644 index 00000000..7e8c1869 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionCallOutputItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionCallOutputItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.FunctionCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionCallOutputItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.g.cs new file mode 100644 index 00000000..134a323c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionCallOutputItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputStatusEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputStatusEnum.g.cs new file mode 100644 index 00000000..2dc4be60 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputStatusEnum.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum FunctionCallOutputStatusEnum + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionCallOutputStatusEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionCallOutputStatusEnum value) + { + return value switch + { + FunctionCallOutputStatusEnum.InProgress => "in_progress", + FunctionCallOutputStatusEnum.Completed => "completed", + FunctionCallOutputStatusEnum.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionCallOutputStatusEnum? ToEnum(string value) + { + return value switch + { + "in_progress" => FunctionCallOutputStatusEnum.InProgress, + "completed" => FunctionCallOutputStatusEnum.Completed, + "incomplete" => FunctionCallOutputStatusEnum.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallStatus.g.cs new file mode 100644 index 00000000..e2669709 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallStatus.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum FunctionCallStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionCallStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionCallStatus value) + { + return value switch + { + FunctionCallStatus.InProgress => "in_progress", + FunctionCallStatus.Completed => "completed", + FunctionCallStatus.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionCallStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => FunctionCallStatus.InProgress, + "completed" => FunctionCallStatus.Completed, + "incomplete" => FunctionCallStatus.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObject.g.cs index 1e9da542..7e086950 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObject.g.cs @@ -22,15 +22,14 @@ public sealed partial class FunctionObject public required string Name { get; set; } /// - /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
+ /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
/// Omitting `parameters` defines a function with an empty parameter list. ///
[global::System.Text.Json.Serialization.JsonPropertyName("parameters")] public object? Parameters { get; set; } /// - /// Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
- /// Default Value: false + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("strict")] public bool? Strict { get; set; } @@ -51,13 +50,10 @@ public sealed partial class FunctionObject /// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. /// /// - /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
+ /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
/// Omitting `parameters` defines a function with an empty parameter list. /// - /// - /// Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
- /// Default Value: false - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.Json.g.cs new file mode 100644 index 00000000..d3763423 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionObjectStrict + { + /// + /// 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::tryAGI.OpenAI.FunctionObjectStrict? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionObjectStrict), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionObjectStrict; + } + + /// + /// 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::tryAGI.OpenAI.FunctionObjectStrict? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionObjectStrict), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionObjectStrict; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.g.cs new file mode 100644 index 00000000..dc2686f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionObjectStrict.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionObjectStrict + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionParameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionParameters.g.cs index 24f4697c..853fa7fc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionParameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionParameters.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
+ /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
/// Omitting `parameters` defines a function with an empty parameter list. ///
public sealed partial class FunctionParameters diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.Json.g.cs new file mode 100644 index 00000000..99208d29 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellAction + { + /// + /// 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::tryAGI.OpenAI.FunctionShellAction? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellAction), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellAction; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellAction? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellAction), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellAction; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.g.cs new file mode 100644 index 00000000..0a6387cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellAction.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Execute a shell command. + /// + public sealed partial class FunctionShellAction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("commands")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Commands { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? TimeoutMs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_length")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? MaxOutputLength { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellAction( + global::System.Collections.Generic.IList commands, + int? timeoutMs, + int? maxOutputLength) + { + this.Commands = commands ?? throw new global::System.ArgumentNullException(nameof(commands)); + this.TimeoutMs = timeoutMs ?? throw new global::System.ArgumentNullException(nameof(timeoutMs)); + this.MaxOutputLength = maxOutputLength ?? throw new global::System.ArgumentNullException(nameof(maxOutputLength)); + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellAction() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.Json.g.cs new file mode 100644 index 00000000..7c0c66e6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellActionMaxOutputLength + { + /// + /// 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::tryAGI.OpenAI.FunctionShellActionMaxOutputLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellActionMaxOutputLength), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellActionMaxOutputLength; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellActionMaxOutputLength? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellActionMaxOutputLength), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellActionMaxOutputLength; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.g.cs new file mode 100644 index 00000000..bc7d5b2f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionMaxOutputLength.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellActionMaxOutputLength + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.Json.g.cs new file mode 100644 index 00000000..e9552401 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellActionParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellActionParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellActionParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellActionParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellActionParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.g.cs new file mode 100644 index 00000000..8da10fe1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParam.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Commands and limits describing how to run the shell tool call. + /// + public sealed partial class FunctionShellActionParam + { + /// + /// Ordered shell commands for the execution environment to run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("commands")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Commands { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] + public int? TimeoutMs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_length")] + public int? MaxOutputLength { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Ordered shell commands for the execution environment to run. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellActionParam( + global::System.Collections.Generic.IList commands, + int? timeoutMs, + int? maxOutputLength) + { + this.Commands = commands ?? throw new global::System.ArgumentNullException(nameof(commands)); + this.TimeoutMs = timeoutMs; + this.MaxOutputLength = maxOutputLength; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellActionParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.Json.g.cs new file mode 100644 index 00000000..35fb5562 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellActionParamMaxOutputLength + { + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellActionParamMaxOutputLength; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.g.cs new file mode 100644 index 00000000..80b89886 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamMaxOutputLength.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellActionParamMaxOutputLength + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.Json.g.cs new file mode 100644 index 00000000..905fcccf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellActionParamTimeoutMs + { + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellActionParamTimeoutMs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.g.cs new file mode 100644 index 00000000..fb953961 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionParamTimeoutMs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellActionParamTimeoutMs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.Json.g.cs new file mode 100644 index 00000000..f4f6ed35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellActionTimeoutMs + { + /// + /// 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::tryAGI.OpenAI.FunctionShellActionTimeoutMs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellActionTimeoutMs), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellActionTimeoutMs; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellActionTimeoutMs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellActionTimeoutMs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellActionTimeoutMs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.g.cs new file mode 100644 index 00000000..6a6b906b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellActionTimeoutMs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellActionTimeoutMs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.Json.g.cs new file mode 100644 index 00000000..aa9345a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCall + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCall? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCall; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCall? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCall; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.g.cs new file mode 100644 index 00000000..c9aa51a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCall.g.cs @@ -0,0 +1,119 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool call that executes one or more shell commands in a managed environment. + /// + public sealed partial class FunctionShellCall + { + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallType.ShellCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallType.ShellCall; + + /// + /// The unique ID of the shell tool call. Populated when this item is returned via API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The unique ID of the shell tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The shell commands and limits that describe how to run the tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionShellAction Action { get; set; } + + /// + /// The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.LocalShellCallStatus Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.EnvironmentVariant12? Environment { get; set; } + + /// + /// The ID of the entity that created this tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + /// + /// + /// The unique ID of the shell tool call. Populated when this item is returned via API. + /// + /// + /// The unique ID of the shell tool call generated by the model. + /// + /// + /// The shell commands and limits that describe how to run the tool call. + /// + /// + /// The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. + /// + /// + /// + /// The ID of the entity that created this tool call. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCall( + string id, + string callId, + global::tryAGI.OpenAI.FunctionShellAction action, + global::tryAGI.OpenAI.LocalShellCallStatus status, + global::tryAGI.OpenAI.EnvironmentVariant12? environment, + string? createdBy, + global::tryAGI.OpenAI.FunctionShellCallType type = global::tryAGI.OpenAI.FunctionShellCallType.ShellCall) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Action = action ?? throw new global::System.ArgumentNullException(nameof(action)); + this.Status = status; + this.Environment = environment ?? throw new global::System.ArgumentNullException(nameof(environment)); + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCall() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.Json.g.cs new file mode 100644 index 00000000..8592606e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallEnvironment + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallEnvironment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallEnvironment), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallEnvironment; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallEnvironment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallEnvironment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallEnvironment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.g.cs new file mode 100644 index 00000000..fa3edbe1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironment.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallEnvironment + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.Json.g.cs new file mode 100644 index 00000000..1345c09f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallEnvironmentVariant1Discriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallEnvironmentVariant1Discriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.g.cs new file mode 100644 index 00000000..db230c6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallEnvironmentVariant1Discriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallEnvironmentVariant1Discriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallEnvironmentVariant1Discriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallEnvironmentVariant1Discriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.Json.g.cs new file mode 100644 index 00000000..6371e7d4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallItemParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallItemParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.g.cs new file mode 100644 index 00000000..9e6fdd43 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParam.g.cs @@ -0,0 +1,100 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool representing a request to execute one or more shell commands. + /// + public sealed partial class FunctionShellCallItemParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The unique ID of the shell tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallItemParamType.ShellCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallItemParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallItemParamType.ShellCall; + + /// + /// The shell commands and limits that describe how to run the tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionShellActionParam Action { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public global::tryAGI.OpenAI.FunctionShellCallItemStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment")] + public global::tryAGI.OpenAI.EnvironmentVariant13? Environment { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The unique ID of the shell tool call generated by the model. + /// + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + /// + /// + /// The shell commands and limits that describe how to run the tool call. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallItemParam( + string callId, + global::tryAGI.OpenAI.FunctionShellActionParam action, + string? id, + global::tryAGI.OpenAI.FunctionShellCallItemStatus? status, + global::tryAGI.OpenAI.EnvironmentVariant13? environment, + global::tryAGI.OpenAI.FunctionShellCallItemParamType type = global::tryAGI.OpenAI.FunctionShellCallItemParamType.ShellCall) + { + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Action = action ?? throw new global::System.ArgumentNullException(nameof(action)); + this.Id = id; + this.Type = type; + this.Status = status; + this.Environment = environment; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.Json.g.cs new file mode 100644 index 00000000..895be932 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallItemParamEnvironment + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.g.cs new file mode 100644 index 00000000..fc5c4426 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironment.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallItemParamEnvironment + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.Json.g.cs new file mode 100644 index 00000000..e86251e8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallItemParamEnvironmentVariant1Discriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallItemParamEnvironmentVariant1Discriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.g.cs new file mode 100644 index 00000000..26394e33 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamEnvironmentVariant1Discriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallItemParamEnvironmentVariant1Discriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallItemParamEnvironmentVariant1Discriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallItemParamEnvironmentVariant1Discriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.Json.g.cs new file mode 100644 index 00000000..9bece890 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallItemParamId + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.g.cs new file mode 100644 index 00000000..3a35d3e8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.Json.g.cs new file mode 100644 index 00000000..46756403 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.g.cs new file mode 100644 index 00000000..043b1faf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamType.g.cs new file mode 100644 index 00000000..4db11b46 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + ///
+ public enum FunctionShellCallItemParamType + { + /// + /// + /// + ShellCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallItemParamType value) + { + return value switch + { + FunctionShellCallItemParamType.ShellCall => "shell_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallItemParamType? ToEnum(string value) + { + return value switch + { + "shell_call" => FunctionShellCallItemParamType.ShellCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemStatus.g.cs new file mode 100644 index 00000000..e7b4ec1a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallItemStatus.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Status values reported for shell tool calls. + /// + public enum FunctionShellCallItemStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallItemStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallItemStatus value) + { + return value switch + { + FunctionShellCallItemStatus.InProgress => "in_progress", + FunctionShellCallItemStatus.Completed => "completed", + FunctionShellCallItemStatus.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallItemStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => FunctionShellCallItemStatus.InProgress, + "completed" => FunctionShellCallItemStatus.Completed, + "incomplete" => FunctionShellCallItemStatus.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.Json.g.cs new file mode 100644 index 00000000..3245e1a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutput + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutput; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.g.cs new file mode 100644 index 00000000..b46d2835 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutput.g.cs @@ -0,0 +1,119 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The output of a shell tool call that was emitted. + /// + public sealed partial class FunctionShellCallOutput + { + /// + /// The type of the shell call output. Always `shell_call_output`.
+ /// Default Value: shell_call_output + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputType.ShellCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputType.ShellCallOutput; + + /// + /// The unique ID of the shell call output. Populated when this item is returned via API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The unique ID of the shell tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellCallOutputStatusEnumJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum Status { get; set; } + + /// + /// An array of shell call output contents + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Output { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_length")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int? MaxOutputLength { get; set; } + + /// + /// The identifier of the actor that created the item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the shell call output. Always `shell_call_output`.
+ /// Default Value: shell_call_output + /// + /// + /// The unique ID of the shell call output. Populated when this item is returned via API. + /// + /// + /// The unique ID of the shell tool call generated by the model. + /// + /// + /// The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. + /// + /// + /// An array of shell call output contents + /// + /// + /// + /// The identifier of the actor that created the item. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutput( + string id, + string callId, + global::tryAGI.OpenAI.LocalShellCallOutputStatusEnum status, + global::System.Collections.Generic.IList output, + int? maxOutputLength, + string? createdBy, + global::tryAGI.OpenAI.FunctionShellCallOutputType type = global::tryAGI.OpenAI.FunctionShellCallOutputType.ShellCallOutput) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Status = status; + this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.MaxOutputLength = maxOutputLength ?? throw new global::System.ArgumentNullException(nameof(maxOutputLength)); + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutput() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.Json.g.cs new file mode 100644 index 00000000..e0ac52d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputContent + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContent), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputContent; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.g.cs new file mode 100644 index 00000000..2adf3cab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContent.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The content of a shell tool call output that was emitted. + /// + public sealed partial class FunctionShellCallOutputContent + { + /// + /// The standard output that was captured. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stdout")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Stdout { get; set; } + + /// + /// The standard error output that was captured. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stderr")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Stderr { get; set; } + + /// + /// Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("outcome")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutcomeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Outcome Outcome { get; set; } + + /// + /// The identifier of the actor that created the item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The standard output that was captured. + /// + /// + /// The standard error output that was captured. + /// + /// + /// Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. + /// + /// + /// The identifier of the actor that created the item. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputContent( + string stdout, + string stderr, + global::tryAGI.OpenAI.Outcome outcome, + string? createdBy) + { + this.Stdout = stdout ?? throw new global::System.ArgumentNullException(nameof(stdout)); + this.Stderr = stderr ?? throw new global::System.ArgumentNullException(nameof(stderr)); + this.Outcome = outcome; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputContent() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.Json.g.cs new file mode 100644 index 00000000..58536aeb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputContentOutcomeDiscriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputContentOutcomeDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.g.cs new file mode 100644 index 00000000..9efcfec2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentOutcomeDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputContentOutcomeDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputContentOutcomeDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputContentOutcomeDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.Json.g.cs new file mode 100644 index 00000000..46af18cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputContentParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContentParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContentParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputContentParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputContentParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputContentParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputContentParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.g.cs new file mode 100644 index 00000000..a0e74a59 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputContentParam.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Captured stdout and stderr for a portion of a shell tool call output. + /// + public sealed partial class FunctionShellCallOutputContentParam + { + /// + /// Captured stdout output for the shell call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stdout")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Stdout { get; set; } + + /// + /// Captured stderr output for the shell call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stderr")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Stderr { get; set; } + + /// + /// The exit or timeout outcome associated with this shell call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("outcome")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputOutcomeParamJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam Outcome { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Captured stdout output for the shell call. + /// + /// + /// Captured stderr output for the shell call. + /// + /// + /// The exit or timeout outcome associated with this shell call. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputContentParam( + string stdout, + string stderr, + global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam outcome) + { + this.Stdout = stdout ?? throw new global::System.ArgumentNullException(nameof(stdout)); + this.Stderr = stderr ?? throw new global::System.ArgumentNullException(nameof(stderr)); + this.Outcome = outcome; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputContentParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.Json.g.cs new file mode 100644 index 00000000..9b91b8e9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputExitOutcome + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.g.cs new file mode 100644 index 00000000..0f095103 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcome.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that the shell commands finished and returned an exit code. + /// + public sealed partial class FunctionShellCallOutputExitOutcome + { + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType.Exit + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType.Exit; + + /// + /// Exit code from the shell process. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("exit_code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ExitCode { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + /// + /// + /// Exit code from the shell process. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputExitOutcome( + int exitCode, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType type = global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeType.Exit) + { + this.ExitCode = exitCode; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputExitOutcome() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.Json.g.cs new file mode 100644 index 00000000..b26e87fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputExitOutcomeParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.g.cs new file mode 100644 index 00000000..62ea25d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParam.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that the shell commands finished and returned an exit code. + /// + public sealed partial class FunctionShellCallOutputExitOutcomeParam + { + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType.Exit + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputExitOutcomeParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType.Exit; + + /// + /// The exit code returned by the shell process. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("exit_code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ExitCode { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + /// + /// + /// The exit code returned by the shell process. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputExitOutcomeParam( + int exitCode, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType type = global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParamType.Exit) + { + this.ExitCode = exitCode; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputExitOutcomeParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParamType.g.cs new file mode 100644 index 00000000..58560a13 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + ///
+ public enum FunctionShellCallOutputExitOutcomeParamType + { + /// + /// + /// + Exit, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputExitOutcomeParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputExitOutcomeParamType value) + { + return value switch + { + FunctionShellCallOutputExitOutcomeParamType.Exit => "exit", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputExitOutcomeParamType? ToEnum(string value) + { + return value switch + { + "exit" => FunctionShellCallOutputExitOutcomeParamType.Exit, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeType.g.cs new file mode 100644 index 00000000..f33d1a1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputExitOutcomeType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The outcome type. Always `exit`.
+ /// Default Value: exit + ///
+ public enum FunctionShellCallOutputExitOutcomeType + { + /// + /// + /// + Exit, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputExitOutcomeTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputExitOutcomeType value) + { + return value switch + { + FunctionShellCallOutputExitOutcomeType.Exit => "exit", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputExitOutcomeType? ToEnum(string value) + { + return value switch + { + "exit" => FunctionShellCallOutputExitOutcomeType.Exit, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.Json.g.cs new file mode 100644 index 00000000..8064c881 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputItemParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.g.cs new file mode 100644 index 00000000..594ea553 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParam.g.cs @@ -0,0 +1,100 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The streamed output items emitted by a shell tool call. + /// + public sealed partial class FunctionShellCallOutputItemParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The unique ID of the shell tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The type of the item. Always `shell_call_output`.
+ /// Default Value: shell_call_output + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType.ShellCallOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType.ShellCallOutput; + + /// + /// Captured chunks of stdout and stderr output, along with their associated outcomes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Output { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public global::tryAGI.OpenAI.FunctionShellCallItemStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_length")] + public int? MaxOutputLength { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The unique ID of the shell tool call generated by the model. + /// + /// + /// The type of the item. Always `shell_call_output`.
+ /// Default Value: shell_call_output + /// + /// + /// Captured chunks of stdout and stderr output, along with their associated outcomes. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputItemParam( + string callId, + global::System.Collections.Generic.IList output, + string? id, + global::tryAGI.OpenAI.FunctionShellCallItemStatus? status, + int? maxOutputLength, + global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType type = global::tryAGI.OpenAI.FunctionShellCallOutputItemParamType.ShellCallOutput) + { + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.Id = id; + this.Type = type; + this.Status = status; + this.MaxOutputLength = maxOutputLength; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.Json.g.cs new file mode 100644 index 00000000..7d0f1346 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputItemParamId + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.g.cs new file mode 100644 index 00000000..94a6e688 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.Json.g.cs new file mode 100644 index 00000000..ec129c20 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputItemParamMaxOutputLength + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamMaxOutputLength; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.g.cs new file mode 100644 index 00000000..cf97babb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamMaxOutputLength.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputItemParamMaxOutputLength + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.Json.g.cs new file mode 100644 index 00000000..7ab9c970 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.g.cs new file mode 100644 index 00000000..975dca24 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamType.g.cs new file mode 100644 index 00000000..334321f4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `shell_call_output`.
+ /// Default Value: shell_call_output + ///
+ public enum FunctionShellCallOutputItemParamType + { + /// + /// + /// + ShellCallOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputItemParamType value) + { + return value switch + { + FunctionShellCallOutputItemParamType.ShellCallOutput => "shell_call_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputItemParamType? ToEnum(string value) + { + return value switch + { + "shell_call_output" => FunctionShellCallOutputItemParamType.ShellCallOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.Json.g.cs new file mode 100644 index 00000000..454e414a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputMaxOutputLength + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputMaxOutputLength; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.g.cs new file mode 100644 index 00000000..e73ecb41 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputMaxOutputLength.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputMaxOutputLength + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.Json.g.cs new file mode 100644 index 00000000..3b570e40 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct FunctionShellCallOutputOutcomeParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam?; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParam?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.g.cs new file mode 100644 index 00000000..ab196f32 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParam.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The exit or timeout outcome associated with this shell call. + /// + public readonly partial struct FunctionShellCallOutputOutcomeParam : global::System.IEquatable + { + /// + /// Indicates that the shell call exceeded its configured time limit. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? Timeout { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? Timeout { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Timeout))] +#endif + public bool IsTimeout => Timeout != null; + + /// + /// Indicates that the shell commands finished and returned an exit code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? Exit { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? Exit { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Exit))] +#endif + public bool IsExit => Exit != null; + /// + /// + /// + public static implicit operator FunctionShellCallOutputOutcomeParam(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam value) => new FunctionShellCallOutputOutcomeParam((global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam?(FunctionShellCallOutputOutcomeParam @this) => @this.Timeout; + + /// + /// + /// + public FunctionShellCallOutputOutcomeParam(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? value) + { + Timeout = value; + } + + /// + /// + /// + public static implicit operator FunctionShellCallOutputOutcomeParam(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam value) => new FunctionShellCallOutputOutcomeParam((global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam?(FunctionShellCallOutputOutcomeParam @this) => @this.Exit; + + /// + /// + /// + public FunctionShellCallOutputOutcomeParam(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? value) + { + Exit = value; + } + + /// + /// + /// + public FunctionShellCallOutputOutcomeParam( + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? timeout, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam? exit + ) + { + Timeout = timeout; + Exit = exit; + } + + /// + /// + /// + public object? Object => + Exit as object ?? + Timeout as object + ; + + /// + /// + /// + public override string? ToString() => + Timeout?.ToString() ?? + Exit?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsTimeout && !IsExit || !IsTimeout && IsExit; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? timeout = null, + global::System.Func? exit = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTimeout && timeout != null) + { + return timeout(Timeout!); + } + else if (IsExit && exit != null) + { + return exit(Exit!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? timeout = null, + global::System.Action? exit = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTimeout) + { + timeout?.Invoke(Timeout!); + } + else if (IsExit) + { + exit?.Invoke(Exit!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Timeout, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), + Exit, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcomeParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(FunctionShellCallOutputOutcomeParam other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Timeout, other.Timeout) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Exit, other.Exit) + ; + } + + /// + /// + /// + public static bool operator ==(FunctionShellCallOutputOutcomeParam obj1, FunctionShellCallOutputOutcomeParam obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(FunctionShellCallOutputOutcomeParam obj1, FunctionShellCallOutputOutcomeParam obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is FunctionShellCallOutputOutcomeParam o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.Json.g.cs new file mode 100644 index 00000000..278dcf32 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputOutcomeParamDiscriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputOutcomeParamDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.g.cs new file mode 100644 index 00000000..d8122667 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputOutcomeParamDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellCallOutputOutcomeParamDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputOutcomeParamDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputOutcomeParamDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.Json.g.cs new file mode 100644 index 00000000..6db80083 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputTimeoutOutcome + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.g.cs new file mode 100644 index 00000000..12292eb9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcome.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that the shell call exceeded its configured time limit. + /// + public sealed partial class FunctionShellCallOutputTimeoutOutcome + { + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType.Timeout + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType.Timeout; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputTimeoutOutcome( + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType type = global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeType.Timeout) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputTimeoutOutcome() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.Json.g.cs new file mode 100644 index 00000000..39eab145 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellCallOutputTimeoutOutcomeParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.g.cs new file mode 100644 index 00000000..0efebd43 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that the shell call exceeded its configured time limit. + /// + public sealed partial class FunctionShellCallOutputTimeoutOutcomeParam + { + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + ///
+ /// global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType.Timeout + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellCallOutputTimeoutOutcomeParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType.Timeout; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellCallOutputTimeoutOutcomeParam( + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType type = global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcomeParamType.Timeout) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellCallOutputTimeoutOutcomeParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs new file mode 100644 index 00000000..f19eaddc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + ///
+ public enum FunctionShellCallOutputTimeoutOutcomeParamType + { + /// + /// + /// + Timeout, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputTimeoutOutcomeParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputTimeoutOutcomeParamType value) + { + return value switch + { + FunctionShellCallOutputTimeoutOutcomeParamType.Timeout => "timeout", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputTimeoutOutcomeParamType? ToEnum(string value) + { + return value switch + { + "timeout" => FunctionShellCallOutputTimeoutOutcomeParamType.Timeout, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeType.g.cs new file mode 100644 index 00000000..5b714e6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputTimeoutOutcomeType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The outcome type. Always `timeout`.
+ /// Default Value: timeout + ///
+ public enum FunctionShellCallOutputTimeoutOutcomeType + { + /// + /// + /// + Timeout, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputTimeoutOutcomeTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputTimeoutOutcomeType value) + { + return value switch + { + FunctionShellCallOutputTimeoutOutcomeType.Timeout => "timeout", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputTimeoutOutcomeType? ToEnum(string value) + { + return value switch + { + "timeout" => FunctionShellCallOutputTimeoutOutcomeType.Timeout, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputType.g.cs new file mode 100644 index 00000000..520a6ef4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallOutputType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the shell call output. Always `shell_call_output`.
+ /// Default Value: shell_call_output + ///
+ public enum FunctionShellCallOutputType + { + /// + /// + /// + ShellCallOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallOutputTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallOutputType value) + { + return value switch + { + FunctionShellCallOutputType.ShellCallOutput => "shell_call_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallOutputType? ToEnum(string value) + { + return value switch + { + "shell_call_output" => FunctionShellCallOutputType.ShellCallOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallType.g.cs new file mode 100644 index 00000000..5b857a8e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellCallType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `shell_call`.
+ /// Default Value: shell_call + ///
+ public enum FunctionShellCallType + { + /// + /// + /// + ShellCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellCallType value) + { + return value switch + { + FunctionShellCallType.ShellCall => "shell_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellCallType? ToEnum(string value) + { + return value switch + { + "shell_call" => FunctionShellCallType.ShellCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.Json.g.cs new file mode 100644 index 00000000..e3322e2b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellToolParam + { + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellToolParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.g.cs new file mode 100644 index 00000000..a2c984dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParam.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool that allows the model to execute shell commands. + /// + public sealed partial class FunctionShellToolParam + { + /// + /// The type of the shell tool. Always `shell`.
+ /// Default Value: shell + ///
+ /// global::tryAGI.OpenAI.FunctionShellToolParamType.Shell + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionShellToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionShellToolParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionShellToolParamType.Shell; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("environment")] + public global::tryAGI.OpenAI.EnvironmentVariant1? Environment { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the shell tool. Always `shell`.
+ /// Default Value: shell + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellToolParam( + global::tryAGI.OpenAI.EnvironmentVariant1? environment, + global::tryAGI.OpenAI.FunctionShellToolParamType type = global::tryAGI.OpenAI.FunctionShellToolParamType.Shell) + { + this.Type = type; + this.Environment = environment; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.Json.g.cs new file mode 100644 index 00000000..28112850 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellToolParamEnvironment + { + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParamEnvironment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellToolParamEnvironment), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellToolParamEnvironment; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParamEnvironment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellToolParamEnvironment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellToolParamEnvironment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.g.cs new file mode 100644 index 00000000..7b12133d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironment.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellToolParamEnvironment + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.Json.g.cs new file mode 100644 index 00000000..98c2060c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionShellToolParamEnvironmentVariant1Discriminator + { + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator; + } + + /// + /// 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::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionShellToolParamEnvironmentVariant1Discriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.g.cs new file mode 100644 index 00000000..fc545a9b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamEnvironmentVariant1Discriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionShellToolParamEnvironmentVariant1Discriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionShellToolParamEnvironmentVariant1Discriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionShellToolParamEnvironmentVariant1Discriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamType.g.cs new file mode 100644 index 00000000..af63f0cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionShellToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the shell tool. Always `shell`.
+ /// Default Value: shell + ///
+ public enum FunctionShellToolParamType + { + /// + /// + /// + Shell, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionShellToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionShellToolParamType value) + { + return value switch + { + FunctionShellToolParamType.Shell => "shell", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionShellToolParamType? ToEnum(string value) + { + return value switch + { + "shell" => FunctionShellToolParamType.Shell, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionTool.g.cs index ec52f0fe..03f688cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionTool.g.cs @@ -9,10 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class FunctionTool { /// - /// A description of the function. Used by the model to determine whether or not to call the function. + /// The type of the function tool. Always `function`.
+ /// Default Value: function ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } + /// global::tryAGI.OpenAI.FunctionToolType.Function + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionToolType Type { get; set; } = global::tryAGI.OpenAI.FunctionToolType.Function; /// /// The name of the function to call. @@ -22,27 +25,30 @@ public sealed partial class FunctionTool public required string Name { get; set; } /// - /// A JSON schema object describing the parameters of the function. + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] [global::System.Text.Json.Serialization.JsonRequired] public required object? Parameters { get; set; } /// - /// Whether to enforce strict parameter validation. Default `true`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("strict")] [global::System.Text.Json.Serialization.JsonRequired] public required bool? Strict { get; set; } /// - /// The type of the function tool. Always `function`.
- /// Default Value: function + /// Whether this function is deferred and loaded via tool search. ///
- /// global::tryAGI.OpenAI.FunctionToolType.Function - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolTypeJsonConverter))] - public global::tryAGI.OpenAI.FunctionToolType Type { get; set; } = global::tryAGI.OpenAI.FunctionToolType.Function; + [global::System.Text.Json.Serialization.JsonPropertyName("defer_loading")] + public bool? DeferLoading { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,21 +59,18 @@ public sealed partial class FunctionTool /// /// Initializes a new instance of the class. /// - /// - /// A description of the function. Used by the model to determine whether or not to call the function. + /// + /// The type of the function tool. Always `function`.
+ /// Default Value: function /// /// /// The name of the function to call. /// - /// - /// A JSON schema object describing the parameters of the function. - /// - /// - /// Whether to enforce strict parameter validation. Default `true`. - /// - /// - /// The type of the function tool. Always `function`.
- /// Default Value: function + /// + /// + /// + /// + /// Whether this function is deferred and loaded via tool search. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -77,13 +80,15 @@ public FunctionTool( object? parameters, bool? strict, string? description, + bool? deferLoading, global::tryAGI.OpenAI.FunctionToolType type = global::tryAGI.OpenAI.FunctionToolType.Function) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Parameters = parameters ?? throw new global::System.ArgumentNullException(nameof(parameters)); - this.Strict = strict; - this.Description = description; + this.Strict = strict ?? throw new global::System.ArgumentNullException(nameof(strict)); this.Type = type; + this.Description = description; + this.DeferLoading = deferLoading; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCall.g.cs index 695c64f0..577d8c09 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCall.g.cs @@ -5,16 +5,22 @@ namespace tryAGI.OpenAI { /// /// A tool call to run a function. See the
- /// [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + /// [function calling guide](/docs/guides/function-calling) for more information. ///
public sealed partial class FunctionToolCall { /// - /// A JSON string of the arguments to pass to the function. + /// The unique ID of the function tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// The type of the function tool call. Always `function_call`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionToolCallType Type { get; set; } /// /// The unique ID of the function tool call generated by the model. @@ -24,10 +30,10 @@ public sealed partial class FunctionToolCall public required string CallId { get; set; } /// - /// The unique ID of the function tool call. + /// The namespace of the function to run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("namespace")] + public string? Namespace { get; set; } /// /// The name of the function to run. @@ -36,6 +42,13 @@ public sealed partial class FunctionToolCall [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } + /// + /// A JSON string of the arguments to pass to the function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } + /// /// The status of the item. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when items are returned via API. @@ -44,13 +57,6 @@ public sealed partial class FunctionToolCall [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallStatusJsonConverter))] public global::tryAGI.OpenAI.FunctionToolCallStatus? Status { get; set; } - /// - /// The type of the function tool call. Always `function_call`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.FunctionToolCallType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -60,42 +66,47 @@ public sealed partial class FunctionToolCall /// /// Initializes a new instance of the class. /// - /// - /// A JSON string of the arguments to pass to the function. + /// + /// The unique ID of the function tool call. + /// + /// + /// The type of the function tool call. Always `function_call`. /// /// /// The unique ID of the function tool call generated by the model. /// - /// - /// The unique ID of the function tool call. + /// + /// The namespace of the function to run. /// /// /// The name of the function to run. /// + /// + /// A JSON string of the arguments to pass to the function. + /// /// /// The status of the item. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when items are returned via API. /// - /// - /// The type of the function tool call. Always `function_call`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FunctionToolCall( - string arguments, string callId, string name, + string arguments, string? id, - global::tryAGI.OpenAI.FunctionToolCallStatus? status, - global::tryAGI.OpenAI.FunctionToolCallType type) + global::tryAGI.OpenAI.FunctionToolCallType type, + string? @namespace, + global::tryAGI.OpenAI.FunctionToolCallStatus? status) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id; - this.Status = status; this.Type = type; + this.Namespace = @namespace; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutput.g.cs index aff647ea..24af69bd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutput.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,13 +10,6 @@ namespace tryAGI.OpenAI /// public sealed partial class FunctionToolCallOutput { - /// - /// The unique ID of the function tool call generated by the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } - /// /// The unique ID of the function tool call output. Populated when this item
/// is returned via API. @@ -23,11 +18,27 @@ public sealed partial class FunctionToolCallOutput public string? Id { get; set; } /// - /// A JSON string of the output of the function tool call. + /// The type of the function tool call output. Always `function_call_output`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionToolCallOutputType Type { get; set; } + + /// + /// The unique ID of the function tool call generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The output from the function call generated by your code.
+ /// Can be a string or an list of output content. ///
[global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Output { get; set; } + public required global::tryAGI.OpenAI.OneOf> Output { get; set; } /// /// The status of the item. One of `in_progress`, `completed`, or
@@ -37,13 +48,6 @@ public sealed partial class FunctionToolCallOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputStatusJsonConverter))] public global::tryAGI.OpenAI.FunctionToolCallOutputStatus? Status { get; set; } - /// - /// The type of the function tool call output. Always `function_call_output`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolCallOutputTypeJsonConverter))] - public global::tryAGI.OpenAI.FunctionToolCallOutputType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -53,38 +57,39 @@ public sealed partial class FunctionToolCallOutput /// /// Initializes a new instance of the class. /// - /// - /// The unique ID of the function tool call generated by the model. - /// /// /// The unique ID of the function tool call output. Populated when this item
/// is returned via API. /// + /// + /// The type of the function tool call output. Always `function_call_output`. + /// + /// + /// The unique ID of the function tool call generated by the model. + /// /// - /// A JSON string of the output of the function tool call. + /// The output from the function call generated by your code.
+ /// Can be a string or an list of output content. /// /// /// The status of the item. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when items are returned via API. /// - /// - /// The type of the function tool call output. Always `function_call_output`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public FunctionToolCallOutput( string callId, - string output, + global::tryAGI.OpenAI.OneOf> output, string? id, - global::tryAGI.OpenAI.FunctionToolCallOutputStatus? status, - global::tryAGI.OpenAI.FunctionToolCallOutputType type) + global::tryAGI.OpenAI.FunctionToolCallOutputType type, + global::tryAGI.OpenAI.FunctionToolCallOutputStatus? status) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.Output = output; this.Id = id; - this.Status = status; this.Type = type; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutputResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutputResource.g.cs index 4b9d55e4..a6e9afd0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutputResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallOutputResource.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// The output of a function tool call. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallOutput? Value1 { get; init; } + public global::tryAGI.OpenAI.FunctionToolCallOutput? FunctionToolCallOutput { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCallOutput? Value1 { get; } + public global::tryAGI.OpenAI.FunctionToolCallOutput? FunctionToolCallOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallOutput))] #endif - public bool IsValue1 => Value1 != null; + public bool IsFunctionToolCallOutput => FunctionToolCallOutput != null; /// /// /// - public static implicit operator FunctionToolCallOutputResource(global::tryAGI.OpenAI.FunctionToolCallOutput value) => new FunctionToolCallOutputResource((global::tryAGI.OpenAI.FunctionToolCallOutput?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutput?(FunctionToolCallOutputResource @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public FunctionToolCallOutputResource(global::tryAGI.OpenAI.FunctionToolCallOutput? value) - { - Value1 = value; - } + public static implicit operator FunctionToolCallOutputResource(global::tryAGI.OpenAI.FunctionToolCallOutput value) => new FunctionToolCallOutputResource((global::tryAGI.OpenAI.FunctionToolCallOutput?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutput?(FunctionToolCallOutputResource @this) => @this.FunctionToolCallOutput; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public FunctionToolCallOutputResource(global::tryAGI.OpenAI.FunctionToolCallOutput? value) + { + FunctionToolCallOutput = value; + } /// /// @@ -83,11 +82,11 @@ public FunctionToolCallOutputResource(global::tryAGI.OpenAI.FunctionToolCallOutp /// /// public FunctionToolCallOutputResource( - global::tryAGI.OpenAI.FunctionToolCallOutput? value1, + global::tryAGI.OpenAI.FunctionToolCallOutput? functionToolCallOutput, global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2? value2 ) { - Value1 = value1; + FunctionToolCallOutput = functionToolCallOutput; Value2 = value2; } @@ -96,14 +95,14 @@ public FunctionToolCallOutputResource( ///
public object? Object => Value2 as object ?? - Value1 as object + FunctionToolCallOutput as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + FunctionToolCallOutput?.ToString() ?? Value2?.ToString() ; @@ -112,14 +111,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsFunctionToolCallOutput && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? functionToolCallOutput = null, global::System.Func? value2 = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsFunctionToolCallOutput && functionToolCallOutput != null) { - return value1(Value1!); + return functionToolCallOutput(FunctionToolCallOutput!); } else if (IsValue2 && value2 != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? functionToolCallOutput = null, global::System.Action? value2 = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsFunctionToolCallOutput) { - value1?.Invoke(Value1!); + functionToolCallOutput?.Invoke(FunctionToolCallOutput!); } else if (IsValue2) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + FunctionToolCallOutput, typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), Value2, typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResourceVariant2), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(FunctionToolCallOutputResource other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCallOutput, other.FunctionToolCallOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallResource.g.cs index eb3d2a79..321b57ff 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolCallResource.g.cs @@ -11,56 +11,55 @@ namespace tryAGI.OpenAI { /// /// A tool call to run a function. See the
- /// [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + /// [function calling guide](/docs/guides/function-calling) for more information. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCall? Value1 { get; init; } + public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCall? Value1 { get; } + public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCall))] #endif - public bool IsValue1 => Value1 != null; + public bool IsFunctionToolCall => FunctionToolCall != null; /// /// /// - public static implicit operator FunctionToolCallResource(global::tryAGI.OpenAI.FunctionToolCall value) => new FunctionToolCallResource((global::tryAGI.OpenAI.FunctionToolCall?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(FunctionToolCallResource @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public FunctionToolCallResource(global::tryAGI.OpenAI.FunctionToolCall? value) - { - Value1 = value; - } + public static implicit operator FunctionToolCallResource(global::tryAGI.OpenAI.FunctionToolCall value) => new FunctionToolCallResource((global::tryAGI.OpenAI.FunctionToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(FunctionToolCallResource @this) => @this.FunctionToolCall; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public FunctionToolCallResource(global::tryAGI.OpenAI.FunctionToolCall? value) + { + FunctionToolCall = value; + } /// /// @@ -84,11 +83,11 @@ public FunctionToolCallResource(global::tryAGI.OpenAI.FunctionToolCallResourceVa /// /// public FunctionToolCallResource( - global::tryAGI.OpenAI.FunctionToolCall? value1, + global::tryAGI.OpenAI.FunctionToolCall? functionToolCall, global::tryAGI.OpenAI.FunctionToolCallResourceVariant2? value2 ) { - Value1 = value1; + FunctionToolCall = functionToolCall; Value2 = value2; } @@ -97,14 +96,14 @@ public FunctionToolCallResource( ///
public object? Object => Value2 as object ?? - Value1 as object + FunctionToolCall as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + FunctionToolCall?.ToString() ?? Value2?.ToString() ; @@ -113,14 +112,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsFunctionToolCall && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? functionToolCall = null, global::System.Func? value2 = null, bool validate = true) { @@ -129,9 +128,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsFunctionToolCall && functionToolCall != null) { - return value1(Value1!); + return functionToolCall(FunctionToolCall!); } else if (IsValue2 && value2 != null) { @@ -145,7 +144,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? functionToolCall = null, global::System.Action? value2 = null, bool validate = true) { @@ -154,9 +153,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsFunctionToolCall) { - value1?.Invoke(Value1!); + functionToolCall?.Invoke(FunctionToolCall!); } else if (IsValue2) { @@ -171,7 +170,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + FunctionToolCall, typeof(global::tryAGI.OpenAI.FunctionToolCall), Value2, typeof(global::tryAGI.OpenAI.FunctionToolCallResourceVariant2), @@ -191,7 +190,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(FunctionToolCallResource other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCall, other.FunctionToolCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.Json.g.cs new file mode 100644 index 00000000..aa0740f1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolDescription + { + /// + /// 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::tryAGI.OpenAI.FunctionToolDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolDescription; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.g.cs new file mode 100644 index 00000000..9607774e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.Json.g.cs new file mode 100644 index 00000000..7a6d34c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolParam + { + /// + /// 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::tryAGI.OpenAI.FunctionToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolParam; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.g.cs new file mode 100644 index 00000000..110b3b2d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParam.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public object? Parameters { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("strict")] + public bool? Strict { get; set; } + + /// + /// Default Value: function + /// + /// global::tryAGI.OpenAI.FunctionToolParamType.Function + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.FunctionToolParamType Type { get; set; } = global::tryAGI.OpenAI.FunctionToolParamType.Function; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// Default Value: function + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FunctionToolParam( + string name, + string? description, + object? parameters, + bool? strict, + global::tryAGI.OpenAI.FunctionToolParamType type = global::tryAGI.OpenAI.FunctionToolParamType.Function) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.Parameters = parameters; + this.Strict = strict; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public FunctionToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.Json.g.cs new file mode 100644 index 00000000..0f955618 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolParamDescription + { + /// + /// 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::tryAGI.OpenAI.FunctionToolParamDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolParamDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolParamDescription; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolParamDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolParamDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolParamDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.g.cs new file mode 100644 index 00000000..f4db4f1b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolParamDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.Json.g.cs new file mode 100644 index 00000000..a71b823b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolParamParameters + { + /// + /// 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::tryAGI.OpenAI.FunctionToolParamParameters? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolParamParameters), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolParamParameters; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolParamParameters? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolParamParameters), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolParamParameters; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.g.cs new file mode 100644 index 00000000..93428458 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamParameters.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolParamParameters + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.Json.g.cs new file mode 100644 index 00000000..8ec0f163 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolParamStrict + { + /// + /// 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::tryAGI.OpenAI.FunctionToolParamStrict? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolParamStrict), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolParamStrict; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolParamStrict? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolParamStrict), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolParamStrict; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.g.cs new file mode 100644 index 00000000..63d4c417 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamStrict.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolParamStrict + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamType.g.cs new file mode 100644 index 00000000..970f991f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParamType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: function + /// + public enum FunctionToolParamType + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FunctionToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FunctionToolParamType value) + { + return value switch + { + FunctionToolParamType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FunctionToolParamType? ToEnum(string value) + { + return value switch + { + "function" => FunctionToolParamType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters.g.cs index 235d4cfe..a422e45f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// A JSON schema object describing the parameters of the function. + /// /// public sealed partial class FunctionToolParameters { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters2.g.cs index a03e5ff4..641ca0fe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters2.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// + /// A JSON schema object describing the parameters of the function. /// public sealed partial class FunctionToolParameters2 { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.Json.g.cs new file mode 100644 index 00000000..63167667 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolParameters3 + { + /// + /// 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::tryAGI.OpenAI.FunctionToolParameters3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolParameters3), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolParameters3; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolParameters3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolParameters3), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolParameters3; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.g.cs new file mode 100644 index 00000000..f4a0ebdc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolParameters3.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolParameters3 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.Json.g.cs new file mode 100644 index 00000000..14e0038f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class FunctionToolStrict + { + /// + /// 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::tryAGI.OpenAI.FunctionToolStrict? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.FunctionToolStrict), + jsonSerializerContext) as global::tryAGI.OpenAI.FunctionToolStrict; + } + + /// + /// 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::tryAGI.OpenAI.FunctionToolStrict? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.FunctionToolStrict), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.FunctionToolStrict; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.g.cs new file mode 100644 index 00000000..834ff8d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionToolStrict.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class FunctionToolStrict + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderLabelModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderLabelModel.g.cs index 8e51b1d9..f1dd2901 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderLabelModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderLabelModel.g.cs @@ -10,18 +10,18 @@ namespace tryAGI.OpenAI public sealed partial class GraderLabelModel { /// - /// + /// The object type, which is always `label_model`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderLabelModelType Type { get; set; } /// - /// The labels to assign to each item in the evaluation. + /// The name of the grader. /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Labels { get; set; } + public required string Name { get; set; } /// /// The model to use for the evaluation. Must support structured outputs. @@ -31,25 +31,25 @@ public sealed partial class GraderLabelModel public required string Model { get; set; } /// - /// The name of the grader. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required global::System.Collections.Generic.IList Input { get; set; } /// - /// The labels that indicate a passing result. Must be a subset of labels. + /// The labels to assign to each item in the evaluation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("passing_labels")] + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList PassingLabels { get; set; } + public required global::System.Collections.Generic.IList Labels { get; set; } /// - /// The object type, which is always `label_model`. + /// The labels that indicate a passing result. Must be a subset of labels. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderLabelModelTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderLabelModelType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("passing_labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList PassingLabels { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,37 +60,37 @@ public sealed partial class GraderLabelModel /// /// Initializes a new instance of the class. /// - /// - /// - /// The labels to assign to each item in the evaluation. + /// + /// The object type, which is always `label_model`. + /// + /// + /// The name of the grader. /// /// /// The model to use for the evaluation. Must support structured outputs. /// - /// - /// The name of the grader. + /// + /// + /// The labels to assign to each item in the evaluation. /// /// /// The labels that indicate a passing result. Must be a subset of labels. /// - /// - /// The object type, which is always `label_model`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderLabelModel( + string name, + string model, global::System.Collections.Generic.IList input, global::System.Collections.Generic.IList labels, - string model, - string name, global::System.Collections.Generic.IList passingLabels, global::tryAGI.OpenAI.GraderLabelModelType type) { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.PassingLabels = passingLabels ?? throw new global::System.ArgumentNullException(nameof(passingLabels)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderMulti.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderMulti.g.cs index 694a2625..d4fdf6e5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderMulti.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderMulti.g.cs @@ -11,35 +11,35 @@ namespace tryAGI.OpenAI public sealed partial class GraderMulti { /// - /// A formula to calculate the output based on grader results. + /// The object type, which is always `multi`.
+ /// Default Value: multi ///
- [global::System.Text.Json.Serialization.JsonPropertyName("calculate_output")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CalculateOutput { get; set; } + /// global::tryAGI.OpenAI.GraderMultiType.Multi + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderMultiTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderMultiType Type { get; set; } = global::tryAGI.OpenAI.GraderMultiType.Multi; /// - /// + /// The name of the grader. /// - [global::System.Text.Json.Serialization.JsonPropertyName("graders")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Graders { get; set; } + public required string Name { get; set; } /// - /// The name of the grader. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("graders")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required global::tryAGI.OpenAI.OneOf Graders { get; set; } /// - /// The object type, which is always `multi`.
- /// Default Value: multi + /// A formula to calculate the output based on grader results. ///
- /// global::tryAGI.OpenAI.GraderMultiType.Multi - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderMultiTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderMultiType Type { get; set; } = global::tryAGI.OpenAI.GraderMultiType.Multi; + [global::System.Text.Json.Serialization.JsonPropertyName("calculate_output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CalculateOutput { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -50,29 +50,29 @@ public sealed partial class GraderMulti /// /// Initializes a new instance of the class. /// - /// - /// A formula to calculate the output based on grader results. + /// + /// The object type, which is always `multi`.
+ /// Default Value: multi /// - /// /// /// The name of the grader. /// - /// - /// The object type, which is always `multi`.
- /// Default Value: multi + /// + /// + /// A formula to calculate the output based on grader results. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderMulti( - string calculateOutput, - global::tryAGI.OpenAI.AnyOf graders, string name, + global::tryAGI.OpenAI.OneOf graders, + string calculateOutput, global::tryAGI.OpenAI.GraderMultiType type = global::tryAGI.OpenAI.GraderMultiType.Multi) { - this.CalculateOutput = calculateOutput ?? throw new global::System.ArgumentNullException(nameof(calculateOutput)); - this.Graders = graders; this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Graders = graders; + this.CalculateOutput = calculateOutput ?? throw new global::System.ArgumentNullException(nameof(calculateOutput)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderPython.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderPython.g.cs index 0654e6cd..a18c4c75 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderPython.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderPython.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class GraderPython { /// - /// The image tag to use for the python script. + /// The object type, which is always `python`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_tag")] - public string? ImageTag { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderPythonTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderPythonType Type { get; set; } /// /// The name of the grader. @@ -29,11 +30,10 @@ public sealed partial class GraderPython public required string Source { get; set; } /// - /// The object type, which is always `python`. + /// The image tag to use for the python script. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderPythonTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderPythonType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("image_tag")] + public string? ImageTag { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,8 +44,8 @@ public sealed partial class GraderPython /// /// Initializes a new instance of the class. /// - /// - /// The image tag to use for the python script. + /// + /// The object type, which is always `python`. /// /// /// The name of the grader. @@ -53,8 +53,8 @@ public sealed partial class GraderPython /// /// The source code of the python script. /// - /// - /// The object type, which is always `python`. + /// + /// The image tag to use for the python script. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -62,13 +62,13 @@ public sealed partial class GraderPython public GraderPython( string name, string source, - string? imageTag, - global::tryAGI.OpenAI.GraderPythonType type) + global::tryAGI.OpenAI.GraderPythonType type, + string? imageTag) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); - this.ImageTag = imageTag; this.Type = type; + this.ImageTag = imageTag; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModel.g.cs index e0b44616..d3973471 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModel.g.cs @@ -9,18 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class GraderScoreModel { /// - /// The input text. This may include template strings. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Input { get; set; } - - /// - /// The model to use for the evaluation. + /// The object type, which is always `score_model`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderScoreModelTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderScoreModelType Type { get; set; } /// /// The name of the grader. @@ -30,10 +23,11 @@ public sealed partial class GraderScoreModel public required string Name { get; set; } /// - /// The range of the score. Defaults to `[0, 1]`. + /// The model to use for the evaluation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("range")] - public global::System.Collections.Generic.IList? Range { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } /// /// The sampling parameters for the model. @@ -42,11 +36,17 @@ public sealed partial class GraderScoreModel public global::tryAGI.OpenAI.GraderScoreModelSamplingParams? SamplingParams { get; set; } /// - /// The object type, which is always `score_model`. + /// The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderScoreModelTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderScoreModelType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Input { get; set; } + + /// + /// The range of the score. Defaults to `[0, 1]`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("range")] + public global::System.Collections.Generic.IList? Range { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,41 +57,41 @@ public sealed partial class GraderScoreModel /// /// Initializes a new instance of the class. /// - /// - /// The input text. This may include template strings. - /// - /// - /// The model to use for the evaluation. + /// + /// The object type, which is always `score_model`. /// /// /// The name of the grader. /// - /// - /// The range of the score. Defaults to `[0, 1]`. + /// + /// The model to use for the evaluation. /// /// /// The sampling parameters for the model. /// - /// - /// The object type, which is always `score_model`. + /// + /// The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings. + /// + /// + /// The range of the score. Defaults to `[0, 1]`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderScoreModel( - global::System.Collections.Generic.IList input, - string model, string name, - global::System.Collections.Generic.IList? range, + string model, + global::System.Collections.Generic.IList input, + global::tryAGI.OpenAI.GraderScoreModelType type, global::tryAGI.OpenAI.GraderScoreModelSamplingParams? samplingParams, - global::tryAGI.OpenAI.GraderScoreModelType type) + global::System.Collections.Generic.IList? range) { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Range = range; - this.SamplingParams = samplingParams; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Type = type; + this.SamplingParams = samplingParams; + this.Range = range; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParams.g.cs index e5b9ef7c..50004183 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParams.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParams.g.cs @@ -9,43 +9,34 @@ namespace tryAGI.OpenAI public sealed partial class GraderScoreModelSamplingParams { /// - /// The maximum number of tokens the grader model may generate in its response. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completions_tokens")] - public int? MaxCompletionsTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } /// - /// A seed value to initialize the randomness, during sampling. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("seed")] - public int? Seed { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// A higher temperature increases randomness in the outputs. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_completions_tokens")] + public int? MaxCompletionsTokens { get; set; } /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,43 +47,26 @@ public sealed partial class GraderScoreModelSamplingParams /// /// Initializes a new instance of the class. /// - /// - /// The maximum number of tokens the grader model may generate in its response. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// A seed value to initialize the randomness, during sampling. - /// - /// - /// A higher temperature increases randomness in the outputs. - /// - /// - /// An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
- /// Default Value: 1
- /// Example: 1 - /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderScoreModelSamplingParams( - int? maxCompletionsTokens, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, int? seed, + double? topP, double? temperature, - double? topP) + int? maxCompletionsTokens, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort) { - this.MaxCompletionsTokens = maxCompletionsTokens; - this.ReasoningEffort = reasoningEffort; this.Seed = seed; - this.Temperature = temperature; this.TopP = topP; + this.Temperature = temperature; + this.MaxCompletionsTokens = maxCompletionsTokens; + this.ReasoningEffort = reasoningEffort; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.Json.g.cs new file mode 100644 index 00000000..871617a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GraderScoreModelSamplingParamsMaxCompletionsTokens + { + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens), + jsonSerializerContext) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens; + } + + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsMaxCompletionsTokens; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.g.cs new file mode 100644 index 00000000..328a26a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsMaxCompletionsTokens.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class GraderScoreModelSamplingParamsMaxCompletionsTokens + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.Json.g.cs new file mode 100644 index 00000000..57bbcc8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GraderScoreModelSamplingParamsSeed + { + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed), + jsonSerializerContext) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed; + } + + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsSeed; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.g.cs new file mode 100644 index 00000000..62a6fdfb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsSeed.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class GraderScoreModelSamplingParamsSeed + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.Json.g.cs new file mode 100644 index 00000000..a367b63b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GraderScoreModelSamplingParamsTemperature + { + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature; + } + + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.g.cs new file mode 100644 index 00000000..fa46556a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class GraderScoreModelSamplingParamsTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.Json.g.cs new file mode 100644 index 00000000..c7524e00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GraderScoreModelSamplingParamsTopP + { + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP; + } + + /// + /// 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::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GraderScoreModelSamplingParamsTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.g.cs new file mode 100644 index 00000000..ed401aa3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParamsTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class GraderScoreModelSamplingParamsTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderStringCheck.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderStringCheck.g.cs index 6f38cbb2..d6851cf6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderStringCheck.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderStringCheck.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class GraderStringCheck { /// - /// The input text. This may include template strings. + /// The object type, which is always `string_check`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderStringCheckType Type { get; set; } /// /// The name of the grader. @@ -23,12 +23,11 @@ public sealed partial class GraderStringCheck public required string Name { get; set; } /// - /// The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. + /// The input text. This may include template strings. /// - [global::System.Text.Json.Serialization.JsonPropertyName("operation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.GraderStringCheckOperation Operation { get; set; } + public required string Input { get; set; } /// /// The reference text. This may include template strings. @@ -38,11 +37,12 @@ public sealed partial class GraderStringCheck public required string Reference { get; set; } /// - /// The object type, which is always `string_check`. + /// The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderStringCheckType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderStringCheckOperationJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.GraderStringCheckOperation Operation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,35 +53,35 @@ public sealed partial class GraderStringCheck /// /// Initializes a new instance of the class. /// - /// - /// The input text. This may include template strings. + /// + /// The object type, which is always `string_check`. /// /// /// The name of the grader. /// - /// - /// The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. + /// + /// The input text. This may include template strings. /// /// /// The reference text. This may include template strings. /// - /// - /// The object type, which is always `string_check`. + /// + /// The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderStringCheck( - string input, string name, - global::tryAGI.OpenAI.GraderStringCheckOperation operation, + string input, string reference, + global::tryAGI.OpenAI.GraderStringCheckOperation operation, global::tryAGI.OpenAI.GraderStringCheckType type) { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Operation = operation; + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Reference = reference ?? throw new global::System.ArgumentNullException(nameof(reference)); + this.Operation = operation; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderTextSimilarity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderTextSimilarity.g.cs index 1cadb396..394f2cdb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderTextSimilarity.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderTextSimilarity.g.cs @@ -9,28 +9,27 @@ namespace tryAGI.OpenAI public sealed partial class GraderTextSimilarity { /// - /// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,
- /// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,
- /// or `rouge_l`. + /// The type of grader.
+ /// Default Value: text_similarity ///
- [global::System.Text.Json.Serialization.JsonPropertyName("evaluation_metric")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric EvaluationMetric { get; set; } + /// global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityTypeJsonConverter))] + public global::tryAGI.OpenAI.GraderTextSimilarityType Type { get; set; } = global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity; /// - /// The text being graded. + /// The name of the grader. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { get; set; } + public required string Name { get; set; } /// - /// The name of the grader. + /// The text being graded. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string Input { get; set; } /// /// The text being graded against. @@ -40,13 +39,14 @@ public sealed partial class GraderTextSimilarity public required string Reference { get; set; } /// - /// The type of grader.
- /// Default Value: text_similarity + /// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,
+ /// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,
+ /// or `rouge_l`. ///
- /// global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityTypeJsonConverter))] - public global::tryAGI.OpenAI.GraderTextSimilarityType Type { get; set; } = global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity; + [global::System.Text.Json.Serialization.JsonPropertyName("evaluation_metric")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric EvaluationMetric { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,38 +57,38 @@ public sealed partial class GraderTextSimilarity /// /// Initializes a new instance of the class. /// - /// - /// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,
- /// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,
- /// or `rouge_l`. - /// - /// - /// The text being graded. + /// + /// The type of grader.
+ /// Default Value: text_similarity /// /// /// The name of the grader. /// + /// + /// The text being graded. + /// /// /// The text being graded against. /// - /// - /// The type of grader.
- /// Default Value: text_similarity + /// + /// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,
+ /// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,
+ /// or `rouge_l`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public GraderTextSimilarity( - global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric evaluationMetric, - string input, string name, + string input, string reference, + global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric evaluationMetric, global::tryAGI.OpenAI.GraderTextSimilarityType type = global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity) { - this.EvaluationMetric = evaluationMetric; - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Reference = reference ?? throw new global::System.ArgumentNullException(nameof(reference)); + this.EvaluationMetric = evaluationMetric; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GrammarSyntax1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GrammarSyntax1.g.cs new file mode 100644 index 00000000..1f9be4d9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GrammarSyntax1.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum GrammarSyntax1 + { + /// + /// + /// + Lark, + /// + /// + /// + Regex, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GrammarSyntax1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GrammarSyntax1 value) + { + return value switch + { + GrammarSyntax1.Lark => "lark", + GrammarSyntax1.Regex => "regex", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GrammarSyntax1? ToEnum(string value) + { + return value switch + { + "lark" => GrammarSyntax1.Lark, + "regex" => GrammarSyntax1.Regex, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.Json.g.cs new file mode 100644 index 00000000..728bcb76 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Group + { + /// + /// 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::tryAGI.OpenAI.Group? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Group), + jsonSerializerContext) as global::tryAGI.OpenAI.Group; + } + + /// + /// 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::tryAGI.OpenAI.Group? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Group), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Group; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.g.cs new file mode 100644 index 00000000..e7c8a094 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Group.g.cs @@ -0,0 +1,95 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Summary information about a group returned in role assignment responses. + /// + public sealed partial class Group + { + /// + /// Always `group`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupObject Object { get; set; } + + /// + /// Identifier for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Display name of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Unix timestamp (in seconds) when the group was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Whether the group is managed through SCIM. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scim_managed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool ScimManaged { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `group`. + /// + /// + /// Identifier for the group. + /// + /// + /// Display name of the group. + /// + /// + /// Unix timestamp (in seconds) when the group was created. + /// + /// + /// Whether the group is managed through SCIM. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Group( + string id, + string name, + global::System.DateTimeOffset createdAt, + bool scimManaged, + global::tryAGI.OpenAI.GroupObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; + this.ScimManaged = scimManaged; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public Group() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.Json.g.cs new file mode 100644 index 00000000..95ccd5f0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupDeletedResource + { + /// + /// 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::tryAGI.OpenAI.GroupDeletedResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupDeletedResource), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupDeletedResource; + } + + /// + /// 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::tryAGI.OpenAI.GroupDeletedResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupDeletedResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupDeletedResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.g.cs new file mode 100644 index 00000000..90e1aba6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResource.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after deleting a group. + /// + public sealed partial class GroupDeletedResource + { + /// + /// Always `group.deleted`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupDeletedResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupDeletedResourceObject Object { get; set; } + + /// + /// Identifier of the deleted group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Whether the group was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `group.deleted`. + /// + /// + /// Identifier of the deleted group. + /// + /// + /// Whether the group was deleted. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupDeletedResource( + string id, + bool deleted, + global::tryAGI.OpenAI.GroupDeletedResourceObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupDeletedResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResourceObject.g.cs new file mode 100644 index 00000000..def1de95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupDeletedResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `group.deleted`. + /// + public enum GroupDeletedResourceObject + { + /// + /// + /// + GroupDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupDeletedResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupDeletedResourceObject value) + { + return value switch + { + GroupDeletedResourceObject.GroupDeleted => "group.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupDeletedResourceObject? ToEnum(string value) + { + return value switch + { + "group.deleted" => GroupDeletedResourceObject.GroupDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.Json.g.cs new file mode 100644 index 00000000..510ac201 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupListResource + { + /// + /// 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::tryAGI.OpenAI.GroupListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupListResource; + } + + /// + /// 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::tryAGI.OpenAI.GroupListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.g.cs new file mode 100644 index 00000000..3c637143 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Paginated list of organization groups. + /// + public sealed partial class GroupListResource + { + /// + /// Always `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupListResourceObject Object { get; set; } + + /// + /// Groups returned in the current page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// Whether additional groups are available when paginating. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Cursor to fetch the next page of results, or `null` if there are no more results. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Next { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `list`. + /// + /// + /// Groups returned in the current page. + /// + /// + /// Whether additional groups are available when paginating. + /// + /// + /// Cursor to fetch the next page of results, or `null` if there are no more results. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + string? next, + global::tryAGI.OpenAI.GroupListResourceObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Next = next ?? throw new global::System.ArgumentNullException(nameof(next)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.Json.g.cs new file mode 100644 index 00000000..ce3a0e6b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupListResourceNext + { + /// + /// 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::tryAGI.OpenAI.GroupListResourceNext? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupListResourceNext), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupListResourceNext; + } + + /// + /// 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::tryAGI.OpenAI.GroupListResourceNext? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupListResourceNext), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupListResourceNext; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.g.cs new file mode 100644 index 00000000..2ece1922 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceNext.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Cursor to fetch the next page of results, or `null` if there are no more results. + /// + public sealed partial class GroupListResourceNext + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceObject.g.cs new file mode 100644 index 00000000..7cf973f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `list`. + /// + public enum GroupListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupListResourceObject value) + { + return value switch + { + GroupListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => GroupListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupObject.g.cs new file mode 100644 index 00000000..8bf57ab7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `group`. + /// + public enum GroupObject + { + /// + /// + /// + Group, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupObject value) + { + return value switch + { + GroupObject.Group => "group", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupObject? ToEnum(string value) + { + return value switch + { + "group" => GroupObject.Group, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.Json.g.cs new file mode 100644 index 00000000..181ca42a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupResourceWithSuccess + { + /// + /// 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::tryAGI.OpenAI.GroupResourceWithSuccess? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupResourceWithSuccess), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupResourceWithSuccess; + } + + /// + /// 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::tryAGI.OpenAI.GroupResourceWithSuccess? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupResourceWithSuccess), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupResourceWithSuccess; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.g.cs new file mode 100644 index 00000000..5a07699a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResourceWithSuccess.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Response returned after updating a group. + /// + public sealed partial class GroupResourceWithSuccess + { + /// + /// Identifier for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Updated display name for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Unix timestamp (in seconds) when the group was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Whether the group is managed through SCIM and controlled by your identity provider. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_scim_managed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsScimManaged { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the group. + /// + /// + /// Updated display name for the group. + /// + /// + /// Unix timestamp (in seconds) when the group was created. + /// + /// + /// Whether the group is managed through SCIM and controlled by your identity provider. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupResourceWithSuccess( + string id, + string name, + global::System.DateTimeOffset createdAt, + bool isScimManaged) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; + this.IsScimManaged = isScimManaged; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupResourceWithSuccess() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.Json.g.cs new file mode 100644 index 00000000..a0975e75 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupResponse + { + /// + /// 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::tryAGI.OpenAI.GroupResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupResponse), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupResponse; + } + + /// + /// 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::tryAGI.OpenAI.GroupResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupResponse; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.g.cs new file mode 100644 index 00000000..4c9eb521 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupResponse.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Details about an organization group. + /// + public sealed partial class GroupResponse + { + /// + /// Identifier for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Display name of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Unix timestamp (in seconds) when the group was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Whether the group is managed through SCIM and controlled by your identity provider. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_scim_managed")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsScimManaged { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the group. + /// + /// + /// Display name of the group. + /// + /// + /// Unix timestamp (in seconds) when the group was created. + /// + /// + /// Whether the group is managed through SCIM and controlled by your identity provider. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupResponse( + string id, + string name, + global::System.DateTimeOffset createdAt, + bool isScimManaged) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; + this.IsScimManaged = isScimManaged; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.Json.g.cs new file mode 100644 index 00000000..833da7d3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupRoleAssignment + { + /// + /// 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::tryAGI.OpenAI.GroupRoleAssignment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupRoleAssignment), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupRoleAssignment; + } + + /// + /// 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::tryAGI.OpenAI.GroupRoleAssignment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupRoleAssignment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupRoleAssignment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.g.cs new file mode 100644 index 00000000..c55bec9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignment.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Role assignment linking a group to a role. + /// + public sealed partial class GroupRoleAssignment + { + /// + /// Always `group.role`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupRoleAssignmentObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupRoleAssignmentObject Object { get; set; } + + /// + /// Summary information about a group returned in role assignment responses. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Group Group { get; set; } + + /// + /// Details about a role that can be assigned through the public Roles API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Role 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `group.role`. + /// + /// + /// Summary information about a group returned in role assignment responses. + /// + /// + /// Details about a role that can be assigned through the public Roles API. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupRoleAssignment( + global::tryAGI.OpenAI.Group group, + global::tryAGI.OpenAI.Role role, + global::tryAGI.OpenAI.GroupRoleAssignmentObject @object) + { + this.Group = group ?? throw new global::System.ArgumentNullException(nameof(group)); + this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupRoleAssignment() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignmentObject.g.cs new file mode 100644 index 00000000..60e429cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupRoleAssignmentObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `group.role`. + /// + public enum GroupRoleAssignmentObject + { + /// + /// + /// + GroupRole, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupRoleAssignmentObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupRoleAssignmentObject value) + { + return value switch + { + GroupRoleAssignmentObject.GroupRole => "group.role", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupRoleAssignmentObject? ToEnum(string value) + { + return value switch + { + "group.role" => GroupRoleAssignmentObject.GroupRole, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.Json.g.cs new file mode 100644 index 00000000..ee94145c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupUserAssignment + { + /// + /// 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::tryAGI.OpenAI.GroupUserAssignment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupUserAssignment), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupUserAssignment; + } + + /// + /// 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::tryAGI.OpenAI.GroupUserAssignment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupUserAssignment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupUserAssignment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.g.cs new file mode 100644 index 00000000..1a125a00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignment.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after adding a user to a group. + /// + public sealed partial class GroupUserAssignment + { + /// + /// Always `group.user`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserAssignmentObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupUserAssignmentObject Object { get; set; } + + /// + /// Identifier of the user that was added. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string UserId { get; set; } + + /// + /// Identifier of the group the user was added to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GroupId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `group.user`. + /// + /// + /// Identifier of the user that was added. + /// + /// + /// Identifier of the group the user was added to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupUserAssignment( + string userId, + string groupId, + global::tryAGI.OpenAI.GroupUserAssignmentObject @object) + { + this.UserId = userId ?? throw new global::System.ArgumentNullException(nameof(userId)); + this.GroupId = groupId ?? throw new global::System.ArgumentNullException(nameof(groupId)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupUserAssignment() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignmentObject.g.cs new file mode 100644 index 00000000..c965c4f0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserAssignmentObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `group.user`. + /// + public enum GroupUserAssignmentObject + { + /// + /// + /// + GroupUser, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupUserAssignmentObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupUserAssignmentObject value) + { + return value switch + { + GroupUserAssignmentObject.GroupUser => "group.user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupUserAssignmentObject? ToEnum(string value) + { + return value switch + { + "group.user" => GroupUserAssignmentObject.GroupUser, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.Json.g.cs new file mode 100644 index 00000000..b8801d6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class GroupUserDeletedResource + { + /// + /// 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::tryAGI.OpenAI.GroupUserDeletedResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.GroupUserDeletedResource), + jsonSerializerContext) as global::tryAGI.OpenAI.GroupUserDeletedResource; + } + + /// + /// 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::tryAGI.OpenAI.GroupUserDeletedResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.GroupUserDeletedResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.GroupUserDeletedResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.g.cs new file mode 100644 index 00000000..c365c673 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResource.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after removing a user from a group. + /// + public sealed partial class GroupUserDeletedResource + { + /// + /// Always `group.user.deleted`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GroupUserDeletedResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.GroupUserDeletedResourceObject Object { get; set; } + + /// + /// Whether the group membership was removed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `group.user.deleted`. + /// + /// + /// Whether the group membership was removed. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupUserDeletedResource( + bool deleted, + global::tryAGI.OpenAI.GroupUserDeletedResourceObject @object) + { + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupUserDeletedResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResourceObject.g.cs new file mode 100644 index 00000000..42ce137b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GroupUserDeletedResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `group.user.deleted`. + /// + public enum GroupUserDeletedResourceObject + { + /// + /// + /// + GroupUserDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GroupUserDeletedResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GroupUserDeletedResourceObject value) + { + return value switch + { + GroupUserDeletedResourceObject.GroupUserDeleted => "group.user.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GroupUserDeletedResourceObject? ToEnum(string value) + { + return value switch + { + "group.user.deleted" => GroupUserDeletedResourceObject.GroupUserDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.Json.g.cs new file mode 100644 index 00000000..8f7c417a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class HistoryParam + { + /// + /// 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::tryAGI.OpenAI.HistoryParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.HistoryParam), + jsonSerializerContext) as global::tryAGI.OpenAI.HistoryParam; + } + + /// + /// 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::tryAGI.OpenAI.HistoryParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.HistoryParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.HistoryParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.g.cs new file mode 100644 index 00000000..ae966914 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HistoryParam.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls how much historical context is retained for the session. + /// + public sealed partial class HistoryParam + { + /// + /// Enables chat users to access previous ChatKit threads. Defaults to true. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { get; set; } + + /// + /// Number of recent ChatKit threads users have access to. Defaults to unlimited when unset. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("recent_threads")] + public int? RecentThreads { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Enables chat users to access previous ChatKit threads. Defaults to true. + /// + /// + /// Number of recent ChatKit threads users have access to. Defaults to unlimited when unset. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HistoryParam( + bool? enabled, + int? recentThreads) + { + this.Enabled = enabled; + this.RecentThreads = recentThreads; + } + + /// + /// Initializes a new instance of the class. + /// + public HistoryParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.Json.g.cs new file mode 100644 index 00000000..47a9e4cf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class HybridSearchOptions + { + /// + /// 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::tryAGI.OpenAI.HybridSearchOptions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.HybridSearchOptions), + jsonSerializerContext) as global::tryAGI.OpenAI.HybridSearchOptions; + } + + /// + /// 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::tryAGI.OpenAI.HybridSearchOptions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.HybridSearchOptions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.HybridSearchOptions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.g.cs new file mode 100644 index 00000000..96ecaf9e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.HybridSearchOptions.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class HybridSearchOptions + { + /// + /// The weight of the embedding in the reciprocal ranking fusion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embedding_weight")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double EmbeddingWeight { get; set; } + + /// + /// The weight of the text in the reciprocal ranking fusion. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text_weight")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double TextWeight { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The weight of the embedding in the reciprocal ranking fusion. + /// + /// + /// The weight of the text in the reciprocal ranking fusion. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HybridSearchOptions( + double embeddingWeight, + double textWeight) + { + this.EmbeddingWeight = embeddingWeight; + this.TextWeight = textWeight; + } + + /// + /// Initializes a new instance of the class. + /// + public HybridSearchOptions() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Image2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Image2.g.cs index 46268a48..5018283a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Image2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Image2.g.cs @@ -9,22 +9,22 @@ namespace tryAGI.OpenAI public sealed partial class Image2 { /// - /// The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`. + /// The base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`. /// [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] public string? B64Json { get; set; } /// - /// For `dall-e-3` only, the revised prompt that was used to generate the image. + /// When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("revised_prompt")] - public string? RevisedPrompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } /// - /// When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`. + /// For `dall-e-3` only, the revised prompt that was used to generate the image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("revised_prompt")] + public string? RevisedPrompt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -36,25 +36,25 @@ public sealed partial class Image2 /// Initializes a new instance of the class. /// /// - /// The base64-encoded JSON of the generated image. Default value for `gpt-image-1`, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`. + /// The base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if `response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`. + /// + /// + /// When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for the GPT image models. /// /// /// For `dall-e-3` only, the revised prompt that was used to generate the image. /// - /// - /// When using `dall-e-2` or `dall-e-3`, the URL of the generated image if `response_format` is set to `url` (default value). Unsupported for `gpt-image-1`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Image2( string? b64Json, - string? revisedPrompt, - string? url) + string? url, + string? revisedPrompt) { this.B64Json = b64Json; - this.RevisedPrompt = revisedPrompt; this.Url = url; + this.RevisedPrompt = revisedPrompt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageDetail.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageDetail.g.cs index d8aa957b..01259bd5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageDetail.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageDetail.g.cs @@ -20,6 +20,10 @@ public enum ImageDetail /// /// Auto, + /// + /// + /// + Original, } /// @@ -37,6 +41,7 @@ public static string ToValueString(this ImageDetail value) ImageDetail.Low => "low", ImageDetail.High => "high", ImageDetail.Auto => "auto", + ImageDetail.Original => "original", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,6 +55,7 @@ public static string ToValueString(this ImageDetail value) "low" => ImageDetail.Low, "high" => ImageDetail.High, "auto" => ImageDetail.Auto, + "original" => ImageDetail.Original, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditCompletedEvent.g.cs index 431970c5..9cc88844 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditCompletedEvent.g.cs @@ -9,19 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageEditCompletedEvent { /// - /// Base64-encoded final edited image data, suitable for rendering as an image. + /// The type of the event. Always `image_edit.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string B64Json { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageEditCompletedEventType Type { get; set; } /// - /// The background setting for the edited image. + /// Base64-encoded final edited image data, suitable for rendering as an image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventBackgroundJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditCompletedEventBackground Background { get; set; } + public required string B64Json { get; set; } /// /// The Unix timestamp when the event was created. @@ -32,12 +31,12 @@ public sealed partial class ImageEditCompletedEvent public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The output format for the edited image. + /// The size of the edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat OutputFormat { get; set; } + public required global::tryAGI.OpenAI.ImageEditCompletedEventSize Size { get; set; } /// /// The quality setting for the edited image. @@ -48,22 +47,23 @@ public sealed partial class ImageEditCompletedEvent public required global::tryAGI.OpenAI.ImageEditCompletedEventQuality Quality { get; set; } /// - /// The size of the edited image. + /// The background setting for the edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventSizeJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventBackgroundJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditCompletedEventSize Size { get; set; } + public required global::tryAGI.OpenAI.ImageEditCompletedEventBackground Background { get; set; } /// - /// The type of the event. Always `image_edit.completed`. + /// The output format for the edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageEditCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditCompletedEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat OutputFormat { get; set; } /// - /// For `gpt-image-1` only, the token usage information for the image generation. + /// For the GPT image models only, the token usage information for the image generation. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] [global::System.Text.Json.Serialization.JsonRequired] @@ -78,49 +78,49 @@ public sealed partial class ImageEditCompletedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `image_edit.completed`. + /// /// /// Base64-encoded final edited image data, suitable for rendering as an image. /// - /// - /// The background setting for the edited image. - /// /// /// The Unix timestamp when the event was created. /// - /// - /// The output format for the edited image. + /// + /// The size of the edited image. /// /// /// The quality setting for the edited image. /// - /// - /// The size of the edited image. + /// + /// The background setting for the edited image. /// - /// - /// The type of the event. Always `image_edit.completed`. + /// + /// The output format for the edited image. /// /// - /// For `gpt-image-1` only, the token usage information for the image generation. + /// For the GPT image models only, the token usage information for the image generation. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageEditCompletedEvent( string b64Json, - global::tryAGI.OpenAI.ImageEditCompletedEventBackground background, global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat outputFormat, - global::tryAGI.OpenAI.ImageEditCompletedEventQuality quality, global::tryAGI.OpenAI.ImageEditCompletedEventSize size, + global::tryAGI.OpenAI.ImageEditCompletedEventQuality quality, + global::tryAGI.OpenAI.ImageEditCompletedEventBackground background, + global::tryAGI.OpenAI.ImageEditCompletedEventOutputFormat outputFormat, global::tryAGI.OpenAI.ImagesUsage usage, global::tryAGI.OpenAI.ImageEditCompletedEventType type) { this.B64Json = b64Json ?? throw new global::System.ArgumentNullException(nameof(b64Json)); - this.Background = background; this.CreatedAt = createdAt; - this.OutputFormat = outputFormat; - this.Quality = quality; this.Size = size; + this.Quality = quality; + this.Background = background; + this.OutputFormat = outputFormat; this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditPartialImageEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditPartialImageEvent.g.cs index 8f984bbf..59c038c5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditPartialImageEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditPartialImageEvent.g.cs @@ -9,19 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageEditPartialImageEvent { /// - /// Base64-encoded partial image data, suitable for rendering as an image. + /// The type of the event. Always `image_edit.partial_image`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string B64Json { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageEditPartialImageEventType Type { get; set; } /// - /// The background setting for the requested edited image. + /// Base64-encoded partial image data, suitable for rendering as an image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventBackgroundJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditPartialImageEventBackground Background { get; set; } + public required string B64Json { get; set; } /// /// The Unix timestamp when the event was created. @@ -32,19 +31,12 @@ public sealed partial class ImageEditPartialImageEvent public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The output format for the requested edited image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventOutputFormatJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditPartialImageEventOutputFormat OutputFormat { get; set; } - - /// - /// 0-based index for the partial image (streaming). + /// The size of the requested edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required int PartialImageIndex { get; set; } + public required global::tryAGI.OpenAI.ImageEditPartialImageEventSize Size { get; set; } /// /// The quality setting for the requested edited image. @@ -55,19 +47,27 @@ public sealed partial class ImageEditPartialImageEvent public required global::tryAGI.OpenAI.ImageEditPartialImageEventQuality Quality { get; set; } /// - /// The size of the requested edited image. + /// The background setting for the requested edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventSizeJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventBackgroundJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageEditPartialImageEventSize Size { get; set; } + public required global::tryAGI.OpenAI.ImageEditPartialImageEventBackground Background { get; set; } /// - /// The type of the event. Always `image_edit.partial_image`. + /// The output format for the requested edited image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageEditPartialImageEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageEditPartialImageEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageEditPartialImageEventOutputFormat OutputFormat { get; set; } + + /// + /// 0-based index for the partial image (streaming). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int PartialImageIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -78,50 +78,50 @@ public sealed partial class ImageEditPartialImageEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `image_edit.partial_image`. + /// /// /// Base64-encoded partial image data, suitable for rendering as an image. /// - /// - /// The background setting for the requested edited image. - /// /// /// The Unix timestamp when the event was created. /// - /// - /// The output format for the requested edited image. - /// - /// - /// 0-based index for the partial image (streaming). + /// + /// The size of the requested edited image. /// /// /// The quality setting for the requested edited image. /// - /// - /// The size of the requested edited image. + /// + /// The background setting for the requested edited image. /// - /// - /// The type of the event. Always `image_edit.partial_image`. + /// + /// The output format for the requested edited image. + /// + /// + /// 0-based index for the partial image (streaming). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageEditPartialImageEvent( string b64Json, - global::tryAGI.OpenAI.ImageEditPartialImageEventBackground background, global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.ImageEditPartialImageEventSize size, + global::tryAGI.OpenAI.ImageEditPartialImageEventQuality quality, + global::tryAGI.OpenAI.ImageEditPartialImageEventBackground background, global::tryAGI.OpenAI.ImageEditPartialImageEventOutputFormat outputFormat, int partialImageIndex, - global::tryAGI.OpenAI.ImageEditPartialImageEventQuality quality, - global::tryAGI.OpenAI.ImageEditPartialImageEventSize size, global::tryAGI.OpenAI.ImageEditPartialImageEventType type) { this.B64Json = b64Json ?? throw new global::System.ArgumentNullException(nameof(b64Json)); - this.Background = background; this.CreatedAt = createdAt; + this.Size = size; + this.Quality = quality; + this.Background = background; this.OutputFormat = outputFormat; this.PartialImageIndex = partialImageIndex; - this.Quality = quality; - this.Size = size; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditStreamEvent.g.cs index 41507118..045e77bb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageEditStreamEvent.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// Emitted when a partial image is available during image editing streaming. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageEditPartialImageEvent? Partial { get; init; } + public global::tryAGI.OpenAI.ImageEditPartialImageEvent? ImageEditPartialImage { get; init; } #else - public global::tryAGI.OpenAI.ImageEditPartialImageEvent? Partial { get; } + public global::tryAGI.OpenAI.ImageEditPartialImageEvent? ImageEditPartialImage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Partial))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageEditPartialImage))] #endif - public bool IsPartial => Partial != null; + public bool IsImageEditPartialImage => ImageEditPartialImage != null; /// - /// + /// Emitted when image editing has completed and the final image is available. /// - public static implicit operator ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditPartialImageEvent value) => new ImageEditStreamEvent((global::tryAGI.OpenAI.ImageEditPartialImageEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageEditCompletedEvent? ImageEditCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ImageEditCompletedEvent? ImageEditCompleted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageEditPartialImageEvent?(ImageEditStreamEvent @this) => @this.Partial; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageEditCompleted))] +#endif + public bool IsImageEditCompleted => ImageEditCompleted != null; /// /// /// - public ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditPartialImageEvent? value) - { - Partial = value; - } + public static implicit operator ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditPartialImageEvent value) => new ImageEditStreamEvent((global::tryAGI.OpenAI.ImageEditPartialImageEvent?)value); /// - /// Emitted when image editing has completed and the final image is available. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageEditCompletedEvent? Completed { get; init; } -#else - public global::tryAGI.OpenAI.ImageEditCompletedEvent? Completed { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ImageEditPartialImageEvent?(ImageEditStreamEvent @this) => @this.ImageEditPartialImage; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Completed))] -#endif - public bool IsCompleted => Completed != null; + public ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditPartialImageEvent? value) + { + ImageEditPartialImage = value; + } /// /// @@ -69,42 +68,42 @@ public ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditPartialImageEvent? va /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageEditCompletedEvent?(ImageEditStreamEvent @this) => @this.Completed; + public static implicit operator global::tryAGI.OpenAI.ImageEditCompletedEvent?(ImageEditStreamEvent @this) => @this.ImageEditCompleted; /// /// /// public ImageEditStreamEvent(global::tryAGI.OpenAI.ImageEditCompletedEvent? value) { - Completed = value; + ImageEditCompleted = value; } /// /// /// public ImageEditStreamEvent( - global::tryAGI.OpenAI.ImageEditPartialImageEvent? partial, - global::tryAGI.OpenAI.ImageEditCompletedEvent? completed + global::tryAGI.OpenAI.ImageEditPartialImageEvent? imageEditPartialImage, + global::tryAGI.OpenAI.ImageEditCompletedEvent? imageEditCompleted ) { - Partial = partial; - Completed = completed; + ImageEditPartialImage = imageEditPartialImage; + ImageEditCompleted = imageEditCompleted; } /// /// /// public object? Object => - Completed as object ?? - Partial as object + ImageEditCompleted as object ?? + ImageEditPartialImage as object ; /// /// /// public override string? ToString() => - Partial?.ToString() ?? - Completed?.ToString() + ImageEditPartialImage?.ToString() ?? + ImageEditCompleted?.ToString() ; /// @@ -112,15 +111,15 @@ Partial as object /// public bool Validate() { - return IsPartial || IsCompleted; + return IsImageEditPartialImage || IsImageEditCompleted; } /// /// /// public TResult? Match( - global::System.Func? partial = null, - global::System.Func? completed = null, + global::System.Func? imageEditPartialImage = null, + global::System.Func? imageEditCompleted = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsPartial && partial != null) + if (IsImageEditPartialImage && imageEditPartialImage != null) { - return partial(Partial!); + return imageEditPartialImage(ImageEditPartialImage!); } - else if (IsCompleted && completed != null) + else if (IsImageEditCompleted && imageEditCompleted != null) { - return completed(Completed!); + return imageEditCompleted(ImageEditCompleted!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? partial = null, - global::System.Action? completed = null, + global::System.Action? imageEditPartialImage = null, + global::System.Action? imageEditCompleted = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsPartial) + if (IsImageEditPartialImage) { - partial?.Invoke(Partial!); + imageEditPartialImage?.Invoke(ImageEditPartialImage!); } - else if (IsCompleted) + else if (IsImageEditCompleted) { - completed?.Invoke(Completed!); + imageEditCompleted?.Invoke(ImageEditCompleted!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Partial, + ImageEditPartialImage, typeof(global::tryAGI.OpenAI.ImageEditPartialImageEvent), - Completed, + ImageEditCompleted, typeof(global::tryAGI.OpenAI.ImageEditCompletedEvent), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ImageEditStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Partial, other.Partial) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Completed, other.Completed) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageEditPartialImage, other.ImageEditPartialImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageEditCompleted, other.ImageEditCompleted) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenActionEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenActionEnum.g.cs new file mode 100644 index 00000000..c3628384 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenActionEnum.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ImageGenActionEnum + { + /// + /// + /// + Generate, + /// + /// + /// + Edit, + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ImageGenActionEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ImageGenActionEnum value) + { + return value switch + { + ImageGenActionEnum.Generate => "generate", + ImageGenActionEnum.Edit => "edit", + ImageGenActionEnum.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ImageGenActionEnum? ToEnum(string value) + { + return value switch + { + "generate" => ImageGenActionEnum.Generate, + "edit" => ImageGenActionEnum.Edit, + "auto" => ImageGenActionEnum.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenCompletedEvent.g.cs index de5c5159..4b6a55a7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenCompletedEvent.g.cs @@ -9,19 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageGenCompletedEvent { /// - /// Base64-encoded image data, suitable for rendering as an image. + /// The type of the event. Always `image_generation.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string B64Json { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageGenCompletedEventType Type { get; set; } /// - /// The background setting for the generated image. + /// Base64-encoded image data, suitable for rendering as an image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventBackgroundJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenCompletedEventBackground Background { get; set; } + public required string B64Json { get; set; } /// /// The Unix timestamp when the event was created. @@ -32,12 +31,12 @@ public sealed partial class ImageGenCompletedEvent public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The output format for the generated image. + /// The size of the generated image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat OutputFormat { get; set; } + public required global::tryAGI.OpenAI.ImageGenCompletedEventSize Size { get; set; } /// /// The quality setting for the generated image. @@ -48,22 +47,23 @@ public sealed partial class ImageGenCompletedEvent public required global::tryAGI.OpenAI.ImageGenCompletedEventQuality Quality { get; set; } /// - /// The size of the generated image. + /// The background setting for the generated image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventSizeJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventBackgroundJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenCompletedEventSize Size { get; set; } + public required global::tryAGI.OpenAI.ImageGenCompletedEventBackground Background { get; set; } /// - /// The type of the event. Always `image_generation.completed`. + /// The output format for the generated image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageGenCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenCompletedEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat OutputFormat { get; set; } /// - /// For `gpt-image-1` only, the token usage information for the image generation. + /// For the GPT image models only, the token usage information for the image generation. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] [global::System.Text.Json.Serialization.JsonRequired] @@ -78,49 +78,49 @@ public sealed partial class ImageGenCompletedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `image_generation.completed`. + /// /// /// Base64-encoded image data, suitable for rendering as an image. /// - /// - /// The background setting for the generated image. - /// /// /// The Unix timestamp when the event was created. /// - /// - /// The output format for the generated image. + /// + /// The size of the generated image. /// /// /// The quality setting for the generated image. /// - /// - /// The size of the generated image. + /// + /// The background setting for the generated image. /// - /// - /// The type of the event. Always `image_generation.completed`. + /// + /// The output format for the generated image. /// /// - /// For `gpt-image-1` only, the token usage information for the image generation. + /// For the GPT image models only, the token usage information for the image generation. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenCompletedEvent( string b64Json, - global::tryAGI.OpenAI.ImageGenCompletedEventBackground background, global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat outputFormat, - global::tryAGI.OpenAI.ImageGenCompletedEventQuality quality, global::tryAGI.OpenAI.ImageGenCompletedEventSize size, + global::tryAGI.OpenAI.ImageGenCompletedEventQuality quality, + global::tryAGI.OpenAI.ImageGenCompletedEventBackground background, + global::tryAGI.OpenAI.ImageGenCompletedEventOutputFormat outputFormat, global::tryAGI.OpenAI.ImagesUsage usage, global::tryAGI.OpenAI.ImageGenCompletedEventType type) { this.B64Json = b64Json ?? throw new global::System.ArgumentNullException(nameof(b64Json)); - this.Background = background; this.CreatedAt = createdAt; - this.OutputFormat = outputFormat; - this.Quality = quality; this.Size = size; + this.Quality = quality; + this.Background = background; + this.OutputFormat = outputFormat; this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenInputUsageDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenInputUsageDetails.g.cs index 779132f7..4c7d4c92 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenInputUsageDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenInputUsageDetails.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageGenInputUsageDetails { /// - /// The number of image tokens in the input prompt. + /// The number of text tokens in the input prompt. /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ImageTokens { get; set; } + public required int TextTokens { get; set; } /// - /// The number of text tokens in the input prompt. + /// The number of image tokens in the input prompt. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("image_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TextTokens { get; set; } + public required int ImageTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class ImageGenInputUsageDetails /// /// Initializes a new instance of the class. /// - /// - /// The number of image tokens in the input prompt. - /// /// /// The number of text tokens in the input prompt. /// + /// + /// The number of image tokens in the input prompt. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenInputUsageDetails( - int imageTokens, - int textTokens) + int textTokens, + int imageTokens) { - this.ImageTokens = imageTokens; this.TextTokens = textTokens; + this.ImageTokens = imageTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.Json.g.cs new file mode 100644 index 00000000..576f828a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageGenOutputTokensDetails + { + /// + /// 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::tryAGI.OpenAI.ImageGenOutputTokensDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageGenOutputTokensDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageGenOutputTokensDetails; + } + + /// + /// 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::tryAGI.OpenAI.ImageGenOutputTokensDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageGenOutputTokensDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageGenOutputTokensDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.g.cs new file mode 100644 index 00000000..0698cd6d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenOutputTokensDetails.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The output token details for the image generation. + /// + public sealed partial class ImageGenOutputTokensDetails + { + /// + /// The number of image output tokens generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ImageTokens { get; set; } + + /// + /// The number of text output tokens generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TextTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The number of image output tokens generated by the model. + /// + /// + /// The number of text output tokens generated by the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImageGenOutputTokensDetails( + int imageTokens, + int textTokens) + { + this.ImageTokens = imageTokens; + this.TextTokens = textTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public ImageGenOutputTokensDetails() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenPartialImageEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenPartialImageEvent.g.cs index 485bea30..248b0198 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenPartialImageEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenPartialImageEvent.g.cs @@ -9,19 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageGenPartialImageEvent { /// - /// Base64-encoded partial image data, suitable for rendering as an image. + /// The type of the event. Always `image_generation.partial_image`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string B64Json { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageGenPartialImageEventType Type { get; set; } /// - /// The background setting for the requested image. + /// Base64-encoded partial image data, suitable for rendering as an image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventBackgroundJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("b64_json")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenPartialImageEventBackground Background { get; set; } + public required string B64Json { get; set; } /// /// The Unix timestamp when the event was created. @@ -32,19 +31,12 @@ public sealed partial class ImageGenPartialImageEvent public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The output format for the requested image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventOutputFormatJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenPartialImageEventOutputFormat OutputFormat { get; set; } - - /// - /// 0-based index for the partial image (streaming). + /// The size of the requested image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required int PartialImageIndex { get; set; } + public required global::tryAGI.OpenAI.ImageGenPartialImageEventSize Size { get; set; } /// /// The quality setting for the requested image. @@ -55,19 +47,27 @@ public sealed partial class ImageGenPartialImageEvent public required global::tryAGI.OpenAI.ImageGenPartialImageEventQuality Quality { get; set; } /// - /// The size of the requested image. + /// The background setting for the requested image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventSizeJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventBackgroundJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenPartialImageEventSize Size { get; set; } + public required global::tryAGI.OpenAI.ImageGenPartialImageEventBackground Background { get; set; } /// - /// The type of the event. Always `image_generation.partial_image`. + /// The output format for the requested image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageGenPartialImageEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenPartialImageEventOutputFormatJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageGenPartialImageEventOutputFormat OutputFormat { get; set; } + + /// + /// 0-based index for the partial image (streaming). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int PartialImageIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -78,50 +78,50 @@ public sealed partial class ImageGenPartialImageEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `image_generation.partial_image`. + /// /// /// Base64-encoded partial image data, suitable for rendering as an image. /// - /// - /// The background setting for the requested image. - /// /// /// The Unix timestamp when the event was created. /// - /// - /// The output format for the requested image. - /// - /// - /// 0-based index for the partial image (streaming). + /// + /// The size of the requested image. /// /// /// The quality setting for the requested image. /// - /// - /// The size of the requested image. + /// + /// The background setting for the requested image. /// - /// - /// The type of the event. Always `image_generation.partial_image`. + /// + /// The output format for the requested image. + /// + /// + /// 0-based index for the partial image (streaming). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenPartialImageEvent( string b64Json, - global::tryAGI.OpenAI.ImageGenPartialImageEventBackground background, global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.ImageGenPartialImageEventSize size, + global::tryAGI.OpenAI.ImageGenPartialImageEventQuality quality, + global::tryAGI.OpenAI.ImageGenPartialImageEventBackground background, global::tryAGI.OpenAI.ImageGenPartialImageEventOutputFormat outputFormat, int partialImageIndex, - global::tryAGI.OpenAI.ImageGenPartialImageEventQuality quality, - global::tryAGI.OpenAI.ImageGenPartialImageEventSize size, global::tryAGI.OpenAI.ImageGenPartialImageEventType type) { this.B64Json = b64Json ?? throw new global::System.ArgumentNullException(nameof(b64Json)); - this.Background = background; this.CreatedAt = createdAt; + this.Size = size; + this.Quality = quality; + this.Background = background; this.OutputFormat = outputFormat; this.PartialImageIndex = partialImageIndex; - this.Quality = quality; - this.Size = size; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenStreamEvent.g.cs index 0ed8c0d0..77eb7350 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenStreamEvent.g.cs @@ -13,53 +13,52 @@ namespace tryAGI.OpenAI /// Emitted when a partial image is available during image generation streaming. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenPartialImageEvent? Partial { get; init; } + public global::tryAGI.OpenAI.ImageGenPartialImageEvent? ImageGenerationPartialImage { get; init; } #else - public global::tryAGI.OpenAI.ImageGenPartialImageEvent? Partial { get; } + public global::tryAGI.OpenAI.ImageGenPartialImageEvent? ImageGenerationPartialImage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Partial))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationPartialImage))] #endif - public bool IsPartial => Partial != null; + public bool IsImageGenerationPartialImage => ImageGenerationPartialImage != null; /// - /// + /// Emitted when image generation has completed and the final image is available. /// - public static implicit operator ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenPartialImageEvent value) => new ImageGenStreamEvent((global::tryAGI.OpenAI.ImageGenPartialImageEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenCompletedEvent? ImageGenerationCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenCompletedEvent? ImageGenerationCompleted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenPartialImageEvent?(ImageGenStreamEvent @this) => @this.Partial; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCompleted))] +#endif + public bool IsImageGenerationCompleted => ImageGenerationCompleted != null; /// /// /// - public ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenPartialImageEvent? value) - { - Partial = value; - } + public static implicit operator ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenPartialImageEvent value) => new ImageGenStreamEvent((global::tryAGI.OpenAI.ImageGenPartialImageEvent?)value); /// - /// Emitted when image generation has completed and the final image is available. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenCompletedEvent? Completed { get; init; } -#else - public global::tryAGI.OpenAI.ImageGenCompletedEvent? Completed { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ImageGenPartialImageEvent?(ImageGenStreamEvent @this) => @this.ImageGenerationPartialImage; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Completed))] -#endif - public bool IsCompleted => Completed != null; + public ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenPartialImageEvent? value) + { + ImageGenerationPartialImage = value; + } /// /// @@ -69,42 +68,42 @@ public ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenPartialImageEvent? valu /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenCompletedEvent?(ImageGenStreamEvent @this) => @this.Completed; + public static implicit operator global::tryAGI.OpenAI.ImageGenCompletedEvent?(ImageGenStreamEvent @this) => @this.ImageGenerationCompleted; /// /// /// public ImageGenStreamEvent(global::tryAGI.OpenAI.ImageGenCompletedEvent? value) { - Completed = value; + ImageGenerationCompleted = value; } /// /// /// public ImageGenStreamEvent( - global::tryAGI.OpenAI.ImageGenPartialImageEvent? partial, - global::tryAGI.OpenAI.ImageGenCompletedEvent? completed + global::tryAGI.OpenAI.ImageGenPartialImageEvent? imageGenerationPartialImage, + global::tryAGI.OpenAI.ImageGenCompletedEvent? imageGenerationCompleted ) { - Partial = partial; - Completed = completed; + ImageGenerationPartialImage = imageGenerationPartialImage; + ImageGenerationCompleted = imageGenerationCompleted; } /// /// /// public object? Object => - Completed as object ?? - Partial as object + ImageGenerationCompleted as object ?? + ImageGenerationPartialImage as object ; /// /// /// public override string? ToString() => - Partial?.ToString() ?? - Completed?.ToString() + ImageGenerationPartialImage?.ToString() ?? + ImageGenerationCompleted?.ToString() ; /// @@ -112,15 +111,15 @@ Partial as object /// public bool Validate() { - return IsPartial || IsCompleted; + return IsImageGenerationPartialImage || IsImageGenerationCompleted; } /// /// /// public TResult? Match( - global::System.Func? partial = null, - global::System.Func? completed = null, + global::System.Func? imageGenerationPartialImage = null, + global::System.Func? imageGenerationCompleted = null, bool validate = true) { if (validate) @@ -128,13 +127,13 @@ public bool Validate() Validate(); } - if (IsPartial && partial != null) + if (IsImageGenerationPartialImage && imageGenerationPartialImage != null) { - return partial(Partial!); + return imageGenerationPartialImage(ImageGenerationPartialImage!); } - else if (IsCompleted && completed != null) + else if (IsImageGenerationCompleted && imageGenerationCompleted != null) { - return completed(Completed!); + return imageGenerationCompleted(ImageGenerationCompleted!); } return default(TResult); @@ -144,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? partial = null, - global::System.Action? completed = null, + global::System.Action? imageGenerationPartialImage = null, + global::System.Action? imageGenerationCompleted = null, bool validate = true) { if (validate) @@ -153,13 +152,13 @@ public void Match( Validate(); } - if (IsPartial) + if (IsImageGenerationPartialImage) { - partial?.Invoke(Partial!); + imageGenerationPartialImage?.Invoke(ImageGenerationPartialImage!); } - else if (IsCompleted) + else if (IsImageGenerationCompleted) { - completed?.Invoke(Completed!); + imageGenerationCompleted?.Invoke(ImageGenerationCompleted!); } } @@ -170,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Partial, + ImageGenerationPartialImage, typeof(global::tryAGI.OpenAI.ImageGenPartialImageEvent), - Completed, + ImageGenerationCompleted, typeof(global::tryAGI.OpenAI.ImageGenCompletedEvent), }; const int offset = unchecked((int)2166136261); @@ -190,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ImageGenStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Partial, other.Partial) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Completed, other.Completed) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationPartialImage, other.ImageGenerationPartialImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCompleted, other.ImageGenerationCompleted) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenTool.g.cs index 65202c47..ce7ac471 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenTool.g.cs @@ -1,54 +1,55 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI { /// - /// A tool that generates images using a model like `gpt-image-1`. + /// A tool that generates images using the GPT image models. /// public sealed partial class ImageGenTool { /// - /// Background type for the generated image. One of `transparent`,
- /// `opaque`, or `auto`. Default: `auto`.
- /// Default Value: auto + /// The type of the image generation tool. Always `image_generation`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolBackground? Background { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolType Type { get; set; } /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_fidelity")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageInputFidelityJsonConverter))] - public global::tryAGI.OpenAI.ImageInputFidelity? InputFidelity { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } /// - /// Optional mask for inpainting. Contains `image_url`
- /// (string, optional) and `file_id` (string, optional). + /// The quality of the generated image. One of `low`, `medium`, `high`,
+ /// or `auto`. Default: `auto`.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_image_mask")] - public global::tryAGI.OpenAI.ImageGenToolInputImageMask? InputImageMask { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("quality")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolQuality? Quality { get; set; } /// - /// The image generation model to use. Default: `gpt-image-1`.
- /// Default Value: gpt-image-1 + /// The size of the generated image. One of `1024x1024`, `1024x1536`,
+ /// `1536x1024`, or `auto`. Default: `auto`.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModelJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolModel? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolSize? Size { get; set; } /// - /// Moderation level for the generated image. Default: `auto`.
- /// Default Value: auto + /// The output format of the generated image. One of `png`, `webp`, or
+ /// `jpeg`. Default: `png`.
+ /// Default Value: png ///
- [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolModeration? Moderation { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolOutputFormat? OutputFormat { get; set; } /// /// Compression level for the output image. Default: 100.
@@ -58,45 +59,48 @@ public sealed partial class ImageGenTool public int? OutputCompression { get; set; } /// - /// The output format of the generated image. One of `png`, `webp`, or
- /// `jpeg`. Default: `png`.
- /// Default Value: png + /// Moderation level for the generated image. Default: `auto`.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolOutputFormatJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolOutputFormat? OutputFormat { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("moderation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolModerationJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolModeration? Moderation { get; set; } /// - /// Number of partial images to generate in streaming mode, from 0 (default value) to 3.
- /// Default Value: 0 + /// Background type for the generated image. One of `transparent`,
+ /// `opaque`, or `auto`. Default: `auto`.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] - public int? PartialImages { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolBackgroundJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolBackground? Background { get; set; } /// - /// The quality of the generated image. One of `low`, `medium`, `high`,
- /// or `auto`. Default: `auto`.
- /// Default Value: auto + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("quality")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolQualityJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolQuality? Quality { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_fidelity")] + public global::tryAGI.OpenAI.InputFidelity? InputFidelity { get; set; } /// - /// The size of the generated image. One of `1024x1024`, `1024x1536`,
- /// `1536x1024`, or `auto`. Default: `auto`.
- /// Default Value: auto + /// Optional mask for inpainting. Contains `image_url`
+ /// (string, optional) and `file_id` (string, optional). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolSizeJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolSize? Size { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_image_mask")] + public global::tryAGI.OpenAI.ImageGenToolInputImageMask? InputImageMask { get; set; } /// - /// The type of the image generation tool. Always `image_generation`. + /// Number of partial images to generate in streaming mode, from 0 (default value) to 3.
+ /// Default Value: 0 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("partial_images")] + public int? PartialImages { get; set; } + + /// + /// Whether to generate a new image or edit an existing image. Default: `auto`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenActionEnumJsonConverter))] + public global::tryAGI.OpenAI.ImageGenActionEnum? Action { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -107,82 +111,79 @@ public sealed partial class ImageGenTool /// /// Initializes a new instance of the class. /// - /// - /// Background type for the generated image. One of `transparent`,
- /// `opaque`, or `auto`. Default: `auto`.
+ /// + /// The type of the image generation tool. Always `image_generation`. + /// + /// + /// + /// The quality of the generated image. One of `low`, `medium`, `high`,
+ /// or `auto`. Default: `auto`.
/// Default Value: auto /// - /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low + /// + /// The size of the generated image. One of `1024x1024`, `1024x1536`,
+ /// `1536x1024`, or `auto`. Default: `auto`.
+ /// Default Value: auto /// - /// - /// Optional mask for inpainting. Contains `image_url`
- /// (string, optional) and `file_id` (string, optional). + /// + /// The output format of the generated image. One of `png`, `webp`, or
+ /// `jpeg`. Default: `png`.
+ /// Default Value: png /// - /// - /// The image generation model to use. Default: `gpt-image-1`.
- /// Default Value: gpt-image-1 + /// + /// Compression level for the output image. Default: 100.
+ /// Default Value: 100 /// /// /// Moderation level for the generated image. Default: `auto`.
/// Default Value: auto /// - /// - /// Compression level for the output image. Default: 100.
- /// Default Value: 100 + /// + /// Background type for the generated image. One of `transparent`,
+ /// `opaque`, or `auto`. Default: `auto`.
+ /// Default Value: auto /// - /// - /// The output format of the generated image. One of `png`, `webp`, or
- /// `jpeg`. Default: `png`.
- /// Default Value: png + /// + /// + /// Optional mask for inpainting. Contains `image_url`
+ /// (string, optional) and `file_id` (string, optional). /// /// /// Number of partial images to generate in streaming mode, from 0 (default value) to 3.
/// Default Value: 0 /// - /// - /// The quality of the generated image. One of `low`, `medium`, `high`,
- /// or `auto`. Default: `auto`.
- /// Default Value: auto - /// - /// - /// The size of the generated image. One of `1024x1024`, `1024x1536`,
- /// `1536x1024`, or `auto`. Default: `auto`.
- /// Default Value: auto - /// - /// - /// The type of the image generation tool. Always `image_generation`. + /// + /// Whether to generate a new image or edit an existing image. Default: `auto`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenTool( + global::tryAGI.OpenAI.ImageGenToolType type, + global::tryAGI.OpenAI.AnyOf? model, + global::tryAGI.OpenAI.ImageGenToolQuality? quality, + global::tryAGI.OpenAI.ImageGenToolSize? size, + global::tryAGI.OpenAI.ImageGenToolOutputFormat? outputFormat, + int? outputCompression, + global::tryAGI.OpenAI.ImageGenToolModeration? moderation, global::tryAGI.OpenAI.ImageGenToolBackground? background, - global::tryAGI.OpenAI.ImageInputFidelity? inputFidelity, + global::tryAGI.OpenAI.InputFidelity? inputFidelity, global::tryAGI.OpenAI.ImageGenToolInputImageMask? inputImageMask, - global::tryAGI.OpenAI.ImageGenToolModel? model, - global::tryAGI.OpenAI.ImageGenToolModeration? moderation, - int? outputCompression, - global::tryAGI.OpenAI.ImageGenToolOutputFormat? outputFormat, int? partialImages, - global::tryAGI.OpenAI.ImageGenToolQuality? quality, - global::tryAGI.OpenAI.ImageGenToolSize? size, - global::tryAGI.OpenAI.ImageGenToolType type) + global::tryAGI.OpenAI.ImageGenActionEnum? action) { + this.Type = type; + this.Model = model; + this.Quality = quality; + this.Size = size; + this.OutputFormat = outputFormat; + this.OutputCompression = outputCompression; + this.Moderation = moderation; this.Background = background; this.InputFidelity = inputFidelity; this.InputImageMask = inputImageMask; - this.Model = model; - this.Moderation = moderation; - this.OutputCompression = outputCompression; - this.OutputFormat = outputFormat; this.PartialImages = partialImages; - this.Quality = quality; - this.Size = size; - this.Type = type; + this.Action = action; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolBackground.g.cs index 1216e4aa..d6d0087d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolBackground.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolBackground.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Background type for the generated image. One of `transparent`,
+ /// Background type for the generated image. One of `transparent`,
/// `opaque`, or `auto`. Default: `auto`.
/// Default Value: auto ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCall.g.cs index 953ba959..85ae4eaa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCall.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImageGenToolCall { /// - /// The unique ID of the image generation call. + /// The type of the image generation call. Always `image_generation_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.ImageGenToolCallType Type { get; set; } /// - /// The generated image encoded in base64. + /// The unique ID of the image generation call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("result")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? Result { get; set; } + public required string Id { get; set; } /// /// The status of the image generation call. @@ -31,11 +31,11 @@ public sealed partial class ImageGenToolCall public required global::tryAGI.OpenAI.ImageGenToolCallStatus Status { get; set; } /// - /// The type of the image generation call. Always `image_generation_call`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageGenToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.ImageGenToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("result")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -46,30 +46,28 @@ public sealed partial class ImageGenToolCall /// /// Initializes a new instance of the class. /// + /// + /// The type of the image generation call. Always `image_generation_call`. + /// /// /// The unique ID of the image generation call. /// - /// - /// The generated image encoded in base64. - /// /// /// The status of the image generation call. /// - /// - /// The type of the image generation call. Always `image_generation_call`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenToolCall( string id, - string? result, global::tryAGI.OpenAI.ImageGenToolCallStatus status, + string? result, global::tryAGI.OpenAI.ImageGenToolCallType type) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); this.Status = status; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.Json.g.cs new file mode 100644 index 00000000..45fc908b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageGenToolCallResult + { + /// + /// 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::tryAGI.OpenAI.ImageGenToolCallResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageGenToolCallResult), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageGenToolCallResult; + } + + /// + /// 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::tryAGI.OpenAI.ImageGenToolCallResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageGenToolCallResult), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageGenToolCallResult; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.g.cs new file mode 100644 index 00000000..36a7a1a6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolCallResult.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ImageGenToolCallResult + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.Json.g.cs new file mode 100644 index 00000000..cfac9ea7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageGenToolInputFidelity + { + /// + /// 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::tryAGI.OpenAI.ImageGenToolInputFidelity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageGenToolInputFidelity), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageGenToolInputFidelity; + } + + /// + /// 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::tryAGI.OpenAI.ImageGenToolInputFidelity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageGenToolInputFidelity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageGenToolInputFidelity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.g.cs new file mode 100644 index 00000000..f761924d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputFidelity.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ImageGenToolInputFidelity + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputImageMask.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputImageMask.g.cs index 578834cd..1ba5914c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputImageMask.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolInputImageMask.g.cs @@ -4,23 +4,23 @@ namespace tryAGI.OpenAI { /// - /// Optional mask for inpainting. Contains `image_url`
+ /// Optional mask for inpainting. Contains `image_url`
/// (string, optional) and `file_id` (string, optional). ///
public sealed partial class ImageGenToolInputImageMask { - /// - /// File ID for the mask image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - /// /// Base64-encoded mask image. /// [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] public string? ImageUrl { get; set; } + /// + /// File ID for the mask image. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +30,21 @@ public sealed partial class ImageGenToolInputImageMask /// /// Initializes a new instance of the class. /// - /// - /// File ID for the mask image. - /// /// /// Base64-encoded mask image. /// + /// + /// File ID for the mask image. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenToolInputImageMask( - string? fileId, - string? imageUrl) + string? imageUrl, + string? fileId) { - this.FileId = fileId; this.ImageUrl = imageUrl; + this.FileId = fileId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolModel.g.cs index 2d07cb22..0bba3c89 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolModel.g.cs @@ -13,6 +13,14 @@ public enum ImageGenToolModel /// `gpt-image-1`. /// GptImage1, + /// + /// + /// + GptImage1Mini, + /// + /// + /// + GptImage15, } /// @@ -28,6 +36,8 @@ public static string ToValueString(this ImageGenToolModel value) return value switch { ImageGenToolModel.GptImage1 => "gpt-image-1", + ImageGenToolModel.GptImage1Mini => "gpt-image-1-mini", + ImageGenToolModel.GptImage15 => "gpt-image-1.5", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -39,6 +49,8 @@ public static string ToValueString(this ImageGenToolModel value) return value switch { "gpt-image-1" => ImageGenToolModel.GptImage1, + "gpt-image-1-mini" => ImageGenToolModel.GptImage1Mini, + "gpt-image-1.5" => ImageGenToolModel.GptImage15, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolOutputFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolOutputFormat.g.cs index 620238f9..3e9f4d3d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolOutputFormat.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolOutputFormat.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The output format of the generated image. One of `png`, `webp`, or
+ /// The output format of the generated image. One of `png`, `webp`, or
/// `jpeg`. Default: `png`.
/// Default Value: png ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolQuality.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolQuality.g.cs index 1635944a..1f2c80c5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolQuality.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolQuality.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The quality of the generated image. One of `low`, `medium`, `high`,
+ /// The quality of the generated image. One of `low`, `medium`, `high`,
/// or `auto`. Default: `auto`.
/// Default Value: auto ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolSize.g.cs index 7893283a..7a7fe078 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolSize.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenToolSize.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// The size of the generated image. One of `1024x1024`, `1024x1536`,
+ /// The size of the generated image. One of `1024x1024`, `1024x1536`,
/// `1536x1024`, or `auto`. Default: `auto`.
/// Default Value: auto ///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenUsage.g.cs index c1d4a60b..ae190dc5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageGenUsage.g.cs @@ -16,11 +16,11 @@ public sealed partial class ImageGenUsage public required int InputTokens { get; set; } /// - /// The input tokens detailed information for the image generation. + /// The total number of tokens (images and text) used for the image generation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens_details")] + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageGenInputUsageDetails InputTokensDetails { get; set; } + public required int TotalTokens { get; set; } /// /// The number of output tokens generated by the model. @@ -30,11 +30,17 @@ public sealed partial class ImageGenUsage public required int OutputTokens { get; set; } /// - /// The total number of tokens (images and text) used for the image generation. + /// The output token details for the image generation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens_details")] + public global::tryAGI.OpenAI.ImageGenOutputTokensDetails? OutputTokensDetails { get; set; } + + /// + /// The input tokens detailed information for the image generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens_details")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { get; set; } + public required global::tryAGI.OpenAI.ImageGenInputUsageDetails InputTokensDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,28 +54,33 @@ public sealed partial class ImageGenUsage /// /// The number of tokens (images and text) in the input prompt. /// - /// - /// The input tokens detailed information for the image generation. + /// + /// The total number of tokens (images and text) used for the image generation. /// /// /// The number of output tokens generated by the model. /// - /// - /// The total number of tokens (images and text) used for the image generation. + /// + /// The output token details for the image generation. + /// + /// + /// The input tokens detailed information for the image generation. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImageGenUsage( int inputTokens, - global::tryAGI.OpenAI.ImageGenInputUsageDetails inputTokensDetails, + int totalTokens, int outputTokens, - int totalTokens) + global::tryAGI.OpenAI.ImageGenInputUsageDetails inputTokensDetails, + global::tryAGI.OpenAI.ImageGenOutputTokensDetails? outputTokensDetails) { this.InputTokens = inputTokens; - this.InputTokensDetails = inputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(inputTokensDetails)); - this.OutputTokens = outputTokens; this.TotalTokens = totalTokens; + this.OutputTokens = outputTokens; + this.InputTokensDetails = inputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(inputTokensDetails)); + this.OutputTokensDetails = outputTokensDetails; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageInputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageInputFidelity.g.cs deleted file mode 100644 index e41f5cca..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageInputFidelity.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Control how much effort the model will exert to match the style and features,
- /// especially facial features, of input images. This parameter is only supported
- /// for `gpt-image-1`. Supports `high` and `low`. Defaults to `low`.
- /// Default Value: low - ///
- public enum ImageInputFidelity - { - /// - /// - /// - High, - /// - /// - /// - Low, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ImageInputFidelityExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ImageInputFidelity value) - { - return value switch - { - ImageInputFidelity.High => "high", - ImageInputFidelity.Low => "low", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ImageInputFidelity? ToEnum(string value) - { - return value switch - { - "high" => ImageInputFidelity.High, - "low" => ImageInputFidelity.Low, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.Json.g.cs new file mode 100644 index 00000000..3d7b9b4b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageRefParam + { + /// + /// 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::tryAGI.OpenAI.ImageRefParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageRefParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageRefParam; + } + + /// + /// 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::tryAGI.OpenAI.ImageRefParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageRefParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageRefParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.g.cs new file mode 100644 index 00000000..cf8096dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Reference an input image by either URL or uploaded file ID.
+ /// Provide exactly one of `image_url` or `file_id`. + ///
+ public sealed partial class ImageRefParam + { + /// + /// A fully qualified URL or base64-encoded data URL.
+ /// Example: https://example.com/source-image.png + ///
+ /// https://example.com/source-image.png + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string? ImageUrl { get; set; } + + /// + /// The File API ID of an uploaded image to use as input.
+ /// Example: file-abc123 + ///
+ /// file-abc123 + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A fully qualified URL or base64-encoded data URL.
+ /// Example: https://example.com/source-image.png + /// + /// + /// The File API ID of an uploaded image to use as input.
+ /// Example: file-abc123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImageRefParam( + string? imageUrl, + string? fileId) + { + this.ImageUrl = imageUrl; + this.FileId = fileId; + } + + /// + /// Initializes a new instance of the class. + /// + public ImageRefParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.Json.g.cs new file mode 100644 index 00000000..d372366d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageRefParam2 + { + /// + /// 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::tryAGI.OpenAI.ImageRefParam2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageRefParam2), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageRefParam2; + } + + /// + /// 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::tryAGI.OpenAI.ImageRefParam2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageRefParam2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageRefParam2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.g.cs new file mode 100644 index 00000000..119e5426 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParam2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ImageRefParam2 + { + /// + /// A fully qualified URL or base64-encoded data URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string? ImageUrl { get; set; } + + /// + /// Example: file-123 + /// + /// file-123 + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A fully qualified URL or base64-encoded data URL. + /// + /// + /// Example: file-123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImageRefParam2( + string? imageUrl, + string? fileId) + { + this.ImageUrl = imageUrl; + this.FileId = fileId; + } + + /// + /// Initializes a new instance of the class. + /// + public ImageRefParam2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.Json.g.cs new file mode 100644 index 00000000..02575d78 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageRefParamVariant1 + { + /// + /// 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::tryAGI.OpenAI.ImageRefParamVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageRefParamVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageRefParamVariant1; + } + + /// + /// 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::tryAGI.OpenAI.ImageRefParamVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageRefParamVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageRefParamVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.g.cs new file mode 100644 index 00000000..419f55af --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant1.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ImageRefParamVariant1 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.Json.g.cs new file mode 100644 index 00000000..e398092a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ImageRefParamVariant2 + { + /// + /// 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::tryAGI.OpenAI.ImageRefParamVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ImageRefParamVariant2), + jsonSerializerContext) as global::tryAGI.OpenAI.ImageRefParamVariant2; + } + + /// + /// 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::tryAGI.OpenAI.ImageRefParamVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ImageRefParamVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ImageRefParamVariant2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.g.cs new file mode 100644 index 00000000..5c111ac3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageRefParamVariant2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ImageRefParamVariant2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesResponse.g.cs index d9264788..97a1f039 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesResponse.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ImagesResponse { - /// - /// The background parameter used for the image generation. Either `transparent` or `opaque`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("background")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseBackgroundJsonConverter))] - public global::tryAGI.OpenAI.ImagesResponseBackground? Background { get; set; } - /// /// The Unix timestamp (in seconds) of when the image was created. /// @@ -29,6 +22,13 @@ public sealed partial class ImagesResponse [global::System.Text.Json.Serialization.JsonPropertyName("data")] public global::System.Collections.Generic.IList? Data { get; set; } + /// + /// The background parameter used for the image generation. Either `transparent` or `opaque`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseBackgroundJsonConverter))] + public global::tryAGI.OpenAI.ImagesResponseBackground? Background { get; set; } + /// /// The output format of the image generation. Either `png`, `webp`, or `jpeg`. /// @@ -36,13 +36,6 @@ public sealed partial class ImagesResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseOutputFormatJsonConverter))] public global::tryAGI.OpenAI.ImagesResponseOutputFormat? OutputFormat { get; set; } - /// - /// The quality of the image generated. Either `low`, `medium`, or `high`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("quality")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityJsonConverter))] - public global::tryAGI.OpenAI.ImagesResponseQuality? Quality { get; set; } - /// /// The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`. /// @@ -50,6 +43,13 @@ public sealed partial class ImagesResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseSizeJsonConverter))] public global::tryAGI.OpenAI.ImagesResponseSize? Size { get; set; } + /// + /// The quality of the image generated. Either `low`, `medium`, or `high`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("quality")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImagesResponseQualityJsonConverter))] + public global::tryAGI.OpenAI.ImagesResponseQuality? Quality { get; set; } + /// /// For `gpt-image-1` only, the token usage information for the image generation. /// @@ -65,24 +65,24 @@ public sealed partial class ImagesResponse /// /// Initializes a new instance of the class. /// - /// - /// The background parameter used for the image generation. Either `transparent` or `opaque`. - /// /// /// The Unix timestamp (in seconds) of when the image was created. /// /// /// The list of generated images. /// + /// + /// The background parameter used for the image generation. Either `transparent` or `opaque`. + /// /// /// The output format of the image generation. Either `png`, `webp`, or `jpeg`. /// - /// - /// The quality of the image generated. Either `low`, `medium`, or `high`. - /// /// /// The size of the image generated. Either `1024x1024`, `1024x1536`, or `1536x1024`. /// + /// + /// The quality of the image generated. Either `low`, `medium`, or `high`. + /// /// /// For `gpt-image-1` only, the token usage information for the image generation. /// @@ -91,19 +91,19 @@ public sealed partial class ImagesResponse #endif public ImagesResponse( global::System.DateTimeOffset created, - global::tryAGI.OpenAI.ImagesResponseBackground? background, global::System.Collections.Generic.IList? data, + global::tryAGI.OpenAI.ImagesResponseBackground? background, global::tryAGI.OpenAI.ImagesResponseOutputFormat? outputFormat, - global::tryAGI.OpenAI.ImagesResponseQuality? quality, global::tryAGI.OpenAI.ImagesResponseSize? size, + global::tryAGI.OpenAI.ImagesResponseQuality? quality, global::tryAGI.OpenAI.ImageGenUsage? usage) { this.Created = created; - this.Background = background; this.Data = data; + this.Background = background; this.OutputFormat = outputFormat; - this.Quality = quality; this.Size = size; + this.Quality = quality; this.Usage = usage; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsage.g.cs index 873b4aaa..40c10d0d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsage.g.cs @@ -4,23 +4,23 @@ namespace tryAGI.OpenAI { /// - /// For `gpt-image-1` only, the token usage information for the image generation. + /// For the GPT image models only, the token usage information for the image generation. /// public sealed partial class ImagesUsage { /// - /// The number of tokens (images and text) in the input prompt. + /// The total number of tokens (images and text) used for the image generation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int InputTokens { get; set; } + public required int TotalTokens { get; set; } /// - /// The input tokens detailed information for the image generation. + /// The number of tokens (images and text) in the input prompt. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens_details")] + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImagesUsageInputTokensDetails InputTokensDetails { get; set; } + public required int InputTokens { get; set; } /// /// The number of image tokens in the output image. @@ -30,11 +30,11 @@ public sealed partial class ImagesUsage public required int OutputTokens { get; set; } /// - /// The total number of tokens (images and text) used for the image generation. + /// The input tokens detailed information for the image generation. /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens_details")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { get; set; } + public required global::tryAGI.OpenAI.ImagesUsageInputTokensDetails InputTokensDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,31 +45,31 @@ public sealed partial class ImagesUsage /// /// Initializes a new instance of the class. /// + /// + /// The total number of tokens (images and text) used for the image generation. + /// /// /// The number of tokens (images and text) in the input prompt. /// - /// - /// The input tokens detailed information for the image generation. - /// /// /// The number of image tokens in the output image. /// - /// - /// The total number of tokens (images and text) used for the image generation. + /// + /// The input tokens detailed information for the image generation. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImagesUsage( + int totalTokens, int inputTokens, - global::tryAGI.OpenAI.ImagesUsageInputTokensDetails inputTokensDetails, int outputTokens, - int totalTokens) + global::tryAGI.OpenAI.ImagesUsageInputTokensDetails inputTokensDetails) { + this.TotalTokens = totalTokens; this.InputTokens = inputTokens; - this.InputTokensDetails = inputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(inputTokensDetails)); this.OutputTokens = outputTokens; - this.TotalTokens = totalTokens; + this.InputTokensDetails = inputTokensDetails ?? throw new global::System.ArgumentNullException(nameof(inputTokensDetails)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsageInputTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsageInputTokensDetails.g.cs index 59c95dda..8fa403b4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsageInputTokensDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImagesUsageInputTokensDetails.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ImagesUsageInputTokensDetails { /// - /// The number of image tokens in the input prompt. + /// The number of text tokens in the input prompt. /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ImageTokens { get; set; } + public required int TextTokens { get; set; } /// - /// The number of text tokens in the input prompt. + /// The number of image tokens in the input prompt. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("image_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int TextTokens { get; set; } + public required int ImageTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class ImagesUsageInputTokensDetails /// /// Initializes a new instance of the class. /// - /// - /// The number of image tokens in the input prompt. - /// /// /// The number of text tokens in the input prompt. /// + /// + /// The number of image tokens in the input prompt. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ImagesUsageInputTokensDetails( - int imageTokens, - int textTokens) + int textTokens, + int imageTokens) { - this.ImageTokens = imageTokens; this.TextTokens = textTokens; + this.ImageTokens = imageTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Includable.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Includable.g.cs deleted file mode 100644 index ca4af189..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Includable.g.cs +++ /dev/null @@ -1,89 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specify additional output data to include in the model response. Currently
- /// supported values are:
- /// - `web_search_call.action.sources`: Include the sources of the web search tool call.
- /// - `code_interpreter_call.outputs`: Includes the outputs of python code execution
- /// in code interpreter tool call items.
- /// - `computer_call_output.output.image_url`: Include image urls from the computer call output.
- /// - `file_search_call.results`: Include the search results of
- /// the file search tool call.
- /// - `message.input_image.image_url`: Include image urls from the input message.
- /// - `message.output_text.logprobs`: Include logprobs with assistant messages.
- /// - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
- /// tokens in reasoning item outputs. This enables reasoning items to be used in
- /// multi-turn conversations when using the Responses API statelessly (like
- /// when the `store` parameter is set to `false`, or when an organization is
- /// enrolled in the zero data retention program). - ///
- public enum Includable - { - /// - /// Includes the outputs of python code execution - /// - CodeInterpreterCallOutputs, - /// - /// Include image urls from the computer call output. - /// - ComputerCallOutputOutputImageUrl, - /// - /// Include the search results of - /// - FileSearchCallResults, - /// - /// Include image urls from the input message. - /// - MessageInputImageImageUrl, - /// - /// Include logprobs with assistant messages. - /// - MessageOutputTextLogprobs, - /// - /// Includes an encrypted version of reasoning - /// - ReasoningEncryptedContent, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class IncludableExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this Includable value) - { - return value switch - { - Includable.CodeInterpreterCallOutputs => "code_interpreter_call.outputs", - Includable.ComputerCallOutputOutputImageUrl => "computer_call_output.output.image_url", - Includable.FileSearchCallResults => "file_search_call.results", - Includable.MessageInputImageImageUrl => "message.input_image.image_url", - Includable.MessageOutputTextLogprobs => "message.output_text.logprobs", - Includable.ReasoningEncryptedContent => "reasoning.encrypted_content", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static Includable? ToEnum(string value) - { - return value switch - { - "code_interpreter_call.outputs" => Includable.CodeInterpreterCallOutputs, - "computer_call_output.output.image_url" => Includable.ComputerCallOutputOutputImageUrl, - "file_search_call.results" => Includable.FileSearchCallResults, - "message.input_image.image_url" => Includable.MessageInputImageImageUrl, - "message.output_text.logprobs" => Includable.MessageOutputTextLogprobs, - "reasoning.encrypted_content" => Includable.ReasoningEncryptedContent, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IncludeEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IncludeEnum.g.cs new file mode 100644 index 00000000..a2a5b3e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IncludeEnum.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specify additional output data to include in the model response. Currently supported values are:
+ /// - `web_search_call.action.sources`: Include the sources of the web search tool call.
+ /// - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.
+ /// - `computer_call_output.output.image_url`: Include image urls from the computer call output.
+ /// - `file_search_call.results`: Include the search results of the file search tool call.
+ /// - `message.input_image.image_url`: Include image urls from the input message.
+ /// - `message.output_text.logprobs`: Include logprobs with assistant messages.
+ /// - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program). + ///
+ public enum IncludeEnum + { + /// + /// Include the search results of the file search tool call. + /// + FileSearchCallResults, + /// + /// + /// + WebSearchCallResults, + /// + /// Include the sources of the web search tool call. + /// + WebSearchCallActionSources, + /// + /// Include image urls from the input message. + /// + MessageInputImageImageUrl, + /// + /// Include image urls from the computer call output. + /// + ComputerCallOutputOutputImageUrl, + /// + /// Includes the outputs of python code execution in code interpreter tool call items. + /// + CodeInterpreterCallOutputs, + /// + /// Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program). + /// + ReasoningEncryptedContent, + /// + /// Include logprobs with assistant messages. + /// + MessageOutputTextLogprobs, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class IncludeEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this IncludeEnum value) + { + return value switch + { + IncludeEnum.FileSearchCallResults => "file_search_call.results", + IncludeEnum.WebSearchCallResults => "web_search_call.results", + IncludeEnum.WebSearchCallActionSources => "web_search_call.action.sources", + IncludeEnum.MessageInputImageImageUrl => "message.input_image.image_url", + IncludeEnum.ComputerCallOutputOutputImageUrl => "computer_call_output.output.image_url", + IncludeEnum.CodeInterpreterCallOutputs => "code_interpreter_call.outputs", + IncludeEnum.ReasoningEncryptedContent => "reasoning.encrypted_content", + IncludeEnum.MessageOutputTextLogprobs => "message.output_text.logprobs", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static IncludeEnum? ToEnum(string value) + { + return value switch + { + "file_search_call.results" => IncludeEnum.FileSearchCallResults, + "web_search_call.results" => IncludeEnum.WebSearchCallResults, + "web_search_call.action.sources" => IncludeEnum.WebSearchCallActionSources, + "message.input_image.image_url" => IncludeEnum.MessageInputImageImageUrl, + "computer_call_output.output.image_url" => IncludeEnum.ComputerCallOutputOutputImageUrl, + "code_interpreter_call.outputs" => IncludeEnum.CodeInterpreterCallOutputs, + "reasoning.encrypted_content" => IncludeEnum.ReasoningEncryptedContent, + "message.output_text.logprobs" => IncludeEnum.MessageOutputTextLogprobs, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.Json.g.cs new file mode 100644 index 00000000..2b7a4ef7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InferenceOptions + { + /// + /// 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::tryAGI.OpenAI.InferenceOptions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InferenceOptions), + jsonSerializerContext) as global::tryAGI.OpenAI.InferenceOptions; + } + + /// + /// 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::tryAGI.OpenAI.InferenceOptions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InferenceOptions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InferenceOptions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.g.cs new file mode 100644 index 00000000..4f60e5c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptions.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Model and tool overrides applied when generating the assistant response. + /// + public sealed partial class InferenceOptions + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ToolChoice8? ToolChoice { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Model { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InferenceOptions( + global::tryAGI.OpenAI.ToolChoice8? toolChoice, + string? model) + { + this.ToolChoice = toolChoice ?? throw new global::System.ArgumentNullException(nameof(toolChoice)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + } + + /// + /// Initializes a new instance of the class. + /// + public InferenceOptions() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.Json.g.cs new file mode 100644 index 00000000..99d3ce2e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InferenceOptionsModel + { + /// + /// 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::tryAGI.OpenAI.InferenceOptionsModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InferenceOptionsModel), + jsonSerializerContext) as global::tryAGI.OpenAI.InferenceOptionsModel; + } + + /// + /// 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::tryAGI.OpenAI.InferenceOptionsModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InferenceOptionsModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InferenceOptionsModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.g.cs new file mode 100644 index 00000000..9911dffc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InferenceOptionsModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.Json.g.cs new file mode 100644 index 00000000..e0e4a2b4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InferenceOptionsToolChoice + { + /// + /// 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::tryAGI.OpenAI.InferenceOptionsToolChoice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InferenceOptionsToolChoice), + jsonSerializerContext) as global::tryAGI.OpenAI.InferenceOptionsToolChoice; + } + + /// + /// 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::tryAGI.OpenAI.InferenceOptionsToolChoice? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InferenceOptionsToolChoice), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InferenceOptionsToolChoice; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.g.cs new file mode 100644 index 00000000..c9c6048c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InferenceOptionsToolChoice.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InferenceOptionsToolChoice + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.Json.g.cs new file mode 100644 index 00000000..e69a300e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InlineSkillParam + { + /// + /// 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::tryAGI.OpenAI.InlineSkillParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InlineSkillParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InlineSkillParam; + } + + /// + /// 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::tryAGI.OpenAI.InlineSkillParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InlineSkillParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InlineSkillParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.g.cs new file mode 100644 index 00000000..55f21c1b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParam.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InlineSkillParam + { + /// + /// Defines an inline skill for this request.
+ /// Default Value: inline + ///
+ /// global::tryAGI.OpenAI.InlineSkillParamType.Inline + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillParamTypeJsonConverter))] + public global::tryAGI.OpenAI.InlineSkillParamType Type { get; set; } = global::tryAGI.OpenAI.InlineSkillParamType.Inline; + + /// + /// The name of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The description of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Inline skill payload + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.InlineSkillSourceParam Source { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Defines an inline skill for this request.
+ /// Default Value: inline + /// + /// + /// The name of the skill. + /// + /// + /// The description of the skill. + /// + /// + /// Inline skill payload + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineSkillParam( + string name, + string description, + global::tryAGI.OpenAI.InlineSkillSourceParam source, + global::tryAGI.OpenAI.InlineSkillParamType type = global::tryAGI.OpenAI.InlineSkillParamType.Inline) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineSkillParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParamType.g.cs new file mode 100644 index 00000000..190d5653 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Defines an inline skill for this request.
+ /// Default Value: inline + ///
+ public enum InlineSkillParamType + { + /// + /// + /// + Inline, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InlineSkillParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InlineSkillParamType value) + { + return value switch + { + InlineSkillParamType.Inline => "inline", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InlineSkillParamType? ToEnum(string value) + { + return value switch + { + "inline" => InlineSkillParamType.Inline, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.Json.g.cs new file mode 100644 index 00000000..1efae521 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InlineSkillSourceParam + { + /// + /// 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::tryAGI.OpenAI.InlineSkillSourceParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InlineSkillSourceParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InlineSkillSourceParam; + } + + /// + /// 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::tryAGI.OpenAI.InlineSkillSourceParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InlineSkillSourceParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InlineSkillSourceParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.g.cs new file mode 100644 index 00000000..0d7b6141 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParam.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Inline skill payload + /// + public sealed partial class InlineSkillSourceParam + { + /// + /// The type of the inline skill source. Must be `base64`.
+ /// Default Value: base64 + ///
+ /// global::tryAGI.OpenAI.InlineSkillSourceParamType.Base64 + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamTypeJsonConverter))] + public global::tryAGI.OpenAI.InlineSkillSourceParamType Type { get; set; } = global::tryAGI.OpenAI.InlineSkillSourceParamType.Base64; + + /// + /// The media type of the inline skill payload. Must be `application/zip`.
+ /// Default Value: application/zip + ///
+ /// global::tryAGI.OpenAI.InlineSkillSourceParamMediaType.ApplicationZip + [global::System.Text.Json.Serialization.JsonPropertyName("media_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InlineSkillSourceParamMediaTypeJsonConverter))] + public global::tryAGI.OpenAI.InlineSkillSourceParamMediaType MediaType { get; set; } = global::tryAGI.OpenAI.InlineSkillSourceParamMediaType.ApplicationZip; + + /// + /// Base64-encoded skill zip bundle. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Data { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the inline skill source. Must be `base64`.
+ /// Default Value: base64 + /// + /// + /// The media type of the inline skill payload. Must be `application/zip`.
+ /// Default Value: application/zip + /// + /// + /// Base64-encoded skill zip bundle. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineSkillSourceParam( + string data, + global::tryAGI.OpenAI.InlineSkillSourceParamType type = global::tryAGI.OpenAI.InlineSkillSourceParamType.Base64, + global::tryAGI.OpenAI.InlineSkillSourceParamMediaType mediaType = global::tryAGI.OpenAI.InlineSkillSourceParamMediaType.ApplicationZip) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.Type = type; + this.MediaType = mediaType; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineSkillSourceParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamMediaType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamMediaType.g.cs new file mode 100644 index 00000000..a74d7bf1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamMediaType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The media type of the inline skill payload. Must be `application/zip`.
+ /// Default Value: application/zip + ///
+ public enum InlineSkillSourceParamMediaType + { + /// + /// + /// + ApplicationZip, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InlineSkillSourceParamMediaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InlineSkillSourceParamMediaType value) + { + return value switch + { + InlineSkillSourceParamMediaType.ApplicationZip => "application/zip", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InlineSkillSourceParamMediaType? ToEnum(string value) + { + return value switch + { + "application/zip" => InlineSkillSourceParamMediaType.ApplicationZip, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamType.g.cs new file mode 100644 index 00000000..924d5c6d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InlineSkillSourceParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the inline skill source. Must be `base64`.
+ /// Default Value: base64 + ///
+ public enum InlineSkillSourceParamType + { + /// + /// + /// + Base64, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InlineSkillSourceParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InlineSkillSourceParamType value) + { + return value switch + { + InlineSkillSourceParamType.Base64 => "base64", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InlineSkillSourceParamType? ToEnum(string value) + { + return value switch + { + "base64" => InlineSkillSourceParamType.Base64, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputAudio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputAudio.g.cs index 90dd2b2c..5b485829 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputAudio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputAudio.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class InputAudio { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_audio")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.InputAudioInputAudio1 InputAudio1 { get; set; } - /// /// The type of the input item. Always `input_audio`. /// @@ -22,6 +15,13 @@ public sealed partial class InputAudio [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputAudioTypeJsonConverter))] public global::tryAGI.OpenAI.InputAudioType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_audio")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.InputAudioInputAudio1 InputAudio1 { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class InputAudio /// /// Initializes a new instance of the class. /// - /// /// /// The type of the input item. Always `input_audio`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputContent.g.cs index 8702e2e3..2bb2daf3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputContent.g.cs @@ -13,176 +13,136 @@ namespace tryAGI.OpenAI /// A text input to the model. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputTextContent? Text { get; init; } + public global::tryAGI.OpenAI.InputTextContent? InputText { get; init; } #else - public global::tryAGI.OpenAI.InputTextContent? Text { get; } + public global::tryAGI.OpenAI.InputTextContent? InputText { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] #endif - public bool IsText => Text != null; + public bool IsInputText => InputText != null; /// - /// + /// An image input to the model. Learn about [image inputs](/docs/guides/vision). /// - public static implicit operator InputContent(global::tryAGI.OpenAI.InputTextContent value) => new InputContent((global::tryAGI.OpenAI.InputTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.InputTextContent?(InputContent @this) => @this.Text; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; init; } +#else + public global::tryAGI.OpenAI.InputImageContent? InputImage { get; } +#endif /// /// /// - public InputContent(global::tryAGI.OpenAI.InputTextContent? value) - { - Text = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] +#endif + public bool IsInputImage => InputImage != null; /// - /// An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + /// A file input to the model. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputImageContent? Image { get; init; } + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; init; } #else - public global::tryAGI.OpenAI.InputImageContent? Image { get; } + public global::tryAGI.OpenAI.InputFileContent? InputFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputFile))] #endif - public bool IsImage => Image != null; - + public bool IsInputFile => InputFile != null; /// /// /// - public static implicit operator InputContent(global::tryAGI.OpenAI.InputImageContent value) => new InputContent((global::tryAGI.OpenAI.InputImageContent?)value); + public static implicit operator InputContent(global::tryAGI.OpenAI.InputTextContent value) => new InputContent((global::tryAGI.OpenAI.InputTextContent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputImageContent?(InputContent @this) => @this.Image; + public static implicit operator global::tryAGI.OpenAI.InputTextContent?(InputContent @this) => @this.InputText; /// /// /// - public InputContent(global::tryAGI.OpenAI.InputImageContent? value) + public InputContent(global::tryAGI.OpenAI.InputTextContent? value) { - Image = value; + InputText = value; } - /// - /// A file input to the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputFileContent? File { get; init; } -#else - public global::tryAGI.OpenAI.InputFileContent? File { get; } -#endif - /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(File))] -#endif - public bool IsFile => File != null; - - /// - /// - /// - public static implicit operator InputContent(global::tryAGI.OpenAI.InputFileContent value) => new InputContent((global::tryAGI.OpenAI.InputFileContent?)value); + public static implicit operator InputContent(global::tryAGI.OpenAI.InputImageContent value) => new InputContent((global::tryAGI.OpenAI.InputImageContent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputFileContent?(InputContent @this) => @this.File; + public static implicit operator global::tryAGI.OpenAI.InputImageContent?(InputContent @this) => @this.InputImage; /// /// /// - public InputContent(global::tryAGI.OpenAI.InputFileContent? value) + public InputContent(global::tryAGI.OpenAI.InputImageContent? value) { - File = value; + InputImage = value; } - /// - /// An audio input to the model. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputAudio? Audio { get; init; } -#else - public global::tryAGI.OpenAI.InputAudio? Audio { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Audio))] -#endif - public bool IsAudio => Audio != null; - /// /// /// - public static implicit operator InputContent(global::tryAGI.OpenAI.InputAudio value) => new InputContent((global::tryAGI.OpenAI.InputAudio?)value); + public static implicit operator InputContent(global::tryAGI.OpenAI.InputFileContent value) => new InputContent((global::tryAGI.OpenAI.InputFileContent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputAudio?(InputContent @this) => @this.Audio; + public static implicit operator global::tryAGI.OpenAI.InputFileContent?(InputContent @this) => @this.InputFile; /// /// /// - public InputContent(global::tryAGI.OpenAI.InputAudio? value) + public InputContent(global::tryAGI.OpenAI.InputFileContent? value) { - Audio = value; + InputFile = value; } /// /// /// public InputContent( - global::tryAGI.OpenAI.InputTextContent? text, - global::tryAGI.OpenAI.InputImageContent? image, - global::tryAGI.OpenAI.InputFileContent? file, - global::tryAGI.OpenAI.InputAudio? audio + global::tryAGI.OpenAI.InputTextContent? inputText, + global::tryAGI.OpenAI.InputImageContent? inputImage, + global::tryAGI.OpenAI.InputFileContent? inputFile ) { - Text = text; - Image = image; - File = file; - Audio = audio; + InputText = inputText; + InputImage = inputImage; + InputFile = inputFile; } /// /// /// public object? Object => - Audio as object ?? - File as object ?? - Image as object ?? - Text as object + InputFile as object ?? + InputImage as object ?? + InputText as object ; /// /// /// public override string? ToString() => - Text?.ToString() ?? - Image?.ToString() ?? - File?.ToString() ?? - Audio?.ToString() + InputText?.ToString() ?? + InputImage?.ToString() ?? + InputFile?.ToString() ; /// @@ -190,17 +150,16 @@ Text as object /// public bool Validate() { - return IsText || IsImage || IsFile || IsAudio; + return IsInputText && !IsInputImage && !IsInputFile || !IsInputText && IsInputImage && !IsInputFile || !IsInputText && !IsInputImage && IsInputFile; } /// /// /// public TResult? Match( - global::System.Func? text = null, - global::System.Func? image = null, - global::System.Func? file = null, - global::System.Func? audio = null, + global::System.Func? inputText = null, + global::System.Func? inputImage = null, + global::System.Func? inputFile = null, bool validate = true) { if (validate) @@ -208,21 +167,17 @@ public bool Validate() Validate(); } - if (IsText && text != null) - { - return text(Text!); - } - else if (IsImage && image != null) + if (IsInputText && inputText != null) { - return image(Image!); + return inputText(InputText!); } - else if (IsFile && file != null) + else if (IsInputImage && inputImage != null) { - return file(File!); + return inputImage(InputImage!); } - else if (IsAudio && audio != null) + else if (IsInputFile && inputFile != null) { - return audio(Audio!); + return inputFile(InputFile!); } return default(TResult); @@ -232,10 +187,9 @@ public bool Validate() /// ///
public void Match( - global::System.Action? text = null, - global::System.Action? image = null, - global::System.Action? file = null, - global::System.Action? audio = null, + global::System.Action? inputText = null, + global::System.Action? inputImage = null, + global::System.Action? inputFile = null, bool validate = true) { if (validate) @@ -243,21 +197,17 @@ public void Match( Validate(); } - if (IsText) - { - text?.Invoke(Text!); - } - else if (IsImage) + if (IsInputText) { - image?.Invoke(Image!); + inputText?.Invoke(InputText!); } - else if (IsFile) + else if (IsInputImage) { - file?.Invoke(File!); + inputImage?.Invoke(InputImage!); } - else if (IsAudio) + else if (IsInputFile) { - audio?.Invoke(Audio!); + inputFile?.Invoke(InputFile!); } } @@ -268,14 +218,12 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + InputText, typeof(global::tryAGI.OpenAI.InputTextContent), - Image, + InputImage, typeof(global::tryAGI.OpenAI.InputImageContent), - File, + InputFile, typeof(global::tryAGI.OpenAI.InputFileContent), - Audio, - typeof(global::tryAGI.OpenAI.InputAudio), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -292,10 +240,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(InputContent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(File, other.File) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Audio, other.Audio) + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputFile, other.InputFile) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFidelity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFidelity.g.cs new file mode 100644 index 00000000..e5ff210c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFidelity.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + /// + public enum InputFidelity + { + /// + /// + /// + High, + /// + /// + /// + Low, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputFidelityExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputFidelity value) + { + return value switch + { + InputFidelity.High => "high", + InputFidelity.Low => "low", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputFidelity? ToEnum(string value) + { + return value switch + { + "high" => InputFidelity.High, + "low" => InputFidelity.Low, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent.g.cs index f9d261c6..edf58c36 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent.g.cs @@ -9,23 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class InputFileContent { /// - /// The content of the file to be sent to the model. + /// The type of the input item. Always `input_file`.
+ /// Default Value: input_file ///
- [global::System.Text.Json.Serialization.JsonPropertyName("file_data")] - public string? FileData { get; set; } + /// global::tryAGI.OpenAI.InputFileContentType.InputFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentTypeJsonConverter))] + public global::tryAGI.OpenAI.InputFileContentType Type { get; set; } = global::tryAGI.OpenAI.InputFileContentType.InputFile; /// - /// The ID of the file to be sent to the model. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] public string? FileId { get; set; } - /// - /// The URL of the file to be sent to the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_url")] - public string? FileUrl { get; set; } - /// /// The name of the file to be sent to the model. /// @@ -33,13 +30,23 @@ public sealed partial class InputFileContent public string? Filename { get; set; } /// - /// The type of the input item. Always `input_file`.
- /// Default Value: input_file + /// The content of the file to be sent to the model. ///
- /// global::tryAGI.OpenAI.InputFileContentType.InputFile - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentTypeJsonConverter))] - public global::tryAGI.OpenAI.InputFileContentType Type { get; set; } = global::tryAGI.OpenAI.InputFileContentType.InputFile; + [global::System.Text.Json.Serialization.JsonPropertyName("file_data")] + public string? FileData { get; set; } + + /// + /// The URL of the file to be sent to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_url")] + public string? FileUrl { get; set; } + + /// + /// The detail level of the file to be sent to the model. One of `high` or `low`. Defaults to `high`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileInputDetailJsonConverter))] + public global::tryAGI.OpenAI.FileInputDetail? Detail { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -50,37 +57,40 @@ public sealed partial class InputFileContent /// /// Initializes a new instance of the class. /// + /// + /// The type of the input item. Always `input_file`.
+ /// Default Value: input_file + /// + /// + /// + /// The name of the file to be sent to the model. + /// /// /// The content of the file to be sent to the model. /// - /// - /// The ID of the file to be sent to the model. - /// /// /// The URL of the file to be sent to the model. /// - /// - /// The name of the file to be sent to the model. - /// - /// - /// The type of the input item. Always `input_file`.
- /// Default Value: input_file + /// + /// The detail level of the file to be sent to the model. One of `high` or `low`. Defaults to `high`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public InputFileContent( - string? fileData, string? fileId, - string? fileUrl, string? filename, + string? fileData, + string? fileUrl, + global::tryAGI.OpenAI.FileInputDetail? detail, global::tryAGI.OpenAI.InputFileContentType type = global::tryAGI.OpenAI.InputFileContentType.InputFile) { - this.FileData = fileData; + this.Type = type; this.FileId = fileId; - this.FileUrl = fileUrl; this.Filename = filename; - this.Type = type; + this.FileData = fileData; + this.FileUrl = fileUrl; + this.Detail = detail; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.Json.g.cs new file mode 100644 index 00000000..9ef4d40a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentFileId + { + /// + /// 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::tryAGI.OpenAI.InputFileContentFileId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentFileId), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentFileId; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentFileId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentFileId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentFileId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.g.cs new file mode 100644 index 00000000..04da9f6c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentFileId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputFileContentFileId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.Json.g.cs new file mode 100644 index 00000000..81df5f41 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentParam + { + /// + /// 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::tryAGI.OpenAI.InputFileContentParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentParam; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.g.cs new file mode 100644 index 00000000..179d27eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParam.g.cs @@ -0,0 +1,97 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A file input to the model. + /// + public sealed partial class InputFileContentParam + { + /// + /// The type of the input item. Always `input_file`.
+ /// Default Value: input_file + ///
+ /// global::tryAGI.OpenAI.InputFileContentParamType.InputFile + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputFileContentParamTypeJsonConverter))] + public global::tryAGI.OpenAI.InputFileContentParamType Type { get; set; } = global::tryAGI.OpenAI.InputFileContentParamType.InputFile; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + public string? Filename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_data")] + public string? FileData { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_url")] + public string? FileUrl { get; set; } + + /// + /// The detail level of the file to be sent to the model. One of `high` or `low`. Defaults to `high`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FileDetailEnumJsonConverter))] + public global::tryAGI.OpenAI.FileDetailEnum? Detail { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the input item. Always `input_file`.
+ /// Default Value: input_file + /// + /// + /// + /// + /// + /// + /// The detail level of the file to be sent to the model. One of `high` or `low`. Defaults to `high`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputFileContentParam( + string? fileId, + string? filename, + string? fileData, + string? fileUrl, + global::tryAGI.OpenAI.FileDetailEnum? detail, + global::tryAGI.OpenAI.InputFileContentParamType type = global::tryAGI.OpenAI.InputFileContentParamType.InputFile) + { + this.Type = type; + this.FileId = fileId; + this.Filename = filename; + this.FileData = fileData; + this.FileUrl = fileUrl; + this.Detail = detail; + } + + /// + /// Initializes a new instance of the class. + /// + public InputFileContentParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.Json.g.cs new file mode 100644 index 00000000..9fe2944f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentParamFileData + { + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileData? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileData), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentParamFileData; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileData? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileData), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentParamFileData; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.g.cs new file mode 100644 index 00000000..e1159246 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileData.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputFileContentParamFileData + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.Json.g.cs new file mode 100644 index 00000000..9a4a90af --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentParamFileId + { + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileId), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentParamFileId; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentParamFileId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.g.cs new file mode 100644 index 00000000..49cbf38e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputFileContentParamFileId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.Json.g.cs new file mode 100644 index 00000000..b1ced758 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentParamFileUrl + { + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentParamFileUrl; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFileUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentParamFileUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentParamFileUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.g.cs new file mode 100644 index 00000000..ccfc0277 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFileUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputFileContentParamFileUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.Json.g.cs new file mode 100644 index 00000000..5e682bdc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputFileContentParamFilename + { + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFilename? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputFileContentParamFilename), + jsonSerializerContext) as global::tryAGI.OpenAI.InputFileContentParamFilename; + } + + /// + /// 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::tryAGI.OpenAI.InputFileContentParamFilename? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputFileContentParamFilename), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputFileContentParamFilename; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.g.cs new file mode 100644 index 00000000..785c934e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamFilename.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputFileContentParamFilename + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamType.g.cs new file mode 100644 index 00000000..85255e25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContentParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the input item. Always `input_file`.
+ /// Default Value: input_file + ///
+ public enum InputFileContentParamType + { + /// + /// + /// + InputFile, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputFileContentParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputFileContentParamType value) + { + return value switch + { + InputFileContentParamType.InputFile => "input_file", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputFileContentParamType? ToEnum(string value) + { + return value switch + { + "input_file" => InputFileContentParamType.InputFile, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent.g.cs index 6fa0d6bf..e5236ba0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent.g.cs @@ -4,38 +4,38 @@ namespace tryAGI.OpenAI { /// - /// An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + /// An image input to the model. Learn about [image inputs](/docs/guides/vision). /// public sealed partial class InputImageContent { /// - /// + /// The type of the input item. Always `input_image`.
+ /// Default Value: input_image ///
- [global::System.Text.Json.Serialization.JsonPropertyName("detail")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ImageDetail Detail { get; set; } + /// global::tryAGI.OpenAI.InputImageContentType.InputImage + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentTypeJsonConverter))] + public global::tryAGI.OpenAI.InputImageContentType Type { get; set; } = global::tryAGI.OpenAI.InputImageContentType.InputImage; /// - /// The ID of the file to be sent to the model. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string? ImageUrl { get; set; } /// - /// The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - public string? ImageUrl { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } /// - /// The type of the input item. Always `input_image`.
- /// Default Value: input_image + /// The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. ///
- /// global::tryAGI.OpenAI.InputImageContentType.InputImage - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentTypeJsonConverter))] - public global::tryAGI.OpenAI.InputImageContentType Type { get; set; } = global::tryAGI.OpenAI.InputImageContentType.InputImage; + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ImageDetailJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ImageDetail Detail { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -46,30 +46,28 @@ public sealed partial class InputImageContent /// /// Initializes a new instance of the class. /// - /// - /// - /// The ID of the file to be sent to the model. - /// - /// - /// The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - /// /// /// The type of the input item. Always `input_image`.
/// Default Value: input_image /// + /// + /// + /// + /// The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public InputImageContent( global::tryAGI.OpenAI.ImageDetail detail, - string? fileId, string? imageUrl, + string? fileId, global::tryAGI.OpenAI.InputImageContentType type = global::tryAGI.OpenAI.InputImageContentType.InputImage) { this.Detail = detail; - this.FileId = fileId; - this.ImageUrl = imageUrl; this.Type = type; + this.ImageUrl = imageUrl; + this.FileId = fileId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.Json.g.cs new file mode 100644 index 00000000..ae879663 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentFileId + { + /// + /// 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::tryAGI.OpenAI.InputImageContentFileId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentFileId), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentFileId; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentFileId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentFileId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentFileId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.g.cs new file mode 100644 index 00000000..5926e604 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentFileId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputImageContentFileId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.Json.g.cs new file mode 100644 index 00000000..fd3aeea0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentImageUrl + { + /// + /// 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::tryAGI.OpenAI.InputImageContentImageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentImageUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentImageUrl; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentImageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentImageUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.g.cs new file mode 100644 index 00000000..8f2993ec --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentImageUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputImageContentImageUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.Json.g.cs new file mode 100644 index 00000000..2d154c0f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentParamAutoParam + { + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentParamAutoParam; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentParamAutoParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.g.cs new file mode 100644 index 00000000..e8feff83 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParam.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An image input to the model. Learn about [image inputs](/docs/guides/vision) + /// + public sealed partial class InputImageContentParamAutoParam + { + /// + /// The type of the input item. Always `input_image`.
+ /// Default Value: input_image + ///
+ /// global::tryAGI.OpenAI.InputImageContentParamAutoParamType.InputImage + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputImageContentParamAutoParamTypeJsonConverter))] + public global::tryAGI.OpenAI.InputImageContentParamAutoParamType Type { get; set; } = global::tryAGI.OpenAI.InputImageContentParamAutoParamType.InputImage; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public string? ImageUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + public global::tryAGI.OpenAI.DetailEnum? Detail { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the input item. Always `input_image`.
+ /// Default Value: input_image + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputImageContentParamAutoParam( + string? imageUrl, + string? fileId, + global::tryAGI.OpenAI.DetailEnum? detail, + global::tryAGI.OpenAI.InputImageContentParamAutoParamType type = global::tryAGI.OpenAI.InputImageContentParamAutoParamType.InputImage) + { + this.Type = type; + this.ImageUrl = imageUrl; + this.FileId = fileId; + this.Detail = detail; + } + + /// + /// Initializes a new instance of the class. + /// + public InputImageContentParamAutoParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.Json.g.cs new file mode 100644 index 00000000..b1832a79 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentParamAutoParamDetail + { + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamDetail? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamDetail), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentParamAutoParamDetail; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamDetail? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamDetail), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentParamAutoParamDetail; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.g.cs new file mode 100644 index 00000000..95934c8b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamDetail.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputImageContentParamAutoParamDetail + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.Json.g.cs new file mode 100644 index 00000000..832b546d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentParamAutoParamFileId + { + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamFileId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamFileId), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentParamAutoParamFileId; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamFileId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamFileId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentParamAutoParamFileId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.g.cs new file mode 100644 index 00000000..aeb45670 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamFileId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputImageContentParamAutoParamFileId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.Json.g.cs new file mode 100644 index 00000000..23d35796 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputImageContentParamAutoParamImageUrl + { + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl; + } + + /// + /// 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::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputImageContentParamAutoParamImageUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.g.cs new file mode 100644 index 00000000..8a43e9ea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamImageUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class InputImageContentParamAutoParamImageUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamType.g.cs new file mode 100644 index 00000000..0f07d686 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContentParamAutoParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the input item. Always `input_image`.
+ /// Default Value: input_image + ///
+ public enum InputImageContentParamAutoParamType + { + /// + /// + /// + InputImage, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputImageContentParamAutoParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputImageContentParamAutoParamType value) + { + return value switch + { + InputImageContentParamAutoParamType.InputImage => "input_image", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputImageContentParamAutoParamType? ToEnum(string value) + { + return value switch + { + "input_image" => InputImageContentParamAutoParamType.InputImage, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputItem.g.cs index 246e10a3..9c129bf9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputItem.g.cs @@ -17,88 +17,89 @@ namespace tryAGI.OpenAI /// interactions. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EasyInputMessage? Value1 { get; init; } + public global::tryAGI.OpenAI.EasyInputMessage? Message { get; init; } #else - public global::tryAGI.OpenAI.EasyInputMessage? Value1 { get; } + public global::tryAGI.OpenAI.EasyInputMessage? Message { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] #endif - public bool IsValue1 => Value1 != null; + public bool IsMessage => Message != null; /// - /// + /// An item representing part of the context for the response to be
+ /// generated by the model. Can contain text, images, and audio inputs,
+ /// as well as previous assistant responses and tool call outputs. ///
- public static implicit operator InputItem(global::tryAGI.OpenAI.EasyInputMessage value) => new InputItem((global::tryAGI.OpenAI.EasyInputMessage?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EasyInputMessage?(InputItem @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.Item? Item { get; init; } +#else + public global::tryAGI.OpenAI.Item? Item { get; } +#endif /// /// /// - public InputItem(global::tryAGI.OpenAI.EasyInputMessage? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Item))] +#endif + public bool IsItem => Item != null; /// - /// Content item used to generate a response. + /// An internal identifier for an item to reference. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.Item? Value2 { get; init; } + public global::tryAGI.OpenAI.ItemReferenceParam? ItemReference { get; init; } #else - public global::tryAGI.OpenAI.Item? Value2 { get; } + public global::tryAGI.OpenAI.ItemReferenceParam? ItemReference { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ItemReference))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsItemReference => ItemReference != null; /// /// /// - public static implicit operator InputItem(global::tryAGI.OpenAI.Item value) => new InputItem((global::tryAGI.OpenAI.Item?)value); + public static implicit operator InputItem(global::tryAGI.OpenAI.EasyInputMessage value) => new InputItem((global::tryAGI.OpenAI.EasyInputMessage?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.Item?(InputItem @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.EasyInputMessage?(InputItem @this) => @this.Message; /// /// /// - public InputItem(global::tryAGI.OpenAI.Item? value) + public InputItem(global::tryAGI.OpenAI.EasyInputMessage? value) { - Value2 = value; + Message = value; } /// - /// An internal identifier for an item to reference. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ItemReferenceParam? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.ItemReferenceParam? Value3 { get; } -#endif + public static implicit operator InputItem(global::tryAGI.OpenAI.Item value) => new InputItem((global::tryAGI.OpenAI.Item?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.Item?(InputItem @this) => @this.Item; + + /// + /// + /// + public InputItem(global::tryAGI.OpenAI.Item? value) + { + Item = value; + } /// /// @@ -108,46 +109,46 @@ public InputItem(global::tryAGI.OpenAI.Item? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.ItemReferenceParam?(InputItem @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.ItemReferenceParam?(InputItem @this) => @this.ItemReference; /// /// /// public InputItem(global::tryAGI.OpenAI.ItemReferenceParam? value) { - Value3 = value; + ItemReference = value; } /// /// /// public InputItem( - global::tryAGI.OpenAI.EasyInputMessage? value1, - global::tryAGI.OpenAI.Item? value2, - global::tryAGI.OpenAI.ItemReferenceParam? value3 + global::tryAGI.OpenAI.EasyInputMessage? message, + global::tryAGI.OpenAI.Item? item, + global::tryAGI.OpenAI.ItemReferenceParam? itemReference ) { - Value1 = value1; - Value2 = value2; - Value3 = value3; + Message = message; + Item = item; + ItemReference = itemReference; } /// /// /// public object? Object => - Value3 as object ?? - Value2 as object ?? - Value1 as object + ItemReference as object ?? + Item as object ?? + Message as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() + Message?.ToString() ?? + Item?.ToString() ?? + ItemReference?.ToString() ; /// @@ -155,16 +156,16 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3; + return IsMessage && !IsItem && !IsItemReference || !IsMessage && IsItem && !IsItemReference || !IsMessage && !IsItem && IsItemReference; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, + global::System.Func? message = null, + global::System.Func? item = null, + global::System.Func? itemReference = null, bool validate = true) { if (validate) @@ -172,17 +173,17 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsMessage && message != null) { - return value1(Value1!); + return message(Message!); } - else if (IsValue2 && value2 != null) + else if (IsItem && item != null) { - return value2(Value2!); + return item(Item!); } - else if (IsValue3 && value3 != null) + else if (IsItemReference && itemReference != null) { - return value3(Value3!); + return itemReference(ItemReference!); } return default(TResult); @@ -192,9 +193,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, + global::System.Action? message = null, + global::System.Action? item = null, + global::System.Action? itemReference = null, bool validate = true) { if (validate) @@ -202,17 +203,17 @@ public void Match( Validate(); } - if (IsValue1) + if (IsMessage) { - value1?.Invoke(Value1!); + message?.Invoke(Message!); } - else if (IsValue2) + else if (IsItem) { - value2?.Invoke(Value2!); + item?.Invoke(Item!); } - else if (IsValue3) + else if (IsItemReference) { - value3?.Invoke(Value3!); + itemReference?.Invoke(ItemReference!); } } @@ -223,11 +224,11 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Message, typeof(global::tryAGI.OpenAI.EasyInputMessage), - Value2, + Item, typeof(global::tryAGI.OpenAI.Item), - Value3, + ItemReference, typeof(global::tryAGI.OpenAI.ItemReferenceParam), }; const int offset = unchecked((int)2166136261); @@ -245,9 +246,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(InputItem 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(Message, other.Message) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Item, other.Item) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ItemReference, other.ItemReference) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessage.g.cs index e6e654de..bc7043ed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessage.g.cs @@ -11,12 +11,11 @@ namespace tryAGI.OpenAI public sealed partial class InputMessage { /// - /// A list of one or many input items to the model, containing different content
- /// types. + /// The type of the message input. Always set to `message`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeJsonConverter))] + public global::tryAGI.OpenAI.InputMessageType? Type { get; set; } /// /// The role of the message input. One of `user`, `system`, or `developer`. @@ -35,11 +34,12 @@ public sealed partial class InputMessage public global::tryAGI.OpenAI.InputMessageStatus? Status { get; set; } /// - /// The type of the message input. Always set to `message`. + /// A list of one or many input items to the model, containing different content
+ /// types. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputMessageTypeJsonConverter))] - public global::tryAGI.OpenAI.InputMessageType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -50,9 +50,8 @@ public sealed partial class InputMessage /// /// Initializes a new instance of the class. /// - /// - /// A list of one or many input items to the model, containing different content
- /// types. + /// + /// The type of the message input. Always set to `message`. /// /// /// The role of the message input. One of `user`, `system`, or `developer`. @@ -61,22 +60,23 @@ public sealed partial class InputMessage /// The status of item. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when items are returned via API. /// - /// - /// The type of the message input. Always set to `message`. + /// + /// A list of one or many input items to the model, containing different content
+ /// types. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public InputMessage( - global::System.Collections.Generic.IList content, global::tryAGI.OpenAI.InputMessageRole role, - global::tryAGI.OpenAI.InputMessageStatus? status, - global::tryAGI.OpenAI.InputMessageType? type) + global::System.Collections.Generic.IList content, + global::tryAGI.OpenAI.InputMessageType? type, + global::tryAGI.OpenAI.InputMessageStatus? status) { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Role = role; - this.Status = status; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Type = type; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessageResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessageResource.g.cs index 182f2dad..ae0810e7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessageResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessageResource.g.cs @@ -15,53 +15,52 @@ namespace tryAGI.OpenAI /// precedence over instructions given with the `user` role. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputMessage? Value1 { get; init; } + public global::tryAGI.OpenAI.InputMessage? InputMessage { get; init; } #else - public global::tryAGI.OpenAI.InputMessage? Value1 { get; } + public global::tryAGI.OpenAI.InputMessage? InputMessage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputMessage))] #endif - public bool IsValue1 => Value1 != null; + public bool IsInputMessage => InputMessage != null; /// /// /// - public static implicit operator InputMessageResource(global::tryAGI.OpenAI.InputMessage value) => new InputMessageResource((global::tryAGI.OpenAI.InputMessage?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputMessageResourceVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.InputMessageResourceVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputMessage?(InputMessageResource @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public InputMessageResource(global::tryAGI.OpenAI.InputMessage? value) - { - Value1 = value; - } + public static implicit operator InputMessageResource(global::tryAGI.OpenAI.InputMessage value) => new InputMessageResource((global::tryAGI.OpenAI.InputMessage?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputMessageResourceVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.InputMessageResourceVariant2? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.InputMessage?(InputMessageResource @this) => @this.InputMessage; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public InputMessageResource(global::tryAGI.OpenAI.InputMessage? value) + { + InputMessage = value; + } /// /// @@ -85,11 +84,11 @@ public InputMessageResource(global::tryAGI.OpenAI.InputMessageResourceVariant2? /// /// public InputMessageResource( - global::tryAGI.OpenAI.InputMessage? value1, + global::tryAGI.OpenAI.InputMessage? inputMessage, global::tryAGI.OpenAI.InputMessageResourceVariant2? value2 ) { - Value1 = value1; + InputMessage = inputMessage; Value2 = value2; } @@ -98,14 +97,14 @@ public InputMessageResource( ///
public object? Object => Value2 as object ?? - Value1 as object + InputMessage as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? + InputMessage?.ToString() ?? Value2?.ToString() ; @@ -114,14 +113,14 @@ Value1 as object ///
public bool Validate() { - return IsValue1 && IsValue2; + return IsInputMessage && IsValue2; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, + global::System.Func? inputMessage = null, global::System.Func? value2 = null, bool validate = true) { @@ -130,9 +129,9 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsInputMessage && inputMessage != null) { - return value1(Value1!); + return inputMessage(InputMessage!); } else if (IsValue2 && value2 != null) { @@ -146,7 +145,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, + global::System.Action? inputMessage = null, global::System.Action? value2 = null, bool validate = true) { @@ -155,9 +154,9 @@ public void Match( Validate(); } - if (IsValue1) + if (IsInputMessage) { - value1?.Invoke(Value1!); + inputMessage?.Invoke(InputMessage!); } else if (IsValue2) { @@ -172,7 +171,7 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + InputMessage, typeof(global::tryAGI.OpenAI.InputMessage), Value2, typeof(global::tryAGI.OpenAI.InputMessageResourceVariant2), @@ -192,7 +191,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(InputMessageResource other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputMessage, other.InputMessage) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.Json.g.cs deleted file mode 100644 index bfd63576..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct InputMessages - { - /// - /// 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::tryAGI.OpenAI.InputMessages? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.InputMessages), - jsonSerializerContext) as global::tryAGI.OpenAI.InputMessages?; - } - - /// - /// 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::tryAGI.OpenAI.InputMessages? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.InputMessages), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputMessages?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.g.cs deleted file mode 100644 index 896dcbb0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. - /// - public readonly partial struct InputMessages : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? Value1 { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? 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 InputMessages(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1 value) => new InputMessages((global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1?(InputMessages @this) => @this.Value1; - - /// - /// - /// - public InputMessages(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? 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 InputMessages(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2 value) => new InputMessages((global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2?(InputMessages @this) => @this.Value2; - - /// - /// - /// - public InputMessages(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? value) - { - Value2 = value; - } - - /// - /// - /// - public InputMessages( - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1? value1, - global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant1), - Value2, - typeof(global::tryAGI.OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesVariant2), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(InputMessages 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 ==(InputMessages obj1, InputMessages obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(InputMessages obj1, InputMessages obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is InputMessages o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.Json.g.cs deleted file mode 100644 index b68e6c71..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct InputMessages2 - { - /// - /// 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::tryAGI.OpenAI.InputMessages2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.InputMessages2), - jsonSerializerContext) as global::tryAGI.OpenAI.InputMessages2?; - } - - /// - /// 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::tryAGI.OpenAI.InputMessages2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.InputMessages2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputMessages2?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.g.cs deleted file mode 100644 index 6a96817f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputMessages2.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace. - /// - public readonly partial struct InputMessages2 : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? Value1 { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? 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 InputMessages2(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1 value) => new InputMessages2((global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1?(InputMessages2 @this) => @this.Value1; - - /// - /// - /// - public InputMessages2(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? 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 InputMessages2(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2 value) => new InputMessages2((global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2?(InputMessages2 @this) => @this.Value2; - - /// - /// - /// - public InputMessages2(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? value) - { - Value2 = value; - } - - /// - /// - /// - public InputMessages2( - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1? value1, - global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant1), - Value2, - typeof(global::tryAGI.OpenAI.CreateEvalResponsesRunDataSourceInputMessagesVariant2), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(InputMessages2 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 ==(InputMessages2 obj1, InputMessages2 obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(InputMessages2 obj1, InputMessages2 obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is InputMessages2 o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.Json.g.cs new file mode 100644 index 00000000..4c94e763 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct InputParam + { + /// + /// 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::tryAGI.OpenAI.InputParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InputParam?; + } + + /// + /// 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::tryAGI.OpenAI.InputParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputParam?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.g.cs new file mode 100644 index 00000000..31fe4434 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputParam.g.cs @@ -0,0 +1,211 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Text, image, or file inputs to the model, used to generate a response.
+ /// Learn more:
+ /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Image inputs](/docs/guides/images)
+ /// - [File inputs](/docs/guides/pdf-files)
+ /// - [Conversation state](/docs/guides/conversation-state)
+ /// - [Function calling](/docs/guides/function-calling) + ///
+ public readonly partial struct InputParam : global::System.IEquatable + { + /// + /// A text input to the model, equivalent to a text input with the
+ /// `user` role. + ///
+#if NET6_0_OR_GREATER + public string? TextInput { get; init; } +#else + public string? TextInput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextInput))] +#endif + public bool IsTextInput => TextInput != null; + + /// + /// A list of one or many input items to the model, containing
+ /// different content types. + ///
+#if NET6_0_OR_GREATER + public global::System.Collections.Generic.IList? InputItemList { get; init; } +#else + public global::System.Collections.Generic.IList? InputItemList { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputItemList))] +#endif + public bool IsInputItemList => InputItemList != null; + /// + /// + /// + public static implicit operator InputParam(string value) => new InputParam((string?)value); + + /// + /// + /// + public static implicit operator string?(InputParam @this) => @this.TextInput; + + /// + /// + /// + public InputParam(string? value) + { + TextInput = value; + } + + /// + /// + /// + public InputParam( + string? textInput, + global::System.Collections.Generic.IList? inputItemList + ) + { + TextInput = textInput; + InputItemList = inputItemList; + } + + /// + /// + /// + public object? Object => + InputItemList as object ?? + TextInput as object + ; + + /// + /// + /// + public override string? ToString() => + TextInput?.ToString() ?? + InputItemList?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsTextInput && !IsInputItemList || !IsTextInput && IsInputItemList; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? textInput = null, + global::System.Func?, TResult>? inputItemList = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTextInput && textInput != null) + { + return textInput(TextInput!); + } + else if (IsInputItemList && inputItemList != null) + { + return inputItemList(InputItemList!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? textInput = null, + global::System.Action?>? inputItemList = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTextInput) + { + textInput?.Invoke(TextInput!); + } + else if (IsInputItemList) + { + inputItemList?.Invoke(InputItemList!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + TextInput, + typeof(string), + InputItemList, + typeof(global::System.Collections.Generic.IList), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InputParam other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextInput, other.TextInput) && + global::System.Collections.Generic.EqualityComparer?>.Default.Equals(InputItemList, other.InputItemList) + ; + } + + /// + /// + /// + public static bool operator ==(InputParam obj1, InputParam obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InputParam obj1, InputParam obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is InputParam o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent.g.cs index 8a2d4a82..d3020dc7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class InputTextContent { - /// - /// The text input to the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the input item. Always `input_text`.
/// Default Value: input_text @@ -24,6 +17,13 @@ public sealed partial class InputTextContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentTypeJsonConverter))] public global::tryAGI.OpenAI.InputTextContentType Type { get; set; } = global::tryAGI.OpenAI.InputTextContentType.InputText; + /// + /// The text input to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class InputTextContent /// /// Initializes a new instance of the class. /// - /// - /// The text input to the model. - /// /// /// The type of the input item. Always `input_text`.
/// Default Value: input_text /// + /// + /// The text input to the model. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.Json.g.cs new file mode 100644 index 00000000..a24bccae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InputTextContentParam + { + /// + /// 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::tryAGI.OpenAI.InputTextContentParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InputTextContentParam), + jsonSerializerContext) as global::tryAGI.OpenAI.InputTextContentParam; + } + + /// + /// 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::tryAGI.OpenAI.InputTextContentParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InputTextContentParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputTextContentParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.g.cs new file mode 100644 index 00000000..a0b1a99c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParam.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A text input to the model. + /// + public sealed partial class InputTextContentParam + { + /// + /// The type of the input item. Always `input_text`.
+ /// Default Value: input_text + ///
+ /// global::tryAGI.OpenAI.InputTextContentParamType.InputText + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InputTextContentParamTypeJsonConverter))] + public global::tryAGI.OpenAI.InputTextContentParamType Type { get; set; } = global::tryAGI.OpenAI.InputTextContentParamType.InputText; + + /// + /// The text input to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the input item. Always `input_text`.
+ /// Default Value: input_text + /// + /// + /// The text input to the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputTextContentParam( + string text, + global::tryAGI.OpenAI.InputTextContentParamType type = global::tryAGI.OpenAI.InputTextContentParamType.InputText) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public InputTextContentParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParamType.g.cs new file mode 100644 index 00000000..4fe2152f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContentParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the input item. Always `input_text`.
+ /// Default Value: input_text + ///
+ public enum InputTextContentParamType + { + /// + /// + /// + InputText, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputTextContentParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputTextContentParamType value) + { + return value switch + { + InputTextContentParamType.InputText => "input_text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputTextContentParamType? ToEnum(string value) + { + return value switch + { + "input_text" => InputTextContentParamType.InputText, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.Json.g.cs deleted file mode 100644 index 6640e8c3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct InputVariant3Item - { - /// - /// 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::tryAGI.OpenAI.InputVariant3Item? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.InputVariant3Item), - jsonSerializerContext) as global::tryAGI.OpenAI.InputVariant3Item?; - } - - /// - /// 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::tryAGI.OpenAI.InputVariant3Item? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.InputVariant3Item), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InputVariant3Item?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.g.cs deleted file mode 100644 index 78862f0a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputVariant3Item.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct InputVariant3Item : global::System.IEquatable - { - /// - /// An object describing an image to classify. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ModerationImageURLInput? ModerationImageURL { get; init; } -#else - public global::tryAGI.OpenAI.ModerationImageURLInput? ModerationImageURL { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ModerationImageURL))] -#endif - public bool IsModerationImageURL => ModerationImageURL != null; - - /// - /// - /// - public static implicit operator InputVariant3Item(global::tryAGI.OpenAI.ModerationImageURLInput value) => new InputVariant3Item((global::tryAGI.OpenAI.ModerationImageURLInput?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ModerationImageURLInput?(InputVariant3Item @this) => @this.ModerationImageURL; - - /// - /// - /// - public InputVariant3Item(global::tryAGI.OpenAI.ModerationImageURLInput? value) - { - ModerationImageURL = value; - } - - /// - /// An object describing text to classify. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ModerationTextInput? ModerationText { get; init; } -#else - public global::tryAGI.OpenAI.ModerationTextInput? ModerationText { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ModerationText))] -#endif - public bool IsModerationText => ModerationText != null; - - /// - /// - /// - public static implicit operator InputVariant3Item(global::tryAGI.OpenAI.ModerationTextInput value) => new InputVariant3Item((global::tryAGI.OpenAI.ModerationTextInput?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ModerationTextInput?(InputVariant3Item @this) => @this.ModerationText; - - /// - /// - /// - public InputVariant3Item(global::tryAGI.OpenAI.ModerationTextInput? value) - { - ModerationText = value; - } - - /// - /// - /// - public InputVariant3Item( - global::tryAGI.OpenAI.ModerationImageURLInput? moderationImageURL, - global::tryAGI.OpenAI.ModerationTextInput? moderationText - ) - { - ModerationImageURL = moderationImageURL; - ModerationText = moderationText; - } - - /// - /// - /// - public object? Object => - ModerationText as object ?? - ModerationImageURL as object - ; - - /// - /// - /// - public override string? ToString() => - ModerationImageURL?.ToString() ?? - ModerationText?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsModerationImageURL || IsModerationText; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? moderationImageURL = null, - global::System.Func? moderationText = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsModerationImageURL && moderationImageURL != null) - { - return moderationImageURL(ModerationImageURL!); - } - else if (IsModerationText && moderationText != null) - { - return moderationText(ModerationText!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? moderationImageURL = null, - global::System.Action? moderationText = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsModerationImageURL) - { - moderationImageURL?.Invoke(ModerationImageURL!); - } - else if (IsModerationText) - { - moderationText?.Invoke(ModerationText!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ModerationImageURL, - typeof(global::tryAGI.OpenAI.ModerationImageURLInput), - ModerationText, - typeof(global::tryAGI.OpenAI.ModerationTextInput), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(InputVariant3Item other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ModerationImageURL, other.ModerationImageURL) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ModerationText, other.ModerationText) - ; - } - - /// - /// - /// - public static bool operator ==(InputVariant3Item obj1, InputVariant3Item obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(InputVariant3Item obj1, InputVariant3Item obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is InputVariant3Item o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.Json.g.cs deleted file mode 100644 index 918862a0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct IntegrationsItem - { - /// - /// 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::tryAGI.OpenAI.IntegrationsItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.IntegrationsItem), - jsonSerializerContext) as global::tryAGI.OpenAI.IntegrationsItem?; - } - - /// - /// 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::tryAGI.OpenAI.IntegrationsItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.IntegrationsItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.IntegrationsItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.g.cs deleted file mode 100644 index 08da1a97..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.IntegrationsItem.g.cs +++ /dev/null @@ -1,160 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct IntegrationsItem : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FineTuningIntegration? FineTuningIntegration { get; init; } -#else - public global::tryAGI.OpenAI.FineTuningIntegration? FineTuningIntegration { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FineTuningIntegration))] -#endif - public bool IsFineTuningIntegration => FineTuningIntegration != null; - - /// - /// - /// - public static implicit operator IntegrationsItem(global::tryAGI.OpenAI.FineTuningIntegration value) => new IntegrationsItem((global::tryAGI.OpenAI.FineTuningIntegration?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.FineTuningIntegration?(IntegrationsItem @this) => @this.FineTuningIntegration; - - /// - /// - /// - public IntegrationsItem(global::tryAGI.OpenAI.FineTuningIntegration? value) - { - FineTuningIntegration = value; - } - - /// - /// - /// - public object? Object => - FineTuningIntegration as object - ; - - /// - /// - /// - public override string? ToString() => - FineTuningIntegration?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsFineTuningIntegration; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? fineTuningIntegration = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsFineTuningIntegration && fineTuningIntegration != null) - { - return fineTuningIntegration(FineTuningIntegration!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? fineTuningIntegration = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsFineTuningIntegration) - { - fineTuningIntegration?.Invoke(FineTuningIntegration!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - FineTuningIntegration, - typeof(global::tryAGI.OpenAI.FineTuningIntegration), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(IntegrationsItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(FineTuningIntegration, other.FineTuningIntegration) - ; - } - - /// - /// - /// - public static bool operator ==(IntegrationsItem obj1, IntegrationsItem obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(IntegrationsItem obj1, IntegrationsItem obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is IntegrationsItem o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Invite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Invite.g.cs index 6c906ab7..7554571b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Invite.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Invite.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class Invite { /// - /// The Unix timestamp (in seconds) of when the invite was accepted. + /// The object type, which is always `organization.invite` /// - [global::System.Text.Json.Serialization.JsonPropertyName("accepted_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? AcceptedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteObjectJsonConverter))] + public global::tryAGI.OpenAI.InviteObject Object { get; set; } + + /// + /// The identifier, which can be referenced in API endpoints + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } /// /// The email address of the individual to whom the invite was sent @@ -23,19 +30,20 @@ public sealed partial class Invite public required string Email { get; set; } /// - /// The Unix timestamp (in seconds) of when the invite expires. + /// `owner` or `reader` /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteRoleJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset ExpiresAt { get; set; } + public required global::tryAGI.OpenAI.InviteRole Role { get; set; } /// - /// The identifier, which can be referenced in API endpoints + /// `accepted`,`expired`, or `pending` /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.InviteStatus Status { get; set; } /// /// The Unix timestamp (in seconds) of when the invite was sent. @@ -46,33 +54,25 @@ public sealed partial class Invite public required global::System.DateTimeOffset InvitedAt { get; set; } /// - /// The object type, which is always `organization.invite` - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteObjectJsonConverter))] - public global::tryAGI.OpenAI.InviteObject Object { get; set; } - - /// - /// The projects that were granted membership upon acceptance of the invite. + /// The Unix timestamp (in seconds) of when the invite expires. /// - [global::System.Text.Json.Serialization.JsonPropertyName("projects")] - public global::System.Collections.Generic.IList? Projects { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset ExpiresAt { get; set; } /// - /// `owner` or `reader` + /// The Unix timestamp (in seconds) of when the invite was accepted. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.InviteRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("accepted_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + public global::System.DateTimeOffset? AcceptedAt { get; set; } /// - /// `accepted`,`expired`, or `pending` + /// The projects that were granted membership upon acceptance of the invite. /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.InviteStatus Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("projects")] + public global::System.Collections.Generic.IList? Projects { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -83,55 +83,55 @@ public sealed partial class Invite /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the invite was accepted. + /// + /// The object type, which is always `organization.invite` + /// + /// + /// The identifier, which can be referenced in API endpoints /// /// /// The email address of the individual to whom the invite was sent /// - /// - /// The Unix timestamp (in seconds) of when the invite expires. + /// + /// `owner` or `reader` /// - /// - /// The identifier, which can be referenced in API endpoints + /// + /// `accepted`,`expired`, or `pending` /// /// /// The Unix timestamp (in seconds) of when the invite was sent. /// - /// - /// The object type, which is always `organization.invite` + /// + /// The Unix timestamp (in seconds) of when the invite expires. + /// + /// + /// The Unix timestamp (in seconds) of when the invite was accepted. /// /// /// The projects that were granted membership upon acceptance of the invite. /// - /// - /// `owner` or `reader` - /// - /// - /// `accepted`,`expired`, or `pending` - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Invite( - string email, - global::System.DateTimeOffset expiresAt, string id, - global::System.DateTimeOffset invitedAt, + string email, global::tryAGI.OpenAI.InviteRole role, global::tryAGI.OpenAI.InviteStatus status, - global::System.DateTimeOffset? acceptedAt, + global::System.DateTimeOffset invitedAt, + global::System.DateTimeOffset expiresAt, global::tryAGI.OpenAI.InviteObject @object, + global::System.DateTimeOffset? acceptedAt, global::System.Collections.Generic.IList? projects) { - this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); - this.ExpiresAt = expiresAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.InvitedAt = invitedAt; + this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); this.Role = role; this.Status = status; - this.AcceptedAt = acceptedAt; + this.InvitedAt = invitedAt; + this.ExpiresAt = expiresAt; this.Object = @object; + this.AcceptedAt = acceptedAt; this.Projects = projects; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteDeleteResponse.g.cs index 82fbee4a..df3d8129 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteDeleteResponse.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class InviteDeleteResponse { /// - /// + /// The object type, which is always `organization.invite.deleted` /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteDeleteResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.InviteDeleteResponseObject Object { get; set; } /// /// @@ -23,11 +23,11 @@ public sealed partial class InviteDeleteResponse public required string Id { get; set; } /// - /// The object type, which is always `organization.invite.deleted` + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteDeleteResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.InviteDeleteResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,21 +38,21 @@ public sealed partial class InviteDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// /// /// The object type, which is always `organization.invite.deleted` /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public InviteDeleteResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.InviteDeleteResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteListResponse.g.cs index ead53168..791806a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteListResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class InviteListResponse { + /// + /// The object type, which is always `list` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.InviteListResponseObject Object { get; set; } + /// /// /// @@ -21,12 +28,6 @@ public sealed partial class InviteListResponse [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] public string? FirstId { get; set; } - /// - /// The `has_more` property is used for pagination to indicate there are additional results. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - public bool? HasMore { get; set; } - /// /// The last `invite_id` in the retrieved `list` /// @@ -34,11 +35,10 @@ public sealed partial class InviteListResponse public string? LastId { get; set; } /// - /// The object type, which is always `list` + /// The `has_more` property is used for pagination to indicate there are additional results. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.InviteListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.InviteListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool? HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,34 +49,34 @@ public sealed partial class InviteListResponse /// /// Initializes a new instance of the class. /// + /// + /// The object type, which is always `list` + /// /// /// /// The first `invite_id` in the retrieved `list` /// - /// - /// The `has_more` property is used for pagination to indicate there are additional results. - /// /// /// The last `invite_id` in the retrieved `list` /// - /// - /// The object type, which is always `list` + /// + /// The `has_more` property is used for pagination to indicate there are additional results. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public InviteListResponse( global::System.Collections.Generic.IList data, + global::tryAGI.OpenAI.InviteListResponseObject @object, string? firstId, - bool? hasMore, string? lastId, - global::tryAGI.OpenAI.InviteListResponseObject @object) + bool? hasMore) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.Object = @object; this.FirstId = firstId; - this.HasMore = hasMore; this.LastId = lastId; - this.Object = @object; + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.Json.g.cs new file mode 100644 index 00000000..006be041 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class InviteProjectGroupBody + { + /// + /// 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::tryAGI.OpenAI.InviteProjectGroupBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.InviteProjectGroupBody), + jsonSerializerContext) as global::tryAGI.OpenAI.InviteProjectGroupBody; + } + + /// + /// 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::tryAGI.OpenAI.InviteProjectGroupBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.InviteProjectGroupBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.InviteProjectGroupBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.g.cs new file mode 100644 index 00000000..dcff9a31 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteProjectGroupBody.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for granting a group access to a project. + /// + public sealed partial class InviteProjectGroupBody + { + /// + /// Identifier of the group to add to the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GroupId { get; set; } + + /// + /// Identifier of the project role to grant to the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the group to add to the project. + /// + /// + /// Identifier of the project role to grant to the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InviteProjectGroupBody( + string groupId, + string role) + { + this.GroupId = groupId ?? throw new global::System.ArgumentNullException(nameof(groupId)); + this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + } + + /// + /// Initializes a new instance of the class. + /// + public InviteProjectGroupBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteRequest.g.cs index acb66a08..79e2518c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InviteRequest.g.cs @@ -15,12 +15,6 @@ public sealed partial class InviteRequest [global::System.Text.Json.Serialization.JsonRequired] public required string Email { get; set; } - /// - /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("projects")] - public global::System.Collections.Generic.IList? Projects { get; set; } - /// /// `owner` or `reader` /// @@ -29,6 +23,12 @@ public sealed partial class InviteRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.InviteRequestRole Role { get; set; } + /// + /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("projects")] + public global::System.Collections.Generic.IList? Projects { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class InviteRequest /// /// Send an email to this address /// - /// - /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. - /// /// /// `owner` or `reader` /// + /// + /// An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Item.g.cs index d7792e7c..63603e05 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Item.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Item.g.cs @@ -15,655 +15,899 @@ namespace tryAGI.OpenAI /// precedence over instructions given with the `user` role. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.InputMessage? InputMessage { get; init; } + public global::tryAGI.OpenAI.InputMessage? Message1 { get; init; } #else - public global::tryAGI.OpenAI.InputMessage? InputMessage { get; } + public global::tryAGI.OpenAI.InputMessage? Message1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message1))] #endif - public bool IsInputMessage => InputMessage != null; + public bool IsMessage1 => Message1 != null; /// - /// + /// An output message from the model. /// - public static implicit operator Item(global::tryAGI.OpenAI.InputMessage value) => new Item((global::tryAGI.OpenAI.InputMessage?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.OutputMessage? Message2 { get; init; } +#else + public global::tryAGI.OpenAI.OutputMessage? Message2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputMessage?(Item @this) => @this.InputMessage; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message2))] +#endif + public bool IsMessage2 => Message2 != null; + + /// + /// The results of a file search tool call. See the
+ /// [file search guide](/docs/guides/tools-file-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.InputMessage? value) - { - InputMessage = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCall))] +#endif + public bool IsFileSearchCall => FileSearchCall != null; /// - /// An output message from the model. + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputMessage? OutputMessage { get; init; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; init; } #else - public global::tryAGI.OpenAI.OutputMessage? OutputMessage { get; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCall))] #endif - public bool IsOutputMessage => OutputMessage != null; + public bool IsComputerCall => ComputerCall != null; /// - /// + /// The output of a computer tool call. /// - public static implicit operator Item(global::tryAGI.OpenAI.OutputMessage value) => new Item((global::tryAGI.OpenAI.OutputMessage?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerCallOutputItemParam? ComputerCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ComputerCallOutputItemParam? ComputerCallOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.OutputMessage?(Item @this) => @this.OutputMessage; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCallOutput))] +#endif + public bool IsComputerCallOutput => ComputerCallOutput != null; + + /// + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.OutputMessage? value) - { - OutputMessage = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCall))] +#endif + public bool IsWebSearchCall => WebSearchCall != null; /// - /// The results of a file search tool call. See the
- /// [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + /// A tool call to run a function. See the
+ /// [function calling guide](/docs/guides/function-calling) for more information. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; init; } + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; init; } #else - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; } + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCall))] +#endif + public bool IsFunctionCall => FunctionCall != null; + + /// + /// The output of a function tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionCallOutputItemParam? FunctionCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionCallOutputItemParam? FunctionCallOutput { get; } #endif - public bool IsFileSearchToolCall => FileSearchToolCall != null; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.FileSearchToolCall value) => new Item((global::tryAGI.OpenAI.FileSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCallOutput))] +#endif + public bool IsFunctionCallOutput => FunctionCallOutput != null; /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(Item @this) => @this.FileSearchToolCall; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchCallItemParam? ToolSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchCallItemParam? ToolSearchCall { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.FileSearchToolCall? value) - { - FileSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchCall))] +#endif + public bool IsToolSearchCall => ToolSearchCall != null; /// - /// A tool call to a computer use tool. See the
- /// [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; init; } + public global::tryAGI.OpenAI.ToolSearchOutputItemParam? ToolSearchOutput { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; } + public global::tryAGI.OpenAI.ToolSearchOutputItemParam? ToolSearchOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchOutput))] +#endif + public bool IsToolSearchOutput => ToolSearchOutput != null; + + /// + /// A description of the chain of thought used by a reasoning model while generating
+ /// a response. Be sure to include these items in your `input` to the Responses API
+ /// for subsequent turns of a conversation if you are manually
+ /// [managing context](/docs/guides/conversation-state). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } +#else + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } #endif - public bool IsComputerToolCall => ComputerToolCall != null; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.ComputerToolCall value) => new Item((global::tryAGI.OpenAI.ComputerToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] +#endif + public bool IsReasoning => Reasoning != null; + + /// + /// A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CompactionSummaryItemParam? Compaction { get; init; } +#else + public global::tryAGI.OpenAI.CompactionSummaryItemParam? Compaction { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(Item @this) => @this.ComputerToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))] +#endif + public bool IsCompaction => Compaction != null; + + /// + /// An image generation request made by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.ComputerToolCall? value) - { - ComputerToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCall))] +#endif + public bool IsImageGenerationCall => ImageGenerationCall != null; /// - /// The output of a computer tool call. + /// A tool call to run code. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerCallOutputItemParam? ComputerCallOutputParam { get; init; } + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; init; } #else - public global::tryAGI.OpenAI.ComputerCallOutputItemParam? ComputerCallOutputParam { get; } + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCallOutputParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCall))] +#endif + public bool IsCodeInterpreterCall => CodeInterpreterCall != null; + + /// + /// A tool call to run a command on the local shell. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; } #endif - public bool IsComputerCallOutputParam => ComputerCallOutputParam != null; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.ComputerCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.ComputerCallOutputItemParam?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCall))] +#endif + public bool IsLocalShellCall => LocalShellCall != null; + + /// + /// The output of a local shell tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerCallOutputItemParam?(Item @this) => @this.ComputerCallOutputParam; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCallOutput))] +#endif + public bool IsLocalShellCallOutput => LocalShellCallOutput != null; + + /// + /// A tool representing a request to execute one or more shell commands. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallItemParam? ShellCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallItemParam? ShellCall { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.ComputerCallOutputItemParam? value) - { - ComputerCallOutputParam = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCall))] +#endif + public bool IsShellCall => ShellCall != null; /// - /// The results of a web search tool call. See the
- /// [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + /// The streamed output items emitted by a shell tool call. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; init; } + public global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? ShellCallOutput { get; init; } #else - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; } + public global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? ShellCallOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCallOutput))] +#endif + public bool IsShellCallOutput => ShellCallOutput != null; + + /// + /// A tool call representing a request to create, delete, or update files using diff patches. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? ApplyPatchCall { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? ApplyPatchCall { get; } #endif - public bool IsWebSearchToolCall => WebSearchToolCall != null; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.WebSearchToolCall value) => new Item((global::tryAGI.OpenAI.WebSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCall))] +#endif + public bool IsApplyPatchCall => ApplyPatchCall != null; + + /// + /// The streamed output emitted by an apply patch tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? ApplyPatchCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? ApplyPatchCallOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(Item @this) => @this.WebSearchToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCallOutput))] +#endif + public bool IsApplyPatchCallOutput => ApplyPatchCallOutput != null; + + /// + /// A list of tools available on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; init; } +#else + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.WebSearchToolCall? value) - { - WebSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpListTools))] +#endif + public bool IsMcpListTools => McpListTools != null; /// - /// A tool call to run a function. See the
- /// [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + /// A request for human approval of a tool invocation. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; init; } + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; } + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalRequest))] +#endif + public bool IsMcpApprovalRequest => McpApprovalRequest != null; + + /// + /// A response to an MCP approval request. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalResponse? McpApprovalResponse { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalResponse? McpApprovalResponse { get; } #endif - public bool IsFunctionToolCall => FunctionToolCall != null; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.FunctionToolCall value) => new Item((global::tryAGI.OpenAI.FunctionToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalResponse))] +#endif + public bool IsMcpApprovalResponse => McpApprovalResponse != null; + + /// + /// An invocation of a tool on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; init; } +#else + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(Item @this) => @this.FunctionToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpCall))] +#endif + public bool IsMcpCall => McpCall != null; + + /// + /// The output of a custom tool call from your code, being sent back to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; } +#endif /// /// /// - public Item(global::tryAGI.OpenAI.FunctionToolCall? value) - { - FunctionToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallOutput))] +#endif + public bool IsCustomToolCallOutput => CustomToolCallOutput != null; /// - /// The output of a function tool call. + /// A call to a custom tool created by the model. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionCallOutputItemParam? FunctionCallOutputParam { get; init; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } #else - public global::tryAGI.OpenAI.FunctionCallOutputItemParam? FunctionCallOutputParam { get; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCallOutputParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] #endif - public bool IsFunctionCallOutputParam => FunctionCallOutputParam != null; + public bool IsCustomToolCall => CustomToolCall != null; + /// + /// + /// + public static implicit operator Item(global::tryAGI.OpenAI.InputMessage value) => new Item((global::tryAGI.OpenAI.InputMessage?)value); /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.FunctionCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.FunctionCallOutputItemParam?)value); + public static implicit operator global::tryAGI.OpenAI.InputMessage?(Item @this) => @this.Message1; /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionCallOutputItemParam?(Item @this) => @this.FunctionCallOutputParam; + public Item(global::tryAGI.OpenAI.InputMessage? value) + { + Message1 = value; + } /// /// /// - public Item(global::tryAGI.OpenAI.FunctionCallOutputItemParam? value) + public static implicit operator Item(global::tryAGI.OpenAI.OutputMessage value) => new Item((global::tryAGI.OpenAI.OutputMessage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.OutputMessage?(Item @this) => @this.Message2; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.OutputMessage? value) { - FunctionCallOutputParam = value; + Message2 = value; } /// - /// A description of the chain of thought used by a reasoning model while generating
- /// a response. Be sure to include these items in your `input` to the Responses API
- /// for subsequent turns of a conversation if you are manually
- /// [managing context](https://platform.openai.com/docs/guides/conversation-state). + /// ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } -#else - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.FileSearchToolCall value) => new Item((global::tryAGI.OpenAI.FileSearchToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] -#endif - public bool IsReasoning => Reasoning != null; + public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(Item @this) => @this.FileSearchCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.ReasoningItem value) => new Item((global::tryAGI.OpenAI.ReasoningItem?)value); + public Item(global::tryAGI.OpenAI.FileSearchToolCall? value) + { + FileSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ReasoningItem?(Item @this) => @this.Reasoning; + public static implicit operator Item(global::tryAGI.OpenAI.ComputerToolCall value) => new Item((global::tryAGI.OpenAI.ComputerToolCall?)value); /// /// /// - public Item(global::tryAGI.OpenAI.ReasoningItem? value) + public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(Item @this) => @this.ComputerCall; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.ComputerToolCall? value) { - Reasoning = value; + ComputerCall = value; } /// - /// An image generation request made by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; init; } -#else - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.ComputerCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.ComputerCallOutputItemParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenToolCall))] -#endif - public bool IsImageGenToolCall => ImageGenToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ComputerCallOutputItemParam?(Item @this) => @this.ComputerCallOutput; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.ImageGenToolCall value) => new Item((global::tryAGI.OpenAI.ImageGenToolCall?)value); + public Item(global::tryAGI.OpenAI.ComputerCallOutputItemParam? value) + { + ComputerCallOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(Item @this) => @this.ImageGenToolCall; + public static implicit operator Item(global::tryAGI.OpenAI.WebSearchToolCall value) => new Item((global::tryAGI.OpenAI.WebSearchToolCall?)value); /// /// /// - public Item(global::tryAGI.OpenAI.ImageGenToolCall? value) + public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(Item @this) => @this.WebSearchCall; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.WebSearchToolCall? value) { - ImageGenToolCall = value; + WebSearchCall = value; } /// - /// A tool call to run code. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.FunctionToolCall value) => new Item((global::tryAGI.OpenAI.FunctionToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterToolCall))] -#endif - public bool IsCodeInterpreterToolCall => CodeInterpreterToolCall != null; + public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(Item @this) => @this.FunctionCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new Item((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + public Item(global::tryAGI.OpenAI.FunctionToolCall? value) + { + FunctionCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(Item @this) => @this.CodeInterpreterToolCall; + public static implicit operator Item(global::tryAGI.OpenAI.FunctionCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.FunctionCallOutputItemParam?)value); /// /// /// - public Item(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + public static implicit operator global::tryAGI.OpenAI.FunctionCallOutputItemParam?(Item @this) => @this.FunctionCallOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.FunctionCallOutputItemParam? value) { - CodeInterpreterToolCall = value; + FunctionCallOutput = value; } /// - /// A tool call to run a command on the local shell. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.ToolSearchCallItemParam value) => new Item((global::tryAGI.OpenAI.ToolSearchCallItemParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCall))] -#endif - public bool IsLocalShellToolCall => LocalShellToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ToolSearchCallItemParam?(Item @this) => @this.ToolSearchCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.LocalShellToolCall value) => new Item((global::tryAGI.OpenAI.LocalShellToolCall?)value); + public Item(global::tryAGI.OpenAI.ToolSearchCallItemParam? value) + { + ToolSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(Item @this) => @this.LocalShellToolCall; + public static implicit operator Item(global::tryAGI.OpenAI.ToolSearchOutputItemParam value) => new Item((global::tryAGI.OpenAI.ToolSearchOutputItemParam?)value); /// /// /// - public Item(global::tryAGI.OpenAI.LocalShellToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ToolSearchOutputItemParam?(Item @this) => @this.ToolSearchOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.ToolSearchOutputItemParam? value) { - LocalShellToolCall = value; + ToolSearchOutput = value; } /// - /// The output of a local shell tool call. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.ReasoningItem value) => new Item((global::tryAGI.OpenAI.ReasoningItem?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCallOutput))] -#endif - public bool IsLocalShellToolCallOutput => LocalShellToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.ReasoningItem?(Item @this) => @this.Reasoning; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.LocalShellToolCallOutput value) => new Item((global::tryAGI.OpenAI.LocalShellToolCallOutput?)value); + public Item(global::tryAGI.OpenAI.ReasoningItem? value) + { + Reasoning = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(Item @this) => @this.LocalShellToolCallOutput; + public static implicit operator Item(global::tryAGI.OpenAI.CompactionSummaryItemParam value) => new Item((global::tryAGI.OpenAI.CompactionSummaryItemParam?)value); /// /// /// - public Item(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) + public static implicit operator global::tryAGI.OpenAI.CompactionSummaryItemParam?(Item @this) => @this.Compaction; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.CompactionSummaryItemParam? value) { - LocalShellToolCallOutput = value; + Compaction = value; } /// - /// A list of tools available on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; init; } -#else - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.ImageGenToolCall value) => new Item((global::tryAGI.OpenAI.ImageGenToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListTools))] -#endif - public bool IsMCPListTools => MCPListTools != null; + public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(Item @this) => @this.ImageGenerationCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.MCPListTools value) => new Item((global::tryAGI.OpenAI.MCPListTools?)value); + public Item(global::tryAGI.OpenAI.ImageGenToolCall? value) + { + ImageGenerationCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPListTools?(Item @this) => @this.MCPListTools; + public static implicit operator Item(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new Item((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); /// /// /// - public Item(global::tryAGI.OpenAI.MCPListTools? value) + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(Item @this) => @this.CodeInterpreterCall; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) { - MCPListTools = value; + CodeInterpreterCall = value; } /// - /// A request for human approval of a tool invocation. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.LocalShellToolCall value) => new Item((global::tryAGI.OpenAI.LocalShellToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalRequest))] -#endif - public bool IsMCPApprovalRequest => MCPApprovalRequest != null; + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(Item @this) => @this.LocalShellCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.MCPApprovalRequest value) => new Item((global::tryAGI.OpenAI.MCPApprovalRequest?)value); + public Item(global::tryAGI.OpenAI.LocalShellToolCall? value) + { + LocalShellCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(Item @this) => @this.MCPApprovalRequest; + public static implicit operator Item(global::tryAGI.OpenAI.LocalShellToolCallOutput value) => new Item((global::tryAGI.OpenAI.LocalShellToolCallOutput?)value); /// /// /// - public Item(global::tryAGI.OpenAI.MCPApprovalRequest? value) + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(Item @this) => @this.LocalShellCallOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) { - MCPApprovalRequest = value; + LocalShellCallOutput = value; } /// - /// A response to an MCP approval request. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalResponse? MCPApprovalResponse { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalResponse? MCPApprovalResponse { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.FunctionShellCallItemParam value) => new Item((global::tryAGI.OpenAI.FunctionShellCallItemParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalResponse))] -#endif - public bool IsMCPApprovalResponse => MCPApprovalResponse != null; + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallItemParam?(Item @this) => @this.ShellCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.MCPApprovalResponse value) => new Item((global::tryAGI.OpenAI.MCPApprovalResponse?)value); + public Item(global::tryAGI.OpenAI.FunctionShellCallItemParam? value) + { + ShellCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponse?(Item @this) => @this.MCPApprovalResponse; + public static implicit operator Item(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.FunctionShellCallOutputItemParam?)value); /// /// /// - public Item(global::tryAGI.OpenAI.MCPApprovalResponse? value) + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutputItemParam?(Item @this) => @this.ShellCallOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? value) { - MCPApprovalResponse = value; + ShellCallOutput = value; } /// - /// An invocation of a tool on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; init; } -#else - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam value) => new Item((global::tryAGI.OpenAI.ApplyPatchToolCallItemParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPToolCall))] -#endif - public bool IsMCPToolCall => MCPToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallItemParam?(Item @this) => @this.ApplyPatchCall; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.MCPToolCall value) => new Item((global::tryAGI.OpenAI.MCPToolCall?)value); + public Item(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? value) + { + ApplyPatchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(Item @this) => @this.MCPToolCall; + public static implicit operator Item(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam value) => new Item((global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam?)value); /// /// /// - public Item(global::tryAGI.OpenAI.MCPToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam?(Item @this) => @this.ApplyPatchCallOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? value) { - MCPToolCall = value; + ApplyPatchCallOutput = value; } /// - /// The output of a custom tool call from your code, being sent back to the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.MCPListTools value) => new Item((global::tryAGI.OpenAI.MCPListTools?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallOutput))] -#endif - public bool IsCustomToolCallOutput => CustomToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.MCPListTools?(Item @this) => @this.McpListTools; /// /// /// - public static implicit operator Item(global::tryAGI.OpenAI.CustomToolCallOutput value) => new Item((global::tryAGI.OpenAI.CustomToolCallOutput?)value); + public Item(global::tryAGI.OpenAI.MCPListTools? value) + { + McpListTools = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CustomToolCallOutput?(Item @this) => @this.CustomToolCallOutput; + public static implicit operator Item(global::tryAGI.OpenAI.MCPApprovalRequest value) => new Item((global::tryAGI.OpenAI.MCPApprovalRequest?)value); /// /// /// - public Item(global::tryAGI.OpenAI.CustomToolCallOutput? value) + public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(Item @this) => @this.McpApprovalRequest; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.MCPApprovalRequest? value) { - CustomToolCallOutput = value; + McpApprovalRequest = value; } /// - /// A call to a custom tool created by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } -#endif + public static implicit operator Item(global::tryAGI.OpenAI.MCPApprovalResponse value) => new Item((global::tryAGI.OpenAI.MCPApprovalResponse?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] -#endif - public bool IsCustomToolCall => CustomToolCall != null; + public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponse?(Item @this) => @this.McpApprovalResponse; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.MCPApprovalResponse? value) + { + McpApprovalResponse = value; + } + + /// + /// + /// + public static implicit operator Item(global::tryAGI.OpenAI.MCPToolCall value) => new Item((global::tryAGI.OpenAI.MCPToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(Item @this) => @this.McpCall; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.MCPToolCall? value) + { + McpCall = value; + } + + /// + /// + /// + public static implicit operator Item(global::tryAGI.OpenAI.CustomToolCallOutput value) => new Item((global::tryAGI.OpenAI.CustomToolCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CustomToolCallOutput?(Item @this) => @this.CustomToolCallOutput; + + /// + /// + /// + public Item(global::tryAGI.OpenAI.CustomToolCallOutput? value) + { + CustomToolCallOutput = value; + } /// /// @@ -687,44 +931,58 @@ public Item(global::tryAGI.OpenAI.CustomToolCall? value) /// /// public Item( - global::tryAGI.OpenAI.InputMessage? inputMessage, - global::tryAGI.OpenAI.OutputMessage? outputMessage, - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall, - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall, - global::tryAGI.OpenAI.ComputerCallOutputItemParam? computerCallOutputParam, - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall, - global::tryAGI.OpenAI.FunctionToolCall? functionToolCall, - global::tryAGI.OpenAI.FunctionCallOutputItemParam? functionCallOutputParam, + global::tryAGI.OpenAI.InputMessage? message1, + global::tryAGI.OpenAI.OutputMessage? message2, + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall, + global::tryAGI.OpenAI.ComputerToolCall? computerCall, + global::tryAGI.OpenAI.ComputerCallOutputItemParam? computerCallOutput, + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall, + global::tryAGI.OpenAI.FunctionToolCall? functionCall, + global::tryAGI.OpenAI.FunctionCallOutputItemParam? functionCallOutput, + global::tryAGI.OpenAI.ToolSearchCallItemParam? toolSearchCall, + global::tryAGI.OpenAI.ToolSearchOutputItemParam? toolSearchOutput, global::tryAGI.OpenAI.ReasoningItem? reasoning, - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall, - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall, - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall, - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput, - global::tryAGI.OpenAI.MCPListTools? mCPListTools, - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest, - global::tryAGI.OpenAI.MCPApprovalResponse? mCPApprovalResponse, - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall, + global::tryAGI.OpenAI.CompactionSummaryItemParam? compaction, + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall, + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall, + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall, + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput, + global::tryAGI.OpenAI.FunctionShellCallItemParam? shellCall, + global::tryAGI.OpenAI.FunctionShellCallOutputItemParam? shellCallOutput, + global::tryAGI.OpenAI.ApplyPatchToolCallItemParam? applyPatchCall, + global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam? applyPatchCallOutput, + global::tryAGI.OpenAI.MCPListTools? mcpListTools, + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest, + global::tryAGI.OpenAI.MCPApprovalResponse? mcpApprovalResponse, + global::tryAGI.OpenAI.MCPToolCall? mcpCall, global::tryAGI.OpenAI.CustomToolCallOutput? customToolCallOutput, global::tryAGI.OpenAI.CustomToolCall? customToolCall ) { - InputMessage = inputMessage; - OutputMessage = outputMessage; - FileSearchToolCall = fileSearchToolCall; - ComputerToolCall = computerToolCall; - ComputerCallOutputParam = computerCallOutputParam; - WebSearchToolCall = webSearchToolCall; - FunctionToolCall = functionToolCall; - FunctionCallOutputParam = functionCallOutputParam; + Message1 = message1; + Message2 = message2; + FileSearchCall = fileSearchCall; + ComputerCall = computerCall; + ComputerCallOutput = computerCallOutput; + WebSearchCall = webSearchCall; + FunctionCall = functionCall; + FunctionCallOutput = functionCallOutput; + ToolSearchCall = toolSearchCall; + ToolSearchOutput = toolSearchOutput; Reasoning = reasoning; - ImageGenToolCall = imageGenToolCall; - CodeInterpreterToolCall = codeInterpreterToolCall; - LocalShellToolCall = localShellToolCall; - LocalShellToolCallOutput = localShellToolCallOutput; - MCPListTools = mCPListTools; - MCPApprovalRequest = mCPApprovalRequest; - MCPApprovalResponse = mCPApprovalResponse; - MCPToolCall = mCPToolCall; + Compaction = compaction; + ImageGenerationCall = imageGenerationCall; + CodeInterpreterCall = codeInterpreterCall; + LocalShellCall = localShellCall; + LocalShellCallOutput = localShellCallOutput; + ShellCall = shellCall; + ShellCallOutput = shellCallOutput; + ApplyPatchCall = applyPatchCall; + ApplyPatchCallOutput = applyPatchCallOutput; + McpListTools = mcpListTools; + McpApprovalRequest = mcpApprovalRequest; + McpApprovalResponse = mcpApprovalResponse; + McpCall = mcpCall; CustomToolCallOutput = customToolCallOutput; CustomToolCall = customToolCall; } @@ -735,46 +993,60 @@ public Item( public object? Object => CustomToolCall as object ?? CustomToolCallOutput as object ?? - MCPToolCall as object ?? - MCPApprovalResponse as object ?? - MCPApprovalRequest as object ?? - MCPListTools as object ?? - LocalShellToolCallOutput as object ?? - LocalShellToolCall as object ?? - CodeInterpreterToolCall as object ?? - ImageGenToolCall as object ?? + McpCall as object ?? + McpApprovalResponse as object ?? + McpApprovalRequest as object ?? + McpListTools as object ?? + ApplyPatchCallOutput as object ?? + ApplyPatchCall as object ?? + ShellCallOutput as object ?? + ShellCall as object ?? + LocalShellCallOutput as object ?? + LocalShellCall as object ?? + CodeInterpreterCall as object ?? + ImageGenerationCall as object ?? + Compaction as object ?? Reasoning as object ?? - FunctionCallOutputParam as object ?? - FunctionToolCall as object ?? - WebSearchToolCall as object ?? - ComputerCallOutputParam as object ?? - ComputerToolCall as object ?? - FileSearchToolCall as object ?? - OutputMessage as object ?? - InputMessage as object + ToolSearchOutput as object ?? + ToolSearchCall as object ?? + FunctionCallOutput as object ?? + FunctionCall as object ?? + WebSearchCall as object ?? + ComputerCallOutput as object ?? + ComputerCall as object ?? + FileSearchCall as object ?? + Message2 as object ?? + Message1 as object ; /// /// /// public override string? ToString() => - InputMessage?.ToString() ?? - OutputMessage?.ToString() ?? - FileSearchToolCall?.ToString() ?? - ComputerToolCall?.ToString() ?? - ComputerCallOutputParam?.ToString() ?? - WebSearchToolCall?.ToString() ?? - FunctionToolCall?.ToString() ?? - FunctionCallOutputParam?.ToString() ?? + Message1?.ToString() ?? + Message2?.ToString() ?? + FileSearchCall?.ToString() ?? + ComputerCall?.ToString() ?? + ComputerCallOutput?.ToString() ?? + WebSearchCall?.ToString() ?? + FunctionCall?.ToString() ?? + FunctionCallOutput?.ToString() ?? + ToolSearchCall?.ToString() ?? + ToolSearchOutput?.ToString() ?? Reasoning?.ToString() ?? - ImageGenToolCall?.ToString() ?? - CodeInterpreterToolCall?.ToString() ?? - LocalShellToolCall?.ToString() ?? - LocalShellToolCallOutput?.ToString() ?? - MCPListTools?.ToString() ?? - MCPApprovalRequest?.ToString() ?? - MCPApprovalResponse?.ToString() ?? - MCPToolCall?.ToString() ?? + Compaction?.ToString() ?? + ImageGenerationCall?.ToString() ?? + CodeInterpreterCall?.ToString() ?? + LocalShellCall?.ToString() ?? + LocalShellCallOutput?.ToString() ?? + ShellCall?.ToString() ?? + ShellCallOutput?.ToString() ?? + ApplyPatchCall?.ToString() ?? + ApplyPatchCallOutput?.ToString() ?? + McpListTools?.ToString() ?? + McpApprovalRequest?.ToString() ?? + McpApprovalResponse?.ToString() ?? + McpCall?.ToString() ?? CustomToolCallOutput?.ToString() ?? CustomToolCall?.ToString() ; @@ -784,30 +1056,37 @@ InputMessage as object ///
public bool Validate() { - return IsInputMessage || IsOutputMessage || IsFileSearchToolCall || IsComputerToolCall || IsComputerCallOutputParam || IsWebSearchToolCall || IsFunctionToolCall || IsFunctionCallOutputParam || IsReasoning || IsImageGenToolCall || IsCodeInterpreterToolCall || IsLocalShellToolCall || IsLocalShellToolCallOutput || IsMCPListTools || IsMCPApprovalRequest || IsMCPApprovalResponse || IsMCPToolCall || IsCustomToolCallOutput || IsCustomToolCall; + return IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && IsMcpCall && !IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && IsCustomToolCallOutput && !IsCustomToolCall || !IsMessage1 && !IsMessage2 && !IsFileSearchCall && !IsComputerCall && !IsComputerCallOutput && !IsWebSearchCall && !IsFunctionCall && !IsFunctionCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsReasoning && !IsCompaction && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCallOutput && IsCustomToolCall; } /// /// /// public TResult? Match( - global::System.Func? inputMessage = null, - global::System.Func? outputMessage = null, - global::System.Func? fileSearchToolCall = null, - global::System.Func? computerToolCall = null, - global::System.Func? computerCallOutputParam = null, - global::System.Func? webSearchToolCall = null, - global::System.Func? functionToolCall = null, - global::System.Func? functionCallOutputParam = null, + global::System.Func? message1 = null, + global::System.Func? message2 = null, + global::System.Func? fileSearchCall = null, + global::System.Func? computerCall = null, + global::System.Func? computerCallOutput = null, + global::System.Func? webSearchCall = null, + global::System.Func? functionCall = null, + global::System.Func? functionCallOutput = null, + global::System.Func? toolSearchCall = null, + global::System.Func? toolSearchOutput = null, global::System.Func? reasoning = null, - global::System.Func? imageGenToolCall = null, - global::System.Func? codeInterpreterToolCall = null, - global::System.Func? localShellToolCall = null, - global::System.Func? localShellToolCallOutput = null, - global::System.Func? mCPListTools = null, - global::System.Func? mCPApprovalRequest = null, - global::System.Func? mCPApprovalResponse = null, - global::System.Func? mCPToolCall = null, + global::System.Func? compaction = null, + global::System.Func? imageGenerationCall = null, + global::System.Func? codeInterpreterCall = null, + global::System.Func? localShellCall = null, + global::System.Func? localShellCallOutput = null, + global::System.Func? shellCall = null, + global::System.Func? shellCallOutput = null, + global::System.Func? applyPatchCall = null, + global::System.Func? applyPatchCallOutput = null, + global::System.Func? mcpListTools = null, + global::System.Func? mcpApprovalRequest = null, + global::System.Func? mcpApprovalResponse = null, + global::System.Func? mcpCall = null, global::System.Func? customToolCallOutput = null, global::System.Func? customToolCall = null, bool validate = true) @@ -817,73 +1096,101 @@ public bool Validate() Validate(); } - if (IsInputMessage && inputMessage != null) + if (IsMessage1 && message1 != null) + { + return message1(Message1!); + } + else if (IsMessage2 && message2 != null) { - return inputMessage(InputMessage!); + return message2(Message2!); } - else if (IsOutputMessage && outputMessage != null) + else if (IsFileSearchCall && fileSearchCall != null) { - return outputMessage(OutputMessage!); + return fileSearchCall(FileSearchCall!); } - else if (IsFileSearchToolCall && fileSearchToolCall != null) + else if (IsComputerCall && computerCall != null) { - return fileSearchToolCall(FileSearchToolCall!); + return computerCall(ComputerCall!); } - else if (IsComputerToolCall && computerToolCall != null) + else if (IsComputerCallOutput && computerCallOutput != null) { - return computerToolCall(ComputerToolCall!); + return computerCallOutput(ComputerCallOutput!); } - else if (IsComputerCallOutputParam && computerCallOutputParam != null) + else if (IsWebSearchCall && webSearchCall != null) { - return computerCallOutputParam(ComputerCallOutputParam!); + return webSearchCall(WebSearchCall!); } - else if (IsWebSearchToolCall && webSearchToolCall != null) + else if (IsFunctionCall && functionCall != null) { - return webSearchToolCall(WebSearchToolCall!); + return functionCall(FunctionCall!); } - else if (IsFunctionToolCall && functionToolCall != null) + else if (IsFunctionCallOutput && functionCallOutput != null) { - return functionToolCall(FunctionToolCall!); + return functionCallOutput(FunctionCallOutput!); } - else if (IsFunctionCallOutputParam && functionCallOutputParam != null) + else if (IsToolSearchCall && toolSearchCall != null) { - return functionCallOutputParam(FunctionCallOutputParam!); + return toolSearchCall(ToolSearchCall!); + } + else if (IsToolSearchOutput && toolSearchOutput != null) + { + return toolSearchOutput(ToolSearchOutput!); } else if (IsReasoning && reasoning != null) { return reasoning(Reasoning!); } - else if (IsImageGenToolCall && imageGenToolCall != null) + else if (IsCompaction && compaction != null) + { + return compaction(Compaction!); + } + else if (IsImageGenerationCall && imageGenerationCall != null) + { + return imageGenerationCall(ImageGenerationCall!); + } + else if (IsCodeInterpreterCall && codeInterpreterCall != null) + { + return codeInterpreterCall(CodeInterpreterCall!); + } + else if (IsLocalShellCall && localShellCall != null) + { + return localShellCall(LocalShellCall!); + } + else if (IsLocalShellCallOutput && localShellCallOutput != null) + { + return localShellCallOutput(LocalShellCallOutput!); + } + else if (IsShellCall && shellCall != null) { - return imageGenToolCall(ImageGenToolCall!); + return shellCall(ShellCall!); } - else if (IsCodeInterpreterToolCall && codeInterpreterToolCall != null) + else if (IsShellCallOutput && shellCallOutput != null) { - return codeInterpreterToolCall(CodeInterpreterToolCall!); + return shellCallOutput(ShellCallOutput!); } - else if (IsLocalShellToolCall && localShellToolCall != null) + else if (IsApplyPatchCall && applyPatchCall != null) { - return localShellToolCall(LocalShellToolCall!); + return applyPatchCall(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput && localShellToolCallOutput != null) + else if (IsApplyPatchCallOutput && applyPatchCallOutput != null) { - return localShellToolCallOutput(LocalShellToolCallOutput!); + return applyPatchCallOutput(ApplyPatchCallOutput!); } - else if (IsMCPListTools && mCPListTools != null) + else if (IsMcpListTools && mcpListTools != null) { - return mCPListTools(MCPListTools!); + return mcpListTools(McpListTools!); } - else if (IsMCPApprovalRequest && mCPApprovalRequest != null) + else if (IsMcpApprovalRequest && mcpApprovalRequest != null) { - return mCPApprovalRequest(MCPApprovalRequest!); + return mcpApprovalRequest(McpApprovalRequest!); } - else if (IsMCPApprovalResponse && mCPApprovalResponse != null) + else if (IsMcpApprovalResponse && mcpApprovalResponse != null) { - return mCPApprovalResponse(MCPApprovalResponse!); + return mcpApprovalResponse(McpApprovalResponse!); } - else if (IsMCPToolCall && mCPToolCall != null) + else if (IsMcpCall && mcpCall != null) { - return mCPToolCall(MCPToolCall!); + return mcpCall(McpCall!); } else if (IsCustomToolCallOutput && customToolCallOutput != null) { @@ -901,23 +1208,30 @@ public bool Validate() /// ///
public void Match( - global::System.Action? inputMessage = null, - global::System.Action? outputMessage = null, - global::System.Action? fileSearchToolCall = null, - global::System.Action? computerToolCall = null, - global::System.Action? computerCallOutputParam = null, - global::System.Action? webSearchToolCall = null, - global::System.Action? functionToolCall = null, - global::System.Action? functionCallOutputParam = null, + global::System.Action? message1 = null, + global::System.Action? message2 = null, + global::System.Action? fileSearchCall = null, + global::System.Action? computerCall = null, + global::System.Action? computerCallOutput = null, + global::System.Action? webSearchCall = null, + global::System.Action? functionCall = null, + global::System.Action? functionCallOutput = null, + global::System.Action? toolSearchCall = null, + global::System.Action? toolSearchOutput = null, global::System.Action? reasoning = null, - global::System.Action? imageGenToolCall = null, - global::System.Action? codeInterpreterToolCall = null, - global::System.Action? localShellToolCall = null, - global::System.Action? localShellToolCallOutput = null, - global::System.Action? mCPListTools = null, - global::System.Action? mCPApprovalRequest = null, - global::System.Action? mCPApprovalResponse = null, - global::System.Action? mCPToolCall = null, + global::System.Action? compaction = null, + global::System.Action? imageGenerationCall = null, + global::System.Action? codeInterpreterCall = null, + global::System.Action? localShellCall = null, + global::System.Action? localShellCallOutput = null, + global::System.Action? shellCall = null, + global::System.Action? shellCallOutput = null, + global::System.Action? applyPatchCall = null, + global::System.Action? applyPatchCallOutput = null, + global::System.Action? mcpListTools = null, + global::System.Action? mcpApprovalRequest = null, + global::System.Action? mcpApprovalResponse = null, + global::System.Action? mcpCall = null, global::System.Action? customToolCallOutput = null, global::System.Action? customToolCall = null, bool validate = true) @@ -927,73 +1241,101 @@ public void Match( Validate(); } - if (IsInputMessage) + if (IsMessage1) + { + message1?.Invoke(Message1!); + } + else if (IsMessage2) + { + message2?.Invoke(Message2!); + } + else if (IsFileSearchCall) { - inputMessage?.Invoke(InputMessage!); + fileSearchCall?.Invoke(FileSearchCall!); } - else if (IsOutputMessage) + else if (IsComputerCall) { - outputMessage?.Invoke(OutputMessage!); + computerCall?.Invoke(ComputerCall!); } - else if (IsFileSearchToolCall) + else if (IsComputerCallOutput) { - fileSearchToolCall?.Invoke(FileSearchToolCall!); + computerCallOutput?.Invoke(ComputerCallOutput!); } - else if (IsComputerToolCall) + else if (IsWebSearchCall) { - computerToolCall?.Invoke(ComputerToolCall!); + webSearchCall?.Invoke(WebSearchCall!); } - else if (IsComputerCallOutputParam) + else if (IsFunctionCall) { - computerCallOutputParam?.Invoke(ComputerCallOutputParam!); + functionCall?.Invoke(FunctionCall!); } - else if (IsWebSearchToolCall) + else if (IsFunctionCallOutput) { - webSearchToolCall?.Invoke(WebSearchToolCall!); + functionCallOutput?.Invoke(FunctionCallOutput!); } - else if (IsFunctionToolCall) + else if (IsToolSearchCall) { - functionToolCall?.Invoke(FunctionToolCall!); + toolSearchCall?.Invoke(ToolSearchCall!); } - else if (IsFunctionCallOutputParam) + else if (IsToolSearchOutput) { - functionCallOutputParam?.Invoke(FunctionCallOutputParam!); + toolSearchOutput?.Invoke(ToolSearchOutput!); } else if (IsReasoning) { reasoning?.Invoke(Reasoning!); } - else if (IsImageGenToolCall) + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + else if (IsImageGenerationCall) + { + imageGenerationCall?.Invoke(ImageGenerationCall!); + } + else if (IsCodeInterpreterCall) + { + codeInterpreterCall?.Invoke(CodeInterpreterCall!); + } + else if (IsLocalShellCall) + { + localShellCall?.Invoke(LocalShellCall!); + } + else if (IsLocalShellCallOutput) + { + localShellCallOutput?.Invoke(LocalShellCallOutput!); + } + else if (IsShellCall) { - imageGenToolCall?.Invoke(ImageGenToolCall!); + shellCall?.Invoke(ShellCall!); } - else if (IsCodeInterpreterToolCall) + else if (IsShellCallOutput) { - codeInterpreterToolCall?.Invoke(CodeInterpreterToolCall!); + shellCallOutput?.Invoke(ShellCallOutput!); } - else if (IsLocalShellToolCall) + else if (IsApplyPatchCall) { - localShellToolCall?.Invoke(LocalShellToolCall!); + applyPatchCall?.Invoke(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput) + else if (IsApplyPatchCallOutput) { - localShellToolCallOutput?.Invoke(LocalShellToolCallOutput!); + applyPatchCallOutput?.Invoke(ApplyPatchCallOutput!); } - else if (IsMCPListTools) + else if (IsMcpListTools) { - mCPListTools?.Invoke(MCPListTools!); + mcpListTools?.Invoke(McpListTools!); } - else if (IsMCPApprovalRequest) + else if (IsMcpApprovalRequest) { - mCPApprovalRequest?.Invoke(MCPApprovalRequest!); + mcpApprovalRequest?.Invoke(McpApprovalRequest!); } - else if (IsMCPApprovalResponse) + else if (IsMcpApprovalResponse) { - mCPApprovalResponse?.Invoke(MCPApprovalResponse!); + mcpApprovalResponse?.Invoke(McpApprovalResponse!); } - else if (IsMCPToolCall) + else if (IsMcpCall) { - mCPToolCall?.Invoke(MCPToolCall!); + mcpCall?.Invoke(McpCall!); } else if (IsCustomToolCallOutput) { @@ -1012,39 +1354,53 @@ public override int GetHashCode() { var fields = new object?[] { - InputMessage, + Message1, typeof(global::tryAGI.OpenAI.InputMessage), - OutputMessage, + Message2, typeof(global::tryAGI.OpenAI.OutputMessage), - FileSearchToolCall, + FileSearchCall, typeof(global::tryAGI.OpenAI.FileSearchToolCall), - ComputerToolCall, + ComputerCall, typeof(global::tryAGI.OpenAI.ComputerToolCall), - ComputerCallOutputParam, + ComputerCallOutput, typeof(global::tryAGI.OpenAI.ComputerCallOutputItemParam), - WebSearchToolCall, + WebSearchCall, typeof(global::tryAGI.OpenAI.WebSearchToolCall), - FunctionToolCall, + FunctionCall, typeof(global::tryAGI.OpenAI.FunctionToolCall), - FunctionCallOutputParam, + FunctionCallOutput, typeof(global::tryAGI.OpenAI.FunctionCallOutputItemParam), + ToolSearchCall, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), + ToolSearchOutput, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), Reasoning, typeof(global::tryAGI.OpenAI.ReasoningItem), - ImageGenToolCall, + Compaction, + typeof(global::tryAGI.OpenAI.CompactionSummaryItemParam), + ImageGenerationCall, typeof(global::tryAGI.OpenAI.ImageGenToolCall), - CodeInterpreterToolCall, + CodeInterpreterCall, typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), - LocalShellToolCall, + LocalShellCall, typeof(global::tryAGI.OpenAI.LocalShellToolCall), - LocalShellToolCallOutput, + LocalShellCallOutput, typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), - MCPListTools, + ShellCall, + typeof(global::tryAGI.OpenAI.FunctionShellCallItemParam), + ShellCallOutput, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputItemParam), + ApplyPatchCall, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallItemParam), + ApplyPatchCallOutput, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutputItemParam), + McpListTools, typeof(global::tryAGI.OpenAI.MCPListTools), - MCPApprovalRequest, + McpApprovalRequest, typeof(global::tryAGI.OpenAI.MCPApprovalRequest), - MCPApprovalResponse, + McpApprovalResponse, typeof(global::tryAGI.OpenAI.MCPApprovalResponse), - MCPToolCall, + McpCall, typeof(global::tryAGI.OpenAI.MCPToolCall), CustomToolCallOutput, typeof(global::tryAGI.OpenAI.CustomToolCallOutput), @@ -1066,23 +1422,30 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Item other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputMessage, other.InputMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputMessage, other.OutputMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchToolCall, other.FileSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCall, other.ComputerToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCallOutputParam, other.ComputerCallOutputParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchToolCall, other.WebSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCall, other.FunctionToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCallOutputParam, other.FunctionCallOutputParam) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Message1, other.Message1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Message2, other.Message2) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCall, other.FileSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCall, other.ComputerCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCallOutput, other.ComputerCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCall, other.WebSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCall, other.FunctionCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCallOutput, other.FunctionCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchCall, other.ToolSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchOutput, other.ToolSearchOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Reasoning, other.Reasoning) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenToolCall, other.ImageGenToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterToolCall, other.CodeInterpreterToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCall, other.LocalShellToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCallOutput, other.LocalShellToolCallOutput) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListTools, other.MCPListTools) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalRequest, other.MCPApprovalRequest) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalResponse, other.MCPApprovalResponse) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolCall, other.MCPToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Compaction, other.Compaction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCall, other.ImageGenerationCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCall, other.CodeInterpreterCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCall, other.LocalShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCallOutput, other.LocalShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCall, other.ShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCallOutput, other.ShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCall, other.ApplyPatchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCallOutput, other.ApplyPatchCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpListTools, other.McpListTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalRequest, other.McpApprovalRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalResponse, other.McpApprovalResponse) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpCall, other.McpCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCallOutput, other.CustomToolCallOutput) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCall, other.CustomToolCall) ; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.Json.g.cs new file mode 100644 index 00000000..b6e1cf88 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ItemField + { + /// + /// 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::tryAGI.OpenAI.ItemField? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ItemField), + jsonSerializerContext) as global::tryAGI.OpenAI.ItemField?; + } + + /// + /// 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::tryAGI.OpenAI.ItemField? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ItemField), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ItemField?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.g.cs new file mode 100644 index 00000000..01b92d45 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemField.g.cs @@ -0,0 +1,1424 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An item representing a message, tool call, tool output, reasoning, or other response element. + /// + public readonly partial struct ItemField : global::System.IEquatable + { + /// + /// A message to or from the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.Message? Message { get; init; } +#else + public global::tryAGI.OpenAI.Message? Message { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] +#endif + public bool IsMessage => Message != null; + + /// + /// A tool call to run a function. See the
+ /// [function calling guide](/docs/guides/function-calling) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCall))] +#endif + public bool IsFunctionCall => FunctionCall != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchCall))] +#endif + public bool IsToolSearchCall => ToolSearchCall != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchOutput))] +#endif + public bool IsToolSearchOutput => ToolSearchOutput != null; + + /// + /// The output of a function tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallOutput? FunctionCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallOutput? FunctionCallOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCallOutput))] +#endif + public bool IsFunctionCallOutput => FunctionCallOutput != null; + + /// + /// The results of a file search tool call. See the
+ /// [file search guide](/docs/guides/tools-file-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCall))] +#endif + public bool IsFileSearchCall => FileSearchCall != null; + + /// + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCall))] +#endif + public bool IsWebSearchCall => WebSearchCall != null; + + /// + /// An image generation request made by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCall))] +#endif + public bool IsImageGenerationCall => ImageGenerationCall != null; + + /// + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; init; } +#else + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCall))] +#endif + public bool IsComputerCall => ComputerCall != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; init; } +#else + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutputResource { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutputResource))] +#endif + public bool IsComputerToolCallOutputResource => ComputerToolCallOutputResource != null; + + /// + /// A description of the chain of thought used by a reasoning model while generating
+ /// a response. Be sure to include these items in your `input` to the Responses API
+ /// for subsequent turns of a conversation if you are manually
+ /// [managing context](/docs/guides/conversation-state). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } +#else + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] +#endif + public bool IsReasoning => Reasoning != null; + + /// + /// A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CompactionBody? Compaction { get; init; } +#else + public global::tryAGI.OpenAI.CompactionBody? Compaction { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))] +#endif + public bool IsCompaction => Compaction != null; + + /// + /// A tool call to run code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCall))] +#endif + public bool IsCodeInterpreterCall => CodeInterpreterCall != null; + + /// + /// A tool call to run a command on the local shell. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCall))] +#endif + public bool IsLocalShellCall => LocalShellCall != null; + + /// + /// The output of a local shell tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCallOutput))] +#endif + public bool IsLocalShellCallOutput => LocalShellCallOutput != null; + + /// + /// A tool call that executes one or more shell commands in a managed environment. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCall))] +#endif + public bool IsShellCall => ShellCall != null; + + /// + /// The output of a shell tool call that was emitted. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCallOutput))] +#endif + public bool IsShellCallOutput => ShellCallOutput != null; + + /// + /// A tool call that applies file diffs by creating, deleting, or updating files. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCall))] +#endif + public bool IsApplyPatchCall => ApplyPatchCall != null; + + /// + /// The output emitted by an apply patch tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCallOutput))] +#endif + public bool IsApplyPatchCallOutput => ApplyPatchCallOutput != null; + + /// + /// A list of tools available on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; init; } +#else + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpListTools))] +#endif + public bool IsMcpListTools => McpListTools != null; + + /// + /// A request for human approval of a tool invocation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalRequest))] +#endif + public bool IsMcpApprovalRequest => McpApprovalRequest != null; + + /// + /// A response to an MCP approval request. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalResponse))] +#endif + public bool IsMcpApprovalResponse => McpApprovalResponse != null; + + /// + /// An invocation of a tool on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; init; } +#else + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpCall))] +#endif + public bool IsMcpCall => McpCall != null; + + /// + /// A call to a custom tool created by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } +#else + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] +#endif + public bool IsCustomToolCall => CustomToolCall != null; + + /// + /// The output of a custom tool call from your code, being sent back to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.CustomToolCallOutput? CustomToolCallOutput { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallOutput))] +#endif + public bool IsCustomToolCallOutput => CustomToolCallOutput != null; + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.Message value) => new ItemField((global::tryAGI.OpenAI.Message?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.Message?(ItemField @this) => @this.Message; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.Message? value) + { + Message = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.FunctionToolCall value) => new ItemField((global::tryAGI.OpenAI.FunctionToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(ItemField @this) => @this.FunctionCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.FunctionToolCall? value) + { + FunctionCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ToolSearchCall value) => new ItemField((global::tryAGI.OpenAI.ToolSearchCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolSearchCall?(ItemField @this) => @this.ToolSearchCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ToolSearchCall? value) + { + ToolSearchCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ToolSearchOutput value) => new ItemField((global::tryAGI.OpenAI.ToolSearchOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolSearchOutput?(ItemField @this) => @this.ToolSearchOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ToolSearchOutput? value) + { + ToolSearchOutput = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.FunctionToolCallOutput value) => new ItemField((global::tryAGI.OpenAI.FunctionToolCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutput?(ItemField @this) => @this.FunctionCallOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.FunctionToolCallOutput? value) + { + FunctionCallOutput = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.FileSearchToolCall value) => new ItemField((global::tryAGI.OpenAI.FileSearchToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(ItemField @this) => @this.FileSearchCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.FileSearchToolCall? value) + { + FileSearchCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.WebSearchToolCall value) => new ItemField((global::tryAGI.OpenAI.WebSearchToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(ItemField @this) => @this.WebSearchCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.WebSearchToolCall? value) + { + WebSearchCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ImageGenToolCall value) => new ItemField((global::tryAGI.OpenAI.ImageGenToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(ItemField @this) => @this.ImageGenerationCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ImageGenToolCall? value) + { + ImageGenerationCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ComputerToolCall value) => new ItemField((global::tryAGI.OpenAI.ComputerToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(ItemField @this) => @this.ComputerCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ComputerToolCall? value) + { + ComputerCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ComputerToolCallOutputResource value) => new ItemField((global::tryAGI.OpenAI.ComputerToolCallOutputResource?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutputResource?(ItemField @this) => @this.ComputerToolCallOutputResource; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ComputerToolCallOutputResource? value) + { + ComputerToolCallOutputResource = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ReasoningItem value) => new ItemField((global::tryAGI.OpenAI.ReasoningItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ReasoningItem?(ItemField @this) => @this.Reasoning; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ReasoningItem? value) + { + Reasoning = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.CompactionBody value) => new ItemField((global::tryAGI.OpenAI.CompactionBody?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CompactionBody?(ItemField @this) => @this.Compaction; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.CompactionBody? value) + { + Compaction = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new ItemField((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(ItemField @this) => @this.CodeInterpreterCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + { + CodeInterpreterCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.LocalShellToolCall value) => new ItemField((global::tryAGI.OpenAI.LocalShellToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(ItemField @this) => @this.LocalShellCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.LocalShellToolCall? value) + { + LocalShellCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.LocalShellToolCallOutput value) => new ItemField((global::tryAGI.OpenAI.LocalShellToolCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(ItemField @this) => @this.LocalShellCallOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) + { + LocalShellCallOutput = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.FunctionShellCall value) => new ItemField((global::tryAGI.OpenAI.FunctionShellCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCall?(ItemField @this) => @this.ShellCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.FunctionShellCall? value) + { + ShellCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.FunctionShellCallOutput value) => new ItemField((global::tryAGI.OpenAI.FunctionShellCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutput?(ItemField @this) => @this.ShellCallOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.FunctionShellCallOutput? value) + { + ShellCallOutput = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ApplyPatchToolCall value) => new ItemField((global::tryAGI.OpenAI.ApplyPatchToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCall?(ItemField @this) => @this.ApplyPatchCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ApplyPatchToolCall? value) + { + ApplyPatchCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.ApplyPatchToolCallOutput value) => new ItemField((global::tryAGI.OpenAI.ApplyPatchToolCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallOutput?(ItemField @this) => @this.ApplyPatchCallOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.ApplyPatchToolCallOutput? value) + { + ApplyPatchCallOutput = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.MCPListTools value) => new ItemField((global::tryAGI.OpenAI.MCPListTools?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.MCPListTools?(ItemField @this) => @this.McpListTools; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.MCPListTools? value) + { + McpListTools = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.MCPApprovalRequest value) => new ItemField((global::tryAGI.OpenAI.MCPApprovalRequest?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(ItemField @this) => @this.McpApprovalRequest; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.MCPApprovalRequest? value) + { + McpApprovalRequest = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.MCPApprovalResponseResource value) => new ItemField((global::tryAGI.OpenAI.MCPApprovalResponseResource?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponseResource?(ItemField @this) => @this.McpApprovalResponse; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) + { + McpApprovalResponse = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.MCPToolCall value) => new ItemField((global::tryAGI.OpenAI.MCPToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(ItemField @this) => @this.McpCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.MCPToolCall? value) + { + McpCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.CustomToolCall value) => new ItemField((global::tryAGI.OpenAI.CustomToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CustomToolCall?(ItemField @this) => @this.CustomToolCall; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.CustomToolCall? value) + { + CustomToolCall = value; + } + + /// + /// + /// + public static implicit operator ItemField(global::tryAGI.OpenAI.CustomToolCallOutput value) => new ItemField((global::tryAGI.OpenAI.CustomToolCallOutput?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CustomToolCallOutput?(ItemField @this) => @this.CustomToolCallOutput; + + /// + /// + /// + public ItemField(global::tryAGI.OpenAI.CustomToolCallOutput? value) + { + CustomToolCallOutput = value; + } + + /// + /// + /// + public ItemField( + global::tryAGI.OpenAI.Message? message, + global::tryAGI.OpenAI.FunctionToolCall? functionCall, + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall, + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput, + global::tryAGI.OpenAI.FunctionToolCallOutput? functionCallOutput, + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall, + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall, + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall, + global::tryAGI.OpenAI.ComputerToolCall? computerCall, + global::tryAGI.OpenAI.ComputerToolCallOutputResource? computerToolCallOutputResource, + global::tryAGI.OpenAI.ReasoningItem? reasoning, + global::tryAGI.OpenAI.CompactionBody? compaction, + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall, + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall, + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput, + global::tryAGI.OpenAI.FunctionShellCall? shellCall, + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput, + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall, + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput, + global::tryAGI.OpenAI.MCPListTools? mcpListTools, + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest, + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse, + global::tryAGI.OpenAI.MCPToolCall? mcpCall, + global::tryAGI.OpenAI.CustomToolCall? customToolCall, + global::tryAGI.OpenAI.CustomToolCallOutput? customToolCallOutput + ) + { + Message = message; + FunctionCall = functionCall; + ToolSearchCall = toolSearchCall; + ToolSearchOutput = toolSearchOutput; + FunctionCallOutput = functionCallOutput; + FileSearchCall = fileSearchCall; + WebSearchCall = webSearchCall; + ImageGenerationCall = imageGenerationCall; + ComputerCall = computerCall; + ComputerToolCallOutputResource = computerToolCallOutputResource; + Reasoning = reasoning; + Compaction = compaction; + CodeInterpreterCall = codeInterpreterCall; + LocalShellCall = localShellCall; + LocalShellCallOutput = localShellCallOutput; + ShellCall = shellCall; + ShellCallOutput = shellCallOutput; + ApplyPatchCall = applyPatchCall; + ApplyPatchCallOutput = applyPatchCallOutput; + McpListTools = mcpListTools; + McpApprovalRequest = mcpApprovalRequest; + McpApprovalResponse = mcpApprovalResponse; + McpCall = mcpCall; + CustomToolCall = customToolCall; + CustomToolCallOutput = customToolCallOutput; + } + + /// + /// + /// + public object? Object => + CustomToolCallOutput as object ?? + CustomToolCall as object ?? + McpCall as object ?? + McpApprovalResponse as object ?? + McpApprovalRequest as object ?? + McpListTools as object ?? + ApplyPatchCallOutput as object ?? + ApplyPatchCall as object ?? + ShellCallOutput as object ?? + ShellCall as object ?? + LocalShellCallOutput as object ?? + LocalShellCall as object ?? + CodeInterpreterCall as object ?? + Compaction as object ?? + Reasoning as object ?? + ComputerToolCallOutputResource as object ?? + ComputerCall as object ?? + ImageGenerationCall as object ?? + WebSearchCall as object ?? + FileSearchCall as object ?? + FunctionCallOutput as object ?? + ToolSearchOutput as object ?? + ToolSearchCall as object ?? + FunctionCall as object ?? + Message as object + ; + + /// + /// + /// + public override string? ToString() => + Message?.ToString() ?? + FunctionCall?.ToString() ?? + ToolSearchCall?.ToString() ?? + ToolSearchOutput?.ToString() ?? + FunctionCallOutput?.ToString() ?? + FileSearchCall?.ToString() ?? + WebSearchCall?.ToString() ?? + ImageGenerationCall?.ToString() ?? + ComputerCall?.ToString() ?? + ComputerToolCallOutputResource?.ToString() ?? + Reasoning?.ToString() ?? + Compaction?.ToString() ?? + CodeInterpreterCall?.ToString() ?? + LocalShellCall?.ToString() ?? + LocalShellCallOutput?.ToString() ?? + ShellCall?.ToString() ?? + ShellCallOutput?.ToString() ?? + ApplyPatchCall?.ToString() ?? + ApplyPatchCallOutput?.ToString() ?? + McpListTools?.ToString() ?? + McpApprovalRequest?.ToString() ?? + McpApprovalResponse?.ToString() ?? + McpCall?.ToString() ?? + CustomToolCall?.ToString() ?? + CustomToolCallOutput?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && IsMcpCall && !IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && IsCustomToolCall && !IsCustomToolCallOutput || !IsMessage && !IsFunctionCall && !IsToolSearchCall && !IsToolSearchOutput && !IsFunctionCallOutput && !IsFileSearchCall && !IsWebSearchCall && !IsImageGenerationCall && !IsComputerCall && !IsComputerToolCallOutputResource && !IsReasoning && !IsCompaction && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall && !IsCustomToolCall && IsCustomToolCallOutput; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? message = null, + global::System.Func? functionCall = null, + global::System.Func? toolSearchCall = null, + global::System.Func? toolSearchOutput = null, + global::System.Func? functionCallOutput = null, + global::System.Func? fileSearchCall = null, + global::System.Func? webSearchCall = null, + global::System.Func? imageGenerationCall = null, + global::System.Func? computerCall = null, + global::System.Func? computerToolCallOutputResource = null, + global::System.Func? reasoning = null, + global::System.Func? compaction = null, + global::System.Func? codeInterpreterCall = null, + global::System.Func? localShellCall = null, + global::System.Func? localShellCallOutput = null, + global::System.Func? shellCall = null, + global::System.Func? shellCallOutput = null, + global::System.Func? applyPatchCall = null, + global::System.Func? applyPatchCallOutput = null, + global::System.Func? mcpListTools = null, + global::System.Func? mcpApprovalRequest = null, + global::System.Func? mcpApprovalResponse = null, + global::System.Func? mcpCall = null, + global::System.Func? customToolCall = null, + global::System.Func? customToolCallOutput = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessage && message != null) + { + return message(Message!); + } + else if (IsFunctionCall && functionCall != null) + { + return functionCall(FunctionCall!); + } + else if (IsToolSearchCall && toolSearchCall != null) + { + return toolSearchCall(ToolSearchCall!); + } + else if (IsToolSearchOutput && toolSearchOutput != null) + { + return toolSearchOutput(ToolSearchOutput!); + } + else if (IsFunctionCallOutput && functionCallOutput != null) + { + return functionCallOutput(FunctionCallOutput!); + } + else if (IsFileSearchCall && fileSearchCall != null) + { + return fileSearchCall(FileSearchCall!); + } + else if (IsWebSearchCall && webSearchCall != null) + { + return webSearchCall(WebSearchCall!); + } + else if (IsImageGenerationCall && imageGenerationCall != null) + { + return imageGenerationCall(ImageGenerationCall!); + } + else if (IsComputerCall && computerCall != null) + { + return computerCall(ComputerCall!); + } + else if (IsComputerToolCallOutputResource && computerToolCallOutputResource != null) + { + return computerToolCallOutputResource(ComputerToolCallOutputResource!); + } + else if (IsReasoning && reasoning != null) + { + return reasoning(Reasoning!); + } + else if (IsCompaction && compaction != null) + { + return compaction(Compaction!); + } + else if (IsCodeInterpreterCall && codeInterpreterCall != null) + { + return codeInterpreterCall(CodeInterpreterCall!); + } + else if (IsLocalShellCall && localShellCall != null) + { + return localShellCall(LocalShellCall!); + } + else if (IsLocalShellCallOutput && localShellCallOutput != null) + { + return localShellCallOutput(LocalShellCallOutput!); + } + else if (IsShellCall && shellCall != null) + { + return shellCall(ShellCall!); + } + else if (IsShellCallOutput && shellCallOutput != null) + { + return shellCallOutput(ShellCallOutput!); + } + else if (IsApplyPatchCall && applyPatchCall != null) + { + return applyPatchCall(ApplyPatchCall!); + } + else if (IsApplyPatchCallOutput && applyPatchCallOutput != null) + { + return applyPatchCallOutput(ApplyPatchCallOutput!); + } + else if (IsMcpListTools && mcpListTools != null) + { + return mcpListTools(McpListTools!); + } + else if (IsMcpApprovalRequest && mcpApprovalRequest != null) + { + return mcpApprovalRequest(McpApprovalRequest!); + } + else if (IsMcpApprovalResponse && mcpApprovalResponse != null) + { + return mcpApprovalResponse(McpApprovalResponse!); + } + else if (IsMcpCall && mcpCall != null) + { + return mcpCall(McpCall!); + } + else if (IsCustomToolCall && customToolCall != null) + { + return customToolCall(CustomToolCall!); + } + else if (IsCustomToolCallOutput && customToolCallOutput != null) + { + return customToolCallOutput(CustomToolCallOutput!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? message = null, + global::System.Action? functionCall = null, + global::System.Action? toolSearchCall = null, + global::System.Action? toolSearchOutput = null, + global::System.Action? functionCallOutput = null, + global::System.Action? fileSearchCall = null, + global::System.Action? webSearchCall = null, + global::System.Action? imageGenerationCall = null, + global::System.Action? computerCall = null, + global::System.Action? computerToolCallOutputResource = null, + global::System.Action? reasoning = null, + global::System.Action? compaction = null, + global::System.Action? codeInterpreterCall = null, + global::System.Action? localShellCall = null, + global::System.Action? localShellCallOutput = null, + global::System.Action? shellCall = null, + global::System.Action? shellCallOutput = null, + global::System.Action? applyPatchCall = null, + global::System.Action? applyPatchCallOutput = null, + global::System.Action? mcpListTools = null, + global::System.Action? mcpApprovalRequest = null, + global::System.Action? mcpApprovalResponse = null, + global::System.Action? mcpCall = null, + global::System.Action? customToolCall = null, + global::System.Action? customToolCallOutput = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsMessage) + { + message?.Invoke(Message!); + } + else if (IsFunctionCall) + { + functionCall?.Invoke(FunctionCall!); + } + else if (IsToolSearchCall) + { + toolSearchCall?.Invoke(ToolSearchCall!); + } + else if (IsToolSearchOutput) + { + toolSearchOutput?.Invoke(ToolSearchOutput!); + } + else if (IsFunctionCallOutput) + { + functionCallOutput?.Invoke(FunctionCallOutput!); + } + else if (IsFileSearchCall) + { + fileSearchCall?.Invoke(FileSearchCall!); + } + else if (IsWebSearchCall) + { + webSearchCall?.Invoke(WebSearchCall!); + } + else if (IsImageGenerationCall) + { + imageGenerationCall?.Invoke(ImageGenerationCall!); + } + else if (IsComputerCall) + { + computerCall?.Invoke(ComputerCall!); + } + else if (IsComputerToolCallOutputResource) + { + computerToolCallOutputResource?.Invoke(ComputerToolCallOutputResource!); + } + else if (IsReasoning) + { + reasoning?.Invoke(Reasoning!); + } + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + else if (IsCodeInterpreterCall) + { + codeInterpreterCall?.Invoke(CodeInterpreterCall!); + } + else if (IsLocalShellCall) + { + localShellCall?.Invoke(LocalShellCall!); + } + else if (IsLocalShellCallOutput) + { + localShellCallOutput?.Invoke(LocalShellCallOutput!); + } + else if (IsShellCall) + { + shellCall?.Invoke(ShellCall!); + } + else if (IsShellCallOutput) + { + shellCallOutput?.Invoke(ShellCallOutput!); + } + else if (IsApplyPatchCall) + { + applyPatchCall?.Invoke(ApplyPatchCall!); + } + else if (IsApplyPatchCallOutput) + { + applyPatchCallOutput?.Invoke(ApplyPatchCallOutput!); + } + else if (IsMcpListTools) + { + mcpListTools?.Invoke(McpListTools!); + } + else if (IsMcpApprovalRequest) + { + mcpApprovalRequest?.Invoke(McpApprovalRequest!); + } + else if (IsMcpApprovalResponse) + { + mcpApprovalResponse?.Invoke(McpApprovalResponse!); + } + else if (IsMcpCall) + { + mcpCall?.Invoke(McpCall!); + } + else if (IsCustomToolCall) + { + customToolCall?.Invoke(CustomToolCall!); + } + else if (IsCustomToolCallOutput) + { + customToolCallOutput?.Invoke(CustomToolCallOutput!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Message, + typeof(global::tryAGI.OpenAI.Message), + FunctionCall, + typeof(global::tryAGI.OpenAI.FunctionToolCall), + ToolSearchCall, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + ToolSearchOutput, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), + FunctionCallOutput, + typeof(global::tryAGI.OpenAI.FunctionToolCallOutput), + FileSearchCall, + typeof(global::tryAGI.OpenAI.FileSearchToolCall), + WebSearchCall, + typeof(global::tryAGI.OpenAI.WebSearchToolCall), + ImageGenerationCall, + typeof(global::tryAGI.OpenAI.ImageGenToolCall), + ComputerCall, + typeof(global::tryAGI.OpenAI.ComputerToolCall), + ComputerToolCallOutputResource, + typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), + Reasoning, + typeof(global::tryAGI.OpenAI.ReasoningItem), + Compaction, + typeof(global::tryAGI.OpenAI.CompactionBody), + CodeInterpreterCall, + typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), + LocalShellCall, + typeof(global::tryAGI.OpenAI.LocalShellToolCall), + LocalShellCallOutput, + typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), + ShellCall, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + ShellCallOutput, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + ApplyPatchCall, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + ApplyPatchCallOutput, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + McpListTools, + typeof(global::tryAGI.OpenAI.MCPListTools), + McpApprovalRequest, + typeof(global::tryAGI.OpenAI.MCPApprovalRequest), + McpApprovalResponse, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), + McpCall, + typeof(global::tryAGI.OpenAI.MCPToolCall), + CustomToolCall, + typeof(global::tryAGI.OpenAI.CustomToolCall), + CustomToolCallOutput, + typeof(global::tryAGI.OpenAI.CustomToolCallOutput), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ItemField other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Message, other.Message) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCall, other.FunctionCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchCall, other.ToolSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchOutput, other.ToolSearchOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCallOutput, other.FunctionCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCall, other.FileSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCall, other.WebSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCall, other.ImageGenerationCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCall, other.ComputerCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCallOutputResource, other.ComputerToolCallOutputResource) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Reasoning, other.Reasoning) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Compaction, other.Compaction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCall, other.CodeInterpreterCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCall, other.LocalShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCallOutput, other.LocalShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCall, other.ShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCallOutput, other.ShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCall, other.ApplyPatchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCallOutput, other.ApplyPatchCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpListTools, other.McpListTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalRequest, other.McpApprovalRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalResponse, other.McpApprovalResponse) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpCall, other.McpCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCall, other.CustomToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCallOutput, other.CustomToolCallOutput) + ; + } + + /// + /// + /// + public static bool operator ==(ItemField obj1, ItemField obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ItemField obj1, ItemField obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ItemField o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.Json.g.cs new file mode 100644 index 00000000..c69d98be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ItemFieldDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ItemFieldDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ItemFieldDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ItemFieldDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ItemFieldDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ItemFieldDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ItemFieldDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.g.cs new file mode 100644 index 00000000..3aa57cad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemFieldDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ItemFieldDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ItemFieldDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ItemFieldDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParam.g.cs index 7c1021e9..00d2bceb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParam.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class ItemReferenceParam { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public global::tryAGI.OpenAI.ItemReferenceParamType2? Type { get; set; } + /// /// The ID of the item to reference. /// @@ -15,14 +21,6 @@ public sealed partial class ItemReferenceParam [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } - /// - /// The type of item to reference. Always `item_reference`.
- /// Default Value: item_reference - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ItemReferenceParamTypeJsonConverter))] - public global::tryAGI.OpenAI.ItemReferenceParamType? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,19 +30,16 @@ public sealed partial class ItemReferenceParam /// /// Initializes a new instance of the class. /// + /// /// /// The ID of the item to reference. /// - /// - /// The type of item to reference. Always `item_reference`.
- /// Default Value: item_reference - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ItemReferenceParam( string id, - global::tryAGI.OpenAI.ItemReferenceParamType? type) + global::tryAGI.OpenAI.ItemReferenceParamType2? type) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Type = type; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.Json.g.cs new file mode 100644 index 00000000..940381da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ItemReferenceParamType + { + /// + /// 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::tryAGI.OpenAI.ItemReferenceParamType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ItemReferenceParamType), + jsonSerializerContext) as global::tryAGI.OpenAI.ItemReferenceParamType; + } + + /// + /// 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::tryAGI.OpenAI.ItemReferenceParamType? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ItemReferenceParamType), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ItemReferenceParamType; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.g.cs index 55d6e3e8..8490383f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType.g.cs @@ -4,43 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The type of item to reference. Always `item_reference`.
- /// Default Value: item_reference + /// ///
- public enum ItemReferenceParamType + public sealed partial class ItemReferenceParamType { - /// - /// - /// - ItemReference, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ItemReferenceParamTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ItemReferenceParamType value) - { - return value switch - { - ItemReferenceParamType.ItemReference => "item_reference", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ItemReferenceParamType? ToEnum(string value) - { - return value switch - { - "item_reference" => ItemReferenceParamType.ItemReference, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType2.g.cs new file mode 100644 index 00000000..b92eebb1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemReferenceParamType2.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of item to reference. Always `item_reference`.
+ /// Default Value: item_reference + ///
+ public enum ItemReferenceParamType2 + { + /// + /// + /// + ItemReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ItemReferenceParamType2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ItemReferenceParamType2 value) + { + return value switch + { + ItemReferenceParamType2.ItemReference => "item_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ItemReferenceParamType2? ToEnum(string value) + { + return value switch + { + "item_reference" => ItemReferenceParamType2.ItemReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemResource.g.cs index b433f842..55c766e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ItemResource.g.cs @@ -27,392 +27,597 @@ namespace tryAGI.OpenAI public bool IsInputMessage => InputMessage != null; /// - /// + /// An output message from the model. /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.InputMessageResource value) => new ItemResource((global::tryAGI.OpenAI.InputMessageResource?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.OutputMessage? Message { get; init; } +#else + public global::tryAGI.OpenAI.OutputMessage? Message { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.InputMessageResource?(ItemResource @this) => @this.InputMessage; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Message))] +#endif + public bool IsMessage => Message != null; + + /// + /// The results of a file search tool call. See the
+ /// [file search guide](/docs/guides/tools-file-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; } +#endif /// /// /// - public ItemResource(global::tryAGI.OpenAI.InputMessageResource? value) - { - InputMessage = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCall))] +#endif + public bool IsFileSearchCall => FileSearchCall != null; /// - /// An output message from the model. + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputMessage? OutputMessage { get; init; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; init; } #else - public global::tryAGI.OpenAI.OutputMessage? OutputMessage { get; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCall))] #endif - public bool IsOutputMessage => OutputMessage != null; + public bool IsComputerCall => ComputerCall != null; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.OutputMessage value) => new ItemResource((global::tryAGI.OpenAI.OutputMessage?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.OutputMessage?(ItemResource @this) => @this.OutputMessage; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutput))] +#endif + public bool IsComputerToolCallOutput => ComputerToolCallOutput != null; /// - /// + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. ///
- public ItemResource(global::tryAGI.OpenAI.OutputMessage? value) - { - OutputMessage = value; - } +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; } +#endif /// - /// The results of a file search tool call. See the
- /// [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; init; } -#else - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCall))] #endif + public bool IsWebSearchCall => WebSearchCall != null; /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchToolCall))] + public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCall { get; } #endif - public bool IsFileSearchToolCall => FileSearchToolCall != null; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.FileSearchToolCall value) => new ItemResource((global::tryAGI.OpenAI.FileSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCall))] +#endif + public bool IsFunctionToolCall => FunctionToolCall != null; /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(ItemResource @this) => @this.FileSearchToolCall; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutput { get; } +#endif /// /// /// - public ItemResource(global::tryAGI.OpenAI.FileSearchToolCall? value) - { - FileSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallOutput))] +#endif + public bool IsFunctionToolCallOutput => FunctionToolCallOutput != null; /// - /// A tool call to a computer use tool. See the
- /// [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; init; } + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; } + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchCall))] #endif - public bool IsComputerToolCall => ComputerToolCall != null; + public bool IsToolSearchCall => ToolSearchCall != null; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.ComputerToolCall value) => new ItemResource((global::tryAGI.OpenAI.ComputerToolCall?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(ItemResource @this) => @this.ComputerToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchOutput))] +#endif + public bool IsToolSearchOutput => ToolSearchOutput != null; + + /// + /// An image generation request made by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; } +#endif /// /// /// - public ItemResource(global::tryAGI.OpenAI.ComputerToolCall? value) - { - ComputerToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCall))] +#endif + public bool IsImageGenerationCall => ImageGenerationCall != null; + + /// + /// A tool call to run code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; } +#endif /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutput { get; init; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCall))] +#endif + public bool IsCodeInterpreterCall => CodeInterpreterCall != null; + + /// + /// A tool call to run a command on the local shell. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCallOutputResource? ComputerToolCallOutput { get; } + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCallOutput))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCall))] +#endif + public bool IsLocalShellCall => LocalShellCall != null; + + /// + /// The output of a local shell tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellCallOutput { get; } #endif - public bool IsComputerToolCallOutput => ComputerToolCallOutput != null; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.ComputerToolCallOutputResource value) => new ItemResource((global::tryAGI.OpenAI.ComputerToolCallOutputResource?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCallOutput))] +#endif + public bool IsLocalShellCallOutput => LocalShellCallOutput != null; + + /// + /// A tool call that executes one or more shell commands in a managed environment. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutputResource?(ItemResource @this) => @this.ComputerToolCallOutput; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCall))] +#endif + public bool IsShellCall => ShellCall != null; + + /// + /// The output of a shell tool call that was emitted. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; } +#endif /// /// /// - public ItemResource(global::tryAGI.OpenAI.ComputerToolCallOutputResource? value) - { - ComputerToolCallOutput = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCallOutput))] +#endif + public bool IsShellCallOutput => ShellCallOutput != null; /// - /// The results of a web search tool call. See the
- /// [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + /// A tool call that applies file diffs by creating, deleting, or updating files. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; init; } + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; init; } #else - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; } + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCall))] +#endif + public bool IsApplyPatchCall => ApplyPatchCall != null; + + /// + /// The output emitted by an apply patch tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; } #endif - public bool IsWebSearchToolCall => WebSearchToolCall != null; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.WebSearchToolCall value) => new ItemResource((global::tryAGI.OpenAI.WebSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCallOutput))] +#endif + public bool IsApplyPatchCallOutput => ApplyPatchCallOutput != null; + + /// + /// A list of tools available on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; init; } +#else + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(ItemResource @this) => @this.WebSearchToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpListTools))] +#endif + public bool IsMcpListTools => McpListTools != null; + + /// + /// A request for human approval of a tool invocation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; } +#endif /// /// /// - public ItemResource(global::tryAGI.OpenAI.WebSearchToolCall? value) - { - WebSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalRequest))] +#endif + public bool IsMcpApprovalRequest => McpApprovalRequest != null; + + /// + /// A response to an MCP approval request. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalResponseResource? McpApprovalResponse { get; } +#endif /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCall { get; init; } + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalResponse))] +#endif + public bool IsMcpApprovalResponse => McpApprovalResponse != null; + + /// + /// An invocation of a tool on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCallResource? FunctionToolCall { get; } + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpCall))] #endif - public bool IsFunctionToolCall => FunctionToolCall != null; + public bool IsMcpCall => McpCall != null; + /// + /// + /// + public static implicit operator ItemResource(global::tryAGI.OpenAI.InputMessageResource value) => new ItemResource((global::tryAGI.OpenAI.InputMessageResource?)value); /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionToolCallResource value) => new ItemResource((global::tryAGI.OpenAI.FunctionToolCallResource?)value); + public static implicit operator global::tryAGI.OpenAI.InputMessageResource?(ItemResource @this) => @this.InputMessage; /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCallResource?(ItemResource @this) => @this.FunctionToolCall; + public ItemResource(global::tryAGI.OpenAI.InputMessageResource? value) + { + InputMessage = value; + } /// /// /// - public ItemResource(global::tryAGI.OpenAI.FunctionToolCallResource? value) + public static implicit operator ItemResource(global::tryAGI.OpenAI.OutputMessage value) => new ItemResource((global::tryAGI.OpenAI.OutputMessage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.OutputMessage?(ItemResource @this) => @this.Message; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.OutputMessage? value) { - FunctionToolCall = value; + Message = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.FunctionToolCallOutputResource? FunctionToolCallOutput { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.FileSearchToolCall value) => new ItemResource((global::tryAGI.OpenAI.FileSearchToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCallOutput))] -#endif - public bool IsFunctionToolCallOutput => FunctionToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(ItemResource @this) => @this.FileSearchCall; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionToolCallOutputResource value) => new ItemResource((global::tryAGI.OpenAI.FunctionToolCallOutputResource?)value); + public ItemResource(global::tryAGI.OpenAI.FileSearchToolCall? value) + { + FileSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutputResource?(ItemResource @this) => @this.FunctionToolCallOutput; + public static implicit operator ItemResource(global::tryAGI.OpenAI.ComputerToolCall value) => new ItemResource((global::tryAGI.OpenAI.ComputerToolCall?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.FunctionToolCallOutputResource? value) + public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(ItemResource @this) => @this.ComputerCall; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.ComputerToolCall? value) { - FunctionToolCallOutput = value; + ComputerCall = value; } /// - /// An image generation request made by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; init; } -#else - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.ComputerToolCallOutputResource value) => new ItemResource((global::tryAGI.OpenAI.ComputerToolCallOutputResource?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenToolCall))] -#endif - public bool IsImageGenToolCall => ImageGenToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ComputerToolCallOutputResource?(ItemResource @this) => @this.ComputerToolCallOutput; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.ImageGenToolCall value) => new ItemResource((global::tryAGI.OpenAI.ImageGenToolCall?)value); + public ItemResource(global::tryAGI.OpenAI.ComputerToolCallOutputResource? value) + { + ComputerToolCallOutput = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(ItemResource @this) => @this.ImageGenToolCall; + public static implicit operator ItemResource(global::tryAGI.OpenAI.WebSearchToolCall value) => new ItemResource((global::tryAGI.OpenAI.WebSearchToolCall?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.ImageGenToolCall? value) + public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(ItemResource @this) => @this.WebSearchCall; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.WebSearchToolCall? value) { - ImageGenToolCall = value; + WebSearchCall = value; } /// - /// A tool call to run code. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionToolCallResource value) => new ItemResource((global::tryAGI.OpenAI.FunctionToolCallResource?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterToolCall))] -#endif - public bool IsCodeInterpreterToolCall => CodeInterpreterToolCall != null; + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallResource?(ItemResource @this) => @this.FunctionToolCall; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new ItemResource((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + public ItemResource(global::tryAGI.OpenAI.FunctionToolCallResource? value) + { + FunctionToolCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(ItemResource @this) => @this.CodeInterpreterToolCall; + public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionToolCallOutputResource value) => new ItemResource((global::tryAGI.OpenAI.FunctionToolCallOutputResource?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + public static implicit operator global::tryAGI.OpenAI.FunctionToolCallOutputResource?(ItemResource @this) => @this.FunctionToolCallOutput; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.FunctionToolCallOutputResource? value) { - CodeInterpreterToolCall = value; + FunctionToolCallOutput = value; } /// - /// A tool call to run a command on the local shell. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.ToolSearchCall value) => new ItemResource((global::tryAGI.OpenAI.ToolSearchCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCall))] -#endif - public bool IsLocalShellToolCall => LocalShellToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ToolSearchCall?(ItemResource @this) => @this.ToolSearchCall; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.LocalShellToolCall value) => new ItemResource((global::tryAGI.OpenAI.LocalShellToolCall?)value); + public ItemResource(global::tryAGI.OpenAI.ToolSearchCall? value) + { + ToolSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(ItemResource @this) => @this.LocalShellToolCall; + public static implicit operator ItemResource(global::tryAGI.OpenAI.ToolSearchOutput value) => new ItemResource((global::tryAGI.OpenAI.ToolSearchOutput?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.LocalShellToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ToolSearchOutput?(ItemResource @this) => @this.ToolSearchOutput; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.ToolSearchOutput? value) { - LocalShellToolCall = value; + ToolSearchOutput = value; } /// - /// The output of a local shell tool call. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCallOutput? LocalShellToolCallOutput { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.ImageGenToolCall value) => new ItemResource((global::tryAGI.OpenAI.ImageGenToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCallOutput))] -#endif - public bool IsLocalShellToolCallOutput => LocalShellToolCallOutput != null; + public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(ItemResource @this) => @this.ImageGenerationCall; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.ImageGenToolCall? value) + { + ImageGenerationCall = value; + } + + /// + /// + /// + public static implicit operator ItemResource(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new ItemResource((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(ItemResource @this) => @this.CodeInterpreterCall; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + { + CodeInterpreterCall = value; + } + + /// + /// + /// + public static implicit operator ItemResource(global::tryAGI.OpenAI.LocalShellToolCall value) => new ItemResource((global::tryAGI.OpenAI.LocalShellToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(ItemResource @this) => @this.LocalShellCall; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.LocalShellToolCall? value) + { + LocalShellCall = value; + } /// /// @@ -422,137 +627,141 @@ public ItemResource(global::tryAGI.OpenAI.LocalShellToolCall? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(ItemResource @this) => @this.LocalShellToolCallOutput; + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCallOutput?(ItemResource @this) => @this.LocalShellCallOutput; /// /// /// public ItemResource(global::tryAGI.OpenAI.LocalShellToolCallOutput? value) { - LocalShellToolCallOutput = value; + LocalShellCallOutput = value; } /// - /// A list of tools available on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; init; } -#else - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionShellCall value) => new ItemResource((global::tryAGI.OpenAI.FunctionShellCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListTools))] -#endif - public bool IsMCPListTools => MCPListTools != null; + public static implicit operator global::tryAGI.OpenAI.FunctionShellCall?(ItemResource @this) => @this.ShellCall; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPListTools value) => new ItemResource((global::tryAGI.OpenAI.MCPListTools?)value); + public ItemResource(global::tryAGI.OpenAI.FunctionShellCall? value) + { + ShellCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPListTools?(ItemResource @this) => @this.MCPListTools; + public static implicit operator ItemResource(global::tryAGI.OpenAI.FunctionShellCallOutput value) => new ItemResource((global::tryAGI.OpenAI.FunctionShellCallOutput?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.MCPListTools? value) + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutput?(ItemResource @this) => @this.ShellCallOutput; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.FunctionShellCallOutput? value) { - MCPListTools = value; + ShellCallOutput = value; } /// - /// A request for human approval of a tool invocation. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.ApplyPatchToolCall value) => new ItemResource((global::tryAGI.OpenAI.ApplyPatchToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalRequest))] -#endif - public bool IsMCPApprovalRequest => MCPApprovalRequest != null; + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCall?(ItemResource @this) => @this.ApplyPatchCall; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPApprovalRequest value) => new ItemResource((global::tryAGI.OpenAI.MCPApprovalRequest?)value); + public ItemResource(global::tryAGI.OpenAI.ApplyPatchToolCall? value) + { + ApplyPatchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(ItemResource @this) => @this.MCPApprovalRequest; + public static implicit operator ItemResource(global::tryAGI.OpenAI.ApplyPatchToolCallOutput value) => new ItemResource((global::tryAGI.OpenAI.ApplyPatchToolCallOutput?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.MCPApprovalRequest? value) + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallOutput?(ItemResource @this) => @this.ApplyPatchCallOutput; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.ApplyPatchToolCallOutput? value) { - MCPApprovalRequest = value; + ApplyPatchCallOutput = value; } /// - /// A response to an MCP approval request. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalResponseResource? MCPApprovalResponse { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalResponseResource? MCPApprovalResponse { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPListTools value) => new ItemResource((global::tryAGI.OpenAI.MCPListTools?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalResponse))] -#endif - public bool IsMCPApprovalResponse => MCPApprovalResponse != null; + public static implicit operator global::tryAGI.OpenAI.MCPListTools?(ItemResource @this) => @this.McpListTools; /// /// /// - public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPApprovalResponseResource value) => new ItemResource((global::tryAGI.OpenAI.MCPApprovalResponseResource?)value); + public ItemResource(global::tryAGI.OpenAI.MCPListTools? value) + { + McpListTools = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponseResource?(ItemResource @this) => @this.MCPApprovalResponse; + public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPApprovalRequest value) => new ItemResource((global::tryAGI.OpenAI.MCPApprovalRequest?)value); /// /// /// - public ItemResource(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) + public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(ItemResource @this) => @this.McpApprovalRequest; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.MCPApprovalRequest? value) { - MCPApprovalResponse = value; + McpApprovalRequest = value; } /// - /// An invocation of a tool on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; init; } -#else - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; } -#endif + public static implicit operator ItemResource(global::tryAGI.OpenAI.MCPApprovalResponseResource value) => new ItemResource((global::tryAGI.OpenAI.MCPApprovalResponseResource?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPToolCall))] -#endif - public bool IsMCPToolCall => MCPToolCall != null; + public static implicit operator global::tryAGI.OpenAI.MCPApprovalResponseResource?(ItemResource @this) => @this.McpApprovalResponse; + + /// + /// + /// + public ItemResource(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) + { + McpApprovalResponse = value; + } /// /// @@ -562,14 +771,14 @@ public ItemResource(global::tryAGI.OpenAI.MCPApprovalResponseResource? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(ItemResource @this) => @this.MCPToolCall; + public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(ItemResource @this) => @this.McpCall; /// /// /// public ItemResource(global::tryAGI.OpenAI.MCPToolCall? value) { - MCPToolCall = value; + McpCall = value; } /// @@ -577,60 +786,78 @@ public ItemResource(global::tryAGI.OpenAI.MCPToolCall? value) /// public ItemResource( global::tryAGI.OpenAI.InputMessageResource? inputMessage, - global::tryAGI.OpenAI.OutputMessage? outputMessage, - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall, - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall, + global::tryAGI.OpenAI.OutputMessage? message, + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall, + global::tryAGI.OpenAI.ComputerToolCall? computerCall, global::tryAGI.OpenAI.ComputerToolCallOutputResource? computerToolCallOutput, - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall, + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall, global::tryAGI.OpenAI.FunctionToolCallResource? functionToolCall, global::tryAGI.OpenAI.FunctionToolCallOutputResource? functionToolCallOutput, - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall, - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall, - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall, - global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellToolCallOutput, - global::tryAGI.OpenAI.MCPListTools? mCPListTools, - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest, - global::tryAGI.OpenAI.MCPApprovalResponseResource? mCPApprovalResponse, - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall, + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput, + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall, + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall, + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall, + global::tryAGI.OpenAI.LocalShellToolCallOutput? localShellCallOutput, + global::tryAGI.OpenAI.FunctionShellCall? shellCall, + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput, + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall, + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput, + global::tryAGI.OpenAI.MCPListTools? mcpListTools, + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest, + global::tryAGI.OpenAI.MCPApprovalResponseResource? mcpApprovalResponse, + global::tryAGI.OpenAI.MCPToolCall? mcpCall ) { InputMessage = inputMessage; - OutputMessage = outputMessage; - FileSearchToolCall = fileSearchToolCall; - ComputerToolCall = computerToolCall; + Message = message; + FileSearchCall = fileSearchCall; + ComputerCall = computerCall; ComputerToolCallOutput = computerToolCallOutput; - WebSearchToolCall = webSearchToolCall; + WebSearchCall = webSearchCall; FunctionToolCall = functionToolCall; FunctionToolCallOutput = functionToolCallOutput; - ImageGenToolCall = imageGenToolCall; - CodeInterpreterToolCall = codeInterpreterToolCall; - LocalShellToolCall = localShellToolCall; - LocalShellToolCallOutput = localShellToolCallOutput; - MCPListTools = mCPListTools; - MCPApprovalRequest = mCPApprovalRequest; - MCPApprovalResponse = mCPApprovalResponse; - MCPToolCall = mCPToolCall; + ToolSearchCall = toolSearchCall; + ToolSearchOutput = toolSearchOutput; + ImageGenerationCall = imageGenerationCall; + CodeInterpreterCall = codeInterpreterCall; + LocalShellCall = localShellCall; + LocalShellCallOutput = localShellCallOutput; + ShellCall = shellCall; + ShellCallOutput = shellCallOutput; + ApplyPatchCall = applyPatchCall; + ApplyPatchCallOutput = applyPatchCallOutput; + McpListTools = mcpListTools; + McpApprovalRequest = mcpApprovalRequest; + McpApprovalResponse = mcpApprovalResponse; + McpCall = mcpCall; } /// /// /// public object? Object => - MCPToolCall as object ?? - MCPApprovalResponse as object ?? - MCPApprovalRequest as object ?? - MCPListTools as object ?? - LocalShellToolCallOutput as object ?? - LocalShellToolCall as object ?? - CodeInterpreterToolCall as object ?? - ImageGenToolCall as object ?? + McpCall as object ?? + McpApprovalResponse as object ?? + McpApprovalRequest as object ?? + McpListTools as object ?? + ApplyPatchCallOutput as object ?? + ApplyPatchCall as object ?? + ShellCallOutput as object ?? + ShellCall as object ?? + LocalShellCallOutput as object ?? + LocalShellCall as object ?? + CodeInterpreterCall as object ?? + ImageGenerationCall as object ?? + ToolSearchOutput as object ?? + ToolSearchCall as object ?? FunctionToolCallOutput as object ?? FunctionToolCall as object ?? - WebSearchToolCall as object ?? + WebSearchCall as object ?? ComputerToolCallOutput as object ?? - ComputerToolCall as object ?? - FileSearchToolCall as object ?? - OutputMessage as object ?? + ComputerCall as object ?? + FileSearchCall as object ?? + Message as object ?? InputMessage as object ; @@ -639,21 +866,27 @@ InputMessage as object /// public override string? ToString() => InputMessage?.ToString() ?? - OutputMessage?.ToString() ?? - FileSearchToolCall?.ToString() ?? - ComputerToolCall?.ToString() ?? + Message?.ToString() ?? + FileSearchCall?.ToString() ?? + ComputerCall?.ToString() ?? ComputerToolCallOutput?.ToString() ?? - WebSearchToolCall?.ToString() ?? + WebSearchCall?.ToString() ?? FunctionToolCall?.ToString() ?? FunctionToolCallOutput?.ToString() ?? - ImageGenToolCall?.ToString() ?? - CodeInterpreterToolCall?.ToString() ?? - LocalShellToolCall?.ToString() ?? - LocalShellToolCallOutput?.ToString() ?? - MCPListTools?.ToString() ?? - MCPApprovalRequest?.ToString() ?? - MCPApprovalResponse?.ToString() ?? - MCPToolCall?.ToString() + ToolSearchCall?.ToString() ?? + ToolSearchOutput?.ToString() ?? + ImageGenerationCall?.ToString() ?? + CodeInterpreterCall?.ToString() ?? + LocalShellCall?.ToString() ?? + LocalShellCallOutput?.ToString() ?? + ShellCall?.ToString() ?? + ShellCallOutput?.ToString() ?? + ApplyPatchCall?.ToString() ?? + ApplyPatchCallOutput?.ToString() ?? + McpListTools?.ToString() ?? + McpApprovalRequest?.ToString() ?? + McpApprovalResponse?.ToString() ?? + McpCall?.ToString() ; /// @@ -661,7 +894,7 @@ InputMessage as object /// public bool Validate() { - return IsInputMessage || IsOutputMessage || IsFileSearchToolCall || IsComputerToolCall || IsComputerToolCallOutput || IsWebSearchToolCall || IsFunctionToolCall || IsFunctionToolCallOutput || IsImageGenToolCall || IsCodeInterpreterToolCall || IsLocalShellToolCall || IsLocalShellToolCallOutput || IsMCPListTools || IsMCPApprovalRequest || IsMCPApprovalResponse || IsMCPToolCall; + return IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && IsMcpApprovalRequest && !IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && IsMcpApprovalResponse && !IsMcpCall || !IsInputMessage && !IsMessage && !IsFileSearchCall && !IsComputerCall && !IsComputerToolCallOutput && !IsWebSearchCall && !IsFunctionToolCall && !IsFunctionToolCallOutput && !IsToolSearchCall && !IsToolSearchOutput && !IsImageGenerationCall && !IsCodeInterpreterCall && !IsLocalShellCall && !IsLocalShellCallOutput && !IsShellCall && !IsShellCallOutput && !IsApplyPatchCall && !IsApplyPatchCallOutput && !IsMcpListTools && !IsMcpApprovalRequest && !IsMcpApprovalResponse && IsMcpCall; } /// @@ -669,21 +902,27 @@ public bool Validate() /// public TResult? Match( global::System.Func? inputMessage = null, - global::System.Func? outputMessage = null, - global::System.Func? fileSearchToolCall = null, - global::System.Func? computerToolCall = null, + global::System.Func? message = null, + global::System.Func? fileSearchCall = null, + global::System.Func? computerCall = null, global::System.Func? computerToolCallOutput = null, - global::System.Func? webSearchToolCall = null, + global::System.Func? webSearchCall = null, global::System.Func? functionToolCall = null, global::System.Func? functionToolCallOutput = null, - global::System.Func? imageGenToolCall = null, - global::System.Func? codeInterpreterToolCall = null, - global::System.Func? localShellToolCall = null, - global::System.Func? localShellToolCallOutput = null, - global::System.Func? mCPListTools = null, - global::System.Func? mCPApprovalRequest = null, - global::System.Func? mCPApprovalResponse = null, - global::System.Func? mCPToolCall = null, + global::System.Func? toolSearchCall = null, + global::System.Func? toolSearchOutput = null, + global::System.Func? imageGenerationCall = null, + global::System.Func? codeInterpreterCall = null, + global::System.Func? localShellCall = null, + global::System.Func? localShellCallOutput = null, + global::System.Func? shellCall = null, + global::System.Func? shellCallOutput = null, + global::System.Func? applyPatchCall = null, + global::System.Func? applyPatchCallOutput = null, + global::System.Func? mcpListTools = null, + global::System.Func? mcpApprovalRequest = null, + global::System.Func? mcpApprovalResponse = null, + global::System.Func? mcpCall = null, bool validate = true) { if (validate) @@ -695,25 +934,25 @@ public bool Validate() { return inputMessage(InputMessage!); } - else if (IsOutputMessage && outputMessage != null) + else if (IsMessage && message != null) { - return outputMessage(OutputMessage!); + return message(Message!); } - else if (IsFileSearchToolCall && fileSearchToolCall != null) + else if (IsFileSearchCall && fileSearchCall != null) { - return fileSearchToolCall(FileSearchToolCall!); + return fileSearchCall(FileSearchCall!); } - else if (IsComputerToolCall && computerToolCall != null) + else if (IsComputerCall && computerCall != null) { - return computerToolCall(ComputerToolCall!); + return computerCall(ComputerCall!); } else if (IsComputerToolCallOutput && computerToolCallOutput != null) { return computerToolCallOutput(ComputerToolCallOutput!); } - else if (IsWebSearchToolCall && webSearchToolCall != null) + else if (IsWebSearchCall && webSearchCall != null) { - return webSearchToolCall(WebSearchToolCall!); + return webSearchCall(WebSearchCall!); } else if (IsFunctionToolCall && functionToolCall != null) { @@ -723,37 +962,61 @@ public bool Validate() { return functionToolCallOutput(FunctionToolCallOutput!); } - else if (IsImageGenToolCall && imageGenToolCall != null) + else if (IsToolSearchCall && toolSearchCall != null) + { + return toolSearchCall(ToolSearchCall!); + } + else if (IsToolSearchOutput && toolSearchOutput != null) + { + return toolSearchOutput(ToolSearchOutput!); + } + else if (IsImageGenerationCall && imageGenerationCall != null) + { + return imageGenerationCall(ImageGenerationCall!); + } + else if (IsCodeInterpreterCall && codeInterpreterCall != null) + { + return codeInterpreterCall(CodeInterpreterCall!); + } + else if (IsLocalShellCall && localShellCall != null) + { + return localShellCall(LocalShellCall!); + } + else if (IsLocalShellCallOutput && localShellCallOutput != null) + { + return localShellCallOutput(LocalShellCallOutput!); + } + else if (IsShellCall && shellCall != null) { - return imageGenToolCall(ImageGenToolCall!); + return shellCall(ShellCall!); } - else if (IsCodeInterpreterToolCall && codeInterpreterToolCall != null) + else if (IsShellCallOutput && shellCallOutput != null) { - return codeInterpreterToolCall(CodeInterpreterToolCall!); + return shellCallOutput(ShellCallOutput!); } - else if (IsLocalShellToolCall && localShellToolCall != null) + else if (IsApplyPatchCall && applyPatchCall != null) { - return localShellToolCall(LocalShellToolCall!); + return applyPatchCall(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput && localShellToolCallOutput != null) + else if (IsApplyPatchCallOutput && applyPatchCallOutput != null) { - return localShellToolCallOutput(LocalShellToolCallOutput!); + return applyPatchCallOutput(ApplyPatchCallOutput!); } - else if (IsMCPListTools && mCPListTools != null) + else if (IsMcpListTools && mcpListTools != null) { - return mCPListTools(MCPListTools!); + return mcpListTools(McpListTools!); } - else if (IsMCPApprovalRequest && mCPApprovalRequest != null) + else if (IsMcpApprovalRequest && mcpApprovalRequest != null) { - return mCPApprovalRequest(MCPApprovalRequest!); + return mcpApprovalRequest(McpApprovalRequest!); } - else if (IsMCPApprovalResponse && mCPApprovalResponse != null) + else if (IsMcpApprovalResponse && mcpApprovalResponse != null) { - return mCPApprovalResponse(MCPApprovalResponse!); + return mcpApprovalResponse(McpApprovalResponse!); } - else if (IsMCPToolCall && mCPToolCall != null) + else if (IsMcpCall && mcpCall != null) { - return mCPToolCall(MCPToolCall!); + return mcpCall(McpCall!); } return default(TResult); @@ -764,21 +1027,27 @@ public bool Validate() /// public void Match( global::System.Action? inputMessage = null, - global::System.Action? outputMessage = null, - global::System.Action? fileSearchToolCall = null, - global::System.Action? computerToolCall = null, + global::System.Action? message = null, + global::System.Action? fileSearchCall = null, + global::System.Action? computerCall = null, global::System.Action? computerToolCallOutput = null, - global::System.Action? webSearchToolCall = null, + global::System.Action? webSearchCall = null, global::System.Action? functionToolCall = null, global::System.Action? functionToolCallOutput = null, - global::System.Action? imageGenToolCall = null, - global::System.Action? codeInterpreterToolCall = null, - global::System.Action? localShellToolCall = null, - global::System.Action? localShellToolCallOutput = null, - global::System.Action? mCPListTools = null, - global::System.Action? mCPApprovalRequest = null, - global::System.Action? mCPApprovalResponse = null, - global::System.Action? mCPToolCall = null, + global::System.Action? toolSearchCall = null, + global::System.Action? toolSearchOutput = null, + global::System.Action? imageGenerationCall = null, + global::System.Action? codeInterpreterCall = null, + global::System.Action? localShellCall = null, + global::System.Action? localShellCallOutput = null, + global::System.Action? shellCall = null, + global::System.Action? shellCallOutput = null, + global::System.Action? applyPatchCall = null, + global::System.Action? applyPatchCallOutput = null, + global::System.Action? mcpListTools = null, + global::System.Action? mcpApprovalRequest = null, + global::System.Action? mcpApprovalResponse = null, + global::System.Action? mcpCall = null, bool validate = true) { if (validate) @@ -790,25 +1059,25 @@ public void Match( { inputMessage?.Invoke(InputMessage!); } - else if (IsOutputMessage) + else if (IsMessage) { - outputMessage?.Invoke(OutputMessage!); + message?.Invoke(Message!); } - else if (IsFileSearchToolCall) + else if (IsFileSearchCall) { - fileSearchToolCall?.Invoke(FileSearchToolCall!); + fileSearchCall?.Invoke(FileSearchCall!); } - else if (IsComputerToolCall) + else if (IsComputerCall) { - computerToolCall?.Invoke(ComputerToolCall!); + computerCall?.Invoke(ComputerCall!); } else if (IsComputerToolCallOutput) { computerToolCallOutput?.Invoke(ComputerToolCallOutput!); } - else if (IsWebSearchToolCall) + else if (IsWebSearchCall) { - webSearchToolCall?.Invoke(WebSearchToolCall!); + webSearchCall?.Invoke(WebSearchCall!); } else if (IsFunctionToolCall) { @@ -818,37 +1087,61 @@ public void Match( { functionToolCallOutput?.Invoke(FunctionToolCallOutput!); } - else if (IsImageGenToolCall) + else if (IsToolSearchCall) + { + toolSearchCall?.Invoke(ToolSearchCall!); + } + else if (IsToolSearchOutput) + { + toolSearchOutput?.Invoke(ToolSearchOutput!); + } + else if (IsImageGenerationCall) + { + imageGenerationCall?.Invoke(ImageGenerationCall!); + } + else if (IsCodeInterpreterCall) + { + codeInterpreterCall?.Invoke(CodeInterpreterCall!); + } + else if (IsLocalShellCall) + { + localShellCall?.Invoke(LocalShellCall!); + } + else if (IsLocalShellCallOutput) + { + localShellCallOutput?.Invoke(LocalShellCallOutput!); + } + else if (IsShellCall) { - imageGenToolCall?.Invoke(ImageGenToolCall!); + shellCall?.Invoke(ShellCall!); } - else if (IsCodeInterpreterToolCall) + else if (IsShellCallOutput) { - codeInterpreterToolCall?.Invoke(CodeInterpreterToolCall!); + shellCallOutput?.Invoke(ShellCallOutput!); } - else if (IsLocalShellToolCall) + else if (IsApplyPatchCall) { - localShellToolCall?.Invoke(LocalShellToolCall!); + applyPatchCall?.Invoke(ApplyPatchCall!); } - else if (IsLocalShellToolCallOutput) + else if (IsApplyPatchCallOutput) { - localShellToolCallOutput?.Invoke(LocalShellToolCallOutput!); + applyPatchCallOutput?.Invoke(ApplyPatchCallOutput!); } - else if (IsMCPListTools) + else if (IsMcpListTools) { - mCPListTools?.Invoke(MCPListTools!); + mcpListTools?.Invoke(McpListTools!); } - else if (IsMCPApprovalRequest) + else if (IsMcpApprovalRequest) { - mCPApprovalRequest?.Invoke(MCPApprovalRequest!); + mcpApprovalRequest?.Invoke(McpApprovalRequest!); } - else if (IsMCPApprovalResponse) + else if (IsMcpApprovalResponse) { - mCPApprovalResponse?.Invoke(MCPApprovalResponse!); + mcpApprovalResponse?.Invoke(McpApprovalResponse!); } - else if (IsMCPToolCall) + else if (IsMcpCall) { - mCPToolCall?.Invoke(MCPToolCall!); + mcpCall?.Invoke(McpCall!); } } @@ -861,35 +1154,47 @@ public override int GetHashCode() { InputMessage, typeof(global::tryAGI.OpenAI.InputMessageResource), - OutputMessage, + Message, typeof(global::tryAGI.OpenAI.OutputMessage), - FileSearchToolCall, + FileSearchCall, typeof(global::tryAGI.OpenAI.FileSearchToolCall), - ComputerToolCall, + ComputerCall, typeof(global::tryAGI.OpenAI.ComputerToolCall), ComputerToolCallOutput, typeof(global::tryAGI.OpenAI.ComputerToolCallOutputResource), - WebSearchToolCall, + WebSearchCall, typeof(global::tryAGI.OpenAI.WebSearchToolCall), FunctionToolCall, typeof(global::tryAGI.OpenAI.FunctionToolCallResource), FunctionToolCallOutput, typeof(global::tryAGI.OpenAI.FunctionToolCallOutputResource), - ImageGenToolCall, + ToolSearchCall, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + ToolSearchOutput, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), + ImageGenerationCall, typeof(global::tryAGI.OpenAI.ImageGenToolCall), - CodeInterpreterToolCall, + CodeInterpreterCall, typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), - LocalShellToolCall, + LocalShellCall, typeof(global::tryAGI.OpenAI.LocalShellToolCall), - LocalShellToolCallOutput, + LocalShellCallOutput, typeof(global::tryAGI.OpenAI.LocalShellToolCallOutput), - MCPListTools, + ShellCall, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + ShellCallOutput, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + ApplyPatchCall, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + ApplyPatchCallOutput, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + McpListTools, typeof(global::tryAGI.OpenAI.MCPListTools), - MCPApprovalRequest, + McpApprovalRequest, typeof(global::tryAGI.OpenAI.MCPApprovalRequest), - MCPApprovalResponse, + McpApprovalResponse, typeof(global::tryAGI.OpenAI.MCPApprovalResponseResource), - MCPToolCall, + McpCall, typeof(global::tryAGI.OpenAI.MCPToolCall), }; const int offset = unchecked((int)2166136261); @@ -908,21 +1213,27 @@ public bool Equals(ItemResource other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(InputMessage, other.InputMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputMessage, other.OutputMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchToolCall, other.FileSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCall, other.ComputerToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Message, other.Message) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCall, other.FileSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCall, other.ComputerCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCallOutput, other.ComputerToolCallOutput) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchToolCall, other.WebSearchToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCall, other.WebSearchCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCall, other.FunctionToolCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCallOutput, other.FunctionToolCallOutput) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenToolCall, other.ImageGenToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterToolCall, other.CodeInterpreterToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCall, other.LocalShellToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCallOutput, other.LocalShellToolCallOutput) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListTools, other.MCPListTools) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalRequest, other.MCPApprovalRequest) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalResponse, other.MCPApprovalResponse) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolCall, other.MCPToolCall) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchCall, other.ToolSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchOutput, other.ToolSearchOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCall, other.ImageGenerationCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCall, other.CodeInterpreterCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCall, other.LocalShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCallOutput, other.LocalShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCall, other.ShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCallOutput, other.ShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCall, other.ApplyPatchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCallOutput, other.ApplyPatchCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpListTools, other.McpListTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalRequest, other.McpApprovalRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalResponse, other.McpApprovalResponse) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpCall, other.McpCall) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.Json.g.cs deleted file mode 100644 index f4775050..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class KeyPress - { - /// - /// 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::tryAGI.OpenAI.KeyPress? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.KeyPress), - jsonSerializerContext) as global::tryAGI.OpenAI.KeyPress; - } - - /// - /// 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::tryAGI.OpenAI.KeyPress? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.KeyPress), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.KeyPress; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.g.cs deleted file mode 100644 index ec7e84b1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPress.g.cs +++ /dev/null @@ -1,65 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A collection of keypresses the model would like to perform. - /// - public sealed partial class KeyPress - { - /// - /// The combination of keys the model is requesting to be pressed. This is an
- /// array of strings, each representing a key. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("keys")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Keys { get; set; } - - /// - /// Specifies the event type. For a keypress action, this property is
- /// always set to `keypress`.
- /// Default Value: keypress - ///
- /// global::tryAGI.OpenAI.KeyPressType.Keypress - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressTypeJsonConverter))] - public global::tryAGI.OpenAI.KeyPressType Type { get; set; } = global::tryAGI.OpenAI.KeyPressType.Keypress; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The combination of keys the model is requesting to be pressed. This is an
- /// array of strings, each representing a key. - /// - /// - /// Specifies the event type. For a keypress action, this property is
- /// always set to `keypress`.
- /// Default Value: keypress - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public KeyPress( - global::System.Collections.Generic.IList keys, - global::tryAGI.OpenAI.KeyPressType type = global::tryAGI.OpenAI.KeyPressType.Keypress) - { - this.Keys = keys ?? throw new global::System.ArgumentNullException(nameof(keys)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public KeyPress() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.Json.g.cs new file mode 100644 index 00000000..8f61522d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class KeyPressAction + { + /// + /// 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::tryAGI.OpenAI.KeyPressAction? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.KeyPressAction), + jsonSerializerContext) as global::tryAGI.OpenAI.KeyPressAction; + } + + /// + /// 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::tryAGI.OpenAI.KeyPressAction? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.KeyPressAction), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.KeyPressAction; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.g.cs new file mode 100644 index 00000000..5495bd81 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressAction.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A collection of keypresses the model would like to perform. + /// + public sealed partial class KeyPressAction + { + /// + /// Specifies the event type. For a keypress action, this property is always set to `keypress`.
+ /// Default Value: keypress + ///
+ /// global::tryAGI.OpenAI.KeyPressActionType.Keypress + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.KeyPressActionTypeJsonConverter))] + public global::tryAGI.OpenAI.KeyPressActionType Type { get; set; } = global::tryAGI.OpenAI.KeyPressActionType.Keypress; + + /// + /// The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("keys")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Keys { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a keypress action, this property is always set to `keypress`.
+ /// Default Value: keypress + /// + /// + /// The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public KeyPressAction( + global::System.Collections.Generic.IList keys, + global::tryAGI.OpenAI.KeyPressActionType type = global::tryAGI.OpenAI.KeyPressActionType.Keypress) + { + this.Keys = keys ?? throw new global::System.ArgumentNullException(nameof(keys)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public KeyPressAction() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressActionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressActionType.g.cs new file mode 100644 index 00000000..ffa1f7a7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressActionType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a keypress action, this property is always set to `keypress`.
+ /// Default Value: keypress + ///
+ public enum KeyPressActionType + { + /// + /// + /// + Keypress, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class KeyPressActionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this KeyPressActionType value) + { + return value switch + { + KeyPressActionType.Keypress => "keypress", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static KeyPressActionType? ToEnum(string value) + { + return value switch + { + "keypress" => KeyPressActionType.Keypress, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressType.g.cs deleted file mode 100644 index 088715d9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.KeyPressType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a keypress action, this property is
- /// always set to `keypress`.
- /// Default Value: keypress - ///
- public enum KeyPressType - { - /// - /// - /// - Keypress, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class KeyPressTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this KeyPressType value) - { - return value switch - { - KeyPressType.Keypress => "keypress", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static KeyPressType? ToEnum(string value) - { - return value switch - { - "keypress" => KeyPressType.Keypress, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAssistantsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAssistantsResponse.g.cs index 2b0e98a4..817a03c0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAssistantsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAssistantsResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI ///
public sealed partial class ListAssistantsResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListAssistantsResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: asst_abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListAssistantsResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListAssistantsResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: asst_abc123 /// - /// - /// Example: false - /// /// /// Example: asst_abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListAssistantsResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAuditLogsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAuditLogsResponse.g.cs index b6368300..79134e7b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAuditLogsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListAuditLogsResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ListAuditLogsResponse { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListAuditLogsResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ListAuditLogsResponseObject Object { get; set; } + /// /// /// @@ -23,13 +30,6 @@ public sealed partial class ListAuditLogsResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: audit_log-hnbkd8s93s /// @@ -41,9 +41,9 @@ public sealed partial class ListAuditLogsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListAuditLogsResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ListAuditLogsResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,29 +54,29 @@ public sealed partial class ListAuditLogsResponse /// /// Initializes a new instance of the class. /// + /// /// /// /// Example: audit_log-defb456h8dks /// - /// /// /// Example: audit_log-hnbkd8s93s /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListAuditLogsResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ListAuditLogsResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListBatchesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListBatchesResponse.g.cs index f3f96794..2325e157 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListBatchesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListBatchesResponse.g.cs @@ -22,13 +22,6 @@ public sealed partial class ListBatchesResponse [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] public string? FirstId { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: batch_abc456 /// @@ -36,6 +29,13 @@ public sealed partial class ListBatchesResponse [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] public string? LastId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + /// /// /// @@ -56,10 +56,10 @@ public sealed partial class ListBatchesResponse /// /// Example: batch_abc123 /// - /// /// /// Example: batch_abc456 /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListCertificatesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListCertificatesResponse.g.cs index 8b96bd00..1d8f711d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListCertificatesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListCertificatesResponse.g.cs @@ -22,13 +22,6 @@ public sealed partial class ListCertificatesResponse [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] public string? FirstId { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: cert_abc /// @@ -36,6 +29,13 @@ public sealed partial class ListCertificatesResponse [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] public string? LastId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + /// /// /// @@ -56,10 +56,10 @@ public sealed partial class ListCertificatesResponse /// /// Example: cert_abc /// - /// /// /// Example: cert_abc /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFilesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFilesResponse.g.cs index 4b0583c8..296d62d3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFilesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFilesResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListFilesResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListFilesResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: file-abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListFilesResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListFilesResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: file-abc123 /// - /// - /// Example: false - /// /// /// Example: file-abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListFilesResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponse.g.cs index 1acb1335..2d9ce703 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponse.g.cs @@ -18,15 +18,15 @@ public sealed partial class ListFineTuningCheckpointPermissionResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] - public string? FirstId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningCheckpointPermissionResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + public string? FirstId { get; set; } /// /// @@ -37,9 +37,9 @@ public sealed partial class ListFineTuningCheckpointPermissionResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningCheckpointPermissionResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,25 +51,25 @@ public sealed partial class ListFineTuningCheckpointPermissionResponse /// Initializes a new instance of the class. /// /// + /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListFineTuningCheckpointPermissionResponse( global::System.Collections.Generic.IList data, bool hasMore, + global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject @object, string? firstId, - string? lastId, - global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseObject @object) + string? lastId) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.HasMore = hasMore; + this.Object = @object; this.FirstId = firstId; this.LastId = lastId; - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.Json.g.cs new file mode 100644 index 00000000..8c921f02 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ListFineTuningCheckpointPermissionResponseFirstId + { + /// + /// 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::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId; + } + + /// + /// 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::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.g.cs new file mode 100644 index 00000000..ad40d6b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ListFineTuningCheckpointPermissionResponseFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.Json.g.cs new file mode 100644 index 00000000..78cd0082 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ListFineTuningCheckpointPermissionResponseLastId + { + /// + /// 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::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId; + } + + /// + /// 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::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponseLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.g.cs new file mode 100644 index 00000000..44d2ff47 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningCheckpointPermissionResponseLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ListFineTuningCheckpointPermissionResponseLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponse.g.cs index cb5bf8a6..2f07248e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponse.g.cs @@ -18,15 +18,15 @@ public sealed partial class ListFineTuningJobCheckpointsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] - public string? FirstId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobCheckpointsResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + public string? FirstId { get; set; } /// /// @@ -37,9 +37,9 @@ public sealed partial class ListFineTuningJobCheckpointsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobCheckpointsResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,25 +51,25 @@ public sealed partial class ListFineTuningJobCheckpointsResponse /// Initializes a new instance of the class. /// /// + /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListFineTuningJobCheckpointsResponse( global::System.Collections.Generic.IList data, bool hasMore, + global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject @object, string? firstId, - string? lastId, - global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseObject @object) + string? lastId) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.HasMore = hasMore; + this.Object = @object; this.FirstId = firstId; this.LastId = lastId; - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.Json.g.cs new file mode 100644 index 00000000..713b2688 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ListFineTuningJobCheckpointsResponseFirstId + { + /// + /// 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::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId; + } + + /// + /// 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::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.g.cs new file mode 100644 index 00000000..1f153145 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ListFineTuningJobCheckpointsResponseFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.Json.g.cs new file mode 100644 index 00000000..3479b960 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ListFineTuningJobCheckpointsResponseLastId + { + /// + /// 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::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId; + } + + /// + /// 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::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponseLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.g.cs new file mode 100644 index 00000000..c705c32d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobCheckpointsResponseLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ListFineTuningJobCheckpointsResponseLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobEventsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobEventsResponse.g.cs index 1dcc9a3c..6323a2d0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobEventsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListFineTuningJobEventsResponse.g.cs @@ -18,16 +18,16 @@ public sealed partial class ListFineTuningJobEventsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobEventsResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ListFineTuningJobEventsResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListFineTuningJobEventsResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ListFineTuningJobEventsResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,8 +39,8 @@ public sealed partial class ListFineTuningJobEventsResponse /// Initializes a new instance of the class. /// /// - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..3f5ca870 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupRoleAssignmentsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ListGroupRoleAssignmentsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListGroupRoleAssignmentsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListGroupRoleAssignmentsOrder value) + { + return value switch + { + ListGroupRoleAssignmentsOrder.Asc => "asc", + ListGroupRoleAssignmentsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListGroupRoleAssignmentsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListGroupRoleAssignmentsOrder.Asc, + "desc" => ListGroupRoleAssignmentsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupUsersOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupUsersOrder.g.cs new file mode 100644 index 00000000..a69dd388 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupUsersOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: desc + /// + public enum ListGroupUsersOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListGroupUsersOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListGroupUsersOrder value) + { + return value switch + { + ListGroupUsersOrder.Asc => "asc", + ListGroupUsersOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListGroupUsersOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListGroupUsersOrder.Asc, + "desc" => ListGroupUsersOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupsOrder.g.cs new file mode 100644 index 00000000..fc1edb8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListGroupsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: asc + /// + public enum ListGroupsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListGroupsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListGroupsOrder value) + { + return value switch + { + ListGroupsOrder.Asc => "asc", + ListGroupsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListGroupsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListGroupsOrder.Asc, + "desc" => ListGroupsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListMessagesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListMessagesResponse.g.cs index 407b7800..a4539c8d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListMessagesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListMessagesResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListMessagesResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListMessagesResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: msg_abc123 /// @@ -40,12 +40,12 @@ public sealed partial class ListMessagesResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListMessagesResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: msg_abc123 /// - /// - /// Example: false - /// /// /// Example: msg_abc123 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListMessagesResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListModelsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListModelsResponse.g.cs index 0a558ec9..74011a77 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListModelsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListModelsResponse.g.cs @@ -11,16 +11,16 @@ public sealed partial class ListModelsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListModelsResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ListModelsResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ListModelsResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ListModelsResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,13 +31,13 @@ public sealed partial class ListModelsResponse /// /// Initializes a new instance of the class. /// - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListModelsResponse( - global::System.Collections.Generic.IList data, + global::System.Collections.Generic.IList data, global::tryAGI.OpenAI.ListModelsResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..5c32ae34 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupRoleAssignmentsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ListProjectGroupRoleAssignmentsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListProjectGroupRoleAssignmentsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListProjectGroupRoleAssignmentsOrder value) + { + return value switch + { + ListProjectGroupRoleAssignmentsOrder.Asc => "asc", + ListProjectGroupRoleAssignmentsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListProjectGroupRoleAssignmentsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListProjectGroupRoleAssignmentsOrder.Asc, + "desc" => ListProjectGroupRoleAssignmentsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupsOrder.g.cs new file mode 100644 index 00000000..7f77cafe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectGroupsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: asc + /// + public enum ListProjectGroupsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListProjectGroupsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListProjectGroupsOrder value) + { + return value switch + { + ListProjectGroupsOrder.Asc => "asc", + ListProjectGroupsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListProjectGroupsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListProjectGroupsOrder.Asc, + "desc" => ListProjectGroupsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectRolesOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectRolesOrder.g.cs new file mode 100644 index 00000000..c9162a27 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectRolesOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: asc + /// + public enum ListProjectRolesOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListProjectRolesOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListProjectRolesOrder value) + { + return value switch + { + ListProjectRolesOrder.Asc => "asc", + ListProjectRolesOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListProjectRolesOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListProjectRolesOrder.Asc, + "desc" => ListProjectRolesOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectUserRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectUserRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..bd19f79e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListProjectUserRoleAssignmentsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ListProjectUserRoleAssignmentsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListProjectUserRoleAssignmentsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListProjectUserRoleAssignmentsOrder value) + { + return value switch + { + ListProjectUserRoleAssignmentsOrder.Asc => "asc", + ListProjectUserRoleAssignmentsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListProjectUserRoleAssignmentsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListProjectUserRoleAssignmentsOrder.Asc, + "desc" => ListProjectUserRoleAssignmentsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRolesOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRolesOrder.g.cs new file mode 100644 index 00000000..bb3d4ef4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRolesOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: asc + /// + public enum ListRolesOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListRolesOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListRolesOrder value) + { + return value switch + { + ListRolesOrder.Asc => "asc", + ListRolesOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListRolesOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListRolesOrder.Asc, + "desc" => ListRolesOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunStepsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunStepsResponse.g.cs index 09d6bfd5..2893be45 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunStepsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunStepsResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListRunStepsResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListRunStepsResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: step_abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListRunStepsResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListRunStepsResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: step_abc123 /// - /// - /// Example: false - /// /// /// Example: step_abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListRunStepsResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunsResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunsResponse.g.cs index d551cd8b..8d17cfd2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunsResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListRunsResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListRunsResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListRunsResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: run_abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListRunsResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListRunsResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: run_abc123 /// - /// - /// Example: false - /// /// /// Example: run_abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListRunsResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListUserRoleAssignmentsOrder.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListUserRoleAssignmentsOrder.g.cs new file mode 100644 index 00000000..eebe6bfe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListUserRoleAssignmentsOrder.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ListUserRoleAssignmentsOrder + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListUserRoleAssignmentsOrderExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListUserRoleAssignmentsOrder value) + { + return value switch + { + ListUserRoleAssignmentsOrder.Asc => "asc", + ListUserRoleAssignmentsOrder.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListUserRoleAssignmentsOrder? ToEnum(string value) + { + return value switch + { + "asc" => ListUserRoleAssignmentsOrder.Asc, + "desc" => ListUserRoleAssignmentsOrder.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoreFilesResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoreFilesResponse.g.cs index 5f34aff8..246a5995 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoreFilesResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoreFilesResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListVectorStoreFilesResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListVectorStoreFilesResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: file-abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListVectorStoreFilesResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListVectorStoreFilesResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: file-abc123 /// - /// - /// Example: false - /// /// /// Example: file-abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListVectorStoreFilesResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoresResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoresResponse.g.cs index 692b98ca..b384dd8e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoresResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ListVectorStoresResponse.g.cs @@ -8,6 +8,14 @@ namespace tryAGI.OpenAI /// public sealed partial class ListVectorStoresResponse { + /// + /// Example: list + /// + /// list + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + /// /// /// @@ -23,14 +31,6 @@ public sealed partial class ListVectorStoresResponse [global::System.Text.Json.Serialization.JsonRequired] public required string FirstId { get; set; } - /// - /// Example: false - /// - /// false - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } - /// /// Example: vs_abc456 /// @@ -40,12 +40,12 @@ public sealed partial class ListVectorStoresResponse public required string LastId { get; set; } /// - /// Example: list + /// Example: false /// - /// list - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + /// false + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,34 +56,34 @@ public sealed partial class ListVectorStoresResponse /// /// Initializes a new instance of the class. /// + /// + /// Example: list + /// /// /// /// Example: vs_abc123 /// - /// - /// Example: false - /// /// /// Example: vs_abc456 /// - /// - /// Example: list + /// + /// Example: false /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListVectorStoresResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.Json.g.cs new file mode 100644 index 00000000..0c98a71d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalEnvironmentParam + { + /// + /// 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::tryAGI.OpenAI.LocalEnvironmentParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalEnvironmentParam; + } + + /// + /// 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::tryAGI.OpenAI.LocalEnvironmentParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalEnvironmentParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalEnvironmentParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.g.cs new file mode 100644 index 00000000..d5bc4d14 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParam.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LocalEnvironmentParam + { + /// + /// Use a local computer environment.
+ /// Default Value: local + ///
+ /// global::tryAGI.OpenAI.LocalEnvironmentParamType.Local + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentParamTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalEnvironmentParamType Type { get; set; } = global::tryAGI.OpenAI.LocalEnvironmentParamType.Local; + + /// + /// An optional list of skills. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skills")] + public global::System.Collections.Generic.IList? Skills { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Use a local computer environment.
+ /// Default Value: local + /// + /// + /// An optional list of skills. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LocalEnvironmentParam( + global::System.Collections.Generic.IList? skills, + global::tryAGI.OpenAI.LocalEnvironmentParamType type = global::tryAGI.OpenAI.LocalEnvironmentParamType.Local) + { + this.Type = type; + this.Skills = skills; + } + + /// + /// Initializes a new instance of the class. + /// + public LocalEnvironmentParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParamType.g.cs new file mode 100644 index 00000000..fd5ed03f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Use a local computer environment.
+ /// Default Value: local + ///
+ public enum LocalEnvironmentParamType + { + /// + /// + /// + Local, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalEnvironmentParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalEnvironmentParamType value) + { + return value switch + { + LocalEnvironmentParamType.Local => "local", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalEnvironmentParamType? ToEnum(string value) + { + return value switch + { + "local" => LocalEnvironmentParamType.Local, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.Json.g.cs new file mode 100644 index 00000000..8e659ecf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalEnvironmentResource + { + /// + /// 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::tryAGI.OpenAI.LocalEnvironmentResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalEnvironmentResource; + } + + /// + /// 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::tryAGI.OpenAI.LocalEnvironmentResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalEnvironmentResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalEnvironmentResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.g.cs new file mode 100644 index 00000000..64c0346e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResource.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents the use of a local environment to perform shell actions. + /// + public sealed partial class LocalEnvironmentResource + { + /// + /// The environment type. Always `local`.
+ /// Default Value: local + ///
+ /// global::tryAGI.OpenAI.LocalEnvironmentResourceType.Local + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalEnvironmentResourceTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalEnvironmentResourceType Type { get; set; } = global::tryAGI.OpenAI.LocalEnvironmentResourceType.Local; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The environment type. Always `local`.
+ /// Default Value: local + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LocalEnvironmentResource( + global::tryAGI.OpenAI.LocalEnvironmentResourceType type = global::tryAGI.OpenAI.LocalEnvironmentResourceType.Local) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LocalEnvironmentResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResourceType.g.cs new file mode 100644 index 00000000..17793891 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalEnvironmentResourceType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The environment type. Always `local`.
+ /// Default Value: local + ///
+ public enum LocalEnvironmentResourceType + { + /// + /// + /// + Local, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalEnvironmentResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalEnvironmentResourceType value) + { + return value switch + { + LocalEnvironmentResourceType.Local => "local", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalEnvironmentResourceType? ToEnum(string value) + { + return value switch + { + "local" => LocalEnvironmentResourceType.Local, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallOutputStatusEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallOutputStatusEnum.g.cs new file mode 100644 index 00000000..67044a22 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallOutputStatusEnum.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum LocalShellCallOutputStatusEnum + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalShellCallOutputStatusEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalShellCallOutputStatusEnum value) + { + return value switch + { + LocalShellCallOutputStatusEnum.InProgress => "in_progress", + LocalShellCallOutputStatusEnum.Completed => "completed", + LocalShellCallOutputStatusEnum.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalShellCallOutputStatusEnum? ToEnum(string value) + { + return value switch + { + "in_progress" => LocalShellCallOutputStatusEnum.InProgress, + "completed" => LocalShellCallOutputStatusEnum.Completed, + "incomplete" => LocalShellCallOutputStatusEnum.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallStatus.g.cs new file mode 100644 index 00000000..92c72111 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellCallStatus.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum LocalShellCallStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalShellCallStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalShellCallStatus value) + { + return value switch + { + LocalShellCallStatus.InProgress => "in_progress", + LocalShellCallStatus.Completed => "completed", + LocalShellCallStatus.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalShellCallStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => LocalShellCallStatus.InProgress, + "completed" => LocalShellCallStatus.Completed, + "incomplete" => LocalShellCallStatus.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecAction.g.cs index 2a12422e..83e7ff4c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecAction.g.cs @@ -9,43 +9,45 @@ namespace tryAGI.OpenAI public sealed partial class LocalShellExecAction { /// - /// The command to run. + /// The type of the local shell action. Always `exec`.
+ /// Default Value: exec ///
- [global::System.Text.Json.Serialization.JsonPropertyName("command")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Command { get; set; } + /// global::tryAGI.OpenAI.LocalShellExecActionType.Exec + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellExecActionTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalShellExecActionType Type { get; set; } = global::tryAGI.OpenAI.LocalShellExecActionType.Exec; /// - /// Environment variables to set for the command. + /// The command to run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("env")] + [global::System.Text.Json.Serialization.JsonPropertyName("command")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary Env { get; set; } + public required global::System.Collections.Generic.IList Command { get; set; } /// - /// Optional timeout in milliseconds for the command. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] public int? TimeoutMs { get; set; } /// - /// The type of the local shell action. Always `exec`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellExecActionTypeJsonConverter))] - public global::tryAGI.OpenAI.LocalShellExecActionType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("working_directory")] + public string? WorkingDirectory { get; set; } /// - /// Optional user to run the command as. + /// Environment variables to set for the command. /// - [global::System.Text.Json.Serialization.JsonPropertyName("user")] - public string? User { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("env")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary Env { get; set; } /// - /// Optional working directory to run the command in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("working_directory")] - public string? WorkingDirectory { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + public string? User { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,24 +58,19 @@ public sealed partial class LocalShellExecAction /// /// Initializes a new instance of the class. /// + /// + /// The type of the local shell action. Always `exec`.
+ /// Default Value: exec + /// /// /// The command to run. /// + /// + /// /// /// Environment variables to set for the command. /// - /// - /// Optional timeout in milliseconds for the command. - /// - /// - /// The type of the local shell action. Always `exec`. - /// - /// - /// Optional user to run the command as. - /// - /// - /// Optional working directory to run the command in. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -81,16 +78,16 @@ public LocalShellExecAction( global::System.Collections.Generic.IList command, global::System.Collections.Generic.Dictionary env, int? timeoutMs, - global::tryAGI.OpenAI.LocalShellExecActionType type, + string? workingDirectory, string? user, - string? workingDirectory) + global::tryAGI.OpenAI.LocalShellExecActionType type = global::tryAGI.OpenAI.LocalShellExecActionType.Exec) { this.Command = command ?? throw new global::System.ArgumentNullException(nameof(command)); this.Env = env ?? throw new global::System.ArgumentNullException(nameof(env)); - this.TimeoutMs = timeoutMs; this.Type = type; - this.User = user; + this.TimeoutMs = timeoutMs; this.WorkingDirectory = workingDirectory; + this.User = user; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.Json.g.cs new file mode 100644 index 00000000..1769135e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalShellExecActionTimeoutMs + { + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionTimeoutMs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalShellExecActionTimeoutMs), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellExecActionTimeoutMs; + } + + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionTimeoutMs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalShellExecActionTimeoutMs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellExecActionTimeoutMs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.g.cs new file mode 100644 index 00000000..e63d24e8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionTimeoutMs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LocalShellExecActionTimeoutMs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionType.g.cs index 7322095b..63e4c753 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionType.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// The type of the local shell action. Always `exec`. + /// The type of the local shell action. Always `exec`.
+ /// Default Value: exec ///
public enum LocalShellExecActionType { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.Json.g.cs new file mode 100644 index 00000000..5bb0e577 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalShellExecActionUser + { + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionUser? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalShellExecActionUser), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellExecActionUser; + } + + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionUser? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalShellExecActionUser), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellExecActionUser; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.g.cs new file mode 100644 index 00000000..b6e083ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionUser.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LocalShellExecActionUser + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.Json.g.cs new file mode 100644 index 00000000..2861a513 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalShellExecActionWorkingDirectory + { + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory; + } + + /// + /// 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::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellExecActionWorkingDirectory; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.g.cs new file mode 100644 index 00000000..35c8191e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellExecActionWorkingDirectory.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LocalShellExecActionWorkingDirectory + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.Json.g.cs deleted file mode 100644 index e9786497..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class LocalShellTool - { - /// - /// 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::tryAGI.OpenAI.LocalShellTool? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.LocalShellTool), - jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellTool; - } - - /// - /// 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::tryAGI.OpenAI.LocalShellTool? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.LocalShellTool), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellTool; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.g.cs deleted file mode 100644 index c5235df7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellTool.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A tool that allows the model to execute shell commands in a local environment. - /// - public sealed partial class LocalShellTool - { - /// - /// The type of the local shell tool. Always `local_shell`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolTypeJsonConverter))] - public global::tryAGI.OpenAI.LocalShellToolType 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The type of the local shell tool. Always `local_shell`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public LocalShellTool( - global::tryAGI.OpenAI.LocalShellToolType type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public LocalShellTool() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCall.g.cs index e70bef49..15100197 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCall.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class LocalShellToolCall { /// - /// Execute a shell command on the server. + /// The type of the local shell call. Always `local_shell_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalShellToolCallType Type { get; set; } + + /// + /// The unique ID of the local shell call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.LocalShellExecAction Action { get; set; } + public required string Id { get; set; } /// /// The unique ID of the local shell tool call generated by the model. @@ -23,11 +30,11 @@ public sealed partial class LocalShellToolCall public required string CallId { get; set; } /// - /// The unique ID of the local shell call. + /// Execute a shell command on the server. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("action")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.LocalShellExecAction Action { get; set; } /// /// The status of the local shell call. @@ -37,13 +44,6 @@ public sealed partial class LocalShellToolCall [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.LocalShellToolCallStatus Status { get; set; } - /// - /// The type of the local shell call. Always `local_shell_call`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.LocalShellToolCallType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -53,34 +53,34 @@ public sealed partial class LocalShellToolCall /// /// Initializes a new instance of the class. /// - /// - /// Execute a shell command on the server. + /// + /// The type of the local shell call. Always `local_shell_call`. + /// + /// + /// The unique ID of the local shell call. /// /// /// The unique ID of the local shell tool call generated by the model. /// - /// - /// The unique ID of the local shell call. + /// + /// Execute a shell command on the server. /// /// /// The status of the local shell call. /// - /// - /// The type of the local shell call. Always `local_shell_call`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public LocalShellToolCall( - global::tryAGI.OpenAI.LocalShellExecAction action, - string callId, string id, + string callId, + global::tryAGI.OpenAI.LocalShellExecAction action, global::tryAGI.OpenAI.LocalShellToolCallStatus status, global::tryAGI.OpenAI.LocalShellToolCallType type) { - this.Action = action ?? throw new global::System.ArgumentNullException(nameof(action)); - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Action = action ?? throw new global::System.ArgumentNullException(nameof(action)); this.Status = status; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutput.g.cs index cd91cb5c..17888245 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutput.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class LocalShellToolCallOutput { + /// + /// The type of the local shell tool call output. Always `local_shell_call_output`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalShellToolCallOutputType Type { get; set; } + /// /// The unique ID of the local shell tool call generated by the model. /// @@ -23,18 +30,10 @@ public sealed partial class LocalShellToolCallOutput public required string Output { get; set; } /// - /// The status of the item. One of `in_progress`, `completed`, or `incomplete`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputStatusJsonConverter))] - public global::tryAGI.OpenAI.LocalShellToolCallOutputStatus? Status { get; set; } - - /// - /// The type of the local shell tool call output. Always `local_shell_call_output`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolCallOutputTypeJsonConverter))] - public global::tryAGI.OpenAI.LocalShellToolCallOutputType Type { get; set; } + public global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2? Status { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,31 +44,29 @@ public sealed partial class LocalShellToolCallOutput /// /// Initializes a new instance of the class. /// + /// + /// The type of the local shell tool call output. Always `local_shell_call_output`. + /// /// /// The unique ID of the local shell tool call generated by the model. /// /// /// A JSON string of the output of the local shell tool call. /// - /// - /// The status of the item. One of `in_progress`, `completed`, or `incomplete`. - /// - /// - /// The type of the local shell tool call output. Always `local_shell_call_output`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public LocalShellToolCallOutput( string id, string output, - global::tryAGI.OpenAI.LocalShellToolCallOutputStatus? status, - global::tryAGI.OpenAI.LocalShellToolCallOutputType type) + global::tryAGI.OpenAI.LocalShellToolCallOutputType type, + global::tryAGI.OpenAI.LocalShellToolCallOutputStatus2? status) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); - this.Status = status; this.Type = type; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.Json.g.cs new file mode 100644 index 00000000..82f4272b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalShellToolCallOutputStatus + { + /// + /// 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::tryAGI.OpenAI.LocalShellToolCallOutputStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellToolCallOutputStatus; + } + + /// + /// 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::tryAGI.OpenAI.LocalShellToolCallOutputStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalShellToolCallOutputStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellToolCallOutputStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.g.cs index fd5ecc87..b03da01e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus.g.cs @@ -4,54 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The status of the item. One of `in_progress`, `completed`, or `incomplete`. + /// /// - public enum LocalShellToolCallOutputStatus + public sealed partial class LocalShellToolCallOutputStatus { - /// - /// - /// - InProgress, - /// - /// - /// - Completed, - /// - /// - /// - Incomplete, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class LocalShellToolCallOutputStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this LocalShellToolCallOutputStatus value) - { - return value switch - { - LocalShellToolCallOutputStatus.InProgress => "in_progress", - LocalShellToolCallOutputStatus.Completed => "completed", - LocalShellToolCallOutputStatus.Incomplete => "incomplete", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static LocalShellToolCallOutputStatus? ToEnum(string value) - { - return value switch - { - "in_progress" => LocalShellToolCallOutputStatus.InProgress, - "completed" => LocalShellToolCallOutputStatus.Completed, - "incomplete" => LocalShellToolCallOutputStatus.Incomplete, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus2.g.cs new file mode 100644 index 00000000..1402b11c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolCallOutputStatus2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The status of the item. One of `in_progress`, `completed`, or `incomplete`. + /// + public enum LocalShellToolCallOutputStatus2 + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalShellToolCallOutputStatus2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalShellToolCallOutputStatus2 value) + { + return value switch + { + LocalShellToolCallOutputStatus2.InProgress => "in_progress", + LocalShellToolCallOutputStatus2.Completed => "completed", + LocalShellToolCallOutputStatus2.Incomplete => "incomplete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalShellToolCallOutputStatus2? ToEnum(string value) + { + return value switch + { + "in_progress" => LocalShellToolCallOutputStatus2.InProgress, + "completed" => LocalShellToolCallOutputStatus2.Completed, + "incomplete" => LocalShellToolCallOutputStatus2.Incomplete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.Json.g.cs new file mode 100644 index 00000000..ccf15869 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalShellToolParam + { + /// + /// 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::tryAGI.OpenAI.LocalShellToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalShellToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalShellToolParam; + } + + /// + /// 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::tryAGI.OpenAI.LocalShellToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalShellToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalShellToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.g.cs new file mode 100644 index 00000000..7efd6c99 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A tool that allows the model to execute shell commands in a local environment. + /// + public sealed partial class LocalShellToolParam + { + /// + /// The type of the local shell tool. Always `local_shell`.
+ /// Default Value: local_shell + ///
+ /// global::tryAGI.OpenAI.LocalShellToolParamType.LocalShell + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LocalShellToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.LocalShellToolParamType Type { get; set; } = global::tryAGI.OpenAI.LocalShellToolParamType.LocalShell; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the local shell tool. Always `local_shell`.
+ /// Default Value: local_shell + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LocalShellToolParam( + global::tryAGI.OpenAI.LocalShellToolParamType type = global::tryAGI.OpenAI.LocalShellToolParamType.LocalShell) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LocalShellToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParamType.g.cs new file mode 100644 index 00000000..5081240b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the local shell tool. Always `local_shell`.
+ /// Default Value: local_shell + ///
+ public enum LocalShellToolParamType + { + /// + /// + /// + LocalShell, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LocalShellToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LocalShellToolParamType value) + { + return value switch + { + LocalShellToolParamType.LocalShell => "local_shell", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LocalShellToolParamType? ToEnum(string value) + { + return value switch + { + "local_shell" => LocalShellToolParamType.LocalShell, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolType.g.cs deleted file mode 100644 index df28f254..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalShellToolType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of the local shell tool. Always `local_shell`. - /// - public enum LocalShellToolType - { - /// - /// - /// - LocalShell, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class LocalShellToolTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this LocalShellToolType value) - { - return value switch - { - LocalShellToolType.LocalShell => "local_shell", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static LocalShellToolType? ToEnum(string value) - { - return value switch - { - "local_shell" => LocalShellToolType.LocalShell, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.Json.g.cs new file mode 100644 index 00000000..0adcf545 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LocalSkillParam + { + /// + /// 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::tryAGI.OpenAI.LocalSkillParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LocalSkillParam), + jsonSerializerContext) as global::tryAGI.OpenAI.LocalSkillParam; + } + + /// + /// 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::tryAGI.OpenAI.LocalSkillParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LocalSkillParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LocalSkillParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.g.cs new file mode 100644 index 00000000..9d3a2ab4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LocalSkillParam.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LocalSkillParam + { + /// + /// The name of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The description of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// The path to the directory containing the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the skill. + /// + /// + /// The description of the skill. + /// + /// + /// The path to the directory containing the skill. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LocalSkillParam( + string name, + string description, + string path) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + } + + /// + /// Initializes a new instance of the class. + /// + public LocalSkillParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.Json.g.cs new file mode 100644 index 00000000..8b55cbbf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LockedStatus + { + /// + /// 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::tryAGI.OpenAI.LockedStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LockedStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.LockedStatus; + } + + /// + /// 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::tryAGI.OpenAI.LockedStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LockedStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LockedStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.g.cs new file mode 100644 index 00000000..8ee025d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatus.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Indicates that a thread is locked and cannot accept new input. + /// + public sealed partial class LockedStatus + { + /// + /// Status discriminator that is always `locked`.
+ /// Default Value: locked + ///
+ /// global::tryAGI.OpenAI.LockedStatusType.Locked + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.LockedStatusTypeJsonConverter))] + public global::tryAGI.OpenAI.LockedStatusType Type { get; set; } = global::tryAGI.OpenAI.LockedStatusType.Locked; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Reason { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Status discriminator that is always `locked`.
+ /// Default Value: locked + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LockedStatus( + string? reason, + global::tryAGI.OpenAI.LockedStatusType type = global::tryAGI.OpenAI.LockedStatusType.Locked) + { + this.Reason = reason ?? throw new global::System.ArgumentNullException(nameof(reason)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LockedStatus() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.Json.g.cs new file mode 100644 index 00000000..3d94c39d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class LockedStatusReason + { + /// + /// 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::tryAGI.OpenAI.LockedStatusReason? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.LockedStatusReason), + jsonSerializerContext) as global::tryAGI.OpenAI.LockedStatusReason; + } + + /// + /// 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::tryAGI.OpenAI.LockedStatusReason? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.LockedStatusReason), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.LockedStatusReason; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.g.cs new file mode 100644 index 00000000..b2cd1c0e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusReason.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class LockedStatusReason + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusType.g.cs new file mode 100644 index 00000000..a1535ba4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LockedStatusType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Status discriminator that is always `locked`.
+ /// Default Value: locked + ///
+ public enum LockedStatusType + { + /// + /// + /// + Locked, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LockedStatusTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LockedStatusType value) + { + return value switch + { + LockedStatusType.Locked => "locked", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LockedStatusType? ToEnum(string value) + { + return value switch + { + "locked" => LockedStatusType.Locked, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb.g.cs index 1d6b6bbc..cca0d39c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb.g.cs @@ -11,9 +11,9 @@ public sealed partial class LogProb /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Bytes { get; set; } + public required string Token { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class LogProb /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required global::System.Collections.Generic.IList Bytes { get; set; } /// /// @@ -45,22 +45,22 @@ public sealed partial class LogProb /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public LogProb( - global::System.Collections.Generic.IList bytes, - double logprob, string token, + double logprob, + global::System.Collections.Generic.IList bytes, global::System.Collections.Generic.IList topLogprobs) { - this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; + this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); this.TopLogprobs = topLogprobs ?? throw new global::System.ArgumentNullException(nameof(topLogprobs)); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProbProperties.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProbProperties.g.cs index c421240f..8fa82243 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProbProperties.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProbProperties.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class LogProbProperties { /// - /// The bytes that were used to generate the log probability. + /// The token that was used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Bytes { get; set; } + public required string Token { get; set; } /// /// The log probability of the token. @@ -23,11 +23,11 @@ public sealed partial class LogProbProperties public required double Logprob { get; set; } /// - /// The token that was used to generate the log probability. + /// The bytes that were used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required global::System.Collections.Generic.IList Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +38,26 @@ public sealed partial class LogProbProperties /// /// Initializes a new instance of the class. /// - /// - /// The bytes that were used to generate the log probability. + /// + /// The token that was used to generate the log probability. /// /// /// The log probability of the token. /// - /// - /// The token that was used to generate the log probability. + /// + /// The bytes that were used to generate the log probability. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public LogProbProperties( - global::System.Collections.Generic.IList bytes, + string token, double logprob, - string token) + global::System.Collections.Generic.IList bytes) { - this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; + this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalRequest.g.cs index 4878b47d..a9566244 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalRequest.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class MCPApprovalRequest { /// - /// A JSON string of arguments for the tool. + /// The type of the item. Always `mcp_approval_request`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalRequestTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPApprovalRequestType Type { get; set; } /// /// The unique ID of the approval request. @@ -23,25 +23,25 @@ public sealed partial class MCPApprovalRequest public required string Id { get; set; } /// - /// The name of the tool to run. + /// The label of the MCP server making the request. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string ServerLabel { get; set; } /// - /// The label of the MCP server making the request. + /// The name of the tool to run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ServerLabel { get; set; } + public required string Name { get; set; } /// - /// The type of the item. Always `mcp_approval_request`. + /// A JSON string of arguments for the tool. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalRequestTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPApprovalRequestType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,35 +52,35 @@ public sealed partial class MCPApprovalRequest /// /// Initializes a new instance of the class. /// - /// - /// A JSON string of arguments for the tool. + /// + /// The type of the item. Always `mcp_approval_request`. /// /// /// The unique ID of the approval request. /// - /// - /// The name of the tool to run. - /// /// /// The label of the MCP server making the request. /// - /// - /// The type of the item. Always `mcp_approval_request`. + /// + /// The name of the tool to run. + /// + /// + /// A JSON string of arguments for the tool. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPApprovalRequest( - string arguments, string id, - string name, string serverLabel, + string name, + string arguments, global::tryAGI.OpenAI.MCPApprovalRequestType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponse.g.cs index 0079db70..adda938b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponse.g.cs @@ -8,6 +8,19 @@ namespace tryAGI.OpenAI /// public sealed partial class MCPApprovalResponse { + /// + /// The type of the item. Always `mcp_approval_response`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPApprovalResponseType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + /// /// The ID of the approval request being answered. /// @@ -23,24 +36,11 @@ public sealed partial class MCPApprovalResponse public required bool Approve { get; set; } /// - /// The unique ID of the approval response - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } - - /// - /// Optional reason for the decision. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("reason")] public string? Reason { get; set; } - /// - /// The type of the item. Always `mcp_approval_response`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPApprovalResponseType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -50,36 +50,32 @@ public sealed partial class MCPApprovalResponse /// /// Initializes a new instance of the class. /// + /// + /// The type of the item. Always `mcp_approval_response`. + /// + /// /// /// The ID of the approval request being answered. /// /// /// Whether the request was approved. /// - /// - /// The unique ID of the approval response - /// - /// - /// Optional reason for the decision. - /// - /// - /// The type of the item. Always `mcp_approval_response`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPApprovalResponse( string approvalRequestId, bool approve, + global::tryAGI.OpenAI.MCPApprovalResponseType type, string? id, - string? reason, - global::tryAGI.OpenAI.MCPApprovalResponseType type) + string? reason) { this.ApprovalRequestId = approvalRequestId ?? throw new global::System.ArgumentNullException(nameof(approvalRequestId)); this.Approve = approve; + this.Type = type; this.Id = id; this.Reason = reason; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.Json.g.cs new file mode 100644 index 00000000..cd62dd3d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPApprovalResponseId + { + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseId), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPApprovalResponseId; + } + + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPApprovalResponseId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.g.cs new file mode 100644 index 00000000..ac578053 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPApprovalResponseId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.Json.g.cs new file mode 100644 index 00000000..bdc359e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPApprovalResponseReason + { + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseReason? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseReason), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPApprovalResponseReason; + } + + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseReason? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseReason), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPApprovalResponseReason; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.g.cs new file mode 100644 index 00000000..c6d78e1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseReason.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPApprovalResponseReason + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResource.g.cs index 47a4a7c0..2f71ff0f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResource.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResource.g.cs @@ -8,6 +8,20 @@ namespace tryAGI.OpenAI /// public sealed partial class MCPApprovalResponseResource { + /// + /// The type of the item. Always `mcp_approval_response`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseResourceTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPApprovalResponseResourceType Type { get; set; } + + /// + /// The unique ID of the approval response + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The ID of the approval request being answered. /// @@ -23,25 +37,11 @@ public sealed partial class MCPApprovalResponseResource public required bool Approve { get; set; } /// - /// The unique ID of the approval response - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Optional reason for the decision. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("reason")] public string? Reason { get; set; } - /// - /// The type of the item. Always `mcp_approval_response`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPApprovalResponseResourceTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPApprovalResponseResourceType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,36 +51,34 @@ public sealed partial class MCPApprovalResponseResource /// /// Initializes a new instance of the class. /// - /// - /// The ID of the approval request being answered. - /// - /// - /// Whether the request was approved. + /// + /// The type of the item. Always `mcp_approval_response`. /// /// /// The unique ID of the approval response /// - /// - /// Optional reason for the decision. + /// + /// The ID of the approval request being answered. /// - /// - /// The type of the item. Always `mcp_approval_response`. + /// + /// Whether the request was approved. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPApprovalResponseResource( + string id, string approvalRequestId, bool approve, - string id, - string? reason, - global::tryAGI.OpenAI.MCPApprovalResponseResourceType type) + global::tryAGI.OpenAI.MCPApprovalResponseResourceType type, + string? reason) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ApprovalRequestId = approvalRequestId ?? throw new global::System.ArgumentNullException(nameof(approvalRequestId)); this.Approve = approve; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Reason = reason; this.Type = type; + this.Reason = reason; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.Json.g.cs new file mode 100644 index 00000000..ec068c98 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPApprovalResponseResourceReason + { + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseResourceReason? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseResourceReason), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPApprovalResponseResourceReason; + } + + /// + /// 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::tryAGI.OpenAI.MCPApprovalResponseResourceReason? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPApprovalResponseResourceReason), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPApprovalResponseResourceReason; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.g.cs new file mode 100644 index 00000000..6a544aed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPApprovalResponseResourceReason.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPApprovalResponseResourceReason + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListTools.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListTools.g.cs index 934990e6..2905cf3b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListTools.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListTools.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class MCPListTools { /// - /// Error message if the server could not list tools. + /// The type of the item. Always `mcp_list_tools`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public string? Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPListToolsTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPListToolsType Type { get; set; } /// /// The unique ID of the list. @@ -36,11 +37,10 @@ public sealed partial class MCPListTools public required global::System.Collections.Generic.IList Tools { get; set; } /// - /// The type of the item. Always `mcp_list_tools`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPListToolsTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPListToolsType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,8 +51,8 @@ public sealed partial class MCPListTools /// /// Initializes a new instance of the class. /// - /// - /// Error message if the server could not list tools. + /// + /// The type of the item. Always `mcp_list_tools`. /// /// /// The unique ID of the list. @@ -63,9 +63,7 @@ public sealed partial class MCPListTools /// /// The tools available on the server. /// - /// - /// The type of the item. Always `mcp_list_tools`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -73,14 +71,14 @@ public MCPListTools( string id, string serverLabel, global::System.Collections.Generic.IList tools, - string? error, - global::tryAGI.OpenAI.MCPListToolsType type) + global::tryAGI.OpenAI.MCPListToolsType type, + string? error) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); - this.Error = error; this.Type = type; + this.Error = error; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.Json.g.cs new file mode 100644 index 00000000..36ac3fb8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPListToolsError + { + /// + /// 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::tryAGI.OpenAI.MCPListToolsError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPListToolsError), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPListToolsError; + } + + /// + /// 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::tryAGI.OpenAI.MCPListToolsError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPListToolsError), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPListToolsError; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.g.cs new file mode 100644 index 00000000..be85c49b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsError.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPListToolsError + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsTool.g.cs index 32dbfa5f..a617579a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsTool.g.cs @@ -9,13 +9,14 @@ namespace tryAGI.OpenAI public sealed partial class MCPListToolsTool { /// - /// Additional annotations about the tool. + /// The name of the tool. /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] - public object? Annotations { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } /// - /// The description of the tool. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -28,11 +29,10 @@ public sealed partial class MCPListToolsTool public required object InputSchema { get; set; } /// - /// The name of the tool. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + public object? Annotations { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -43,31 +43,27 @@ public sealed partial class MCPListToolsTool /// /// Initializes a new instance of the class. /// - /// - /// Additional annotations about the tool. - /// - /// - /// The description of the tool. + /// + /// The name of the tool. /// + /// /// /// The JSON schema describing the tool's input. /// - /// - /// The name of the tool. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPListToolsTool( - object inputSchema, string name, - object? annotations, - string? description) + object inputSchema, + string? description, + object? annotations) { - this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Annotations = annotations; + this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); this.Description = description; + this.Annotations = annotations; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations.g.cs index c9af47c9..6ce527b4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Additional annotations about the tool. + /// /// public sealed partial class MCPListToolsToolAnnotations { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.Json.g.cs new file mode 100644 index 00000000..5badead4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPListToolsToolAnnotations2 + { + /// + /// 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::tryAGI.OpenAI.MCPListToolsToolAnnotations2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPListToolsToolAnnotations2), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPListToolsToolAnnotations2; + } + + /// + /// 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::tryAGI.OpenAI.MCPListToolsToolAnnotations2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPListToolsToolAnnotations2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPListToolsToolAnnotations2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.g.cs new file mode 100644 index 00000000..92eb7539 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolAnnotations2.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Additional annotations about the tool. + /// + public sealed partial class MCPListToolsToolAnnotations2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.Json.g.cs new file mode 100644 index 00000000..f856e900 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPListToolsToolDescription + { + /// + /// 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::tryAGI.OpenAI.MCPListToolsToolDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPListToolsToolDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPListToolsToolDescription; + } + + /// + /// 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::tryAGI.OpenAI.MCPListToolsToolDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPListToolsToolDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPListToolsToolDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.g.cs new file mode 100644 index 00000000..a9c553a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPListToolsToolDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPListToolsToolDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPTool.g.cs index a6b0d56f..d8bc4269 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPTool.g.cs @@ -1,32 +1,41 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI { /// /// Give the model access to additional tools via remote Model Context Protocol
- /// (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + /// (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). ///
public sealed partial class MCPTool { /// - /// + /// The type of the MCP tool. Always `mcp`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("allowed_tools")] - public object? AllowedTools { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPToolType Type { get; set; } /// - /// An OAuth access token that can be used with a remote MCP server, either
- /// with a custom MCP server URL or a service connector. Your application
- /// must handle the OAuth authorization flow and provide the token here. + /// A label for this MCP server, used to identify it in tool calls. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("authorization")] - public string? Authorization { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ServerLabel { get; set; } + + /// + /// The URL for the MCP server. One of `server_url` or `connector_id` must be
+ /// provided. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("server_url")] + public string? ServerUrl { get; set; } /// /// Identifier for service connectors, like those available in ChatGPT. One of
/// `server_url` or `connector_id` must be provided. Learn more about service
- /// connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
+ /// connectors [here](/docs/guides/tools-remote-mcp#connectors).
/// Currently supported `connector_id` values are:
/// - Dropbox: `connector_dropbox`
/// - Gmail: `connector_gmail`
@@ -42,17 +51,12 @@ public sealed partial class MCPTool public global::tryAGI.OpenAI.MCPToolConnectorId? ConnectorId { get; set; } /// - /// Optional HTTP headers to send to the MCP server. Use for authentication
- /// or other purposes. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("headers")] - public global::System.Collections.Generic.Dictionary? Headers { get; set; } - - /// - /// + /// An OAuth access token that can be used with a remote MCP server, either
+ /// with a custom MCP server URL or a service connector. Your application
+ /// must handle the OAuth authorization flow and provide the token here. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("require_approval")] - public object? RequireApproval { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("authorization")] + public string? Authorization { get; set; } /// /// Optional description of the MCP server, used to provide more context. @@ -61,25 +65,28 @@ public sealed partial class MCPTool public string? ServerDescription { get; set; } /// - /// A label for this MCP server, used to identify it in tool calls. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ServerLabel { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public global::System.Collections.Generic.Dictionary? Headers { get; set; } /// - /// The URL for the MCP server. One of `server_url` or `connector_id` must be
- /// provided. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("server_url")] - public string? ServerUrl { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_tools")] + public global::tryAGI.OpenAI.OneOf, global::tryAGI.OpenAI.MCPToolFilter>? AllowedTools { get; set; } /// - /// The type of the MCP tool. Always `mcp`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPToolType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("require_approval")] + public global::tryAGI.OpenAI.OneOf? RequireApproval { get; set; } + + /// + /// Whether this MCP tool is deferred and discovered via tool search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("defer_loading")] + public bool? DeferLoading { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -90,16 +97,20 @@ public sealed partial class MCPTool /// /// Initializes a new instance of the class. /// - /// - /// - /// An OAuth access token that can be used with a remote MCP server, either
- /// with a custom MCP server URL or a service connector. Your application
- /// must handle the OAuth authorization flow and provide the token here. + /// + /// The type of the MCP tool. Always `mcp`. + /// + /// + /// A label for this MCP server, used to identify it in tool calls. + /// + /// + /// The URL for the MCP server. One of `server_url` or `connector_id` must be
+ /// provided. /// /// /// Identifier for service connectors, like those available in ChatGPT. One of
/// `server_url` or `connector_id` must be provided. Learn more about service
- /// connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
+ /// connectors [here](/docs/guides/tools-remote-mcp#connectors).
/// Currently supported `connector_id` values are:
/// - Dropbox: `connector_dropbox`
/// - Gmail: `connector_gmail`
@@ -110,47 +121,45 @@ public sealed partial class MCPTool /// - Outlook Email: `connector_outlookemail`
/// - SharePoint: `connector_sharepoint` /// - /// - /// Optional HTTP headers to send to the MCP server. Use for authentication
- /// or other purposes. + /// + /// An OAuth access token that can be used with a remote MCP server, either
+ /// with a custom MCP server URL or a service connector. Your application
+ /// must handle the OAuth authorization flow and provide the token here. /// - /// /// /// Optional description of the MCP server, used to provide more context. /// - /// - /// A label for this MCP server, used to identify it in tool calls. - /// - /// - /// The URL for the MCP server. One of `server_url` or `connector_id` must be
- /// provided. - /// - /// - /// The type of the MCP tool. Always `mcp`. + /// + /// + /// + /// + /// Whether this MCP tool is deferred and discovered via tool search. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPTool( string serverLabel, - object? allowedTools, - string? authorization, + global::tryAGI.OpenAI.MCPToolType type, + string? serverUrl, global::tryAGI.OpenAI.MCPToolConnectorId? connectorId, - global::System.Collections.Generic.Dictionary? headers, - object? requireApproval, + string? authorization, string? serverDescription, - string? serverUrl, - global::tryAGI.OpenAI.MCPToolType type) + global::System.Collections.Generic.Dictionary? headers, + global::tryAGI.OpenAI.OneOf, global::tryAGI.OpenAI.MCPToolFilter>? allowedTools, + global::tryAGI.OpenAI.OneOf? requireApproval, + bool? deferLoading) { this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); - this.AllowedTools = allowedTools; - this.Authorization = authorization; + this.Type = type; + this.ServerUrl = serverUrl; this.ConnectorId = connectorId; + this.Authorization = authorization; + this.ServerDescription = serverDescription; this.Headers = headers; + this.AllowedTools = allowedTools; this.RequireApproval = requireApproval; - this.ServerDescription = serverDescription; - this.ServerUrl = serverUrl; - this.Type = type; + this.DeferLoading = deferLoading; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.Json.g.cs new file mode 100644 index 00000000..a41a2a46 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolAllowedTools + { + /// + /// 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::tryAGI.OpenAI.MCPToolAllowedTools? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolAllowedTools), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolAllowedTools; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolAllowedTools? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolAllowedTools), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolAllowedTools; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.g.cs new file mode 100644 index 00000000..abb1f7b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolAllowedTools.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPToolAllowedTools + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCall.g.cs index 55ea3be7..5b16d6d8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCall.g.cs @@ -9,17 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class MCPToolCall { /// - /// A JSON string of the arguments passed to the tool. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } - - /// - /// The error from the tool call, if any. + /// The type of the item. Always `mcp_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public string? Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.MCPToolCallType Type { get; set; } /// /// The unique ID of the tool call. @@ -28,6 +22,13 @@ public sealed partial class MCPToolCall [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The label of the MCP server running the tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ServerLabel { get; set; } + /// /// The name of the tool that was run. /// @@ -36,24 +37,36 @@ public sealed partial class MCPToolCall public required string Name { get; set; } /// - /// The output from the tool call. + /// A JSON string of the arguments passed to the tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("output")] public string? Output { get; set; } /// - /// The label of the MCP server running the tool. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ServerLabel { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } /// - /// The type of the item. Always `mcp_call`. + /// The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.MCPToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MCPToolCallStatusJsonConverter))] + public global::tryAGI.OpenAI.MCPToolCallStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("approval_request_id")] + public string? ApprovalRequestId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -64,46 +77,50 @@ public sealed partial class MCPToolCall /// /// Initializes a new instance of the class. /// - /// - /// A JSON string of the arguments passed to the tool. - /// - /// - /// The error from the tool call, if any. + /// + /// The type of the item. Always `mcp_call`. /// /// /// The unique ID of the tool call. /// + /// + /// The label of the MCP server running the tool. + /// /// /// The name of the tool that was run. /// - /// - /// The output from the tool call. - /// - /// - /// The label of the MCP server running the tool. + /// + /// A JSON string of the arguments passed to the tool. /// - /// - /// The type of the item. Always `mcp_call`. + /// + /// + /// + /// The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPToolCall( - string arguments, string id, - string name, string serverLabel, - string? error, + string name, + string arguments, + global::tryAGI.OpenAI.MCPToolCallType type, string? output, - global::tryAGI.OpenAI.MCPToolCallType type) + string? error, + global::tryAGI.OpenAI.MCPToolCallStatus? status, + string? approvalRequestId) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); - this.Error = error; - this.Output = output; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; + this.Output = output; + this.Error = error; + this.Status = status; + this.ApprovalRequestId = approvalRequestId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.Json.g.cs new file mode 100644 index 00000000..3972c087 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolCallApprovalRequestId + { + /// + /// 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::tryAGI.OpenAI.MCPToolCallApprovalRequestId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolCallApprovalRequestId), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolCallApprovalRequestId; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolCallApprovalRequestId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolCallApprovalRequestId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolCallApprovalRequestId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.g.cs new file mode 100644 index 00000000..2fff085b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallApprovalRequestId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPToolCallApprovalRequestId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.Json.g.cs new file mode 100644 index 00000000..58151e63 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolCallError + { + /// + /// 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::tryAGI.OpenAI.MCPToolCallError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolCallError), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolCallError; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolCallError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolCallError), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolCallError; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.g.cs new file mode 100644 index 00000000..09bee2e9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallError.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPToolCallError + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.Json.g.cs new file mode 100644 index 00000000..b85c91c3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolCallOutput + { + /// + /// 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::tryAGI.OpenAI.MCPToolCallOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolCallOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolCallOutput; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolCallOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolCallOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolCallOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.g.cs new file mode 100644 index 00000000..e5c40184 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPToolCallOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallStatus.g.cs new file mode 100644 index 00000000..217969f6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolCallStatus.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum MCPToolCallStatus + { + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + /// + /// + /// + Calling, + /// + /// + /// + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MCPToolCallStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MCPToolCallStatus value) + { + return value switch + { + MCPToolCallStatus.InProgress => "in_progress", + MCPToolCallStatus.Completed => "completed", + MCPToolCallStatus.Incomplete => "incomplete", + MCPToolCallStatus.Calling => "calling", + MCPToolCallStatus.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MCPToolCallStatus? ToEnum(string value) + { + return value switch + { + "in_progress" => MCPToolCallStatus.InProgress, + "completed" => MCPToolCallStatus.Completed, + "incomplete" => MCPToolCallStatus.Incomplete, + "calling" => MCPToolCallStatus.Calling, + "failed" => MCPToolCallStatus.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolConnectorId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolConnectorId.g.cs index 79053a3e..16ec11e5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolConnectorId.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolConnectorId.g.cs @@ -6,7 +6,7 @@ namespace tryAGI.OpenAI /// /// Identifier for service connectors, like those available in ChatGPT. One of
/// `server_url` or `connector_id` must be provided. Learn more about service
- /// connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
+ /// connectors [here](/docs/guides/tools-remote-mcp#connectors).
/// Currently supported `connector_id` values are:
/// - Dropbox: `connector_dropbox`
/// - Gmail: `connector_gmail`
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolFilter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolFilter.g.cs index 6be6d821..ad1af860 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolFilter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolFilter.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class MCPToolFilter { + /// + /// List of allowed tool names. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_names")] + public global::System.Collections.Generic.IList? ToolNames { get; set; } + /// /// Indicates whether or not a tool modifies data or is read-only. If an
/// MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
@@ -16,12 +22,6 @@ public sealed partial class MCPToolFilter [global::System.Text.Json.Serialization.JsonPropertyName("read_only")] public bool? ReadOnly { get; set; } - /// - /// List of allowed tool names. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_names")] - public global::System.Collections.Generic.IList? ToolNames { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,23 +31,23 @@ public sealed partial class MCPToolFilter /// /// Initializes a new instance of the class. /// + /// + /// List of allowed tool names. + /// /// /// Indicates whether or not a tool modifies data or is read-only. If an
/// MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
/// it will match this filter. /// - /// - /// List of allowed tool names. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MCPToolFilter( - bool? readOnly, - global::System.Collections.Generic.IList? toolNames) + global::System.Collections.Generic.IList? toolNames, + bool? readOnly) { - this.ReadOnly = readOnly; this.ToolNames = toolNames; + this.ReadOnly = readOnly; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders.g.cs index ed707801..89a2563c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders.g.cs @@ -4,8 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Optional HTTP headers to send to the MCP server. Use for authentication
- /// or other purposes. + /// ///
public sealed partial class MCPToolHeaders { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.Json.g.cs new file mode 100644 index 00000000..33953d98 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolHeaders2 + { + /// + /// 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::tryAGI.OpenAI.MCPToolHeaders2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolHeaders2), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolHeaders2; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolHeaders2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolHeaders2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolHeaders2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.g.cs new file mode 100644 index 00000000..268ad922 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolHeaders2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional HTTP headers to send to the MCP server. Use for authentication
+ /// or other purposes. + ///
+ public sealed partial class MCPToolHeaders2 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.Json.g.cs new file mode 100644 index 00000000..996565c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolRequireApproval + { + /// + /// 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::tryAGI.OpenAI.MCPToolRequireApproval? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolRequireApproval), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolRequireApproval; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolRequireApproval? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolRequireApproval), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolRequireApproval; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.g.cs new file mode 100644 index 00000000..3383acc7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApproval.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MCPToolRequireApproval + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.Json.g.cs new file mode 100644 index 00000000..beaf2f6f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MCPToolRequireApprovalVariant1Enum + { + /// + /// 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::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum), + jsonSerializerContext) as global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum; + } + + /// + /// 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::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MCPToolRequireApprovalVariant1Enum; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.g.cs new file mode 100644 index 00000000..190db3d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specify which of the MCP server's tools require approval. Can be
+ /// `always`, `never`, or a filter object associated with tools
+ /// that require approval. + ///
+ public sealed partial class MCPToolRequireApprovalVariant1Enum + { + /// + /// A filter object to specify which tools are allowed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("always")] + public global::tryAGI.OpenAI.MCPToolFilter? Always { get; set; } + + /// + /// A filter object to specify which tools are allowed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("never")] + public global::tryAGI.OpenAI.MCPToolFilter? Never { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A filter object to specify which tools are allowed. + /// + /// + /// A filter object to specify which tools are allowed. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MCPToolRequireApprovalVariant1Enum( + global::tryAGI.OpenAI.MCPToolFilter? always, + global::tryAGI.OpenAI.MCPToolFilter? never) + { + this.Always = always; + this.Never = never; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPToolRequireApprovalVariant1Enum() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum2.g.cs new file mode 100644 index 00000000..24ca79c0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPToolRequireApprovalVariant1Enum2.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specify a single approval policy for all tools. One of `always` or
+ /// `never`. When set to `always`, all tools will require approval. When
+ /// set to `never`, all tools will not require approval. + ///
+ public enum MCPToolRequireApprovalVariant1Enum2 + { + /// + /// + /// + Always, + /// + /// + /// + Never, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MCPToolRequireApprovalVariant1Enum2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MCPToolRequireApprovalVariant1Enum2 value) + { + return value switch + { + MCPToolRequireApprovalVariant1Enum2.Always => "always", + MCPToolRequireApprovalVariant1Enum2.Never => "never", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MCPToolRequireApprovalVariant1Enum2? ToEnum(string value) + { + return value switch + { + "always" => MCPToolRequireApprovalVariant1Enum2.Always, + "never" => MCPToolRequireApprovalVariant1Enum2.Never, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Message.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Message.g.cs index ade74122..4c00e317 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Message.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Message.g.cs @@ -9,11 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class Message { /// - /// The content of the message + /// The type of the message. Always set to `message`.
+ /// Default Value: message ///
- [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } + /// global::tryAGI.OpenAI.MessageType.Message + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeJsonConverter))] + public global::tryAGI.OpenAI.MessageType Type { get; set; } = global::tryAGI.OpenAI.MessageType.Message; /// /// The unique ID of the message. @@ -23,29 +25,27 @@ public sealed partial class Message public required string Id { get; set; } /// - /// + /// The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageRole Role { get; set; } + public required global::tryAGI.OpenAI.MessageStatus Status { get; set; } /// - /// + /// The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageRoleJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageStatus Status { get; set; } + public required global::tryAGI.OpenAI.MessageRole Role { get; set; } /// - /// The type of the message. Always set to `message`.
- /// Default Value: message + /// The content of the message ///
- /// global::tryAGI.OpenAI.MessageType.Message - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageTypeJsonConverter))] - public global::tryAGI.OpenAI.MessageType Type { get; set; } = global::tryAGI.OpenAI.MessageType.Message; + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,32 +56,36 @@ public sealed partial class Message /// /// Initializes a new instance of the class. /// - /// - /// The content of the message + /// + /// The type of the message. Always set to `message`.
+ /// Default Value: message /// /// /// The unique ID of the message. /// - /// - /// - /// - /// The type of the message. Always set to `message`.
- /// Default Value: message + /// + /// The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. + /// + /// + /// The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`. + /// + /// + /// The content of the message /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Message( - global::System.Collections.Generic.IList content, string id, - global::tryAGI.OpenAI.MessageRole role, global::tryAGI.OpenAI.MessageStatus status, + global::tryAGI.OpenAI.MessageRole role, + global::System.Collections.Generic.IList content, global::tryAGI.OpenAI.MessageType type = global::tryAGI.OpenAI.MessageType.Message) { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Role = role; this.Status = status; + this.Role = role; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.Json.g.cs deleted file mode 100644 index 3066ffee..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct MessageContent - { - /// - /// 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::tryAGI.OpenAI.MessageContent? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageContent), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageContent?; - } - - /// - /// 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::tryAGI.OpenAI.MessageContent? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageContent), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageContent?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.g.cs deleted file mode 100644 index 2271d49a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContent.g.cs +++ /dev/null @@ -1,326 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct MessageContent : global::System.IEquatable - { - /// - /// References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentImageFileObject? ImageFileObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentImageFileObject? ImageFileObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFileObject))] -#endif - public bool IsImageFileObject => ImageFileObject != null; - - /// - /// - /// - public static implicit operator MessageContent(global::tryAGI.OpenAI.MessageContentImageFileObject value) => new MessageContent((global::tryAGI.OpenAI.MessageContentImageFileObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentImageFileObject?(MessageContent @this) => @this.ImageFileObject; - - /// - /// - /// - public MessageContent(global::tryAGI.OpenAI.MessageContentImageFileObject? value) - { - ImageFileObject = value; - } - - /// - /// References an image URL in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentImageUrlObject? ImageUrlObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentImageUrlObject? ImageUrlObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrlObject))] -#endif - public bool IsImageUrlObject => ImageUrlObject != null; - - /// - /// - /// - public static implicit operator MessageContent(global::tryAGI.OpenAI.MessageContentImageUrlObject value) => new MessageContent((global::tryAGI.OpenAI.MessageContentImageUrlObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentImageUrlObject?(MessageContent @this) => @this.ImageUrlObject; - - /// - /// - /// - public MessageContent(global::tryAGI.OpenAI.MessageContentImageUrlObject? value) - { - ImageUrlObject = value; - } - - /// - /// The text content that is part of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentTextObject? TextObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentTextObject? TextObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextObject))] -#endif - public bool IsTextObject => TextObject != null; - - /// - /// - /// - public static implicit operator MessageContent(global::tryAGI.OpenAI.MessageContentTextObject value) => new MessageContent((global::tryAGI.OpenAI.MessageContentTextObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentTextObject?(MessageContent @this) => @this.TextObject; - - /// - /// - /// - public MessageContent(global::tryAGI.OpenAI.MessageContentTextObject? value) - { - TextObject = value; - } - - /// - /// The refusal content generated by the assistant. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageContentRefusalObject? RefusalObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentRefusalObject? RefusalObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RefusalObject))] -#endif - public bool IsRefusalObject => RefusalObject != null; - - /// - /// - /// - public static implicit operator MessageContent(global::tryAGI.OpenAI.MessageContentRefusalObject value) => new MessageContent((global::tryAGI.OpenAI.MessageContentRefusalObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentRefusalObject?(MessageContent @this) => @this.RefusalObject; - - /// - /// - /// - public MessageContent(global::tryAGI.OpenAI.MessageContentRefusalObject? value) - { - RefusalObject = value; - } - - /// - /// - /// - public MessageContent( - global::tryAGI.OpenAI.MessageContentImageFileObject? imageFileObject, - global::tryAGI.OpenAI.MessageContentImageUrlObject? imageUrlObject, - global::tryAGI.OpenAI.MessageContentTextObject? textObject, - global::tryAGI.OpenAI.MessageContentRefusalObject? refusalObject - ) - { - ImageFileObject = imageFileObject; - ImageUrlObject = imageUrlObject; - TextObject = textObject; - RefusalObject = refusalObject; - } - - /// - /// - /// - public object? Object => - RefusalObject as object ?? - TextObject as object ?? - ImageUrlObject as object ?? - ImageFileObject as object - ; - - /// - /// - /// - public override string? ToString() => - ImageFileObject?.ToString() ?? - ImageUrlObject?.ToString() ?? - TextObject?.ToString() ?? - RefusalObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsImageFileObject || IsImageUrlObject || IsTextObject || IsRefusalObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? imageFileObject = null, - global::System.Func? imageUrlObject = null, - global::System.Func? textObject = null, - global::System.Func? refusalObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsImageFileObject && imageFileObject != null) - { - return imageFileObject(ImageFileObject!); - } - else if (IsImageUrlObject && imageUrlObject != null) - { - return imageUrlObject(ImageUrlObject!); - } - else if (IsTextObject && textObject != null) - { - return textObject(TextObject!); - } - else if (IsRefusalObject && refusalObject != null) - { - return refusalObject(RefusalObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? imageFileObject = null, - global::System.Action? imageUrlObject = null, - global::System.Action? textObject = null, - global::System.Action? refusalObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsImageFileObject) - { - imageFileObject?.Invoke(ImageFileObject!); - } - else if (IsImageUrlObject) - { - imageUrlObject?.Invoke(ImageUrlObject!); - } - else if (IsTextObject) - { - textObject?.Invoke(TextObject!); - } - else if (IsRefusalObject) - { - refusalObject?.Invoke(RefusalObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ImageFileObject, - typeof(global::tryAGI.OpenAI.MessageContentImageFileObject), - ImageUrlObject, - typeof(global::tryAGI.OpenAI.MessageContentImageUrlObject), - TextObject, - typeof(global::tryAGI.OpenAI.MessageContentTextObject), - RefusalObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(MessageContent other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFileObject, other.ImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrlObject, other.ImageUrlObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TextObject, other.TextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RefusalObject, other.RefusalObject) - ; - } - - /// - /// - /// - public static bool operator ==(MessageContent obj1, MessageContent obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(MessageContent obj1, MessageContent obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is MessageContent o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.Json.g.cs deleted file mode 100644 index 343d9e4c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct MessageContentDelta - { - /// - /// 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::tryAGI.OpenAI.MessageContentDelta? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageContentDelta), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageContentDelta?; - } - - /// - /// 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::tryAGI.OpenAI.MessageContentDelta? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageContentDelta), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageContentDelta?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.g.cs deleted file mode 100644 index 425e3d8d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDelta.g.cs +++ /dev/null @@ -1,326 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct MessageContentDelta : global::System.IEquatable - { - /// - /// References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? ImageFileObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? ImageFileObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFileObject))] -#endif - public bool IsImageFileObject => ImageFileObject != null; - - /// - /// - /// - public static implicit operator MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject value) => new MessageContentDelta((global::tryAGI.OpenAI.MessageDeltaContentImageFileObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentImageFileObject?(MessageContentDelta @this) => @this.ImageFileObject; - - /// - /// - /// - public MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? value) - { - ImageFileObject = value; - } - - /// - /// The text content that is part of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageDeltaContentTextObject? TextObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentTextObject? TextObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextObject))] -#endif - public bool IsTextObject => TextObject != null; - - /// - /// - /// - public static implicit operator MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentTextObject value) => new MessageContentDelta((global::tryAGI.OpenAI.MessageDeltaContentTextObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentTextObject?(MessageContentDelta @this) => @this.TextObject; - - /// - /// - /// - public MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentTextObject? value) - { - TextObject = value; - } - - /// - /// The refusal content that is part of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? RefusalObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? RefusalObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RefusalObject))] -#endif - public bool IsRefusalObject => RefusalObject != null; - - /// - /// - /// - public static implicit operator MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject value) => new MessageContentDelta((global::tryAGI.OpenAI.MessageDeltaContentRefusalObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentRefusalObject?(MessageContentDelta @this) => @this.RefusalObject; - - /// - /// - /// - public MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? value) - { - RefusalObject = value; - } - - /// - /// References an image URL in the content of a message. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? ImageUrlObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? ImageUrlObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrlObject))] -#endif - public bool IsImageUrlObject => ImageUrlObject != null; - - /// - /// - /// - public static implicit operator MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject value) => new MessageContentDelta((global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject?(MessageContentDelta @this) => @this.ImageUrlObject; - - /// - /// - /// - public MessageContentDelta(global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? value) - { - ImageUrlObject = value; - } - - /// - /// - /// - public MessageContentDelta( - global::tryAGI.OpenAI.MessageDeltaContentImageFileObject? imageFileObject, - global::tryAGI.OpenAI.MessageDeltaContentTextObject? textObject, - global::tryAGI.OpenAI.MessageDeltaContentRefusalObject? refusalObject, - global::tryAGI.OpenAI.MessageDeltaContentImageUrlObject? imageUrlObject - ) - { - ImageFileObject = imageFileObject; - TextObject = textObject; - RefusalObject = refusalObject; - ImageUrlObject = imageUrlObject; - } - - /// - /// - /// - public object? Object => - ImageUrlObject as object ?? - RefusalObject as object ?? - TextObject as object ?? - ImageFileObject as object - ; - - /// - /// - /// - public override string? ToString() => - ImageFileObject?.ToString() ?? - TextObject?.ToString() ?? - RefusalObject?.ToString() ?? - ImageUrlObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsImageFileObject || IsTextObject || IsRefusalObject || IsImageUrlObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? imageFileObject = null, - global::System.Func? textObject = null, - global::System.Func? refusalObject = null, - global::System.Func? imageUrlObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsImageFileObject && imageFileObject != null) - { - return imageFileObject(ImageFileObject!); - } - else if (IsTextObject && textObject != null) - { - return textObject(TextObject!); - } - else if (IsRefusalObject && refusalObject != null) - { - return refusalObject(RefusalObject!); - } - else if (IsImageUrlObject && imageUrlObject != null) - { - return imageUrlObject(ImageUrlObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? imageFileObject = null, - global::System.Action? textObject = null, - global::System.Action? refusalObject = null, - global::System.Action? imageUrlObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsImageFileObject) - { - imageFileObject?.Invoke(ImageFileObject!); - } - else if (IsTextObject) - { - textObject?.Invoke(TextObject!); - } - else if (IsRefusalObject) - { - refusalObject?.Invoke(RefusalObject!); - } - else if (IsImageUrlObject) - { - imageUrlObject?.Invoke(ImageUrlObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ImageFileObject, - typeof(global::tryAGI.OpenAI.MessageDeltaContentImageFileObject), - TextObject, - typeof(global::tryAGI.OpenAI.MessageDeltaContentTextObject), - RefusalObject, - typeof(global::tryAGI.OpenAI.MessageDeltaContentRefusalObject), - ImageUrlObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(MessageContentDelta other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFileObject, other.ImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TextObject, other.TextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RefusalObject, other.RefusalObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrlObject, other.ImageUrlObject) - ; - } - - /// - /// - /// - public static bool operator ==(MessageContentDelta obj1, MessageContentDelta obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(MessageContentDelta obj1, MessageContentDelta obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is MessageContentDelta o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.Json.g.cs deleted file mode 100644 index 95735c98..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class MessageContentDeltaDiscriminator - { - /// - /// 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::tryAGI.OpenAI.MessageContentDeltaDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageContentDeltaDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageContentDeltaDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.MessageContentDeltaDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageContentDeltaDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageContentDeltaDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.g.cs deleted file mode 100644 index a7ee6092..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDeltaDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class MessageContentDeltaDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MessageContentDeltaDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public MessageContentDeltaDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.Json.g.cs deleted file mode 100644 index f6078f1d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class MessageContentDiscriminator - { - /// - /// 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::tryAGI.OpenAI.MessageContentDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageContentDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageContentDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.MessageContentDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageContentDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageContentDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.g.cs deleted file mode 100644 index 6708b64b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class MessageContentDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MessageContentDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public MessageContentDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObject.g.cs index 33945c4c..e4b18df4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObject.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + /// References an image [File](/docs/api-reference/files) in the content of a message. /// public sealed partial class MessageContentImageFileObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageContentImageFileObjectImageFile ImageFile { get; set; } - /// /// Always `image_file`. /// @@ -22,6 +15,13 @@ public sealed partial class MessageContentImageFileObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageContentImageFileObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageContentImageFileObjectImageFile ImageFile { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageContentImageFileObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `image_file`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObjectImageFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObjectImageFile.g.cs index e6b3fdcd..29777415 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObjectImageFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageFileObjectImageFile.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class MessageContentImageFileObjectImageFile { + /// + /// The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + /// /// Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto @@ -16,13 +23,6 @@ public sealed partial class MessageContentImageFileObjectImageFile [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageFileObjectImageFileDetailJsonConverter))] public global::tryAGI.OpenAI.MessageContentImageFileObjectImageFileDetail? Detail { get; set; } - /// - /// The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,13 +32,13 @@ public sealed partial class MessageContentImageFileObjectImageFile /// /// Initializes a new instance of the class. /// + /// + /// The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + /// /// /// Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto /// - /// - /// The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObject.g.cs index 1c0458f2..087dfa98 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class MessageContentImageUrlObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrl ImageUrl { get; set; } - /// /// The type of the content part. /// @@ -22,6 +15,13 @@ public sealed partial class MessageContentImageUrlObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageContentImageUrlObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrl ImageUrl { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageContentImageUrlObject /// /// Initializes a new instance of the class. /// - /// /// /// The type of the content part. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObjectImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObjectImageUrl.g.cs index d2f66e93..f314048c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObjectImageUrl.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentImageUrlObjectImageUrl.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class MessageContentImageUrlObjectImageUrl { + /// + /// The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + /// /// Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`
/// Default Value: auto @@ -16,13 +23,6 @@ public sealed partial class MessageContentImageUrlObjectImageUrl [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentImageUrlObjectImageUrlDetailJsonConverter))] public global::tryAGI.OpenAI.MessageContentImageUrlObjectImageUrlDetail? Detail { get; set; } - /// - /// The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,13 +32,13 @@ public sealed partial class MessageContentImageUrlObjectImageUrl /// /// Initializes a new instance of the class. /// + /// + /// The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. + /// /// /// Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`
/// Default Value: auto /// - /// - /// The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentRefusalObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentRefusalObject.g.cs index ea9db9f9..cd30c63c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentRefusalObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentRefusalObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class MessageContentRefusalObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Refusal { get; set; } - /// /// Always `refusal`. /// @@ -22,6 +15,13 @@ public sealed partial class MessageContentRefusalObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentRefusalObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageContentRefusalObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Refusal { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageContentRefusalObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `refusal`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFileCitationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFileCitationObject.g.cs index 9ed49b66..d92d5beb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFileCitationObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFileCitationObject.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class MessageContentTextAnnotationsFileCitationObject { /// - /// + /// Always `file_citation`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFileCitationObjectTypeJsonConverter))] + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectType Type { get; set; } + + /// + /// The text in the message content that needs to be replaced. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] - public required int EndIndex { get; set; } + public required string Text { get; set; } /// /// @@ -30,18 +37,11 @@ public sealed partial class MessageContentTextAnnotationsFileCitationObject public required int StartIndex { get; set; } /// - /// The text in the message content that needs to be replaced. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Always `file_citation`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFileCitationObjectTypeJsonConverter))] - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectType Type { get; set; } + public required int EndIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,29 +52,29 @@ public sealed partial class MessageContentTextAnnotationsFileCitationObject /// /// Initializes a new instance of the class. /// - /// - /// - /// - /// - /// The text in the message content that needs to be replaced. - /// /// /// Always `file_citation`. /// + /// + /// The text in the message content that needs to be replaced. + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageContentTextAnnotationsFileCitationObject( - int endIndex, + string text, global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectFileCitation fileCitation, int startIndex, - string text, + int endIndex, global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObjectType type) { - this.EndIndex = endIndex; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.FileCitation = fileCitation ?? throw new global::System.ArgumentNullException(nameof(fileCitation)); this.StartIndex = startIndex; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.EndIndex = endIndex; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFilePathObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFilePathObject.g.cs index 73f9485f..3be26b63 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFilePathObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextAnnotationsFilePathObject.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class MessageContentTextAnnotationsFilePathObject { /// - /// + /// Always `file_path`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeJsonConverter))] + public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectType Type { get; set; } + + /// + /// The text in the message content that needs to be replaced. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] - public required int EndIndex { get; set; } + public required string Text { get; set; } /// /// @@ -30,18 +37,11 @@ public sealed partial class MessageContentTextAnnotationsFilePathObject public required int StartIndex { get; set; } /// - /// The text in the message content that needs to be replaced. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Always `file_path`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextAnnotationsFilePathObjectTypeJsonConverter))] - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectType Type { get; set; } + public required int EndIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,29 +52,29 @@ public sealed partial class MessageContentTextAnnotationsFilePathObject /// /// Initializes a new instance of the class. /// - /// - /// - /// - /// - /// The text in the message content that needs to be replaced. - /// /// /// Always `file_path`. /// + /// + /// The text in the message content that needs to be replaced. + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageContentTextAnnotationsFilePathObject( - int endIndex, + string text, global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectFilePath filePath, int startIndex, - string text, + int endIndex, global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObjectType type) { - this.EndIndex = endIndex; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.FilePath = filePath ?? throw new global::System.ArgumentNullException(nameof(filePath)); this.StartIndex = startIndex; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.EndIndex = endIndex; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObject.g.cs index 0764060f..3b28ef68 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageContentTextObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageContentTextObjectText Text { get; set; } - /// /// Always `text`. /// @@ -22,6 +15,13 @@ public sealed partial class MessageContentTextObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageContentTextObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageContentTextObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageContentTextObjectText Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageContentTextObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `text`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObjectText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObjectText.g.cs index 55ac25e1..e4cec1bb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObjectText.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageContentTextObjectText.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,18 +11,18 @@ namespace tryAGI.OpenAI public sealed partial class MessageContentTextObjectText { /// - /// + /// The data that makes up the text. /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + [global::System.Text.Json.Serialization.JsonPropertyName("value")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Annotations { get; set; } + public required string Value { get; set; } /// - /// The data that makes up the text. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Value { get; set; } + public required global::System.Collections.Generic.IList> Annotations { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,19 +33,19 @@ public sealed partial class MessageContentTextObjectText /// /// Initializes a new instance of the class. /// - /// /// /// The data that makes up the text. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageContentTextObjectText( - global::System.Collections.Generic.IList annotations, - string value) + string value, + global::System.Collections.Generic.IList> annotations) { - this.Annotations = annotations ?? throw new global::System.ArgumentNullException(nameof(annotations)); this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + this.Annotations = annotations ?? throw new global::System.ArgumentNullException(nameof(annotations)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObject.g.cs index 66824a8c..40eaf1cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObject.g.cs @@ -4,16 +4,10 @@ namespace tryAGI.OpenAI { /// - /// References an image [File](https://platform.openai.com/docs/api-reference/files) in the content of a message. + /// References an image [File](/docs/api-reference/files) in the content of a message. /// public sealed partial class MessageDeltaContentImageFileObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] - public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? ImageFile { get; set; } - /// /// The index of the content part in the message. /// @@ -28,6 +22,12 @@ public sealed partial class MessageDeltaContentImageFileObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_file")] + public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? ImageFile { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,24 +37,24 @@ public sealed partial class MessageDeltaContentImageFileObject /// /// Initializes a new instance of the class. /// - /// /// /// The index of the content part in the message. /// /// /// Always `image_file`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentImageFileObject( int index, - global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? imageFile, - global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectType type) + global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectType type, + global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFile? imageFile) { this.Index = index; - this.ImageFile = imageFile; this.Type = type; + this.ImageFile = imageFile; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObjectImageFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObjectImageFile.g.cs index a0e8e8c9..9cc1e91e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObjectImageFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageFileObjectImageFile.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentImageFileObjectImageFile { + /// + /// The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + /// /// Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto @@ -16,12 +22,6 @@ public sealed partial class MessageDeltaContentImageFileObjectImageFile [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageFileObjectImageFileDetailJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? Detail { get; set; } - /// - /// The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,22 +31,22 @@ public sealed partial class MessageDeltaContentImageFileObjectImageFile /// /// Initializes a new instance of the class. /// + /// + /// The [File](/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. + /// /// /// Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto /// - /// - /// The [File](https://platform.openai.com/docs/api-reference/files) ID of the image in the message content. Set `purpose="vision"` when uploading the File if you need to later display the file content. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentImageFileObjectImageFile( - global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? detail, - string? fileId) + string? fileId, + global::tryAGI.OpenAI.MessageDeltaContentImageFileObjectImageFileDetail? detail) { - this.Detail = detail; this.FileId = fileId; + this.Detail = detail; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObject.g.cs index 4b08ec27..0a5c6a3b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObject.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentImageUrlObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? ImageUrl { get; set; } - /// /// The index of the content part in the message. /// @@ -28,6 +22,12 @@ public sealed partial class MessageDeltaContentImageUrlObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? ImageUrl { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,24 +37,24 @@ public sealed partial class MessageDeltaContentImageUrlObject /// /// Initializes a new instance of the class. /// - /// /// /// The index of the content part in the message. /// /// /// Always `image_url`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentImageUrlObject( int index, - global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? imageUrl, - global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectType type) + global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectType type, + global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrl? imageUrl) { this.Index = index; - this.ImageUrl = imageUrl; this.Type = type; + this.ImageUrl = imageUrl; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObjectImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObjectImageUrl.g.cs index 2a7d8e78..c3c813a1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObjectImageUrl.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentImageUrlObjectImageUrl.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentImageUrlObjectImageUrl { + /// + /// The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + /// /// Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto @@ -16,12 +22,6 @@ public sealed partial class MessageDeltaContentImageUrlObjectImageUrl [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentImageUrlObjectImageUrlDetailJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? Detail { get; set; } - /// - /// The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,22 +31,22 @@ public sealed partial class MessageDeltaContentImageUrlObjectImageUrl /// /// Initializes a new instance of the class. /// + /// + /// The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. + /// /// /// Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`.
/// Default Value: auto /// - /// - /// The URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentImageUrlObjectImageUrl( - global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? detail, - string? url) + string? url, + global::tryAGI.OpenAI.MessageDeltaContentImageUrlObjectImageUrlDetail? detail) { - this.Detail = detail; this.Url = url; + this.Detail = detail; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentRefusalObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentRefusalObject.g.cs index dbc9409f..fbec2423 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentRefusalObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentRefusalObject.g.cs @@ -15,12 +15,6 @@ public sealed partial class MessageDeltaContentRefusalObject [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - public string? Refusal { get; set; } - /// /// Always `refusal`. /// @@ -28,6 +22,12 @@ public sealed partial class MessageDeltaContentRefusalObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentRefusalObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentRefusalObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + public string? Refusal { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,21 +40,21 @@ public sealed partial class MessageDeltaContentRefusalObject /// /// The index of the refusal part in the message. /// - /// /// /// Always `refusal`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentRefusalObject( int index, - string? refusal, - global::tryAGI.OpenAI.MessageDeltaContentRefusalObjectType type) + global::tryAGI.OpenAI.MessageDeltaContentRefusalObjectType type, + string? refusal) { this.Index = index; - this.Refusal = refusal; this.Type = type; + this.Refusal = refusal; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFileCitationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFileCitationObject.g.cs index a2402c33..a57e8469 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFileCitationObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFileCitationObject.g.cs @@ -8,18 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentTextAnnotationsFileCitationObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] - public int? EndIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_citation")] - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? FileCitation { get; set; } - /// /// The index of the annotation in the text content part. /// @@ -28,10 +16,11 @@ public sealed partial class MessageDeltaContentTextAnnotationsFileCitationObject public required int Index { get; set; } /// - /// + /// Always `file_citation`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] - public int? StartIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFileCitationObjectTypeJsonConverter))] + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType Type { get; set; } /// /// The text in the message content that needs to be replaced. @@ -40,11 +29,22 @@ public sealed partial class MessageDeltaContentTextAnnotationsFileCitationObject public string? Text { get; set; } /// - /// Always `file_citation`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFileCitationObjectTypeJsonConverter))] - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_citation")] + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? FileCitation { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] + public int? StartIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + public int? EndIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -55,35 +55,35 @@ public sealed partial class MessageDeltaContentTextAnnotationsFileCitationObject /// /// Initializes a new instance of the class. /// - /// - /// /// /// The index of the annotation in the text content part. /// - /// - /// - /// The text in the message content that needs to be replaced. - /// /// /// Always `file_citation`. /// + /// + /// The text in the message content that needs to be replaced. + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentTextAnnotationsFileCitationObject( int index, - int? endIndex, + global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType type, + string? text, global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation? fileCitation, int? startIndex, - string? text, - global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObjectType type) + int? endIndex) { this.Index = index; - this.EndIndex = endIndex; + this.Type = type; + this.Text = text; this.FileCitation = fileCitation; this.StartIndex = startIndex; - this.Text = text; - this.Type = type; + this.EndIndex = endIndex; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFilePathObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFilePathObject.g.cs index e1c5d7c3..99cce854 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFilePathObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextAnnotationsFilePathObject.g.cs @@ -8,18 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentTextAnnotationsFilePathObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] - public int? EndIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_path")] - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? FilePath { get; set; } - /// /// The index of the annotation in the text content part. /// @@ -28,10 +16,11 @@ public sealed partial class MessageDeltaContentTextAnnotationsFilePathObject public required int Index { get; set; } /// - /// + /// Always `file_path`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] - public int? StartIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeJsonConverter))] + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType Type { get; set; } /// /// The text in the message content that needs to be replaced. @@ -40,11 +29,22 @@ public sealed partial class MessageDeltaContentTextAnnotationsFilePathObject public string? Text { get; set; } /// - /// Always `file_path`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextAnnotationsFilePathObjectTypeJsonConverter))] - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("file_path")] + public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? FilePath { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_index")] + public int? StartIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + public int? EndIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -55,35 +55,35 @@ public sealed partial class MessageDeltaContentTextAnnotationsFilePathObject /// /// Initializes a new instance of the class. /// - /// - /// /// /// The index of the annotation in the text content part. /// - /// - /// - /// The text in the message content that needs to be replaced. - /// /// /// Always `file_path`. /// + /// + /// The text in the message content that needs to be replaced. + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentTextAnnotationsFilePathObject( int index, - int? endIndex, + global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType type, + string? text, global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectFilePath? filePath, int? startIndex, - string? text, - global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObjectType type) + int? endIndex) { this.Index = index; - this.EndIndex = endIndex; + this.Type = type; + this.Text = text; this.FilePath = filePath; this.StartIndex = startIndex; - this.Text = text; - this.Type = type; + this.EndIndex = endIndex; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObject.g.cs index 1024abdb..6eabeda6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObject.g.cs @@ -15,12 +15,6 @@ public sealed partial class MessageDeltaContentTextObject [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? Text { get; set; } - /// /// Always `text`. /// @@ -28,6 +22,12 @@ public sealed partial class MessageDeltaContentTextObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaContentTextObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaContentTextObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,21 +40,21 @@ public sealed partial class MessageDeltaContentTextObject /// /// The index of the content part in the message. /// - /// /// /// Always `text`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentTextObject( int index, - global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? text, - global::tryAGI.OpenAI.MessageDeltaContentTextObjectType type) + global::tryAGI.OpenAI.MessageDeltaContentTextObjectType type, + global::tryAGI.OpenAI.MessageDeltaContentTextObjectText? text) { this.Index = index; - this.Text = text; this.Type = type; + this.Text = text; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObjectText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObjectText.g.cs index 0ff32186..57476c14 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObjectText.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaContentTextObjectText.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,18 +10,18 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaContentTextObjectText { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] - public global::System.Collections.Generic.IList? Annotations { get; set; } - /// /// The data that makes up the text. /// [global::System.Text.Json.Serialization.JsonPropertyName("value")] public string? Value { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + public global::System.Collections.Generic.IList>? Annotations { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,19 +31,19 @@ public sealed partial class MessageDeltaContentTextObjectText /// /// Initializes a new instance of the class. /// - /// /// /// The data that makes up the text. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaContentTextObjectText( - global::System.Collections.Generic.IList? annotations, - string? value) + string? value, + global::System.Collections.Generic.IList>? annotations) { - this.Annotations = annotations; this.Value = value; + this.Annotations = annotations; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObject.g.cs index 2fe8e646..92c50f8a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class MessageDeltaObject { - /// - /// The delta containing the fields that have changed on the Message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageDeltaObjectDelta Delta { get; set; } - /// /// The identifier of the message, which can be referenced in API endpoints. /// @@ -29,6 +22,13 @@ public sealed partial class MessageDeltaObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectObjectJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaObjectObject Object { get; set; } + /// + /// The delta containing the fields that have changed on the Message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageDeltaObjectDelta Delta { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class MessageDeltaObject /// /// Initializes a new instance of the class. /// - /// - /// The delta containing the fields that have changed on the Message. - /// /// /// The identifier of the message, which can be referenced in API endpoints. /// /// /// The object type, which is always `thread.message.delta`. /// + /// + /// The delta containing the fields that have changed on the Message. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaObject( - global::tryAGI.OpenAI.MessageDeltaObjectDelta delta, string id, + global::tryAGI.OpenAI.MessageDeltaObjectDelta delta, global::tryAGI.OpenAI.MessageDeltaObjectObject @object) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObjectDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObjectDelta.g.cs index 82cfe769..6001664a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObjectDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageDeltaObjectDelta.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,12 +10,6 @@ namespace tryAGI.OpenAI /// 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; } - /// /// The entity that produced the message. One of `user` or `assistant`. /// @@ -21,6 +17,12 @@ public sealed partial class MessageDeltaObjectDelta [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageDeltaObjectDeltaRoleJsonConverter))] public global::tryAGI.OpenAI.MessageDeltaObjectDeltaRole? Role { get; set; } + /// + /// 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; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +32,21 @@ public sealed partial class MessageDeltaObjectDelta /// /// Initializes a new instance of the class. /// - /// - /// The content of the message in array of text and/or images. - /// /// /// The entity that produced the message. One of `user` or `assistant`. /// + /// + /// The content of the message in array of text and/or images. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDeltaObjectDelta( - global::System.Collections.Generic.IList? content, - global::tryAGI.OpenAI.MessageDeltaObjectDeltaRole? role) + global::tryAGI.OpenAI.MessageDeltaObjectDeltaRole? role, + global::System.Collections.Generic.IList>? content) { - this.Content = content; this.Role = role; + this.Content = content; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObject.g.cs index e2cbbf14..f3dc6ffe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObject.g.cs @@ -1,40 +1,28 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI { /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents a message within a [thread](/docs/api-reference/threads). /// public sealed partial class MessageObject { /// - /// If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string? AssistantId { get; set; } - - /// - /// A list of files attached to the message, and the tools they were added to. + /// The identifier, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList? Attachments { get; set; } - - /// - /// The Unix timestamp (in seconds) for when the message was completed. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? CompletedAt { get; set; } + public required string Id { get; set; } /// - /// The content of the message in array of text and/or images. + /// The object type, which is always `thread.message`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectJsonConverter))] + public global::tryAGI.OpenAI.MessageObjectObject Object { get; set; } /// /// The Unix timestamp (in seconds) for when the message was created. @@ -45,42 +33,36 @@ public sealed partial class MessageObject public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The identifier, which can be referenced in API endpoints. + /// The [thread](/docs/api-reference/threads) ID that this message belongs to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string ThreadId { get; set; } /// - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. + /// The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? IncompleteAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusJsonConverter))] + public global::tryAGI.OpenAI.MessageObjectStatus? Status { get; set; } /// - /// On an incomplete message, details about why the message is incomplete. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_details")] - public global::tryAGI.OpenAI.MessageObjectIncompleteDetails? IncompleteDetails { get; set; } + public global::tryAGI.OpenAI.MessageObjectIncompleteDetails2? IncompleteDetails { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + public global::System.DateTimeOffset? CompletedAt { get; set; } /// - /// The object type, which is always `thread.message`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.MessageObjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_at")] + public global::System.DateTimeOffset? IncompleteAt { get; set; } /// /// The entity that produced the message. One of `user` or `assistant`. @@ -91,25 +73,39 @@ public sealed partial class MessageObject public required global::tryAGI.OpenAI.MessageObjectRole Role { get; set; } /// - /// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. + /// The content of the message in array of text and/or images. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? AssistantId { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string? RunId { get; set; } /// - /// The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectStatusJsonConverter))] - public global::tryAGI.OpenAI.MessageObjectStatus? Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList? Attachments { get; set; } /// - /// The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ThreadId { get; set; } + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -120,85 +116,67 @@ public sealed partial class MessageObject /// /// Initializes a new instance of the class. /// - /// - /// If applicable, the ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this message. - /// - /// - /// A list of files attached to the message, and the tools they were added to. - /// - /// - /// The Unix timestamp (in seconds) for when the message was completed. - /// - /// - /// The content of the message in array of text and/or images. - /// - /// - /// The Unix timestamp (in seconds) for when the message was created. - /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. - /// - /// - /// On an incomplete message, details about why the message is incomplete. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The object type, which is always `thread.message`. /// - /// - /// The entity that produced the message. One of `user` or `assistant`. + /// + /// The Unix timestamp (in seconds) for when the message was created. /// - /// - /// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is `null` when messages are created manually using the create message or create thread endpoints. + /// + /// The [thread](/docs/api-reference/threads) ID that this message belongs to. /// /// /// The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. /// - /// - /// The [thread](https://platform.openai.com/docs/api-reference/threads) ID that this message belongs to. + /// + /// + /// + /// + /// The entity that produced the message. One of `user` or `assistant`. + /// + /// + /// The content of the message in array of text and/or images. /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageObject( - string? assistantId, - global::System.Collections.Generic.IList? attachments, - global::System.Collections.Generic.IList content, - global::System.DateTimeOffset createdAt, string id, - global::System.Collections.Generic.Dictionary? metadata, + global::System.DateTimeOffset createdAt, + string threadId, global::tryAGI.OpenAI.MessageObjectRole role, + global::System.Collections.Generic.IList> content, + string? assistantId, string? runId, - string threadId, - global::System.DateTimeOffset? completedAt, - global::System.DateTimeOffset? incompleteAt, - global::tryAGI.OpenAI.MessageObjectIncompleteDetails? incompleteDetails, + global::System.Collections.Generic.IList? attachments, + global::System.Collections.Generic.Dictionary? metadata, global::tryAGI.OpenAI.MessageObjectObject @object, - global::tryAGI.OpenAI.MessageObjectStatus? status) + global::tryAGI.OpenAI.MessageObjectStatus? status, + global::tryAGI.OpenAI.MessageObjectIncompleteDetails2? incompleteDetails, + global::System.DateTimeOffset? completedAt, + global::System.DateTimeOffset? incompleteAt) { - this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); - this.Attachments = attachments ?? throw new global::System.ArgumentNullException(nameof(attachments)); - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); this.Role = role; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); this.RunId = runId ?? throw new global::System.ArgumentNullException(nameof(runId)); - this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); - this.CompletedAt = completedAt; - this.IncompleteAt = incompleteAt; - this.IncompleteDetails = incompleteDetails; + this.Attachments = attachments ?? throw new global::System.ArgumentNullException(nameof(attachments)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Object = @object; this.Status = status; + this.IncompleteDetails = incompleteDetails; + this.CompletedAt = completedAt; + this.IncompleteAt = incompleteAt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.Json.g.cs new file mode 100644 index 00000000..b055a0a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectAssistantId + { + /// + /// 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::tryAGI.OpenAI.MessageObjectAssistantId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectAssistantId), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectAssistantId; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectAssistantId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectAssistantId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectAssistantId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.g.cs new file mode 100644 index 00000000..3825476e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAssistantId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectAssistantId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.Json.g.cs deleted file mode 100644 index 3928c755..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class MessageObjectAttachment - { - /// - /// 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::tryAGI.OpenAI.MessageObjectAttachment? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageObjectAttachment), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectAttachment; - } - - /// - /// 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::tryAGI.OpenAI.MessageObjectAttachment? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageObjectAttachment), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectAttachment; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.g.cs deleted file mode 100644 index 2ab61f48..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachment.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class MessageObjectAttachment - { - /// - /// The ID of the file to attach to the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] - public string? FileId { get; set; } - - /// - /// The tools to add this file to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The ID of the file to attach to the message. - /// - /// - /// The tools to add this file to. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MessageObjectAttachment( - string? fileId, - global::System.Collections.Generic.IList>? tools) - { - this.FileId = fileId; - this.Tools = tools; - } - - /// - /// Initializes a new instance of the class. - /// - public MessageObjectAttachment() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.Json.g.cs new file mode 100644 index 00000000..b9504f7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectAttachments + { + /// + /// 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::tryAGI.OpenAI.MessageObjectAttachments? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectAttachments), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectAttachments; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectAttachments? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectAttachments), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectAttachments; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.g.cs new file mode 100644 index 00000000..63ed99bd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachments.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectAttachments + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.Json.g.cs new file mode 100644 index 00000000..7e7acf27 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectAttachmentsVariant1Item + { + /// + /// 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::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectAttachmentsVariant1Item; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.g.cs new file mode 100644 index 00000000..d326d3cd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectAttachmentsVariant1Item.g.cs @@ -0,0 +1,58 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectAttachmentsVariant1Item + { + /// + /// The ID of the file to attach to the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + public string? FileId { get; set; } + + /// + /// The tools to add this file to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The ID of the file to attach to the message. + /// + /// + /// The tools to add this file to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MessageObjectAttachmentsVariant1Item( + string? fileId, + global::System.Collections.Generic.IList>? tools) + { + this.FileId = fileId; + this.Tools = tools; + } + + /// + /// Initializes a new instance of the class. + /// + public MessageObjectAttachmentsVariant1Item() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.Json.g.cs new file mode 100644 index 00000000..b0000514 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectCompletedAt + { + /// + /// 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::tryAGI.OpenAI.MessageObjectCompletedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectCompletedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectCompletedAt; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectCompletedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectCompletedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectCompletedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.g.cs new file mode 100644 index 00000000..cfd155f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectCompletedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectCompletedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.Json.g.cs new file mode 100644 index 00000000..50d5b74e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectIncompleteAt + { + /// + /// 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::tryAGI.OpenAI.MessageObjectIncompleteAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectIncompleteAt), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectIncompleteAt; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectIncompleteAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectIncompleteAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectIncompleteAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.g.cs new file mode 100644 index 00000000..8e587e38 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectIncompleteAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails.g.cs index a0642516..d7114bf7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails.g.cs @@ -4,44 +4,15 @@ namespace tryAGI.OpenAI { /// - /// On an incomplete message, details about why the message is incomplete. + /// /// public sealed partial class MessageObjectIncompleteDetails { - /// - /// The reason the message is incomplete. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("reason")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason Reason { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The reason the message is incomplete. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MessageObjectIncompleteDetails( - global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason reason) - { - this.Reason = reason; - } - - /// - /// Initializes a new instance of the class. - /// - public MessageObjectIncompleteDetails() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.Json.g.cs new file mode 100644 index 00000000..613173b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectIncompleteDetails2 + { + /// + /// 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::tryAGI.OpenAI.MessageObjectIncompleteDetails2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectIncompleteDetails2), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectIncompleteDetails2; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectIncompleteDetails2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectIncompleteDetails2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectIncompleteDetails2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.g.cs new file mode 100644 index 00000000..c723de58 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectIncompleteDetails2.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// On an incomplete message, details about why the message is incomplete. + /// + public sealed partial class MessageObjectIncompleteDetails2 + { + /// + /// The reason the message is incomplete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageObjectIncompleteDetailsReasonJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason Reason { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The reason the message is incomplete. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MessageObjectIncompleteDetails2( + global::tryAGI.OpenAI.MessageObjectIncompleteDetailsReason reason) + { + this.Reason = reason; + } + + /// + /// Initializes a new instance of the class. + /// + public MessageObjectIncompleteDetails2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.Json.g.cs new file mode 100644 index 00000000..05ac5276 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MessageObjectRunId + { + /// + /// 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::tryAGI.OpenAI.MessageObjectRunId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MessageObjectRunId), + jsonSerializerContext) as global::tryAGI.OpenAI.MessageObjectRunId; + } + + /// + /// 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::tryAGI.OpenAI.MessageObjectRunId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MessageObjectRunId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageObjectRunId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.g.cs new file mode 100644 index 00000000..fd7ded61 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageObjectRunId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class MessageObjectRunId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessagePhase.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessagePhase.g.cs new file mode 100644 index 00000000..be830ac4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessagePhase.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).
+ /// For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
+ /// phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + ///
+ public enum MessagePhase + { + /// + /// + /// + Commentary, + /// + /// + /// + FinalAnswer, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessagePhaseExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessagePhase value) + { + return value switch + { + MessagePhase.Commentary => "commentary", + MessagePhase.FinalAnswer => "final_answer", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessagePhase? ToEnum(string value) + { + return value switch + { + "commentary" => MessagePhase.Commentary, + "final_answer" => MessagePhase.FinalAnswer, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageRequestContentTextObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageRequestContentTextObject.g.cs index 6d1719cf..63f14aad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageRequestContentTextObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageRequestContentTextObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class MessageRequestContentTextObject { - /// - /// Text content to be sent to the model - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// Always `text`. /// @@ -22,6 +15,13 @@ public sealed partial class MessageRequestContentTextObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageRequestContentTextObjectTypeJsonConverter))] public global::tryAGI.OpenAI.MessageRequestContentTextObjectType Type { get; set; } + /// + /// Text content to be sent to the model + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class MessageRequestContentTextObject /// /// Initializes a new instance of the class. /// - /// - /// Text content to be sent to the model - /// /// /// Always `text`. /// + /// + /// Text content to be sent to the model + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEvent.g.cs index 732594dc..c2ddb7e2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEvent.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct MessageStreamEvent : global::System.IEquatable { /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + /// Occurs when a [message](/docs/api-reference/messages/object) is created. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.MessageStreamEventVariant1? Value1 { get; init; } @@ -27,25 +27,7 @@ namespace tryAGI.OpenAI public bool IsValue1 => Value1 != null; /// - /// - /// - public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant1 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant1?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant1?(MessageStreamEvent @this) => @this.Value1; - - /// - /// - /// - public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant1? value) - { - Value1 = value; - } - - /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.MessageStreamEventVariant2? Value2 { get; init; } @@ -62,109 +44,126 @@ public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant1? valu public bool IsValue2 => Value2 != null; /// - /// + /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// - public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant2 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant2?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MessageStreamEventVariant3? Value3 { get; init; } +#else + public global::tryAGI.OpenAI.MessageStreamEventVariant3? Value3 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant2?(MessageStreamEvent @this) => @this.Value2; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// Occurs when a [message](/docs/api-reference/messages/object) is completed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MessageStreamEventVariant4? Value4 { get; init; } +#else + public global::tryAGI.OpenAI.MessageStreamEventVariant4? Value4 { get; } +#endif /// /// /// - public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant2? value) - { - Value2 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; /// - /// Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageStreamEventVariant3? Value3 { get; init; } + public global::tryAGI.OpenAI.MessageStreamEventVariant5? Value5 { get; init; } #else - public global::tryAGI.OpenAI.MessageStreamEventVariant3? Value3 { get; } + public global::tryAGI.OpenAI.MessageStreamEventVariant5? Value5 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] #endif - public bool IsValue3 => Value3 != null; - + public bool IsValue5 => Value5 != null; /// /// /// - public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant3 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant3?)value); + public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant1 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant1?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant3?(MessageStreamEvent @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant1?(MessageStreamEvent @this) => @this.Value1; /// /// /// - public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant3? value) + public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant1? value) { - Value3 = value; + Value1 = value; } /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageStreamEventVariant4? Value4 { get; init; } -#else - public global::tryAGI.OpenAI.MessageStreamEventVariant4? Value4 { get; } -#endif + public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant2 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant2?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; + public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant2?(MessageStreamEvent @this) => @this.Value2; /// /// /// - public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant4 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant4?)value); + public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant2? value) + { + Value2 = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant4?(MessageStreamEvent @this) => @this.Value4; + public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant3 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant3?)value); /// /// /// - public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant4? value) + public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant3?(MessageStreamEvent @this) => @this.Value3; + + /// + /// + /// + public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant3? value) { - Value4 = value; + Value3 = value; } /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MessageStreamEventVariant5? Value5 { get; init; } -#else - public global::tryAGI.OpenAI.MessageStreamEventVariant5? Value5 { get; } -#endif + public static implicit operator MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant4 value) => new MessageStreamEvent((global::tryAGI.OpenAI.MessageStreamEventVariant4?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; + public static implicit operator global::tryAGI.OpenAI.MessageStreamEventVariant4?(MessageStreamEvent @this) => @this.Value4; + + /// + /// + /// + public MessageStreamEvent(global::tryAGI.OpenAI.MessageStreamEventVariant4? value) + { + Value4 = value; + } /// /// @@ -229,7 +228,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5; + 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; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.Json.g.cs deleted file mode 100644 index 54da5a02..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class MessageStreamEventDiscriminator - { - /// - /// 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::tryAGI.OpenAI.MessageStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.MessageStreamEventDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.MessageStreamEventDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.MessageStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.MessageStreamEventDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MessageStreamEventDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.g.cs deleted file mode 100644 index c218b986..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class MessageStreamEventDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MessageStreamEventDiscriminator( - string? @event) - { - this.Event = @event; - } - - /// - /// Initializes a new instance of the class. - /// - public MessageStreamEventDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant1.g.cs index e864d162..6a85730e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant1.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant1.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is created. + /// Occurs when a [message](/docs/api-reference/messages/object) is created. /// public sealed partial class MessageStreamEventVariant1 { - /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class MessageStreamEventVariant1 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant1EventJsonConverter))] public global::tryAGI.OpenAI.MessageStreamEventVariant1Event Event { get; set; } + /// + /// Represents a message within a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageStreamEventVariant1 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents a message within a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant2.g.cs index 85072302..a565adb5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant2.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves to an `in_progress` state. + /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// public sealed partial class MessageStreamEventVariant2 { - /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class MessageStreamEventVariant2 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant2EventJsonConverter))] public global::tryAGI.OpenAI.MessageStreamEventVariant2Event Event { get; set; } + /// + /// Represents a message within a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageStreamEventVariant2 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents a message within a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant3.g.cs index 697489c7..9d0260c3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant3.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when parts of a [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed. + /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// public sealed partial class MessageStreamEventVariant3 { - /// - /// Represents a message delta i.e. any changed fields on a message during streaming. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageDeltaObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class MessageStreamEventVariant3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant3EventJsonConverter))] public global::tryAGI.OpenAI.MessageStreamEventVariant3Event Event { get; set; } + /// + /// Represents a message delta i.e. any changed fields on a message during streaming. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageDeltaObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageStreamEventVariant3 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a message delta i.e. any changed fields on a message during streaming. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant4.g.cs index eed3f0cc..7d4b5223 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant4.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant4.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is completed. + /// Occurs when a [message](/docs/api-reference/messages/object) is completed. /// public sealed partial class MessageStreamEventVariant4 { - /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class MessageStreamEventVariant4 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant4EventJsonConverter))] public global::tryAGI.OpenAI.MessageStreamEventVariant4Event Event { get; set; } + /// + /// Represents a message within a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageStreamEventVariant4 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents a message within a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant5.g.cs index 2bffa1fe..02e67b0f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant5.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStreamEventVariant5.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends before it is completed. + /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. /// public sealed partial class MessageStreamEventVariant5 { - /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.MessageObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class MessageStreamEventVariant5 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MessageStreamEventVariant5EventJsonConverter))] public global::tryAGI.OpenAI.MessageStreamEventVariant5Event Event { get; set; } + /// + /// Represents a message within a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.MessageObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class MessageStreamEventVariant5 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents a message within a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Metadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Metadata.g.cs index ae9cc020..0d02ed3c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Metadata.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Metadata.g.cs @@ -4,11 +4,7 @@ namespace tryAGI.OpenAI { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
public sealed partial class Metadata { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.Json.g.cs new file mode 100644 index 00000000..e7ef95c7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MetadataVariant1 + { + /// + /// 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::tryAGI.OpenAI.MetadataVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MetadataVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.MetadataVariant1; + } + + /// + /// 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::tryAGI.OpenAI.MetadataVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MetadataVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MetadataVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.g.cs new file mode 100644 index 00000000..a547fbfe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataVariant1.g.cs @@ -0,0 +1,22 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// 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, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings
+ /// with a maximum length of 512 characters. + ///
+ public sealed partial class MetadataVariant1 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.Json.g.cs deleted file mode 100644 index 5e487d65..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Model16 - { - /// - /// 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::tryAGI.OpenAI.Model16? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Model16), - jsonSerializerContext) as global::tryAGI.OpenAI.Model16; - } - - /// - /// 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::tryAGI.OpenAI.Model16? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Model16), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Model16; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.g.cs deleted file mode 100644 index b0e1bc8d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model16.g.cs +++ /dev/null @@ -1,83 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Describes an OpenAI model offering that can be used with the API. - /// - public sealed partial class Model16 - { - /// - /// The Unix timestamp (in seconds) when the model was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset Created { get; set; } - - /// - /// The model identifier, which can be referenced in the API endpoints. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// The object type, which is always "model". - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectJsonConverter))] - public global::tryAGI.OpenAI.ModelObject Object { get; set; } - - /// - /// The organization that owns the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("owned_by")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string OwnedBy { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The Unix timestamp (in seconds) when the model was created. - /// - /// - /// The model identifier, which can be referenced in the API endpoints. - /// - /// - /// The object type, which is always "model". - /// - /// - /// The organization that owns the model. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Model16( - global::System.DateTimeOffset created, - string id, - string ownedBy, - global::tryAGI.OpenAI.ModelObject @object) - { - this.Created = created; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.OwnedBy = ownedBy ?? throw new global::System.ArgumentNullException(nameof(ownedBy)); - this.Object = @object; - } - - /// - /// Initializes a new instance of the class. - /// - public Model16() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.Json.g.cs new file mode 100644 index 00000000..8e420610 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Model17 + { + /// + /// 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::tryAGI.OpenAI.Model17? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Model17), + jsonSerializerContext) as global::tryAGI.OpenAI.Model17; + } + + /// + /// 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::tryAGI.OpenAI.Model17? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Model17), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Model17; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.g.cs new file mode 100644 index 00000000..df993c1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Model17.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Describes an OpenAI model offering that can be used with the API. + /// + public sealed partial class Model17 + { + /// + /// The model identifier, which can be referenced in the API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The Unix timestamp (in seconds) when the model was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset Created { get; set; } + + /// + /// The object type, which is always "model". + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelObjectJsonConverter))] + public global::tryAGI.OpenAI.ModelObject Object { get; set; } + + /// + /// The organization that owns the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("owned_by")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string OwnedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The model identifier, which can be referenced in the API endpoints. + /// + /// + /// The Unix timestamp (in seconds) when the model was created. + /// + /// + /// The object type, which is always "model". + /// + /// + /// The organization that owns the model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Model17( + string id, + global::System.DateTimeOffset created, + string ownedBy, + global::tryAGI.OpenAI.ModelObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Created = created; + this.OwnedBy = ownedBy ?? throw new global::System.ArgumentNullException(nameof(ownedBy)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public Model17() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIds.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIds.g.cs index 32299f9b..1dfdf5ca 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIds.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIds.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct ModelIds : global::System.IEquatable { /// - /// Example: gpt-4o + /// Example: gpt-5.4 /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.ModelIdsShared? Shared { get; init; } @@ -26,6 +26,22 @@ namespace tryAGI.OpenAI #endif public bool IsShared => Shared != null; + /// + /// Example: gpt-5.1 + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ModelIdsResponses? Responses { get; init; } +#else + public global::tryAGI.OpenAI.ModelIdsResponses? Responses { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Responses))] +#endif + public bool IsResponses => Responses != null; /// /// /// @@ -44,23 +60,6 @@ public ModelIds(global::tryAGI.OpenAI.ModelIdsShared? value) Shared = value; } - /// - /// Example: gpt-4o - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ModelIdsResponses? Responses { get; init; } -#else - public global::tryAGI.OpenAI.ModelIdsResponses? Responses { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Responses))] -#endif - public bool IsResponses => Responses != null; - /// /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.Json.g.cs new file mode 100644 index 00000000..4b44f991 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ModelIdsCompaction + { + /// + /// 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::tryAGI.OpenAI.ModelIdsCompaction? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModelIdsCompaction), + jsonSerializerContext) as global::tryAGI.OpenAI.ModelIdsCompaction?; + } + + /// + /// 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::tryAGI.OpenAI.ModelIdsCompaction? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModelIdsCompaction), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModelIdsCompaction?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.g.cs new file mode 100644 index 00000000..061cf2da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsCompaction.g.cs @@ -0,0 +1,255 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. + /// + public readonly partial struct ModelIdsCompaction : global::System.IEquatable + { + /// + /// Example: gpt-5.1 + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ModelIdsResponses? Value1 { get; init; } +#else + public global::tryAGI.OpenAI.ModelIdsResponses? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public string? Value2 { get; init; } +#else + public string? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public object? Value3 { get; init; } +#else + public object? 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 ModelIdsCompaction(global::tryAGI.OpenAI.ModelIdsResponses value) => new ModelIdsCompaction((global::tryAGI.OpenAI.ModelIdsResponses?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ModelIdsResponses?(ModelIdsCompaction @this) => @this.Value1; + + /// + /// + /// + public ModelIdsCompaction(global::tryAGI.OpenAI.ModelIdsResponses? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator ModelIdsCompaction(string value) => new ModelIdsCompaction((string?)value); + + /// + /// + /// + public static implicit operator string?(ModelIdsCompaction @this) => @this.Value2; + + /// + /// + /// + public ModelIdsCompaction(string? value) + { + Value2 = value; + } + + /// + /// + /// + public ModelIdsCompaction( + global::tryAGI.OpenAI.ModelIdsResponses? value1, + string? value2, + object? value3 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + } + + /// + /// + /// + public object? Object => + Value3 as object ?? + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() ?? + Value3?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 || IsValue2 || IsValue3; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? value1 = null, + global::System.Func? value2 = null, + global::System.Func? value3 = 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!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? value1 = null, + global::System.Action? value2 = null, + global::System.Action? value3 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsValue1) + { + value1?.Invoke(Value1!); + } + else if (IsValue2) + { + value2?.Invoke(Value2!); + } + else if (IsValue3) + { + value3?.Invoke(Value3!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::tryAGI.OpenAI.ModelIdsResponses), + Value2, + typeof(string), + Value3, + typeof(object), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ModelIdsCompaction 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) + ; + } + + /// + /// + /// + public static bool operator ==(ModelIdsCompaction obj1, ModelIdsCompaction obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ModelIdsCompaction obj1, ModelIdsCompaction obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ModelIdsCompaction o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponses.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponses.g.cs index c209090f..d1f4ca42 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponses.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponses.g.cs @@ -5,12 +5,12 @@ namespace tryAGI.OpenAI { /// - /// Example: gpt-4o + /// Example: gpt-5.1 /// public readonly partial struct ModelIdsResponses : global::System.IEquatable { /// - /// Example: gpt-4o + /// Example: gpt-5.4 /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.ModelIdsShared? Value1 { get; init; } @@ -29,37 +29,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsShared value) => new ModelIdsResponses((global::tryAGI.OpenAI.ModelIdsShared?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ModelIdsResponsesEnum? ResponsesOnlyModel { get; init; } +#else + public global::tryAGI.OpenAI.ModelIdsResponsesEnum? ResponsesOnlyModel { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ModelIdsShared?(ModelIdsResponses @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponsesOnlyModel))] +#endif + public bool IsResponsesOnlyModel => ResponsesOnlyModel != null; /// /// /// - public ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsShared? value) - { - Value1 = value; - } + public static implicit operator ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsShared value) => new ModelIdsResponses((global::tryAGI.OpenAI.ModelIdsShared?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ModelIdsResponsesEnum? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.ModelIdsResponsesEnum? Value2 { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ModelIdsShared?(ModelIdsResponses @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsShared? value) + { + Value1 = value; + } /// /// @@ -69,14 +68,14 @@ public ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsShared? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.ModelIdsResponsesEnum?(ModelIdsResponses @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ModelIdsResponsesEnum?(ModelIdsResponses @this) => @this.ResponsesOnlyModel; /// /// /// public ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsResponsesEnum? value) { - Value2 = value; + ResponsesOnlyModel = value; } /// @@ -84,18 +83,18 @@ public ModelIdsResponses(global::tryAGI.OpenAI.ModelIdsResponsesEnum? value) /// public ModelIdsResponses( global::tryAGI.OpenAI.ModelIdsShared? value1, - global::tryAGI.OpenAI.ModelIdsResponsesEnum? value2 + global::tryAGI.OpenAI.ModelIdsResponsesEnum? responsesOnlyModel ) { Value1 = value1; - Value2 = value2; + ResponsesOnlyModel = responsesOnlyModel; } /// /// /// public object? Object => - Value2 as object ?? + ResponsesOnlyModel as object ?? Value1 as object ; @@ -104,7 +103,7 @@ Value1 as object /// public override string? ToString() => Value1?.ToString() ?? - Value2?.ToValueString() + ResponsesOnlyModel?.ToValueString() ; /// @@ -112,7 +111,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2; + return IsValue1 || IsResponsesOnlyModel; } /// @@ -120,7 +119,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? responsesOnlyModel = null, bool validate = true) { if (validate) @@ -132,9 +131,9 @@ public bool Validate() { return value1(Value1!); } - else if (IsValue2 && value2 != null) + else if (IsResponsesOnlyModel && responsesOnlyModel != null) { - return value2(Value2!); + return responsesOnlyModel(ResponsesOnlyModel!); } return default(TResult); @@ -145,7 +144,7 @@ public bool Validate() ///
public void Match( global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? responsesOnlyModel = null, bool validate = true) { if (validate) @@ -157,9 +156,9 @@ public void Match( { value1?.Invoke(Value1!); } - else if (IsValue2) + else if (IsResponsesOnlyModel) { - value2?.Invoke(Value2!); + responsesOnlyModel?.Invoke(ResponsesOnlyModel!); } } @@ -172,7 +171,7 @@ public override int GetHashCode() { Value1, typeof(global::tryAGI.OpenAI.ModelIdsShared), - Value2, + ResponsesOnlyModel, typeof(global::tryAGI.OpenAI.ModelIdsResponsesEnum), }; const int offset = unchecked((int)2166136261); @@ -191,7 +190,7 @@ public bool Equals(ModelIdsResponses 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(ResponsesOnlyModel, other.ResponsesOnlyModel) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponsesEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponsesEnum.g.cs index 7f8679d0..4bb202e6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponsesEnum.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsResponsesEnum.g.cs @@ -48,6 +48,22 @@ public enum ModelIdsResponsesEnum /// ///
ComputerUsePreview20250311, + /// + /// + /// + Gpt5Codex, + /// + /// + /// + Gpt5Pro, + /// + /// + /// + Gpt5Pro20251006, + /// + /// + /// + Gpt51CodexMax, } /// @@ -72,6 +88,10 @@ public static string ToValueString(this ModelIdsResponsesEnum value) ModelIdsResponsesEnum.O4MiniDeepResearch20250626 => "o4-mini-deep-research-2025-06-26", ModelIdsResponsesEnum.ComputerUsePreview => "computer-use-preview", ModelIdsResponsesEnum.ComputerUsePreview20250311 => "computer-use-preview-2025-03-11", + ModelIdsResponsesEnum.Gpt5Codex => "gpt-5-codex", + ModelIdsResponsesEnum.Gpt5Pro => "gpt-5-pro", + ModelIdsResponsesEnum.Gpt5Pro20251006 => "gpt-5-pro-2025-10-06", + ModelIdsResponsesEnum.Gpt51CodexMax => "gpt-5.1-codex-max", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -92,6 +112,10 @@ public static string ToValueString(this ModelIdsResponsesEnum value) "o4-mini-deep-research-2025-06-26" => ModelIdsResponsesEnum.O4MiniDeepResearch20250626, "computer-use-preview" => ModelIdsResponsesEnum.ComputerUsePreview, "computer-use-preview-2025-03-11" => ModelIdsResponsesEnum.ComputerUsePreview20250311, + "gpt-5-codex" => ModelIdsResponsesEnum.Gpt5Codex, + "gpt-5-pro" => ModelIdsResponsesEnum.Gpt5Pro, + "gpt-5-pro-2025-10-06" => ModelIdsResponsesEnum.Gpt5Pro20251006, + "gpt-5.1-codex-max" => ModelIdsResponsesEnum.Gpt51CodexMax, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsShared.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsShared.g.cs index 9f919466..91562e80 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsShared.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsShared.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// - /// Example: gpt-4o + /// Example: gpt-5.4 /// public readonly partial struct ModelIdsShared : global::System.IEquatable { @@ -29,52 +29,51 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator ModelIdsShared(string value) => new ModelIdsShared((string?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ModelIdsSharedEnum? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.ModelIdsSharedEnum? Value2 { get; } +#endif /// /// /// - public static implicit operator string?(ModelIdsShared @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public ModelIdsShared(string? value) - { - Value1 = value; - } + public static implicit operator ModelIdsShared(string value) => new ModelIdsShared((string?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatModel? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.ChatModel? Value2 { get; } -#endif + public static implicit operator string?(ModelIdsShared @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public ModelIdsShared(string? value) + { + Value1 = value; + } /// /// /// - public static implicit operator ModelIdsShared(global::tryAGI.OpenAI.ChatModel value) => new ModelIdsShared((global::tryAGI.OpenAI.ChatModel?)value); + public static implicit operator ModelIdsShared(global::tryAGI.OpenAI.ModelIdsSharedEnum value) => new ModelIdsShared((global::tryAGI.OpenAI.ModelIdsSharedEnum?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ChatModel?(ModelIdsShared @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ModelIdsSharedEnum?(ModelIdsShared @this) => @this.Value2; /// /// /// - public ModelIdsShared(global::tryAGI.OpenAI.ChatModel? value) + public ModelIdsShared(global::tryAGI.OpenAI.ModelIdsSharedEnum? value) { Value2 = value; } @@ -84,7 +83,7 @@ public ModelIdsShared(global::tryAGI.OpenAI.ChatModel? value) /// public ModelIdsShared( string? value1, - global::tryAGI.OpenAI.ChatModel? value2 + global::tryAGI.OpenAI.ModelIdsSharedEnum? value2 ) { Value1 = value1; @@ -120,7 +119,7 @@ public bool Validate() ///
public TResult? Match( global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? value2 = null, bool validate = true) { if (validate) @@ -145,7 +144,7 @@ public bool Validate() ///
public void Match( global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? value2 = null, bool validate = true) { if (validate) @@ -173,7 +172,7 @@ public override int GetHashCode() Value1, typeof(string), Value2, - typeof(global::tryAGI.OpenAI.ChatModel), + typeof(global::tryAGI.OpenAI.ModelIdsSharedEnum), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -191,7 +190,7 @@ public bool Equals(ModelIdsShared 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(Value2, other.Value2) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsSharedEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsSharedEnum.g.cs new file mode 100644 index 00000000..8f9b1af9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelIdsSharedEnum.g.cs @@ -0,0 +1,483 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ModelIdsSharedEnum + { + /// + /// + /// + Gpt54, + /// + /// + /// + Gpt53ChatLatest, + /// + /// + /// + Gpt52, + /// + /// + /// + Gpt5220251211, + /// + /// + /// + Gpt52ChatLatest, + /// + /// + /// + Gpt52Pro, + /// + /// + /// + Gpt52Pro20251211, + /// + /// + /// + Gpt51, + /// + /// + /// + Gpt5120251113, + /// + /// + /// + Gpt51Codex, + /// + /// + /// + Gpt51Mini, + /// + /// + /// + Gpt51ChatLatest, + /// + /// + /// + Gpt5, + /// + /// + /// + Gpt5Mini, + /// + /// + /// + Gpt5Nano, + /// + /// + /// + Gpt520250807, + /// + /// + /// + Gpt5Mini20250807, + /// + /// + /// + Gpt5Nano20250807, + /// + /// + /// + Gpt5ChatLatest, + /// + /// + /// + Gpt41, + /// + /// + /// + Gpt41Mini, + /// + /// + /// + Gpt41Nano, + /// + /// + /// + Gpt4120250414, + /// + /// + /// + Gpt41Mini20250414, + /// + /// + /// + Gpt41Nano20250414, + /// + /// + /// + O4Mini, + /// + /// + /// + O4Mini20250416, + /// + /// + /// + O3, + /// + /// + /// + O320250416, + /// + /// + /// + O3Mini, + /// + /// + /// + O3Mini20250131, + /// + /// + /// + O1, + /// + /// + /// + O120241217, + /// + /// + /// + O1Preview, + /// + /// + /// + O1Preview20240912, + /// + /// + /// + O1Mini, + /// + /// + /// + O1Mini20240912, + /// + /// + /// + Gpt4o, + /// + /// + /// + Gpt4o20241120, + /// + /// + /// + Gpt4o20240806, + /// + /// + /// + Gpt4o20240513, + /// + /// + /// + Gpt4oAudioPreview, + /// + /// + /// + Gpt4oAudioPreview20241001, + /// + /// + /// + Gpt4oAudioPreview20241217, + /// + /// + /// + Gpt4oAudioPreview20250603, + /// + /// + /// + Gpt4oMiniAudioPreview, + /// + /// + /// + Gpt4oMiniAudioPreview20241217, + /// + /// + /// + Gpt4oSearchPreview, + /// + /// + /// + Gpt4oMiniSearchPreview, + /// + /// + /// + Gpt4oSearchPreview20250311, + /// + /// + /// + Gpt4oMiniSearchPreview20250311, + /// + /// + /// + Chatgpt4oLatest, + /// + /// + /// + CodexMiniLatest, + /// + /// + /// + Gpt4oMini, + /// + /// + /// + Gpt4oMini20240718, + /// + /// + /// + Gpt4Turbo, + /// + /// + /// + Gpt4Turbo20240409, + /// + /// + /// + Gpt40125Preview, + /// + /// + /// + Gpt4TurboPreview, + /// + /// + /// + Gpt41106Preview, + /// + /// + /// + Gpt4VisionPreview, + /// + /// + /// + Gpt4, + /// + /// + /// + Gpt40314, + /// + /// + /// + Gpt40613, + /// + /// + /// + Gpt432k, + /// + /// + /// + Gpt432k0314, + /// + /// + /// + Gpt432k0613, + /// + /// + /// + Gpt35Turbo, + /// + /// + /// + Gpt35Turbo16k, + /// + /// + /// + Gpt35Turbo0301, + /// + /// + /// + Gpt35Turbo0613, + /// + /// + /// + Gpt35Turbo1106, + /// + /// + /// + Gpt35Turbo0125, + /// + /// + /// + Gpt35Turbo16k0613, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelIdsSharedEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelIdsSharedEnum value) + { + return value switch + { + ModelIdsSharedEnum.Gpt54 => "gpt-5.4", + ModelIdsSharedEnum.Gpt53ChatLatest => "gpt-5.3-chat-latest", + ModelIdsSharedEnum.Gpt52 => "gpt-5.2", + ModelIdsSharedEnum.Gpt5220251211 => "gpt-5.2-2025-12-11", + ModelIdsSharedEnum.Gpt52ChatLatest => "gpt-5.2-chat-latest", + ModelIdsSharedEnum.Gpt52Pro => "gpt-5.2-pro", + ModelIdsSharedEnum.Gpt52Pro20251211 => "gpt-5.2-pro-2025-12-11", + ModelIdsSharedEnum.Gpt51 => "gpt-5.1", + ModelIdsSharedEnum.Gpt5120251113 => "gpt-5.1-2025-11-13", + ModelIdsSharedEnum.Gpt51Codex => "gpt-5.1-codex", + ModelIdsSharedEnum.Gpt51Mini => "gpt-5.1-mini", + ModelIdsSharedEnum.Gpt51ChatLatest => "gpt-5.1-chat-latest", + ModelIdsSharedEnum.Gpt5 => "gpt-5", + ModelIdsSharedEnum.Gpt5Mini => "gpt-5-mini", + ModelIdsSharedEnum.Gpt5Nano => "gpt-5-nano", + ModelIdsSharedEnum.Gpt520250807 => "gpt-5-2025-08-07", + ModelIdsSharedEnum.Gpt5Mini20250807 => "gpt-5-mini-2025-08-07", + ModelIdsSharedEnum.Gpt5Nano20250807 => "gpt-5-nano-2025-08-07", + ModelIdsSharedEnum.Gpt5ChatLatest => "gpt-5-chat-latest", + ModelIdsSharedEnum.Gpt41 => "gpt-4.1", + ModelIdsSharedEnum.Gpt41Mini => "gpt-4.1-mini", + ModelIdsSharedEnum.Gpt41Nano => "gpt-4.1-nano", + ModelIdsSharedEnum.Gpt4120250414 => "gpt-4.1-2025-04-14", + ModelIdsSharedEnum.Gpt41Mini20250414 => "gpt-4.1-mini-2025-04-14", + ModelIdsSharedEnum.Gpt41Nano20250414 => "gpt-4.1-nano-2025-04-14", + ModelIdsSharedEnum.O4Mini => "o4-mini", + ModelIdsSharedEnum.O4Mini20250416 => "o4-mini-2025-04-16", + ModelIdsSharedEnum.O3 => "o3", + ModelIdsSharedEnum.O320250416 => "o3-2025-04-16", + ModelIdsSharedEnum.O3Mini => "o3-mini", + ModelIdsSharedEnum.O3Mini20250131 => "o3-mini-2025-01-31", + ModelIdsSharedEnum.O1 => "o1", + ModelIdsSharedEnum.O120241217 => "o1-2024-12-17", + ModelIdsSharedEnum.O1Preview => "o1-preview", + ModelIdsSharedEnum.O1Preview20240912 => "o1-preview-2024-09-12", + ModelIdsSharedEnum.O1Mini => "o1-mini", + ModelIdsSharedEnum.O1Mini20240912 => "o1-mini-2024-09-12", + ModelIdsSharedEnum.Gpt4o => "gpt-4o", + ModelIdsSharedEnum.Gpt4o20241120 => "gpt-4o-2024-11-20", + ModelIdsSharedEnum.Gpt4o20240806 => "gpt-4o-2024-08-06", + ModelIdsSharedEnum.Gpt4o20240513 => "gpt-4o-2024-05-13", + ModelIdsSharedEnum.Gpt4oAudioPreview => "gpt-4o-audio-preview", + ModelIdsSharedEnum.Gpt4oAudioPreview20241001 => "gpt-4o-audio-preview-2024-10-01", + ModelIdsSharedEnum.Gpt4oAudioPreview20241217 => "gpt-4o-audio-preview-2024-12-17", + ModelIdsSharedEnum.Gpt4oAudioPreview20250603 => "gpt-4o-audio-preview-2025-06-03", + ModelIdsSharedEnum.Gpt4oMiniAudioPreview => "gpt-4o-mini-audio-preview", + ModelIdsSharedEnum.Gpt4oMiniAudioPreview20241217 => "gpt-4o-mini-audio-preview-2024-12-17", + ModelIdsSharedEnum.Gpt4oSearchPreview => "gpt-4o-search-preview", + ModelIdsSharedEnum.Gpt4oMiniSearchPreview => "gpt-4o-mini-search-preview", + ModelIdsSharedEnum.Gpt4oSearchPreview20250311 => "gpt-4o-search-preview-2025-03-11", + ModelIdsSharedEnum.Gpt4oMiniSearchPreview20250311 => "gpt-4o-mini-search-preview-2025-03-11", + ModelIdsSharedEnum.Chatgpt4oLatest => "chatgpt-4o-latest", + ModelIdsSharedEnum.CodexMiniLatest => "codex-mini-latest", + ModelIdsSharedEnum.Gpt4oMini => "gpt-4o-mini", + ModelIdsSharedEnum.Gpt4oMini20240718 => "gpt-4o-mini-2024-07-18", + ModelIdsSharedEnum.Gpt4Turbo => "gpt-4-turbo", + ModelIdsSharedEnum.Gpt4Turbo20240409 => "gpt-4-turbo-2024-04-09", + ModelIdsSharedEnum.Gpt40125Preview => "gpt-4-0125-preview", + ModelIdsSharedEnum.Gpt4TurboPreview => "gpt-4-turbo-preview", + ModelIdsSharedEnum.Gpt41106Preview => "gpt-4-1106-preview", + ModelIdsSharedEnum.Gpt4VisionPreview => "gpt-4-vision-preview", + ModelIdsSharedEnum.Gpt4 => "gpt-4", + ModelIdsSharedEnum.Gpt40314 => "gpt-4-0314", + ModelIdsSharedEnum.Gpt40613 => "gpt-4-0613", + ModelIdsSharedEnum.Gpt432k => "gpt-4-32k", + ModelIdsSharedEnum.Gpt432k0314 => "gpt-4-32k-0314", + ModelIdsSharedEnum.Gpt432k0613 => "gpt-4-32k-0613", + ModelIdsSharedEnum.Gpt35Turbo => "gpt-3.5-turbo", + ModelIdsSharedEnum.Gpt35Turbo16k => "gpt-3.5-turbo-16k", + ModelIdsSharedEnum.Gpt35Turbo0301 => "gpt-3.5-turbo-0301", + ModelIdsSharedEnum.Gpt35Turbo0613 => "gpt-3.5-turbo-0613", + ModelIdsSharedEnum.Gpt35Turbo1106 => "gpt-3.5-turbo-1106", + ModelIdsSharedEnum.Gpt35Turbo0125 => "gpt-3.5-turbo-0125", + ModelIdsSharedEnum.Gpt35Turbo16k0613 => "gpt-3.5-turbo-16k-0613", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelIdsSharedEnum? ToEnum(string value) + { + return value switch + { + "gpt-5.4" => ModelIdsSharedEnum.Gpt54, + "gpt-5.3-chat-latest" => ModelIdsSharedEnum.Gpt53ChatLatest, + "gpt-5.2" => ModelIdsSharedEnum.Gpt52, + "gpt-5.2-2025-12-11" => ModelIdsSharedEnum.Gpt5220251211, + "gpt-5.2-chat-latest" => ModelIdsSharedEnum.Gpt52ChatLatest, + "gpt-5.2-pro" => ModelIdsSharedEnum.Gpt52Pro, + "gpt-5.2-pro-2025-12-11" => ModelIdsSharedEnum.Gpt52Pro20251211, + "gpt-5.1" => ModelIdsSharedEnum.Gpt51, + "gpt-5.1-2025-11-13" => ModelIdsSharedEnum.Gpt5120251113, + "gpt-5.1-codex" => ModelIdsSharedEnum.Gpt51Codex, + "gpt-5.1-mini" => ModelIdsSharedEnum.Gpt51Mini, + "gpt-5.1-chat-latest" => ModelIdsSharedEnum.Gpt51ChatLatest, + "gpt-5" => ModelIdsSharedEnum.Gpt5, + "gpt-5-mini" => ModelIdsSharedEnum.Gpt5Mini, + "gpt-5-nano" => ModelIdsSharedEnum.Gpt5Nano, + "gpt-5-2025-08-07" => ModelIdsSharedEnum.Gpt520250807, + "gpt-5-mini-2025-08-07" => ModelIdsSharedEnum.Gpt5Mini20250807, + "gpt-5-nano-2025-08-07" => ModelIdsSharedEnum.Gpt5Nano20250807, + "gpt-5-chat-latest" => ModelIdsSharedEnum.Gpt5ChatLatest, + "gpt-4.1" => ModelIdsSharedEnum.Gpt41, + "gpt-4.1-mini" => ModelIdsSharedEnum.Gpt41Mini, + "gpt-4.1-nano" => ModelIdsSharedEnum.Gpt41Nano, + "gpt-4.1-2025-04-14" => ModelIdsSharedEnum.Gpt4120250414, + "gpt-4.1-mini-2025-04-14" => ModelIdsSharedEnum.Gpt41Mini20250414, + "gpt-4.1-nano-2025-04-14" => ModelIdsSharedEnum.Gpt41Nano20250414, + "o4-mini" => ModelIdsSharedEnum.O4Mini, + "o4-mini-2025-04-16" => ModelIdsSharedEnum.O4Mini20250416, + "o3" => ModelIdsSharedEnum.O3, + "o3-2025-04-16" => ModelIdsSharedEnum.O320250416, + "o3-mini" => ModelIdsSharedEnum.O3Mini, + "o3-mini-2025-01-31" => ModelIdsSharedEnum.O3Mini20250131, + "o1" => ModelIdsSharedEnum.O1, + "o1-2024-12-17" => ModelIdsSharedEnum.O120241217, + "o1-preview" => ModelIdsSharedEnum.O1Preview, + "o1-preview-2024-09-12" => ModelIdsSharedEnum.O1Preview20240912, + "o1-mini" => ModelIdsSharedEnum.O1Mini, + "o1-mini-2024-09-12" => ModelIdsSharedEnum.O1Mini20240912, + "gpt-4o" => ModelIdsSharedEnum.Gpt4o, + "gpt-4o-2024-11-20" => ModelIdsSharedEnum.Gpt4o20241120, + "gpt-4o-2024-08-06" => ModelIdsSharedEnum.Gpt4o20240806, + "gpt-4o-2024-05-13" => ModelIdsSharedEnum.Gpt4o20240513, + "gpt-4o-audio-preview" => ModelIdsSharedEnum.Gpt4oAudioPreview, + "gpt-4o-audio-preview-2024-10-01" => ModelIdsSharedEnum.Gpt4oAudioPreview20241001, + "gpt-4o-audio-preview-2024-12-17" => ModelIdsSharedEnum.Gpt4oAudioPreview20241217, + "gpt-4o-audio-preview-2025-06-03" => ModelIdsSharedEnum.Gpt4oAudioPreview20250603, + "gpt-4o-mini-audio-preview" => ModelIdsSharedEnum.Gpt4oMiniAudioPreview, + "gpt-4o-mini-audio-preview-2024-12-17" => ModelIdsSharedEnum.Gpt4oMiniAudioPreview20241217, + "gpt-4o-search-preview" => ModelIdsSharedEnum.Gpt4oSearchPreview, + "gpt-4o-mini-search-preview" => ModelIdsSharedEnum.Gpt4oMiniSearchPreview, + "gpt-4o-search-preview-2025-03-11" => ModelIdsSharedEnum.Gpt4oSearchPreview20250311, + "gpt-4o-mini-search-preview-2025-03-11" => ModelIdsSharedEnum.Gpt4oMiniSearchPreview20250311, + "chatgpt-4o-latest" => ModelIdsSharedEnum.Chatgpt4oLatest, + "codex-mini-latest" => ModelIdsSharedEnum.CodexMiniLatest, + "gpt-4o-mini" => ModelIdsSharedEnum.Gpt4oMini, + "gpt-4o-mini-2024-07-18" => ModelIdsSharedEnum.Gpt4oMini20240718, + "gpt-4-turbo" => ModelIdsSharedEnum.Gpt4Turbo, + "gpt-4-turbo-2024-04-09" => ModelIdsSharedEnum.Gpt4Turbo20240409, + "gpt-4-0125-preview" => ModelIdsSharedEnum.Gpt40125Preview, + "gpt-4-turbo-preview" => ModelIdsSharedEnum.Gpt4TurboPreview, + "gpt-4-1106-preview" => ModelIdsSharedEnum.Gpt41106Preview, + "gpt-4-vision-preview" => ModelIdsSharedEnum.Gpt4VisionPreview, + "gpt-4" => ModelIdsSharedEnum.Gpt4, + "gpt-4-0314" => ModelIdsSharedEnum.Gpt40314, + "gpt-4-0613" => ModelIdsSharedEnum.Gpt40613, + "gpt-4-32k" => ModelIdsSharedEnum.Gpt432k, + "gpt-4-32k-0314" => ModelIdsSharedEnum.Gpt432k0314, + "gpt-4-32k-0613" => ModelIdsSharedEnum.Gpt432k0613, + "gpt-3.5-turbo" => ModelIdsSharedEnum.Gpt35Turbo, + "gpt-3.5-turbo-16k" => ModelIdsSharedEnum.Gpt35Turbo16k, + "gpt-3.5-turbo-0301" => ModelIdsSharedEnum.Gpt35Turbo0301, + "gpt-3.5-turbo-0613" => ModelIdsSharedEnum.Gpt35Turbo0613, + "gpt-3.5-turbo-1106" => ModelIdsSharedEnum.Gpt35Turbo1106, + "gpt-3.5-turbo-0125" => ModelIdsSharedEnum.Gpt35Turbo0125, + "gpt-3.5-turbo-16k-0613" => ModelIdsSharedEnum.Gpt35Turbo16k0613, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponseProperties.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponseProperties.g.cs index da1a45fd..e1fdab5f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponseProperties.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponseProperties.g.cs @@ -9,79 +9,33 @@ namespace tryAGI.OpenAI public sealed partial class ModelResponseProperties { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
- /// Example: prompt-cache-key-1234 - ///
- /// prompt-cache-key-1234 - [global::System.Text.Json.Serialization.JsonPropertyName("prompt_cache_key")] - public string? PromptCacheKey { get; set; } - - /// - /// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
- /// The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
- /// Example: safety-identifier-1234 + /// ///
- /// safety-identifier-1234 - [global::System.Text.Json.Serialization.JsonPropertyName("safety_identifier")] - public string? SafetyIdentifier { get; set; } - - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("service_tier")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ServiceTierJsonConverter))] - public global::tryAGI.OpenAI.ServiceTier? ServiceTier { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] + public int? TopLogprobs { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// We generally recommend altering this or `top_p` but not both.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public double? Temperature { get; set; } /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] - public int? TopLogprobs { get; set; } - - /// - /// An alternative to sampling with temperature, called nucleus sampling,
- /// where the model considers the results of the tokens with top_p probability
- /// mass. So 0.1 means only the tokens comprising the top 10% probability mass
- /// are considered.
- /// We generally recommend altering this or `temperature` but not both.
- /// Default Value: 1
- /// Example: 1 - ///
- /// 1 [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] public double? TopP { get; set; } /// /// This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.
/// A stable identifier for your end-users.
- /// Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
+ /// Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
/// Example: user-1234 ///
/// user-1234 @@ -89,6 +43,35 @@ public sealed partial class ModelResponseProperties [global::System.Obsolete("This property marked as deprecated.")] public string? User { get; set; } + /// + /// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
+ /// The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
+ /// Example: safety-identifier-1234 + ///
+ /// safety-identifier-1234 + [global::System.Text.Json.Serialization.JsonPropertyName("safety_identifier")] + public string? SafetyIdentifier { get; set; } + + /// + /// Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching).
+ /// Example: prompt-cache-key-1234 + ///
+ /// prompt-cache-key-1234 + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_cache_key")] + public string? PromptCacheKey { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_tier")] + public global::tryAGI.OpenAI.ServiceTierEnum? ServiceTier { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_cache_retention")] + public global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2? PromptCacheRetention { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -98,69 +81,42 @@ public sealed partial class ModelResponseProperties /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
- /// Example: prompt-cache-key-1234 - /// + /// + /// + /// + /// /// /// A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.
- /// The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
+ /// The IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).
/// Example: safety-identifier-1234 /// - /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// We generally recommend altering this or `top_p` but not both.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// An integer between 0 and 20 specifying the number of most likely tokens to
- /// return at each token position, each with an associated log probability. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling,
- /// where the model considers the results of the tokens with top_p probability
- /// mass. So 0.1 means only the tokens comprising the top 10% probability mass
- /// are considered.
- /// We generally recommend altering this or `temperature` but not both.
- /// Default Value: 1
- /// Example: 1 + /// + /// Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching).
+ /// Example: prompt-cache-key-1234 /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ModelResponseProperties( global::System.Collections.Generic.Dictionary? metadata, - string? promptCacheKey, - string? safetyIdentifier, - global::tryAGI.OpenAI.ServiceTier? serviceTier, - double? temperature, int? topLogprobs, - double? topP) + double? temperature, + double? topP, + string? safetyIdentifier, + string? promptCacheKey, + global::tryAGI.OpenAI.ServiceTierEnum? serviceTier, + global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention2? promptCacheRetention) { this.Metadata = metadata; - this.PromptCacheKey = promptCacheKey; - this.SafetyIdentifier = safetyIdentifier; - this.ServiceTier = serviceTier; - this.Temperature = temperature; this.TopLogprobs = topLogprobs; + this.Temperature = temperature; this.TopP = topP; + this.SafetyIdentifier = safetyIdentifier; + this.PromptCacheKey = promptCacheKey; + this.ServiceTier = serviceTier; + this.PromptCacheRetention = promptCacheRetention; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.Json.g.cs new file mode 100644 index 00000000..660e8a94 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModelResponsePropertiesPromptCacheRetention + { + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention), + jsonSerializerContext) as global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention; + } + + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModelResponsePropertiesPromptCacheRetention; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.g.cs new file mode 100644 index 00000000..8ea47b29 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModelResponsePropertiesPromptCacheRetention + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention2.g.cs new file mode 100644 index 00000000..03991230 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesPromptCacheRetention2.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention). + /// + public enum ModelResponsePropertiesPromptCacheRetention2 + { + /// + /// + /// + InMemory, + /// + /// + /// + x24h, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelResponsePropertiesPromptCacheRetention2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelResponsePropertiesPromptCacheRetention2 value) + { + return value switch + { + ModelResponsePropertiesPromptCacheRetention2.InMemory => "in-memory", + ModelResponsePropertiesPromptCacheRetention2.x24h => "24h", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelResponsePropertiesPromptCacheRetention2? ToEnum(string value) + { + return value switch + { + "in-memory" => ModelResponsePropertiesPromptCacheRetention2.InMemory, + "24h" => ModelResponsePropertiesPromptCacheRetention2.x24h, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.Json.g.cs new file mode 100644 index 00000000..eb840aee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModelResponsePropertiesTemperature + { + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.ModelResponsePropertiesTemperature; + } + + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModelResponsePropertiesTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.g.cs new file mode 100644 index 00000000..8666a5a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModelResponsePropertiesTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.Json.g.cs new file mode 100644 index 00000000..526d9740 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModelResponsePropertiesTopLogprobs + { + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs), + jsonSerializerContext) as global::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs; + } + + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModelResponsePropertiesTopLogprobs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.g.cs new file mode 100644 index 00000000..468509ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopLogprobs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModelResponsePropertiesTopLogprobs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.Json.g.cs new file mode 100644 index 00000000..700c0888 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModelResponsePropertiesTopP + { + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.ModelResponsePropertiesTopP; + } + + /// + /// 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::tryAGI.OpenAI.ModelResponsePropertiesTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModelResponsePropertiesTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModelResponsePropertiesTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.g.cs new file mode 100644 index 00000000..5557c0b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModelResponsePropertiesTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModelResponsePropertiesTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.Json.g.cs deleted file mode 100644 index 8d0044a3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ModerationImageURLInput - { - /// - /// 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::tryAGI.OpenAI.ModerationImageURLInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ModerationImageURLInput), - jsonSerializerContext) as global::tryAGI.OpenAI.ModerationImageURLInput; - } - - /// - /// 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::tryAGI.OpenAI.ModerationImageURLInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ModerationImageURLInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModerationImageURLInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.g.cs deleted file mode 100644 index 2cff312c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInput.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// An object describing an image to classify. - /// - public sealed partial class ModerationImageURLInput - { - /// - /// Contains either an image URL or a data URL for a base64 encoded image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ModerationImageURLInputImageUrl ImageUrl { get; set; } - - /// - /// Always `image_url`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModerationImageURLInputTypeJsonConverter))] - public global::tryAGI.OpenAI.ModerationImageURLInputType 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Contains either an image URL or a data URL for a base64 encoded image. - /// - /// - /// Always `image_url`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ModerationImageURLInput( - global::tryAGI.OpenAI.ModerationImageURLInputImageUrl imageUrl, - global::tryAGI.OpenAI.ModerationImageURLInputType type) - { - this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public ModerationImageURLInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.Json.g.cs deleted file mode 100644 index 153134b4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ModerationImageURLInputImageUrl - { - /// - /// 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::tryAGI.OpenAI.ModerationImageURLInputImageUrl? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ModerationImageURLInputImageUrl), - jsonSerializerContext) as global::tryAGI.OpenAI.ModerationImageURLInputImageUrl; - } - - /// - /// 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::tryAGI.OpenAI.ModerationImageURLInputImageUrl? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ModerationImageURLInputImageUrl), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModerationImageURLInputImageUrl; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.g.cs deleted file mode 100644 index 5d4f9e18..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputImageUrl.g.cs +++ /dev/null @@ -1,49 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Contains either an image URL or a data URL for a base64 encoded image. - /// - public sealed partial class ModerationImageURLInputImageUrl - { - /// - /// Either a URL of the image or the base64 encoded image data.
- /// Example: https://example.com/image.jpg - ///
- /// https://example.com/image.jpg - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Either a URL of the image or the base64 encoded image data.
- /// Example: https://example.com/image.jpg - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ModerationImageURLInputImageUrl( - string url) - { - this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); - } - - /// - /// Initializes a new instance of the class. - /// - public ModerationImageURLInputImageUrl() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputType.g.cs deleted file mode 100644 index 14e9f2fc..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationImageURLInputType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `image_url`. - /// - public enum ModerationImageURLInputType - { - /// - /// - /// - ImageUrl, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ModerationImageURLInputTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ModerationImageURLInputType value) - { - return value switch - { - ModerationImageURLInputType.ImageUrl => "image_url", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ModerationImageURLInputType? ToEnum(string value) - { - return value switch - { - "image_url" => ModerationImageURLInputType.ImageUrl, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.Json.g.cs deleted file mode 100644 index 839e8692..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ModerationTextInput - { - /// - /// 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::tryAGI.OpenAI.ModerationTextInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ModerationTextInput), - jsonSerializerContext) as global::tryAGI.OpenAI.ModerationTextInput; - } - - /// - /// 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::tryAGI.OpenAI.ModerationTextInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ModerationTextInput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModerationTextInput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.g.cs deleted file mode 100644 index b0986936..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInput.g.cs +++ /dev/null @@ -1,61 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// An object describing text to classify. - /// - public sealed partial class ModerationTextInput - { - /// - /// A string of text to classify.
- /// Example: I want to kill them - ///
- /// I want to kill them - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Always `text`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModerationTextInputTypeJsonConverter))] - public global::tryAGI.OpenAI.ModerationTextInputType 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A string of text to classify.
- /// Example: I want to kill them - /// - /// - /// Always `text`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ModerationTextInput( - string text, - global::tryAGI.OpenAI.ModerationTextInputType type) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public ModerationTextInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInputType.g.cs deleted file mode 100644 index 8a7fc3fd..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModerationTextInputType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Always `text`. - /// - public enum ModerationTextInputType - { - /// - /// - /// - Text, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ModerationTextInputTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ModerationTextInputType value) - { - return value switch - { - ModerationTextInputType.Text => "text", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ModerationTextInputType? ToEnum(string value) - { - return value switch - { - "text" => ModerationTextInputType.Text, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequest.g.cs index 1fc956f3..8615e2f4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequest.g.cs @@ -11,88 +11,72 @@ namespace tryAGI.OpenAI public sealed partial class ModifyAssistantRequest { /// - /// The description of the assistant. The maximum length is 512 characters. + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] + public global::tryAGI.OpenAI.ReasoningEffortEnum? ReasoningEffort { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// - /// The name of the assistant. The maximum length is 256 characters. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// 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`.
+ /// Default Value: [] ///
- [global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? ReasoningEffort { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - public object? ResponseFormat { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2? ToolResources { get; set; } /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { 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. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResources? ToolResources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// 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; } + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// ///
- /// 1 - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + public global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? ResponseFormat { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -103,78 +87,49 @@ public sealed partial class ModifyAssistantRequest /// /// Initializes a new instance of the class. /// - /// - /// The description of the assistant. The maximum length is 512 characters. - /// - /// - /// The system instructions that the assistant uses. The maximum length is 256,000 characters. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// - /// ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them. - /// - /// - /// The name of the assistant. The maximum length is 256 characters. - /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
- /// Default Value: 1
- /// Example: 1 - /// - /// - /// 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. + /// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. /// + /// + /// + /// + /// /// - /// 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`. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
- /// We generally recommend altering this or temperature but not both.
- /// Default Value: 1
- /// Example: 1 + /// 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`.
+ /// Default Value: [] /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ModifyAssistantRequest( + global::tryAGI.OpenAI.AnyOf? model, + global::tryAGI.OpenAI.ReasoningEffortEnum? reasoningEffort, + string? name, string? description, string? instructions, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2? toolResources, global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.AnyOf? model, - string? name, - global::tryAGI.OpenAI.ReasoningEffort? reasoningEffort, - object? responseFormat, double? temperature, - global::tryAGI.OpenAI.ModifyAssistantRequestToolResources? toolResources, - global::System.Collections.Generic.IList? tools, - double? topP) + double? topP, + global::tryAGI.OpenAI.AssistantsApiResponseFormatOption? responseFormat) { + this.Model = model; + this.ReasoningEffort = reasoningEffort; + this.Name = name; this.Description = description; this.Instructions = instructions; + this.Tools = tools; + this.ToolResources = toolResources; this.Metadata = metadata; - this.Model = model; - this.Name = name; - this.ReasoningEffort = reasoningEffort; - this.ResponseFormat = responseFormat; this.Temperature = temperature; - this.ToolResources = toolResources; - this.Tools = tools; this.TopP = topP; + this.ResponseFormat = responseFormat; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.Json.g.cs new file mode 100644 index 00000000..b17c94f1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestDescription + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestDescription; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.g.cs new file mode 100644 index 00000000..60249b92 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.Json.g.cs new file mode 100644 index 00000000..cd82c0a5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestInstructions + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestInstructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestInstructions), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestInstructions; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestInstructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestInstructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestInstructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.g.cs new file mode 100644 index 00000000..bd8ce25a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestInstructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestInstructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.Json.g.cs new file mode 100644 index 00000000..de70d116 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestName + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestName), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestName; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.g.cs new file mode 100644 index 00000000..65f51e61 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.Json.g.cs new file mode 100644 index 00000000..07a11d9c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestResponseFormat + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestResponseFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.g.cs new file mode 100644 index 00000000..b601c3fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestResponseFormat.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestResponseFormat + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.Json.g.cs new file mode 100644 index 00000000..4c4e499b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestTemperature + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestTemperature? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestTemperature), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestTemperature; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestTemperature? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestTemperature), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestTemperature; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.g.cs new file mode 100644 index 00000000..8e8f2b52 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTemperature.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestTemperature + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources.g.cs index 25e9d22b..5fdddd7e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// 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. + /// /// public sealed partial class ModifyAssistantRequestToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ModifyAssistantRequestToolResources( - global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public ModifyAssistantRequestToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.Json.g.cs new file mode 100644 index 00000000..929a071b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestToolResources2 + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.g.cs new file mode 100644 index 00000000..8894ab3c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// 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. + /// + public sealed partial class ModifyAssistantRequestToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModifyAssistantRequestToolResources2( + global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.ModifyAssistantRequestToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public ModifyAssistantRequestToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesCodeInterpreter.g.cs index eb767f0b..5a8928f4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class ModifyAssistantRequestToolResourcesCodeInterpreter { /// - /// Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class ModifyAssistantRequestToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// Overrides the list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// Overrides the list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesFileSearch.g.cs index 6dde85ea..9e1b1c34 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestToolResourcesFileSearch.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ModifyAssistantRequestToolResourcesFileSearch { /// - /// Overrides the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// Overrides the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } @@ -24,7 +24,7 @@ public sealed partial class ModifyAssistantRequestToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// Overrides the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + /// Overrides the [vector store](/docs/api-reference/vector-stores/object) attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.Json.g.cs new file mode 100644 index 00000000..58ecd714 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyAssistantRequestTopP + { + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestTopP? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestTopP), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyAssistantRequestTopP; + } + + /// + /// 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::tryAGI.OpenAI.ModifyAssistantRequestTopP? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyAssistantRequestTopP), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyAssistantRequestTopP; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.g.cs new file mode 100644 index 00000000..2fcf2784 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyAssistantRequestTopP.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestTopP + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyMessageRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyMessageRequest.g.cs index 16315132..2839a3df 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyMessageRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyMessageRequest.g.cs @@ -9,11 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ModifyMessageRequest { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -27,13 +23,7 @@ public sealed partial class ModifyMessageRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyRunRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyRunRequest.g.cs index 43a4acd8..9932cb52 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyRunRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyRunRequest.g.cs @@ -9,11 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ModifyRunRequest { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public global::System.Collections.Generic.Dictionary? Metadata { get; set; } @@ -27,13 +23,7 @@ public sealed partial class ModifyRunRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequest.g.cs index f4feae6b..751f7390 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequest.g.cs @@ -9,20 +9,16 @@ namespace tryAGI.OpenAI public sealed partial class ModifyThreadRequest { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public global::tryAGI.OpenAI.ModifyThreadRequestToolResources2? ToolResources { get; set; } /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::tryAGI.OpenAI.ModifyThreadRequestToolResources? ToolResources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -33,25 +29,17 @@ public sealed partial class ModifyThreadRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. - /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ModifyThreadRequest( - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.ModifyThreadRequestToolResources? toolResources) + global::tryAGI.OpenAI.ModifyThreadRequestToolResources2? toolResources, + global::System.Collections.Generic.Dictionary? metadata) { - this.Metadata = metadata; this.ToolResources = toolResources; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources.g.cs index 67328fd1..738625f1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// /// public sealed partial class ModifyThreadRequestToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ModifyThreadRequestToolResources( - global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public ModifyThreadRequestToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.Json.g.cs new file mode 100644 index 00000000..13042a54 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ModifyThreadRequestToolResources2 + { + /// + /// 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::tryAGI.OpenAI.ModifyThreadRequestToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ModifyThreadRequestToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.ModifyThreadRequestToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.ModifyThreadRequestToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ModifyThreadRequestToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ModifyThreadRequestToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.g.cs new file mode 100644 index 00000000..03a37288 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// + public sealed partial class ModifyThreadRequestToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModifyThreadRequestToolResources2( + global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.ModifyThreadRequestToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public ModifyThreadRequestToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesCodeInterpreter.g.cs index b2f6f631..9e79db8a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class ModifyThreadRequestToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class ModifyThreadRequestToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesFileSearch.g.cs index 85062751..84199684 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ModifyThreadRequestToolResourcesFileSearch.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ModifyThreadRequestToolResourcesFileSearch { /// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } @@ -24,7 +24,7 @@ public sealed partial class ModifyThreadRequestToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.Json.g.cs deleted file mode 100644 index 3bc0b947..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Move - { - /// - /// 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::tryAGI.OpenAI.Move? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Move), - jsonSerializerContext) as global::tryAGI.OpenAI.Move; - } - - /// - /// 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::tryAGI.OpenAI.Move? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Move), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Move; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.g.cs deleted file mode 100644 index 3df91798..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Move.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A mouse move action. - /// - public sealed partial class Move - { - /// - /// Specifies the event type. For a move action, this property is
- /// always set to `move`.
- /// Default Value: move - ///
- /// global::tryAGI.OpenAI.MoveType.Move - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MoveTypeJsonConverter))] - public global::tryAGI.OpenAI.MoveType Type { get; set; } = global::tryAGI.OpenAI.MoveType.Move; - - /// - /// The x-coordinate to move to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int X { get; set; } - - /// - /// The y-coordinate to move to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Y { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Specifies the event type. For a move action, this property is
- /// always set to `move`.
- /// Default Value: move - /// - /// - /// The x-coordinate to move to. - /// - /// - /// The y-coordinate to move to. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Move( - int x, - int y, - global::tryAGI.OpenAI.MoveType type = global::tryAGI.OpenAI.MoveType.Move) - { - this.X = x; - this.Y = y; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Move() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.Json.g.cs new file mode 100644 index 00000000..312ba56c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class MoveParam + { + /// + /// 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::tryAGI.OpenAI.MoveParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.MoveParam), + jsonSerializerContext) as global::tryAGI.OpenAI.MoveParam; + } + + /// + /// 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::tryAGI.OpenAI.MoveParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.MoveParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.MoveParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.g.cs new file mode 100644 index 00000000..3d265fda --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParam.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A mouse move action. + /// + public sealed partial class MoveParam + { + /// + /// Specifies the event type. For a move action, this property is always set to `move`.
+ /// Default Value: move + ///
+ /// global::tryAGI.OpenAI.MoveParamType.Move + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.MoveParamTypeJsonConverter))] + public global::tryAGI.OpenAI.MoveParamType Type { get; set; } = global::tryAGI.OpenAI.MoveParamType.Move; + + /// + /// The x-coordinate to move to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate to move to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a move action, this property is always set to `move`.
+ /// Default Value: move + /// + /// + /// The x-coordinate to move to. + /// + /// + /// The y-coordinate to move to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MoveParam( + int x, + int y, + global::tryAGI.OpenAI.MoveParamType type = global::tryAGI.OpenAI.MoveParamType.Move) + { + this.X = x; + this.Y = y; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public MoveParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParamType.g.cs new file mode 100644 index 00000000..3cb00b49 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a move action, this property is always set to `move`.
+ /// Default Value: move + ///
+ public enum MoveParamType + { + /// + /// + /// + Move, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MoveParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MoveParamType value) + { + return value switch + { + MoveParamType.Move => "move", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MoveParamType? ToEnum(string value) + { + return value switch + { + "move" => MoveParamType.Move, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveType.g.cs deleted file mode 100644 index 757d99b0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MoveType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a move action, this property is
- /// always set to `move`.
- /// Default Value: move - ///
- public enum MoveType - { - /// - /// - /// - Move, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class MoveTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this MoveType value) - { - return value switch - { - MoveType.Move => "move", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static MoveType? ToEnum(string value) - { - return value switch - { - "move" => MoveType.Move, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.Json.g.cs new file mode 100644 index 00000000..b9e715f3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class NamespaceToolParam + { + /// + /// 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::tryAGI.OpenAI.NamespaceToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.NamespaceToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.NamespaceToolParam; + } + + /// + /// 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::tryAGI.OpenAI.NamespaceToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.NamespaceToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.NamespaceToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.g.cs new file mode 100644 index 00000000..9de937f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParam.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Groups function/custom tools under a shared namespace. + /// + public sealed partial class NamespaceToolParam + { + /// + /// The type of the tool. Always `namespace`.
+ /// Default Value: namespace + ///
+ /// global::tryAGI.OpenAI.NamespaceToolParamType.Namespace + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.NamespaceToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.NamespaceToolParamType Type { get; set; } = global::tryAGI.OpenAI.NamespaceToolParamType.Namespace; + + /// + /// The namespace name used in tool calls (for example, `crm`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// A description of the namespace shown to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// The function/custom tools available inside this namespace. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tools { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the tool. Always `namespace`.
+ /// Default Value: namespace + /// + /// + /// The namespace name used in tool calls (for example, `crm`). + /// + /// + /// A description of the namespace shown to the model. + /// + /// + /// The function/custom tools available inside this namespace. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public NamespaceToolParam( + string name, + string description, + global::System.Collections.Generic.IList tools, + global::tryAGI.OpenAI.NamespaceToolParamType type = global::tryAGI.OpenAI.NamespaceToolParamType.Namespace) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public NamespaceToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.Json.g.cs new file mode 100644 index 00000000..bcf03dbc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class NamespaceToolParamToolDiscriminator + { + /// + /// 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::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.NamespaceToolParamToolDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.g.cs new file mode 100644 index 00000000..c2158a68 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamToolDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class NamespaceToolParamToolDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public NamespaceToolParamToolDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public NamespaceToolParamToolDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamType.g.cs new file mode 100644 index 00000000..2a0407ab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NamespaceToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the tool. Always `namespace`.
+ /// Default Value: namespace + ///
+ public enum NamespaceToolParamType + { + /// + /// + /// + Namespace, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class NamespaceToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this NamespaceToolParamType value) + { + return value switch + { + NamespaceToolParamType.Namespace => "namespace", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static NamespaceToolParamType? ToEnum(string value) + { + return value switch + { + "namespace" => NamespaceToolParamType.Namespace, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.Json.g.cs new file mode 100644 index 00000000..9c91e8bc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct NetworkPolicy + { + /// + /// 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::tryAGI.OpenAI.NetworkPolicy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.NetworkPolicy), + jsonSerializerContext) as global::tryAGI.OpenAI.NetworkPolicy?; + } + + /// + /// 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::tryAGI.OpenAI.NetworkPolicy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.NetworkPolicy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.NetworkPolicy?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.g.cs new file mode 100644 index 00000000..1318cd53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Network access policy for the container. + /// + public readonly partial struct NetworkPolicy : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Disabled))] +#endif + public bool IsDisabled => Disabled != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Allowlist))] +#endif + public bool IsAllowlist => Allowlist != null; + /// + /// + /// + public static implicit operator NetworkPolicy(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam value) => new NetworkPolicy((global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?(NetworkPolicy @this) => @this.Disabled; + + /// + /// + /// + public NetworkPolicy(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? value) + { + Disabled = value; + } + + /// + /// + /// + public static implicit operator NetworkPolicy(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam value) => new NetworkPolicy((global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?(NetworkPolicy @this) => @this.Allowlist; + + /// + /// + /// + public NetworkPolicy(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? value) + { + Allowlist = value; + } + + /// + /// + /// + public NetworkPolicy( + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist + ) + { + Disabled = disabled; + Allowlist = allowlist; + } + + /// + /// + /// + public object? Object => + Allowlist as object ?? + Disabled as object + ; + + /// + /// + /// + public override string? ToString() => + Disabled?.ToString() ?? + Allowlist?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsDisabled && !IsAllowlist || !IsDisabled && IsAllowlist; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? disabled = null, + global::System.Func? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled && disabled != null) + { + return disabled(Disabled!); + } + else if (IsAllowlist && allowlist != null) + { + return allowlist(Allowlist!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? disabled = null, + global::System.Action? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled) + { + disabled?.Invoke(Disabled!); + } + else if (IsAllowlist) + { + allowlist?.Invoke(Allowlist!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Disabled, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), + Allowlist, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(NetworkPolicy other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Disabled, other.Disabled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Allowlist, other.Allowlist) + ; + } + + /// + /// + /// + public static bool operator ==(NetworkPolicy obj1, NetworkPolicy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(NetworkPolicy obj1, NetworkPolicy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is NetworkPolicy o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.Json.g.cs new file mode 100644 index 00000000..bf619553 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct NetworkPolicy2 + { + /// + /// 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::tryAGI.OpenAI.NetworkPolicy2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.NetworkPolicy2), + jsonSerializerContext) as global::tryAGI.OpenAI.NetworkPolicy2?; + } + + /// + /// 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::tryAGI.OpenAI.NetworkPolicy2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.NetworkPolicy2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.NetworkPolicy2?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.g.cs new file mode 100644 index 00000000..28d2308e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy2.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Network access policy for the container. + /// + public readonly partial struct NetworkPolicy2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Disabled))] +#endif + public bool IsDisabled => Disabled != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Allowlist))] +#endif + public bool IsAllowlist => Allowlist != null; + /// + /// + /// + public static implicit operator NetworkPolicy2(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam value) => new NetworkPolicy2((global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?(NetworkPolicy2 @this) => @this.Disabled; + + /// + /// + /// + public NetworkPolicy2(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? value) + { + Disabled = value; + } + + /// + /// + /// + public static implicit operator NetworkPolicy2(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam value) => new NetworkPolicy2((global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?(NetworkPolicy2 @this) => @this.Allowlist; + + /// + /// + /// + public NetworkPolicy2(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? value) + { + Allowlist = value; + } + + /// + /// + /// + public NetworkPolicy2( + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist + ) + { + Disabled = disabled; + Allowlist = allowlist; + } + + /// + /// + /// + public object? Object => + Allowlist as object ?? + Disabled as object + ; + + /// + /// + /// + public override string? ToString() => + Disabled?.ToString() ?? + Allowlist?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsDisabled && !IsAllowlist || !IsDisabled && IsAllowlist; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? disabled = null, + global::System.Func? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled && disabled != null) + { + return disabled(Disabled!); + } + else if (IsAllowlist && allowlist != null) + { + return allowlist(Allowlist!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? disabled = null, + global::System.Action? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled) + { + disabled?.Invoke(Disabled!); + } + else if (IsAllowlist) + { + allowlist?.Invoke(Allowlist!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Disabled, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), + Allowlist, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(NetworkPolicy2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Disabled, other.Disabled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Allowlist, other.Allowlist) + ; + } + + /// + /// + /// + public static bool operator ==(NetworkPolicy2 obj1, NetworkPolicy2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(NetworkPolicy2 obj1, NetworkPolicy2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is NetworkPolicy2 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.Json.g.cs new file mode 100644 index 00000000..4cd5306d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct NetworkPolicy3 + { + /// + /// 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::tryAGI.OpenAI.NetworkPolicy3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.NetworkPolicy3), + jsonSerializerContext) as global::tryAGI.OpenAI.NetworkPolicy3?; + } + + /// + /// 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::tryAGI.OpenAI.NetworkPolicy3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.NetworkPolicy3), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.NetworkPolicy3?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.g.cs new file mode 100644 index 00000000..02ad32d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.NetworkPolicy3.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Network access policy for the container. + /// + public readonly partial struct NetworkPolicy3 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? Disabled { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Disabled))] +#endif + public bool IsDisabled => Disabled != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; init; } +#else + public global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? Allowlist { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Allowlist))] +#endif + public bool IsAllowlist => Allowlist != null; + /// + /// + /// + public static implicit operator NetworkPolicy3(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam value) => new NetworkPolicy3((global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam?(NetworkPolicy3 @this) => @this.Disabled; + + /// + /// + /// + public NetworkPolicy3(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? value) + { + Disabled = value; + } + + /// + /// + /// + public static implicit operator NetworkPolicy3(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam value) => new NetworkPolicy3((global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam?(NetworkPolicy3 @this) => @this.Allowlist; + + /// + /// + /// + public NetworkPolicy3(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? value) + { + Allowlist = value; + } + + /// + /// + /// + public NetworkPolicy3( + global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam? disabled, + global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam? allowlist + ) + { + Disabled = disabled; + Allowlist = allowlist; + } + + /// + /// + /// + public object? Object => + Allowlist as object ?? + Disabled as object + ; + + /// + /// + /// + public override string? ToString() => + Disabled?.ToString() ?? + Allowlist?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsDisabled && !IsAllowlist || !IsDisabled && IsAllowlist; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? disabled = null, + global::System.Func? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled && disabled != null) + { + return disabled(Disabled!); + } + else if (IsAllowlist && allowlist != null) + { + return allowlist(Allowlist!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? disabled = null, + global::System.Action? allowlist = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsDisabled) + { + disabled?.Invoke(Disabled!); + } + else if (IsAllowlist) + { + allowlist?.Invoke(Allowlist!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Disabled, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyDisabledParam), + Allowlist, + typeof(global::tryAGI.OpenAI.ContainerNetworkPolicyAllowlistParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(NetworkPolicy3 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Disabled, other.Disabled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Allowlist, other.Allowlist) + ; + } + + /// + /// + /// + public static bool operator ==(NetworkPolicy3 obj1, NetworkPolicy3 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(NetworkPolicy3 obj1, NetworkPolicy3 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is NetworkPolicy3 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OpenAIFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OpenAIFile.g.cs index 13af02b7..fba42316 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OpenAIFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OpenAIFile.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class OpenAIFile { + /// + /// The file identifier, which can be referenced in the API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The size of the file, in bytes. /// @@ -37,13 +44,6 @@ public sealed partial class OpenAIFile [global::System.Text.Json.Serialization.JsonRequired] public required string Filename { get; set; } - /// - /// The file identifier, which can be referenced in the API endpoints. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - /// /// The object type, which is always `file`. /// @@ -83,6 +83,9 @@ public sealed partial class OpenAIFile /// /// Initializes a new instance of the class. /// + /// + /// The file identifier, which can be referenced in the API endpoints. + /// /// /// The size of the file, in bytes. /// @@ -95,9 +98,6 @@ public sealed partial class OpenAIFile /// /// The name of the file. /// - /// - /// The file identifier, which can be referenced in the API endpoints. - /// /// /// The object type, which is always `file`. /// @@ -111,19 +111,19 @@ public sealed partial class OpenAIFile [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public OpenAIFile( + string id, int bytes, global::System.DateTimeOffset createdAt, string filename, - string id, global::tryAGI.OpenAI.OpenAIFilePurpose purpose, global::tryAGI.OpenAI.OpenAIFileStatus status, global::System.DateTimeOffset? expiresAt, global::tryAGI.OpenAI.OpenAIFileObject @object) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Bytes = bytes; this.CreatedAt = createdAt; this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Purpose = purpose; this.Status = status; this.ExpiresAt = expiresAt; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.Json.g.cs new file mode 100644 index 00000000..c63a1fc5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct Operation + { + /// + /// 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::tryAGI.OpenAI.Operation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Operation), + jsonSerializerContext) as global::tryAGI.OpenAI.Operation?; + } + + /// + /// 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::tryAGI.OpenAI.Operation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Operation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Operation?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.g.cs new file mode 100644 index 00000000..7c764e5c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Operation.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// One of the create_file, delete_file, or update_file operations applied via apply_patch. + /// + public readonly partial struct Operation : global::System.IEquatable + { + /// + /// Instruction describing how to create a file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperation? CreateFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchCreateFileOperation? CreateFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateFile))] +#endif + public bool IsCreateFile => CreateFile != null; + + /// + /// Instruction describing how to delete a file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? DeleteFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? DeleteFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DeleteFile))] +#endif + public bool IsDeleteFile => DeleteFile != null; + + /// + /// Instruction describing how to update a file via the apply_patch tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? UpdateFile { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? UpdateFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UpdateFile))] +#endif + public bool IsUpdateFile => UpdateFile != null; + /// + /// + /// + public static implicit operator Operation(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation value) => new Operation((global::tryAGI.OpenAI.ApplyPatchCreateFileOperation?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchCreateFileOperation?(Operation @this) => @this.CreateFile; + + /// + /// + /// + public Operation(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation? value) + { + CreateFile = value; + } + + /// + /// + /// + public static implicit operator Operation(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation value) => new Operation((global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation?(Operation @this) => @this.DeleteFile; + + /// + /// + /// + public Operation(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? value) + { + DeleteFile = value; + } + + /// + /// + /// + public static implicit operator Operation(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation value) => new Operation((global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation?(Operation @this) => @this.UpdateFile; + + /// + /// + /// + public Operation(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? value) + { + UpdateFile = value; + } + + /// + /// + /// + public Operation( + global::tryAGI.OpenAI.ApplyPatchCreateFileOperation? createFile, + global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation? deleteFile, + global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation? updateFile + ) + { + CreateFile = createFile; + DeleteFile = deleteFile; + UpdateFile = updateFile; + } + + /// + /// + /// + public object? Object => + UpdateFile as object ?? + DeleteFile as object ?? + CreateFile as object + ; + + /// + /// + /// + public override string? ToString() => + CreateFile?.ToString() ?? + DeleteFile?.ToString() ?? + UpdateFile?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsCreateFile && !IsDeleteFile && !IsUpdateFile || !IsCreateFile && IsDeleteFile && !IsUpdateFile || !IsCreateFile && !IsDeleteFile && IsUpdateFile; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? createFile = null, + global::System.Func? deleteFile = null, + global::System.Func? updateFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCreateFile && createFile != null) + { + return createFile(CreateFile!); + } + else if (IsDeleteFile && deleteFile != null) + { + return deleteFile(DeleteFile!); + } + else if (IsUpdateFile && updateFile != null) + { + return updateFile(UpdateFile!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? createFile = null, + global::System.Action? deleteFile = null, + global::System.Action? updateFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCreateFile) + { + createFile?.Invoke(CreateFile!); + } + else if (IsDeleteFile) + { + deleteFile?.Invoke(DeleteFile!); + } + else if (IsUpdateFile) + { + updateFile?.Invoke(UpdateFile!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + CreateFile, + typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperation), + DeleteFile, + typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperation), + UpdateFile, + typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperation), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Operation other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateFile, other.CreateFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(DeleteFile, other.DeleteFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(UpdateFile, other.UpdateFile) + ; + } + + /// + /// + /// + public static bool operator ==(Operation obj1, Operation obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Operation obj1, Operation obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Operation o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OrderEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OrderEnum.g.cs new file mode 100644 index 00000000..0c1ae0d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OrderEnum.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum OrderEnum + { + /// + /// + /// + Asc, + /// + /// + /// + Desc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OrderEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OrderEnum value) + { + return value switch + { + OrderEnum.Asc => "asc", + OrderEnum.Desc => "desc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OrderEnum? ToEnum(string value) + { + return value switch + { + "asc" => OrderEnum.Asc, + "desc" => OrderEnum.Desc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.Json.g.cs new file mode 100644 index 00000000..aaace924 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct Outcome + { + /// + /// 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::tryAGI.OpenAI.Outcome? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Outcome), + jsonSerializerContext) as global::tryAGI.OpenAI.Outcome?; + } + + /// + /// 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::tryAGI.OpenAI.Outcome? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Outcome), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Outcome?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.g.cs new file mode 100644 index 00000000..e7ad8650 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Outcome.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. + /// + public readonly partial struct Outcome : global::System.IEquatable + { + /// + /// Indicates that the shell call exceeded its configured time limit. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? Timeout { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? Timeout { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Timeout))] +#endif + public bool IsTimeout => Timeout != null; + + /// + /// Indicates that the shell commands finished and returned an exit code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? Exit { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? Exit { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Exit))] +#endif + public bool IsExit => Exit != null; + /// + /// + /// + public static implicit operator Outcome(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome value) => new Outcome((global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome?(Outcome @this) => @this.Timeout; + + /// + /// + /// + public Outcome(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? value) + { + Timeout = value; + } + + /// + /// + /// + public static implicit operator Outcome(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome value) => new Outcome((global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome?(Outcome @this) => @this.Exit; + + /// + /// + /// + public Outcome(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? value) + { + Exit = value; + } + + /// + /// + /// + public Outcome( + global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome? timeout, + global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome? exit + ) + { + Timeout = timeout; + Exit = exit; + } + + /// + /// + /// + public object? Object => + Exit as object ?? + Timeout as object + ; + + /// + /// + /// + public override string? ToString() => + Timeout?.ToString() ?? + Exit?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsTimeout && !IsExit || !IsTimeout && IsExit; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? timeout = null, + global::System.Func? exit = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTimeout && timeout != null) + { + return timeout(Timeout!); + } + else if (IsExit && exit != null) + { + return exit(Exit!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? timeout = null, + global::System.Action? exit = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTimeout) + { + timeout?.Invoke(Timeout!); + } + else if (IsExit) + { + exit?.Invoke(Exit!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Timeout, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputTimeoutOutcome), + Exit, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutputExitOutcome), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Outcome other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Timeout, other.Timeout) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Exit, other.Exit) + ; + } + + /// + /// + /// + public static bool operator ==(Outcome obj1, Outcome obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Outcome obj1, Outcome obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Outcome o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputAudio.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputAudio.g.cs index b5494f7d..7b573e24 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputAudio.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputAudio.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class OutputAudio { + /// + /// The type of the output audio. Always `output_audio`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputAudioTypeJsonConverter))] + public global::tryAGI.OpenAI.OutputAudioType Type { get; set; } + /// /// Base64-encoded audio data from the model. /// @@ -22,13 +29,6 @@ public sealed partial class OutputAudio [global::System.Text.Json.Serialization.JsonRequired] public required string Transcript { get; set; } - /// - /// The type of the output audio. Always `output_audio`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputAudioTypeJsonConverter))] - public global::tryAGI.OpenAI.OutputAudioType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,15 +38,15 @@ public sealed partial class OutputAudio /// /// Initializes a new instance of the class. /// + /// + /// The type of the output audio. Always `output_audio`. + /// /// /// Base64-encoded audio data from the model. /// /// /// The transcript of the audio data from the model. /// - /// - /// The type of the output audio. Always `output_audio`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputContent.g.cs index e5568198..661b3d10 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputContent.g.cs @@ -13,88 +13,87 @@ namespace tryAGI.OpenAI /// A text output from the model. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputTextContent? Text { get; init; } + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; init; } #else - public global::tryAGI.OpenAI.OutputTextContent? Text { get; } + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputText))] #endif - public bool IsText => Text != null; + public bool IsOutputText => OutputText != null; /// - /// - /// - public static implicit operator OutputContent(global::tryAGI.OpenAI.OutputTextContent value) => new OutputContent((global::tryAGI.OpenAI.OutputTextContent?)value); - - /// - /// + /// A refusal from the model. /// - public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(OutputContent @this) => @this.Text; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RefusalContent? Refusal { get; init; } +#else + public global::tryAGI.OpenAI.RefusalContent? Refusal { get; } +#endif /// /// /// - public OutputContent(global::tryAGI.OpenAI.OutputTextContent? value) - { - Text = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] +#endif + public bool IsRefusal => Refusal != null; /// - /// A refusal from the model. + /// Reasoning text from the model. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RefusalContent? Refusal { get; init; } + public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; init; } #else - public global::tryAGI.OpenAI.RefusalContent? Refusal { get; } + public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningText))] #endif - public bool IsRefusal => Refusal != null; - + public bool IsReasoningText => ReasoningText != null; /// /// /// - public static implicit operator OutputContent(global::tryAGI.OpenAI.RefusalContent value) => new OutputContent((global::tryAGI.OpenAI.RefusalContent?)value); + public static implicit operator OutputContent(global::tryAGI.OpenAI.OutputTextContent value) => new OutputContent((global::tryAGI.OpenAI.OutputTextContent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.RefusalContent?(OutputContent @this) => @this.Refusal; + public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(OutputContent @this) => @this.OutputText; /// /// /// - public OutputContent(global::tryAGI.OpenAI.RefusalContent? value) + public OutputContent(global::tryAGI.OpenAI.OutputTextContent? value) { - Refusal = value; + OutputText = value; } /// - /// Reasoning text from the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; init; } -#else - public global::tryAGI.OpenAI.ReasoningTextContent? ReasoningText { get; } -#endif + public static implicit operator OutputContent(global::tryAGI.OpenAI.RefusalContent value) => new OutputContent((global::tryAGI.OpenAI.RefusalContent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningText))] -#endif - public bool IsReasoningText => ReasoningText != null; + public static implicit operator global::tryAGI.OpenAI.RefusalContent?(OutputContent @this) => @this.Refusal; + + /// + /// + /// + public OutputContent(global::tryAGI.OpenAI.RefusalContent? value) + { + Refusal = value; + } /// /// @@ -118,12 +117,12 @@ public OutputContent(global::tryAGI.OpenAI.ReasoningTextContent? value) /// /// public OutputContent( - global::tryAGI.OpenAI.OutputTextContent? text, + global::tryAGI.OpenAI.OutputTextContent? outputText, global::tryAGI.OpenAI.RefusalContent? refusal, global::tryAGI.OpenAI.ReasoningTextContent? reasoningText ) { - Text = text; + OutputText = outputText; Refusal = refusal; ReasoningText = reasoningText; } @@ -134,14 +133,14 @@ public OutputContent( public object? Object => ReasoningText as object ?? Refusal as object ?? - Text as object + OutputText as object ; /// /// /// public override string? ToString() => - Text?.ToString() ?? + OutputText?.ToString() ?? Refusal?.ToString() ?? ReasoningText?.ToString() ; @@ -151,14 +150,14 @@ Text as object ///
public bool Validate() { - return IsText || IsRefusal || IsReasoningText; + return IsOutputText && !IsRefusal && !IsReasoningText || !IsOutputText && IsRefusal && !IsReasoningText || !IsOutputText && !IsRefusal && IsReasoningText; } /// /// /// public TResult? Match( - global::System.Func? text = null, + global::System.Func? outputText = null, global::System.Func? refusal = null, global::System.Func? reasoningText = null, bool validate = true) @@ -168,9 +167,9 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsOutputText && outputText != null) { - return text(Text!); + return outputText(OutputText!); } else if (IsRefusal && refusal != null) { @@ -188,7 +187,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? text = null, + global::System.Action? outputText = null, global::System.Action? refusal = null, global::System.Action? reasoningText = null, bool validate = true) @@ -198,9 +197,9 @@ public void Match( Validate(); } - if (IsText) + if (IsOutputText) { - text?.Invoke(Text!); + outputText?.Invoke(OutputText!); } else if (IsRefusal) { @@ -219,7 +218,7 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + OutputText, typeof(global::tryAGI.OpenAI.OutputTextContent), Refusal, typeof(global::tryAGI.OpenAI.RefusalContent), @@ -241,7 +240,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(OutputContent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputText, other.OutputText) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningText, other.ReasoningText) ; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputItem.g.cs index c48ae5bb..6021eb6b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputItem.g.cs @@ -26,187 +26,424 @@ namespace tryAGI.OpenAI #endif public bool IsMessage => Message != null; + /// + /// The results of a file search tool call. See the
+ /// [file search guide](/docs/guides/tools-file-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchCall { get; } +#endif + /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.OutputMessage value) => new OutputItem((global::tryAGI.OpenAI.OutputMessage?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCall))] +#endif + public bool IsFileSearchCall => FileSearchCall != null; + + /// + /// A tool call to run a function. See the
+ /// [function calling guide](/docs/guides/function-calling) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolCall? FunctionCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.OutputMessage?(OutputItem @this) => @this.Message; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCall))] +#endif + public bool IsFunctionCall => FunctionCall != null; + + /// + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchCall { get; } +#endif /// /// /// - public OutputItem(global::tryAGI.OpenAI.OutputMessage? value) - { - Message = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCall))] +#endif + public bool IsWebSearchCall => WebSearchCall != null; /// - /// The results of a file search tool call. See the
- /// [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + /// A tool call to a computer use tool. See the
+ /// [computer use guide](/docs/guides/tools-computer-use) for more information. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; init; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; init; } #else - public global::tryAGI.OpenAI.FileSearchToolCall? FileSearchToolCall { get; } + public global::tryAGI.OpenAI.ComputerToolCall? ComputerCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerCall))] +#endif + public bool IsComputerCall => ComputerCall != null; + + /// + /// A description of the chain of thought used by a reasoning model while generating
+ /// a response. Be sure to include these items in your `input` to the Responses API
+ /// for subsequent turns of a conversation if you are manually
+ /// [managing context](/docs/guides/conversation-state). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } +#else + public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } #endif - public bool IsFileSearchToolCall => FileSearchToolCall != null; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.FileSearchToolCall value) => new OutputItem((global::tryAGI.OpenAI.FileSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] +#endif + public bool IsReasoning => Reasoning != null; /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(OutputItem @this) => @this.FileSearchToolCall; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchCall? ToolSearchCall { get; } +#endif /// /// /// - public OutputItem(global::tryAGI.OpenAI.FileSearchToolCall? value) - { - FileSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchCall))] +#endif + public bool IsToolSearchCall => ToolSearchCall != null; /// - /// A tool call to run a function. See the
- /// [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + /// ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; init; } + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; init; } #else - public global::tryAGI.OpenAI.FunctionToolCall? FunctionToolCall { get; } + public global::tryAGI.OpenAI.ToolSearchOutput? ToolSearchOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearchOutput))] +#endif + public bool IsToolSearchOutput => ToolSearchOutput != null; + + /// + /// A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CompactionBody? Compaction { get; init; } +#else + public global::tryAGI.OpenAI.CompactionBody? Compaction { get; } #endif - public bool IsFunctionToolCall => FunctionToolCall != null; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.FunctionToolCall value) => new OutputItem((global::tryAGI.OpenAI.FunctionToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))] +#endif + public bool IsCompaction => Compaction != null; + + /// + /// An image generation request made by the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenerationCall { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(OutputItem @this) => @this.FunctionToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenerationCall))] +#endif + public bool IsImageGenerationCall => ImageGenerationCall != null; + + /// + /// A tool call to run code. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterCall { get; } +#endif /// /// /// - public OutputItem(global::tryAGI.OpenAI.FunctionToolCall? value) - { - FunctionToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCall))] +#endif + public bool IsCodeInterpreterCall => CodeInterpreterCall != null; /// - /// The results of a web search tool call. See the
- /// [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + /// A tool call to run a command on the local shell. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; init; } + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; init; } #else - public global::tryAGI.OpenAI.WebSearchToolCall? WebSearchToolCall { get; } + public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellCall))] +#endif + public bool IsLocalShellCall => LocalShellCall != null; + + /// + /// A tool call that executes one or more shell commands in a managed environment. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCall? ShellCall { get; } #endif - public bool IsWebSearchToolCall => WebSearchToolCall != null; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.WebSearchToolCall value) => new OutputItem((global::tryAGI.OpenAI.WebSearchToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCall))] +#endif + public bool IsShellCall => ShellCall != null; + + /// + /// The output of a shell tool call that was emitted. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellCallOutput? ShellCallOutput { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(OutputItem @this) => @this.WebSearchToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ShellCallOutput))] +#endif + public bool IsShellCallOutput => ShellCallOutput != null; + + /// + /// A tool call that applies file diffs by creating, deleting, or updating files. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; init; } +#else + public global::tryAGI.OpenAI.ApplyPatchToolCall? ApplyPatchCall { get; } +#endif /// /// /// - public OutputItem(global::tryAGI.OpenAI.WebSearchToolCall? value) - { - WebSearchToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCall))] +#endif + public bool IsApplyPatchCall => ApplyPatchCall != null; /// - /// A tool call to a computer use tool. See the
- /// [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + /// The output emitted by an apply patch tool call. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; init; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; init; } #else - public global::tryAGI.OpenAI.ComputerToolCall? ComputerToolCall { get; } + public global::tryAGI.OpenAI.ApplyPatchToolCallOutput? ApplyPatchCallOutput { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerToolCall))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatchCallOutput))] +#endif + public bool IsApplyPatchCallOutput => ApplyPatchCallOutput != null; + + /// + /// An invocation of a tool on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; init; } +#else + public global::tryAGI.OpenAI.MCPToolCall? McpCall { get; } #endif - public bool IsComputerToolCall => ComputerToolCall != null; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.ComputerToolCall value) => new OutputItem((global::tryAGI.OpenAI.ComputerToolCall?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpCall))] +#endif + public bool IsMcpCall => McpCall != null; + + /// + /// A list of tools available on an MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; init; } +#else + public global::tryAGI.OpenAI.MCPListTools? McpListTools { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(OutputItem @this) => @this.ComputerToolCall; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpListTools))] +#endif + public bool IsMcpListTools => McpListTools != null; + + /// + /// A request for human approval of a tool invocation. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; init; } +#else + public global::tryAGI.OpenAI.MCPApprovalRequest? McpApprovalRequest { get; } +#endif /// /// /// - public OutputItem(global::tryAGI.OpenAI.ComputerToolCall? value) - { - ComputerToolCall = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpApprovalRequest))] +#endif + public bool IsMcpApprovalRequest => McpApprovalRequest != null; /// - /// A description of the chain of thought used by a reasoning model while generating
- /// a response. Be sure to include these items in your `input` to the Responses API
- /// for subsequent turns of a conversation if you are manually
- /// [managing context](https://platform.openai.com/docs/guides/conversation-state). + /// A call to a custom tool created by the model. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; init; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } #else - public global::tryAGI.OpenAI.ReasoningItem? Reasoning { get; } + public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Reasoning))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] #endif - public bool IsReasoning => Reasoning != null; + public bool IsCustomToolCall => CustomToolCall != null; + /// + /// + /// + public static implicit operator OutputItem(global::tryAGI.OpenAI.OutputMessage value) => new OutputItem((global::tryAGI.OpenAI.OutputMessage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.OutputMessage?(OutputItem @this) => @this.Message; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.OutputMessage? value) + { + Message = value; + } + + /// + /// + /// + public static implicit operator OutputItem(global::tryAGI.OpenAI.FileSearchToolCall value) => new OutputItem((global::tryAGI.OpenAI.FileSearchToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FileSearchToolCall?(OutputItem @this) => @this.FileSearchCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.FileSearchToolCall? value) + { + FileSearchCall = value; + } + + /// + /// + /// + public static implicit operator OutputItem(global::tryAGI.OpenAI.FunctionToolCall value) => new OutputItem((global::tryAGI.OpenAI.FunctionToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionToolCall?(OutputItem @this) => @this.FunctionCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.FunctionToolCall? value) + { + FunctionCall = value; + } + + /// + /// + /// + public static implicit operator OutputItem(global::tryAGI.OpenAI.WebSearchToolCall value) => new OutputItem((global::tryAGI.OpenAI.WebSearchToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.WebSearchToolCall?(OutputItem @this) => @this.WebSearchCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.WebSearchToolCall? value) + { + WebSearchCall = value; + } + + /// + /// + /// + public static implicit operator OutputItem(global::tryAGI.OpenAI.ComputerToolCall value) => new OutputItem((global::tryAGI.OpenAI.ComputerToolCall?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ComputerToolCall?(OutputItem @this) => @this.ComputerCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.ComputerToolCall? value) + { + ComputerCall = value; + } /// /// @@ -227,91 +464,94 @@ public OutputItem(global::tryAGI.OpenAI.ReasoningItem? value) } /// - /// An image generation request made by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; init; } -#else - public global::tryAGI.OpenAI.ImageGenToolCall? ImageGenToolCall { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.ToolSearchCall value) => new OutputItem((global::tryAGI.OpenAI.ToolSearchCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenToolCall))] -#endif - public bool IsImageGenToolCall => ImageGenToolCall != null; + public static implicit operator global::tryAGI.OpenAI.ToolSearchCall?(OutputItem @this) => @this.ToolSearchCall; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.ImageGenToolCall value) => new OutputItem((global::tryAGI.OpenAI.ImageGenToolCall?)value); + public OutputItem(global::tryAGI.OpenAI.ToolSearchCall? value) + { + ToolSearchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(OutputItem @this) => @this.ImageGenToolCall; + public static implicit operator OutputItem(global::tryAGI.OpenAI.ToolSearchOutput value) => new OutputItem((global::tryAGI.OpenAI.ToolSearchOutput?)value); /// /// /// - public OutputItem(global::tryAGI.OpenAI.ImageGenToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ToolSearchOutput?(OutputItem @this) => @this.ToolSearchOutput; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.ToolSearchOutput? value) { - ImageGenToolCall = value; + ToolSearchOutput = value; } /// - /// A tool call to run code. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterToolCall? CodeInterpreterToolCall { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.CompactionBody value) => new OutputItem((global::tryAGI.OpenAI.CompactionBody?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterToolCall))] -#endif - public bool IsCodeInterpreterToolCall => CodeInterpreterToolCall != null; + public static implicit operator global::tryAGI.OpenAI.CompactionBody?(OutputItem @this) => @this.Compaction; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new OutputItem((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); + public OutputItem(global::tryAGI.OpenAI.CompactionBody? value) + { + Compaction = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(OutputItem @this) => @this.CodeInterpreterToolCall; + public static implicit operator OutputItem(global::tryAGI.OpenAI.ImageGenToolCall value) => new OutputItem((global::tryAGI.OpenAI.ImageGenToolCall?)value); /// /// /// - public OutputItem(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + public static implicit operator global::tryAGI.OpenAI.ImageGenToolCall?(OutputItem @this) => @this.ImageGenerationCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.ImageGenToolCall? value) { - CodeInterpreterToolCall = value; + ImageGenerationCall = value; } /// - /// A tool call to run a command on the local shell. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellToolCall? LocalShellToolCall { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.CodeInterpreterToolCall value) => new OutputItem((global::tryAGI.OpenAI.CodeInterpreterToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShellToolCall))] -#endif - public bool IsLocalShellToolCall => LocalShellToolCall != null; + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterToolCall?(OutputItem @this) => @this.CodeInterpreterCall; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) + { + CodeInterpreterCall = value; + } /// /// @@ -321,137 +561,141 @@ public OutputItem(global::tryAGI.OpenAI.CodeInterpreterToolCall? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(OutputItem @this) => @this.LocalShellToolCall; + public static implicit operator global::tryAGI.OpenAI.LocalShellToolCall?(OutputItem @this) => @this.LocalShellCall; /// /// /// public OutputItem(global::tryAGI.OpenAI.LocalShellToolCall? value) { - LocalShellToolCall = value; + LocalShellCall = value; } /// - /// An invocation of a tool on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; init; } -#else - public global::tryAGI.OpenAI.MCPToolCall? MCPToolCall { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.FunctionShellCall value) => new OutputItem((global::tryAGI.OpenAI.FunctionShellCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPToolCall))] -#endif - public bool IsMCPToolCall => MCPToolCall != null; + public static implicit operator global::tryAGI.OpenAI.FunctionShellCall?(OutputItem @this) => @this.ShellCall; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPToolCall value) => new OutputItem((global::tryAGI.OpenAI.MCPToolCall?)value); + public OutputItem(global::tryAGI.OpenAI.FunctionShellCall? value) + { + ShellCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(OutputItem @this) => @this.MCPToolCall; + public static implicit operator OutputItem(global::tryAGI.OpenAI.FunctionShellCallOutput value) => new OutputItem((global::tryAGI.OpenAI.FunctionShellCallOutput?)value); /// /// /// - public OutputItem(global::tryAGI.OpenAI.MCPToolCall? value) + public static implicit operator global::tryAGI.OpenAI.FunctionShellCallOutput?(OutputItem @this) => @this.ShellCallOutput; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.FunctionShellCallOutput? value) { - MCPToolCall = value; + ShellCallOutput = value; } /// - /// A list of tools available on an MCP server. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; init; } -#else - public global::tryAGI.OpenAI.MCPListTools? MCPListTools { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.ApplyPatchToolCall value) => new OutputItem((global::tryAGI.OpenAI.ApplyPatchToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListTools))] -#endif - public bool IsMCPListTools => MCPListTools != null; + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCall?(OutputItem @this) => @this.ApplyPatchCall; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPListTools value) => new OutputItem((global::tryAGI.OpenAI.MCPListTools?)value); + public OutputItem(global::tryAGI.OpenAI.ApplyPatchToolCall? value) + { + ApplyPatchCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPListTools?(OutputItem @this) => @this.MCPListTools; + public static implicit operator OutputItem(global::tryAGI.OpenAI.ApplyPatchToolCallOutput value) => new OutputItem((global::tryAGI.OpenAI.ApplyPatchToolCallOutput?)value); /// /// /// - public OutputItem(global::tryAGI.OpenAI.MCPListTools? value) + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolCallOutput?(OutputItem @this) => @this.ApplyPatchCallOutput; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.ApplyPatchToolCallOutput? value) { - MCPListTools = value; + ApplyPatchCallOutput = value; } /// - /// A request for human approval of a tool invocation. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; init; } -#else - public global::tryAGI.OpenAI.MCPApprovalRequest? MCPApprovalRequest { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPToolCall value) => new OutputItem((global::tryAGI.OpenAI.MCPToolCall?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPApprovalRequest))] -#endif - public bool IsMCPApprovalRequest => MCPApprovalRequest != null; + public static implicit operator global::tryAGI.OpenAI.MCPToolCall?(OutputItem @this) => @this.McpCall; /// /// /// - public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPApprovalRequest value) => new OutputItem((global::tryAGI.OpenAI.MCPApprovalRequest?)value); + public OutputItem(global::tryAGI.OpenAI.MCPToolCall? value) + { + McpCall = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(OutputItem @this) => @this.MCPApprovalRequest; + public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPListTools value) => new OutputItem((global::tryAGI.OpenAI.MCPListTools?)value); /// /// /// - public OutputItem(global::tryAGI.OpenAI.MCPApprovalRequest? value) + public static implicit operator global::tryAGI.OpenAI.MCPListTools?(OutputItem @this) => @this.McpListTools; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.MCPListTools? value) { - MCPApprovalRequest = value; + McpListTools = value; } /// - /// A call to a custom tool created by the model. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolCall? CustomToolCall { get; } -#endif + public static implicit operator OutputItem(global::tryAGI.OpenAI.MCPApprovalRequest value) => new OutputItem((global::tryAGI.OpenAI.MCPApprovalRequest?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCall))] -#endif - public bool IsCustomToolCall => CustomToolCall != null; + public static implicit operator global::tryAGI.OpenAI.MCPApprovalRequest?(OutputItem @this) => @this.McpApprovalRequest; + + /// + /// + /// + public OutputItem(global::tryAGI.OpenAI.MCPApprovalRequest? value) + { + McpApprovalRequest = value; + } /// /// @@ -476,32 +720,46 @@ public OutputItem(global::tryAGI.OpenAI.CustomToolCall? value) /// public OutputItem( global::tryAGI.OpenAI.OutputMessage? message, - global::tryAGI.OpenAI.FileSearchToolCall? fileSearchToolCall, - global::tryAGI.OpenAI.FunctionToolCall? functionToolCall, - global::tryAGI.OpenAI.WebSearchToolCall? webSearchToolCall, - global::tryAGI.OpenAI.ComputerToolCall? computerToolCall, + global::tryAGI.OpenAI.FileSearchToolCall? fileSearchCall, + global::tryAGI.OpenAI.FunctionToolCall? functionCall, + global::tryAGI.OpenAI.WebSearchToolCall? webSearchCall, + global::tryAGI.OpenAI.ComputerToolCall? computerCall, global::tryAGI.OpenAI.ReasoningItem? reasoning, - global::tryAGI.OpenAI.ImageGenToolCall? imageGenToolCall, - global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterToolCall, - global::tryAGI.OpenAI.LocalShellToolCall? localShellToolCall, - global::tryAGI.OpenAI.MCPToolCall? mCPToolCall, - global::tryAGI.OpenAI.MCPListTools? mCPListTools, - global::tryAGI.OpenAI.MCPApprovalRequest? mCPApprovalRequest, + global::tryAGI.OpenAI.ToolSearchCall? toolSearchCall, + global::tryAGI.OpenAI.ToolSearchOutput? toolSearchOutput, + global::tryAGI.OpenAI.CompactionBody? compaction, + global::tryAGI.OpenAI.ImageGenToolCall? imageGenerationCall, + global::tryAGI.OpenAI.CodeInterpreterToolCall? codeInterpreterCall, + global::tryAGI.OpenAI.LocalShellToolCall? localShellCall, + global::tryAGI.OpenAI.FunctionShellCall? shellCall, + global::tryAGI.OpenAI.FunctionShellCallOutput? shellCallOutput, + global::tryAGI.OpenAI.ApplyPatchToolCall? applyPatchCall, + global::tryAGI.OpenAI.ApplyPatchToolCallOutput? applyPatchCallOutput, + global::tryAGI.OpenAI.MCPToolCall? mcpCall, + global::tryAGI.OpenAI.MCPListTools? mcpListTools, + global::tryAGI.OpenAI.MCPApprovalRequest? mcpApprovalRequest, global::tryAGI.OpenAI.CustomToolCall? customToolCall ) { Message = message; - FileSearchToolCall = fileSearchToolCall; - FunctionToolCall = functionToolCall; - WebSearchToolCall = webSearchToolCall; - ComputerToolCall = computerToolCall; + FileSearchCall = fileSearchCall; + FunctionCall = functionCall; + WebSearchCall = webSearchCall; + ComputerCall = computerCall; Reasoning = reasoning; - ImageGenToolCall = imageGenToolCall; - CodeInterpreterToolCall = codeInterpreterToolCall; - LocalShellToolCall = localShellToolCall; - MCPToolCall = mCPToolCall; - MCPListTools = mCPListTools; - MCPApprovalRequest = mCPApprovalRequest; + ToolSearchCall = toolSearchCall; + ToolSearchOutput = toolSearchOutput; + Compaction = compaction; + ImageGenerationCall = imageGenerationCall; + CodeInterpreterCall = codeInterpreterCall; + LocalShellCall = localShellCall; + ShellCall = shellCall; + ShellCallOutput = shellCallOutput; + ApplyPatchCall = applyPatchCall; + ApplyPatchCallOutput = applyPatchCallOutput; + McpCall = mcpCall; + McpListTools = mcpListTools; + McpApprovalRequest = mcpApprovalRequest; CustomToolCall = customToolCall; } @@ -510,17 +768,24 @@ public OutputItem( /// public object? Object => CustomToolCall as object ?? - MCPApprovalRequest as object ?? - MCPListTools as object ?? - MCPToolCall as object ?? - LocalShellToolCall as object ?? - CodeInterpreterToolCall as object ?? - ImageGenToolCall as object ?? + McpApprovalRequest as object ?? + McpListTools as object ?? + McpCall as object ?? + ApplyPatchCallOutput as object ?? + ApplyPatchCall as object ?? + ShellCallOutput as object ?? + ShellCall as object ?? + LocalShellCall as object ?? + CodeInterpreterCall as object ?? + ImageGenerationCall as object ?? + Compaction as object ?? + ToolSearchOutput as object ?? + ToolSearchCall as object ?? Reasoning as object ?? - ComputerToolCall as object ?? - WebSearchToolCall as object ?? - FunctionToolCall as object ?? - FileSearchToolCall as object ?? + ComputerCall as object ?? + WebSearchCall as object ?? + FunctionCall as object ?? + FileSearchCall as object ?? Message as object ; @@ -529,17 +794,24 @@ Message as object /// public override string? ToString() => Message?.ToString() ?? - FileSearchToolCall?.ToString() ?? - FunctionToolCall?.ToString() ?? - WebSearchToolCall?.ToString() ?? - ComputerToolCall?.ToString() ?? + FileSearchCall?.ToString() ?? + FunctionCall?.ToString() ?? + WebSearchCall?.ToString() ?? + ComputerCall?.ToString() ?? Reasoning?.ToString() ?? - ImageGenToolCall?.ToString() ?? - CodeInterpreterToolCall?.ToString() ?? - LocalShellToolCall?.ToString() ?? - MCPToolCall?.ToString() ?? - MCPListTools?.ToString() ?? - MCPApprovalRequest?.ToString() ?? + ToolSearchCall?.ToString() ?? + ToolSearchOutput?.ToString() ?? + Compaction?.ToString() ?? + ImageGenerationCall?.ToString() ?? + CodeInterpreterCall?.ToString() ?? + LocalShellCall?.ToString() ?? + ShellCall?.ToString() ?? + ShellCallOutput?.ToString() ?? + ApplyPatchCall?.ToString() ?? + ApplyPatchCallOutput?.ToString() ?? + McpCall?.ToString() ?? + McpListTools?.ToString() ?? + McpApprovalRequest?.ToString() ?? CustomToolCall?.ToString() ; @@ -548,7 +820,7 @@ Message as object ///
public bool Validate() { - return IsMessage || IsFileSearchToolCall || IsFunctionToolCall || IsWebSearchToolCall || IsComputerToolCall || IsReasoning || IsImageGenToolCall || IsCodeInterpreterToolCall || IsLocalShellToolCall || IsMCPToolCall || IsMCPListTools || IsMCPApprovalRequest || IsCustomToolCall; + return IsMessage || IsFileSearchCall || IsFunctionCall || IsWebSearchCall || IsComputerCall || IsReasoning || IsToolSearchCall || IsToolSearchOutput || IsCompaction || IsImageGenerationCall || IsCodeInterpreterCall || IsLocalShellCall || IsShellCall || IsShellCallOutput || IsApplyPatchCall || IsApplyPatchCallOutput || IsMcpCall || IsMcpListTools || IsMcpApprovalRequest || IsCustomToolCall; } /// @@ -556,17 +828,24 @@ public bool Validate() /// public TResult? Match( global::System.Func? message = null, - global::System.Func? fileSearchToolCall = null, - global::System.Func? functionToolCall = null, - global::System.Func? webSearchToolCall = null, - global::System.Func? computerToolCall = null, + global::System.Func? fileSearchCall = null, + global::System.Func? functionCall = null, + global::System.Func? webSearchCall = null, + global::System.Func? computerCall = null, global::System.Func? reasoning = null, - global::System.Func? imageGenToolCall = null, - global::System.Func? codeInterpreterToolCall = null, - global::System.Func? localShellToolCall = null, - global::System.Func? mCPToolCall = null, - global::System.Func? mCPListTools = null, - global::System.Func? mCPApprovalRequest = null, + global::System.Func? toolSearchCall = null, + global::System.Func? toolSearchOutput = null, + global::System.Func? compaction = null, + global::System.Func? imageGenerationCall = null, + global::System.Func? codeInterpreterCall = null, + global::System.Func? localShellCall = null, + global::System.Func? shellCall = null, + global::System.Func? shellCallOutput = null, + global::System.Func? applyPatchCall = null, + global::System.Func? applyPatchCallOutput = null, + global::System.Func? mcpCall = null, + global::System.Func? mcpListTools = null, + global::System.Func? mcpApprovalRequest = null, global::System.Func? customToolCall = null, bool validate = true) { @@ -579,49 +858,77 @@ public bool Validate() { return message(Message!); } - else if (IsFileSearchToolCall && fileSearchToolCall != null) + else if (IsFileSearchCall && fileSearchCall != null) { - return fileSearchToolCall(FileSearchToolCall!); + return fileSearchCall(FileSearchCall!); } - else if (IsFunctionToolCall && functionToolCall != null) + else if (IsFunctionCall && functionCall != null) { - return functionToolCall(FunctionToolCall!); + return functionCall(FunctionCall!); } - else if (IsWebSearchToolCall && webSearchToolCall != null) + else if (IsWebSearchCall && webSearchCall != null) { - return webSearchToolCall(WebSearchToolCall!); + return webSearchCall(WebSearchCall!); } - else if (IsComputerToolCall && computerToolCall != null) + else if (IsComputerCall && computerCall != null) { - return computerToolCall(ComputerToolCall!); + return computerCall(ComputerCall!); } else if (IsReasoning && reasoning != null) { return reasoning(Reasoning!); } - else if (IsImageGenToolCall && imageGenToolCall != null) + else if (IsToolSearchCall && toolSearchCall != null) + { + return toolSearchCall(ToolSearchCall!); + } + else if (IsToolSearchOutput && toolSearchOutput != null) + { + return toolSearchOutput(ToolSearchOutput!); + } + else if (IsCompaction && compaction != null) { - return imageGenToolCall(ImageGenToolCall!); + return compaction(Compaction!); } - else if (IsCodeInterpreterToolCall && codeInterpreterToolCall != null) + else if (IsImageGenerationCall && imageGenerationCall != null) { - return codeInterpreterToolCall(CodeInterpreterToolCall!); + return imageGenerationCall(ImageGenerationCall!); } - else if (IsLocalShellToolCall && localShellToolCall != null) + else if (IsCodeInterpreterCall && codeInterpreterCall != null) { - return localShellToolCall(LocalShellToolCall!); + return codeInterpreterCall(CodeInterpreterCall!); } - else if (IsMCPToolCall && mCPToolCall != null) + else if (IsLocalShellCall && localShellCall != null) { - return mCPToolCall(MCPToolCall!); + return localShellCall(LocalShellCall!); } - else if (IsMCPListTools && mCPListTools != null) + else if (IsShellCall && shellCall != null) { - return mCPListTools(MCPListTools!); + return shellCall(ShellCall!); } - else if (IsMCPApprovalRequest && mCPApprovalRequest != null) + else if (IsShellCallOutput && shellCallOutput != null) { - return mCPApprovalRequest(MCPApprovalRequest!); + return shellCallOutput(ShellCallOutput!); + } + else if (IsApplyPatchCall && applyPatchCall != null) + { + return applyPatchCall(ApplyPatchCall!); + } + else if (IsApplyPatchCallOutput && applyPatchCallOutput != null) + { + return applyPatchCallOutput(ApplyPatchCallOutput!); + } + else if (IsMcpCall && mcpCall != null) + { + return mcpCall(McpCall!); + } + else if (IsMcpListTools && mcpListTools != null) + { + return mcpListTools(McpListTools!); + } + else if (IsMcpApprovalRequest && mcpApprovalRequest != null) + { + return mcpApprovalRequest(McpApprovalRequest!); } else if (IsCustomToolCall && customToolCall != null) { @@ -636,17 +943,24 @@ public bool Validate() ///
public void Match( global::System.Action? message = null, - global::System.Action? fileSearchToolCall = null, - global::System.Action? functionToolCall = null, - global::System.Action? webSearchToolCall = null, - global::System.Action? computerToolCall = null, + global::System.Action? fileSearchCall = null, + global::System.Action? functionCall = null, + global::System.Action? webSearchCall = null, + global::System.Action? computerCall = null, global::System.Action? reasoning = null, - global::System.Action? imageGenToolCall = null, - global::System.Action? codeInterpreterToolCall = null, - global::System.Action? localShellToolCall = null, - global::System.Action? mCPToolCall = null, - global::System.Action? mCPListTools = null, - global::System.Action? mCPApprovalRequest = null, + global::System.Action? toolSearchCall = null, + global::System.Action? toolSearchOutput = null, + global::System.Action? compaction = null, + global::System.Action? imageGenerationCall = null, + global::System.Action? codeInterpreterCall = null, + global::System.Action? localShellCall = null, + global::System.Action? shellCall = null, + global::System.Action? shellCallOutput = null, + global::System.Action? applyPatchCall = null, + global::System.Action? applyPatchCallOutput = null, + global::System.Action? mcpCall = null, + global::System.Action? mcpListTools = null, + global::System.Action? mcpApprovalRequest = null, global::System.Action? customToolCall = null, bool validate = true) { @@ -659,49 +973,77 @@ public void Match( { message?.Invoke(Message!); } - else if (IsFileSearchToolCall) + else if (IsFileSearchCall) { - fileSearchToolCall?.Invoke(FileSearchToolCall!); + fileSearchCall?.Invoke(FileSearchCall!); } - else if (IsFunctionToolCall) + else if (IsFunctionCall) { - functionToolCall?.Invoke(FunctionToolCall!); + functionCall?.Invoke(FunctionCall!); } - else if (IsWebSearchToolCall) + else if (IsWebSearchCall) { - webSearchToolCall?.Invoke(WebSearchToolCall!); + webSearchCall?.Invoke(WebSearchCall!); } - else if (IsComputerToolCall) + else if (IsComputerCall) { - computerToolCall?.Invoke(ComputerToolCall!); + computerCall?.Invoke(ComputerCall!); } else if (IsReasoning) { reasoning?.Invoke(Reasoning!); } - else if (IsImageGenToolCall) + else if (IsToolSearchCall) + { + toolSearchCall?.Invoke(ToolSearchCall!); + } + else if (IsToolSearchOutput) + { + toolSearchOutput?.Invoke(ToolSearchOutput!); + } + else if (IsCompaction) + { + compaction?.Invoke(Compaction!); + } + else if (IsImageGenerationCall) + { + imageGenerationCall?.Invoke(ImageGenerationCall!); + } + else if (IsCodeInterpreterCall) + { + codeInterpreterCall?.Invoke(CodeInterpreterCall!); + } + else if (IsLocalShellCall) + { + localShellCall?.Invoke(LocalShellCall!); + } + else if (IsShellCall) + { + shellCall?.Invoke(ShellCall!); + } + else if (IsShellCallOutput) { - imageGenToolCall?.Invoke(ImageGenToolCall!); + shellCallOutput?.Invoke(ShellCallOutput!); } - else if (IsCodeInterpreterToolCall) + else if (IsApplyPatchCall) { - codeInterpreterToolCall?.Invoke(CodeInterpreterToolCall!); + applyPatchCall?.Invoke(ApplyPatchCall!); } - else if (IsLocalShellToolCall) + else if (IsApplyPatchCallOutput) { - localShellToolCall?.Invoke(LocalShellToolCall!); + applyPatchCallOutput?.Invoke(ApplyPatchCallOutput!); } - else if (IsMCPToolCall) + else if (IsMcpCall) { - mCPToolCall?.Invoke(MCPToolCall!); + mcpCall?.Invoke(McpCall!); } - else if (IsMCPListTools) + else if (IsMcpListTools) { - mCPListTools?.Invoke(MCPListTools!); + mcpListTools?.Invoke(McpListTools!); } - else if (IsMCPApprovalRequest) + else if (IsMcpApprovalRequest) { - mCPApprovalRequest?.Invoke(MCPApprovalRequest!); + mcpApprovalRequest?.Invoke(McpApprovalRequest!); } else if (IsCustomToolCall) { @@ -718,27 +1060,41 @@ public override int GetHashCode() { Message, typeof(global::tryAGI.OpenAI.OutputMessage), - FileSearchToolCall, + FileSearchCall, typeof(global::tryAGI.OpenAI.FileSearchToolCall), - FunctionToolCall, + FunctionCall, typeof(global::tryAGI.OpenAI.FunctionToolCall), - WebSearchToolCall, + WebSearchCall, typeof(global::tryAGI.OpenAI.WebSearchToolCall), - ComputerToolCall, + ComputerCall, typeof(global::tryAGI.OpenAI.ComputerToolCall), Reasoning, typeof(global::tryAGI.OpenAI.ReasoningItem), - ImageGenToolCall, + ToolSearchCall, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + ToolSearchOutput, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), + Compaction, + typeof(global::tryAGI.OpenAI.CompactionBody), + ImageGenerationCall, typeof(global::tryAGI.OpenAI.ImageGenToolCall), - CodeInterpreterToolCall, + CodeInterpreterCall, typeof(global::tryAGI.OpenAI.CodeInterpreterToolCall), - LocalShellToolCall, + LocalShellCall, typeof(global::tryAGI.OpenAI.LocalShellToolCall), - MCPToolCall, + ShellCall, + typeof(global::tryAGI.OpenAI.FunctionShellCall), + ShellCallOutput, + typeof(global::tryAGI.OpenAI.FunctionShellCallOutput), + ApplyPatchCall, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCall), + ApplyPatchCallOutput, + typeof(global::tryAGI.OpenAI.ApplyPatchToolCallOutput), + McpCall, typeof(global::tryAGI.OpenAI.MCPToolCall), - MCPListTools, + McpListTools, typeof(global::tryAGI.OpenAI.MCPListTools), - MCPApprovalRequest, + McpApprovalRequest, typeof(global::tryAGI.OpenAI.MCPApprovalRequest), CustomToolCall, typeof(global::tryAGI.OpenAI.CustomToolCall), @@ -759,17 +1115,24 @@ public bool Equals(OutputItem other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Message, other.Message) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchToolCall, other.FileSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionToolCall, other.FunctionToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchToolCall, other.WebSearchToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerToolCall, other.ComputerToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCall, other.FileSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCall, other.FunctionCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCall, other.WebSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerCall, other.ComputerCall) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Reasoning, other.Reasoning) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenToolCall, other.ImageGenToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterToolCall, other.CodeInterpreterToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellToolCall, other.LocalShellToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolCall, other.MCPToolCall) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListTools, other.MCPListTools) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPApprovalRequest, other.MCPApprovalRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchCall, other.ToolSearchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearchOutput, other.ToolSearchOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Compaction, other.Compaction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenerationCall, other.ImageGenerationCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCall, other.CodeInterpreterCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShellCall, other.LocalShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCall, other.ShellCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ShellCallOutput, other.ShellCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCall, other.ApplyPatchCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatchCallOutput, other.ApplyPatchCallOutput) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpCall, other.McpCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpListTools, other.McpListTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpApprovalRequest, other.McpApprovalRequest) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCall, other.CustomToolCall) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessage.g.cs index d4f1e6a3..c2a286c6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessage.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class OutputMessage { - /// - /// The content of the output message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The unique ID of the output message. /// @@ -22,6 +15,13 @@ public sealed partial class OutputMessage [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The type of the output message. Always `message`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeJsonConverter))] + public global::tryAGI.OpenAI.OutputMessageType Type { get; set; } + /// /// The role of the output message. Always `assistant`. /// @@ -29,6 +29,19 @@ public sealed partial class OutputMessage [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageRoleJsonConverter))] public global::tryAGI.OpenAI.OutputMessageRole Role { get; set; } + /// + /// The content of the output message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("phase")] + public global::tryAGI.OpenAI.MessagePhase? Phase { get; set; } + /// /// The status of the message input. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when input items are returned via API. @@ -38,13 +51,6 @@ public sealed partial class OutputMessage [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.OutputMessageStatus Status { get; set; } - /// - /// The type of the output message. Always `message`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputMessageTypeJsonConverter))] - public global::tryAGI.OpenAI.OutputMessageType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -54,37 +60,40 @@ public sealed partial class OutputMessage /// /// Initializes a new instance of the class. /// - /// - /// The content of the output message. - /// /// /// The unique ID of the output message. /// + /// + /// The type of the output message. Always `message`. + /// /// /// The role of the output message. Always `assistant`. /// + /// + /// The content of the output message. + /// + /// /// /// The status of the message input. One of `in_progress`, `completed`, or
/// `incomplete`. Populated when input items are returned via API. /// - /// - /// The type of the output message. Always `message`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public OutputMessage( - global::System.Collections.Generic.IList content, string id, + global::System.Collections.Generic.IList content, global::tryAGI.OpenAI.OutputMessageStatus status, + global::tryAGI.OpenAI.OutputMessageType type, global::tryAGI.OpenAI.OutputMessageRole role, - global::tryAGI.OpenAI.OutputMessageType type) + global::tryAGI.OpenAI.MessagePhase? phase) { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Status = status; - this.Role = role; this.Type = type; + this.Role = role; + this.Phase = phase; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessageContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessageContent.g.cs index 491c5e2d..d0c7d68f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessageContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessageContent.g.cs @@ -13,36 +13,18 @@ namespace tryAGI.OpenAI /// A text output from the model. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.OutputTextContent? Text { get; init; } + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; init; } #else - public global::tryAGI.OpenAI.OutputTextContent? Text { get; } + public global::tryAGI.OpenAI.OutputTextContent? OutputText { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputText))] #endif - public bool IsText => Text != null; - - /// - /// - /// - public static implicit operator OutputMessageContent(global::tryAGI.OpenAI.OutputTextContent value) => new OutputMessageContent((global::tryAGI.OpenAI.OutputTextContent?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(OutputMessageContent @this) => @this.Text; - - /// - /// - /// - public OutputMessageContent(global::tryAGI.OpenAI.OutputTextContent? value) - { - Text = value; - } + public bool IsOutputText => OutputText != null; /// /// A refusal from the model. @@ -60,6 +42,23 @@ public OutputMessageContent(global::tryAGI.OpenAI.OutputTextContent? value) [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] #endif public bool IsRefusal => Refusal != null; + /// + /// + /// + public static implicit operator OutputMessageContent(global::tryAGI.OpenAI.OutputTextContent value) => new OutputMessageContent((global::tryAGI.OpenAI.OutputTextContent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.OutputTextContent?(OutputMessageContent @this) => @this.OutputText; + + /// + /// + /// + public OutputMessageContent(global::tryAGI.OpenAI.OutputTextContent? value) + { + OutputText = value; + } /// /// @@ -83,11 +82,11 @@ public OutputMessageContent(global::tryAGI.OpenAI.RefusalContent? value) /// /// public OutputMessageContent( - global::tryAGI.OpenAI.OutputTextContent? text, + global::tryAGI.OpenAI.OutputTextContent? outputText, global::tryAGI.OpenAI.RefusalContent? refusal ) { - Text = text; + OutputText = outputText; Refusal = refusal; } @@ -96,14 +95,14 @@ public OutputMessageContent( /// public object? Object => Refusal as object ?? - Text as object + OutputText as object ; /// /// /// public override string? ToString() => - Text?.ToString() ?? + OutputText?.ToString() ?? Refusal?.ToString() ; @@ -112,14 +111,14 @@ Text as object ///
public bool Validate() { - return IsText || IsRefusal; + return IsOutputText && !IsRefusal || !IsOutputText && IsRefusal; } /// /// /// public TResult? Match( - global::System.Func? text = null, + global::System.Func? outputText = null, global::System.Func? refusal = null, bool validate = true) { @@ -128,9 +127,9 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsOutputText && outputText != null) { - return text(Text!); + return outputText(OutputText!); } else if (IsRefusal && refusal != null) { @@ -144,7 +143,7 @@ public bool Validate() /// ///
public void Match( - global::System.Action? text = null, + global::System.Action? outputText = null, global::System.Action? refusal = null, bool validate = true) { @@ -153,9 +152,9 @@ public void Match( Validate(); } - if (IsText) + if (IsOutputText) { - text?.Invoke(Text!); + outputText?.Invoke(OutputText!); } else if (IsRefusal) { @@ -170,7 +169,7 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + OutputText, typeof(global::tryAGI.OpenAI.OutputTextContent), Refusal, typeof(global::tryAGI.OpenAI.RefusalContent), @@ -190,7 +189,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(OutputMessageContent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputText, other.OutputText) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.Json.g.cs new file mode 100644 index 00000000..22dfadfd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class OutputMessagePhase + { + /// + /// 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::tryAGI.OpenAI.OutputMessagePhase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OutputMessagePhase), + jsonSerializerContext) as global::tryAGI.OpenAI.OutputMessagePhase; + } + + /// + /// 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::tryAGI.OpenAI.OutputMessagePhase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OutputMessagePhase), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OutputMessagePhase; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.g.cs new file mode 100644 index 00000000..8ed7bd76 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputMessagePhase.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class OutputMessagePhase + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent.g.cs index 0826aa64..055a9352 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent.g.cs @@ -9,17 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class OutputTextContent { /// - /// The annotations of the text output. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Annotations { get; set; } - - /// - /// + /// The type of the output text. Always `output_text`.
+ /// Default Value: output_text ///
- [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + /// global::tryAGI.OpenAI.OutputTextContentType.OutputText + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputTextContentTypeJsonConverter))] + public global::tryAGI.OpenAI.OutputTextContentType Type { get; set; } = global::tryAGI.OpenAI.OutputTextContentType.OutputText; /// /// The text output from the model. @@ -29,13 +25,18 @@ public sealed partial class OutputTextContent public required string Text { get; set; } /// - /// The type of the output text. Always `output_text`.
- /// Default Value: output_text + /// The annotations of the text output. ///
- /// global::tryAGI.OpenAI.OutputTextContentType.OutputText - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputTextContentTypeJsonConverter))] - public global::tryAGI.OpenAI.OutputTextContentType Type { get; set; } = global::tryAGI.OpenAI.OutputTextContentType.OutputText; + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Annotations { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Logprobs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -46,29 +47,29 @@ public sealed partial class OutputTextContent /// /// Initializes a new instance of the class. /// - /// - /// The annotations of the text output. + /// + /// The type of the output text. Always `output_text`.
+ /// Default Value: output_text /// - /// /// /// The text output from the model. /// - /// - /// The type of the output text. Always `output_text`.
- /// Default Value: output_text + /// + /// The annotations of the text output. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public OutputTextContent( - global::System.Collections.Generic.IList annotations, string text, - global::System.Collections.Generic.IList? logprobs, + global::System.Collections.Generic.IList annotations, + global::System.Collections.Generic.IList logprobs, global::tryAGI.OpenAI.OutputTextContentType type = global::tryAGI.OpenAI.OutputTextContentType.OutputText) { - this.Annotations = annotations ?? throw new global::System.ArgumentNullException(nameof(annotations)); this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Logprobs = logprobs; + this.Annotations = annotations ?? throw new global::System.ArgumentNullException(nameof(annotations)); + this.Logprobs = logprobs ?? throw new global::System.ArgumentNullException(nameof(logprobs)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.Json.g.cs new file mode 100644 index 00000000..0ddabc30 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OutputVariant2Item + { + /// + /// 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::tryAGI.OpenAI.OutputVariant2Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OutputVariant2Item), + jsonSerializerContext) as global::tryAGI.OpenAI.OutputVariant2Item?; + } + + /// + /// 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::tryAGI.OpenAI.OutputVariant2Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OutputVariant2Item), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OutputVariant2Item?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.g.cs new file mode 100644 index 00000000..09b84f5a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputVariant2Item.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A piece of message content, such as text, an image, or a file. + /// + public readonly partial struct OutputVariant2Item : global::System.IEquatable + { + /// + /// A text input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputTextContentParam? InputText { get; init; } +#else + public global::tryAGI.OpenAI.InputTextContentParam? InputText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputText))] +#endif + public bool IsInputText => InputText != null; + + /// + /// An image input to the model. Learn about [image inputs](/docs/guides/vision) + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputImageContentParamAutoParam? InputImage { get; init; } +#else + public global::tryAGI.OpenAI.InputImageContentParamAutoParam? InputImage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputImage))] +#endif + public bool IsInputImage => InputImage != null; + + /// + /// A file input to the model. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InputFileContentParam? InputFile { get; init; } +#else + public global::tryAGI.OpenAI.InputFileContentParam? InputFile { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputFile))] +#endif + public bool IsInputFile => InputFile != null; + /// + /// + /// + public static implicit operator OutputVariant2Item(global::tryAGI.OpenAI.InputTextContentParam value) => new OutputVariant2Item((global::tryAGI.OpenAI.InputTextContentParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputTextContentParam?(OutputVariant2Item @this) => @this.InputText; + + /// + /// + /// + public OutputVariant2Item(global::tryAGI.OpenAI.InputTextContentParam? value) + { + InputText = value; + } + + /// + /// + /// + public static implicit operator OutputVariant2Item(global::tryAGI.OpenAI.InputImageContentParamAutoParam value) => new OutputVariant2Item((global::tryAGI.OpenAI.InputImageContentParamAutoParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputImageContentParamAutoParam?(OutputVariant2Item @this) => @this.InputImage; + + /// + /// + /// + public OutputVariant2Item(global::tryAGI.OpenAI.InputImageContentParamAutoParam? value) + { + InputImage = value; + } + + /// + /// + /// + public static implicit operator OutputVariant2Item(global::tryAGI.OpenAI.InputFileContentParam value) => new OutputVariant2Item((global::tryAGI.OpenAI.InputFileContentParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InputFileContentParam?(OutputVariant2Item @this) => @this.InputFile; + + /// + /// + /// + public OutputVariant2Item(global::tryAGI.OpenAI.InputFileContentParam? value) + { + InputFile = value; + } + + /// + /// + /// + public OutputVariant2Item( + global::tryAGI.OpenAI.InputTextContentParam? inputText, + global::tryAGI.OpenAI.InputImageContentParamAutoParam? inputImage, + global::tryAGI.OpenAI.InputFileContentParam? inputFile + ) + { + InputText = inputText; + InputImage = inputImage; + InputFile = inputFile; + } + + /// + /// + /// + public object? Object => + InputFile as object ?? + InputImage as object ?? + InputText as object + ; + + /// + /// + /// + public override string? ToString() => + InputText?.ToString() ?? + InputImage?.ToString() ?? + InputFile?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsInputText && !IsInputImage && !IsInputFile || !IsInputText && IsInputImage && !IsInputFile || !IsInputText && !IsInputImage && IsInputFile; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? inputText = null, + global::System.Func? inputImage = null, + global::System.Func? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText && inputText != null) + { + return inputText(InputText!); + } + else if (IsInputImage && inputImage != null) + { + return inputImage(InputImage!); + } + else if (IsInputFile && inputFile != null) + { + return inputFile(InputFile!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? inputText = null, + global::System.Action? inputImage = null, + global::System.Action? inputFile = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsInputText) + { + inputText?.Invoke(InputText!); + } + else if (IsInputImage) + { + inputImage?.Invoke(InputImage!); + } + else if (IsInputFile) + { + inputFile?.Invoke(InputFile!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + InputText, + typeof(global::tryAGI.OpenAI.InputTextContentParam), + InputImage, + typeof(global::tryAGI.OpenAI.InputImageContentParamAutoParam), + InputFile, + typeof(global::tryAGI.OpenAI.InputFileContentParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OutputVariant2Item other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputText, other.InputText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputImage, other.InputImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputFile, other.InputFile) + ; + } + + /// + /// + /// + public static bool operator ==(OutputVariant2Item obj1, OutputVariant2Item obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OutputVariant2Item obj1, OutputVariant2Item obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OutputVariant2Item o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.Json.g.cs deleted file mode 100644 index eb92da08..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct OutputsItem - { - /// - /// 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::tryAGI.OpenAI.OutputsItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.OutputsItem), - jsonSerializerContext) as global::tryAGI.OpenAI.OutputsItem?; - } - - /// - /// 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::tryAGI.OpenAI.OutputsItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.OutputsItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OutputsItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.g.cs deleted file mode 100644 index 683d7854..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsItem.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct OutputsItem : global::System.IEquatable - { - /// - /// The logs output from the code interpreter. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? CodeInterpreterOutputLogs { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? CodeInterpreterOutputLogs { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterOutputLogs))] -#endif - public bool IsCodeInterpreterOutputLogs => CodeInterpreterOutputLogs != null; - - /// - /// - /// - public static implicit operator OutputsItem(global::tryAGI.OpenAI.CodeInterpreterOutputLogs value) => new OutputsItem((global::tryAGI.OpenAI.CodeInterpreterOutputLogs?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterOutputLogs?(OutputsItem @this) => @this.CodeInterpreterOutputLogs; - - /// - /// - /// - public OutputsItem(global::tryAGI.OpenAI.CodeInterpreterOutputLogs? value) - { - CodeInterpreterOutputLogs = value; - } - - /// - /// The image output from the code interpreter. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterOutputImage? CodeInterpreterOutputImage { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterOutputImage? CodeInterpreterOutputImage { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterOutputImage))] -#endif - public bool IsCodeInterpreterOutputImage => CodeInterpreterOutputImage != null; - - /// - /// - /// - public static implicit operator OutputsItem(global::tryAGI.OpenAI.CodeInterpreterOutputImage value) => new OutputsItem((global::tryAGI.OpenAI.CodeInterpreterOutputImage?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterOutputImage?(OutputsItem @this) => @this.CodeInterpreterOutputImage; - - /// - /// - /// - public OutputsItem(global::tryAGI.OpenAI.CodeInterpreterOutputImage? value) - { - CodeInterpreterOutputImage = value; - } - - /// - /// - /// - public OutputsItem( - global::tryAGI.OpenAI.CodeInterpreterOutputLogs? codeInterpreterOutputLogs, - global::tryAGI.OpenAI.CodeInterpreterOutputImage? codeInterpreterOutputImage - ) - { - CodeInterpreterOutputLogs = codeInterpreterOutputLogs; - CodeInterpreterOutputImage = codeInterpreterOutputImage; - } - - /// - /// - /// - public object? Object => - CodeInterpreterOutputImage as object ?? - CodeInterpreterOutputLogs as object - ; - - /// - /// - /// - public override string? ToString() => - CodeInterpreterOutputLogs?.ToString() ?? - CodeInterpreterOutputImage?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCodeInterpreterOutputLogs || IsCodeInterpreterOutputImage; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? codeInterpreterOutputLogs = null, - global::System.Func? codeInterpreterOutputImage = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCodeInterpreterOutputLogs && codeInterpreterOutputLogs != null) - { - return codeInterpreterOutputLogs(CodeInterpreterOutputLogs!); - } - else if (IsCodeInterpreterOutputImage && codeInterpreterOutputImage != null) - { - return codeInterpreterOutputImage(CodeInterpreterOutputImage!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? codeInterpreterOutputLogs = null, - global::System.Action? codeInterpreterOutputImage = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCodeInterpreterOutputLogs) - { - codeInterpreterOutputLogs?.Invoke(CodeInterpreterOutputLogs!); - } - else if (IsCodeInterpreterOutputImage) - { - codeInterpreterOutputImage?.Invoke(CodeInterpreterOutputImage!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - CodeInterpreterOutputLogs, - typeof(global::tryAGI.OpenAI.CodeInterpreterOutputLogs), - CodeInterpreterOutputImage, - typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(OutputsItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterOutputLogs, other.CodeInterpreterOutputLogs) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterOutputImage, other.CodeInterpreterOutputImage) - ; - } - - /// - /// - /// - public static bool operator ==(OutputsItem obj1, OutputsItem obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(OutputsItem obj1, OutputsItem obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is OutputsItem o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.Json.g.cs new file mode 100644 index 00000000..5b499e64 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct OutputsVariant1Item + { + /// + /// 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::tryAGI.OpenAI.OutputsVariant1Item? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.OutputsVariant1Item), + jsonSerializerContext) as global::tryAGI.OpenAI.OutputsVariant1Item?; + } + + /// + /// 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::tryAGI.OpenAI.OutputsVariant1Item? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.OutputsVariant1Item), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OutputsVariant1Item?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.g.cs new file mode 100644 index 00000000..61d78cd9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputsVariant1Item.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct OutputsVariant1Item : global::System.IEquatable + { + /// + /// The logs output from the code interpreter. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? Logs { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterOutputLogs? Logs { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Logs))] +#endif + public bool IsLogs => Logs != null; + + /// + /// The image output from the code interpreter. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CodeInterpreterOutputImage? Image { get; init; } +#else + public global::tryAGI.OpenAI.CodeInterpreterOutputImage? 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 OutputsVariant1Item(global::tryAGI.OpenAI.CodeInterpreterOutputLogs value) => new OutputsVariant1Item((global::tryAGI.OpenAI.CodeInterpreterOutputLogs?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterOutputLogs?(OutputsVariant1Item @this) => @this.Logs; + + /// + /// + /// + public OutputsVariant1Item(global::tryAGI.OpenAI.CodeInterpreterOutputLogs? value) + { + Logs = value; + } + + /// + /// + /// + public static implicit operator OutputsVariant1Item(global::tryAGI.OpenAI.CodeInterpreterOutputImage value) => new OutputsVariant1Item((global::tryAGI.OpenAI.CodeInterpreterOutputImage?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterOutputImage?(OutputsVariant1Item @this) => @this.Image; + + /// + /// + /// + public OutputsVariant1Item(global::tryAGI.OpenAI.CodeInterpreterOutputImage? value) + { + Image = value; + } + + /// + /// + /// + public OutputsVariant1Item( + global::tryAGI.OpenAI.CodeInterpreterOutputLogs? logs, + global::tryAGI.OpenAI.CodeInterpreterOutputImage? image + ) + { + Logs = logs; + Image = image; + } + + /// + /// + /// + public object? Object => + Image as object ?? + Logs as object + ; + + /// + /// + /// + public override string? ToString() => + Logs?.ToString() ?? + Image?.ToString() + ; + + /// + /// + /// + 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::tryAGI.OpenAI.CodeInterpreterOutputLogs), + Image, + typeof(global::tryAGI.OpenAI.CodeInterpreterOutputImage), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OutputsVariant1Item 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 ==(OutputsVariant1Item obj1, OutputsVariant1Item obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OutputsVariant1Item obj1, OutputsVariant1Item obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OutputsVariant1Item o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.Json.g.cs new file mode 100644 index 00000000..f0f73d00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PartialImages + { + /// + /// 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::tryAGI.OpenAI.PartialImages? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PartialImages), + jsonSerializerContext) as global::tryAGI.OpenAI.PartialImages; + } + + /// + /// 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::tryAGI.OpenAI.PartialImages? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PartialImages), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PartialImages; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.g.cs new file mode 100644 index 00000000..3e168d8b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PartialImages.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class PartialImages + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PredictionContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PredictionContent.g.cs index 411306fc..35d559b0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PredictionContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PredictionContent.g.cs @@ -11,16 +11,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class PredictionContent { - /// - /// The content that should be matched when generating a model response.
- /// If generated tokens would match this content, the entire model response
- /// can be returned much more quickly. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Content { get; set; } - /// /// The type of the predicted content you want to provide. This type is
/// currently always `content`. @@ -29,6 +19,16 @@ public sealed partial class PredictionContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.PredictionContentTypeJsonConverter))] public global::tryAGI.OpenAI.PredictionContentType Type { get; set; } + /// + /// The content that should be matched when generating a model response.
+ /// If generated tokens would match this content, the entire model response
+ /// can be returned much more quickly. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf> Content { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,20 +38,20 @@ public sealed partial class PredictionContent /// /// Initializes a new instance of the class. /// + /// + /// The type of the predicted content you want to provide. This type is
+ /// currently always `content`. + /// /// /// The content that should be matched when generating a model response.
/// If generated tokens would match this content, the entire model response
/// can be returned much more quickly. /// - /// - /// The type of the predicted content you want to provide. This type is
- /// currently always `content`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public PredictionContent( - global::tryAGI.OpenAI.AnyOf> content, + global::tryAGI.OpenAI.OneOf> content, global::tryAGI.OpenAI.PredictionContentType type) { this.Content = content; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Project.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Project.g.cs index c449242c..40960080 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Project.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Project.g.cs @@ -8,21 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class Project { - /// - /// The Unix timestamp (in seconds) of when the project was archived or `null`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("archived_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? ArchivedAt { get; set; } - - /// - /// The Unix timestamp (in seconds) of when the project was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - /// /// The identifier, which can be referenced in API endpoints /// @@ -30,6 +15,13 @@ public sealed partial class Project [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The object type, which is always `organization.project` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectObject Object { get; set; } + /// /// The name of the project. This appears in reporting. /// @@ -38,11 +30,18 @@ public sealed partial class Project public required string Name { get; set; } /// - /// The object type, which is always `organization.project` + /// The Unix timestamp (in seconds) of when the project was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("archived_at")] + public global::System.DateTimeOffset? ArchivedAt { get; set; } /// /// `active` or `archived` @@ -61,21 +60,19 @@ public sealed partial class Project /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the project was archived or `null`. - /// - /// - /// The Unix timestamp (in seconds) of when the project was created. - /// /// /// The identifier, which can be referenced in API endpoints /// + /// + /// The object type, which is always `organization.project` + /// /// /// The name of the project. This appears in reporting. /// - /// - /// The object type, which is always `organization.project` + /// + /// The Unix timestamp (in seconds) of when the project was created. /// + /// /// /// `active` or `archived` /// @@ -83,19 +80,19 @@ public sealed partial class Project [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Project( - global::System.DateTimeOffset createdAt, string id, string name, + global::System.DateTimeOffset createdAt, global::tryAGI.OpenAI.ProjectStatus status, - global::System.DateTimeOffset? archivedAt, - global::tryAGI.OpenAI.ProjectObject @object) + global::tryAGI.OpenAI.ProjectObject @object, + global::System.DateTimeOffset? archivedAt) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; this.Status = status; - this.ArchivedAt = archivedAt; this.Object = @object; + this.ArchivedAt = archivedAt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKey.g.cs index bedca1bb..9912dcce 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKey.g.cs @@ -9,41 +9,48 @@ namespace tryAGI.OpenAI public sealed partial class ProjectApiKey { /// - /// The Unix timestamp (in seconds) of when the API key was created + /// The object type, which is always `organization.project.api_key` /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectApiKeyObject Object { get; set; } + + /// + /// The redacted value of the API key + /// + [global::System.Text.Json.Serialization.JsonPropertyName("redacted_value")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required string RedactedValue { get; set; } /// - /// The identifier, which can be referenced in API endpoints + /// The name of the API key /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string Name { get; set; } /// - /// The Unix timestamp (in seconds) of when the API key was last used. + /// The Unix timestamp (in seconds) of when the API key was created /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_used_at")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset LastUsedAt { get; set; } + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The name of the API key + /// The Unix timestamp (in seconds) of when the API key was last used. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("last_used_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required global::System.DateTimeOffset LastUsedAt { get; set; } /// - /// The object type, which is always `organization.project.api_key` + /// The identifier, which can be referenced in API endpoints /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectApiKeyObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } /// /// @@ -52,13 +59,6 @@ public sealed partial class ProjectApiKey [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ProjectApiKeyOwner Owner { get; set; } - /// - /// The redacted value of the API key - /// - [global::System.Text.Json.Serialization.JsonPropertyName("redacted_value")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string RedactedValue { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -68,43 +68,43 @@ public sealed partial class ProjectApiKey /// /// Initializes a new instance of the class. /// + /// + /// The object type, which is always `organization.project.api_key` + /// + /// + /// The redacted value of the API key + /// + /// + /// The name of the API key + /// /// /// The Unix timestamp (in seconds) of when the API key was created /// - /// - /// The identifier, which can be referenced in API endpoints - /// /// /// The Unix timestamp (in seconds) of when the API key was last used. /// - /// - /// The name of the API key - /// - /// - /// The object type, which is always `organization.project.api_key` + /// + /// The identifier, which can be referenced in API endpoints /// /// - /// - /// The redacted value of the API key - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectApiKey( + string redactedValue, + string name, global::System.DateTimeOffset createdAt, - string id, global::System.DateTimeOffset lastUsedAt, - string name, + string id, global::tryAGI.OpenAI.ProjectApiKeyOwner owner, - string redactedValue, global::tryAGI.OpenAI.ProjectApiKeyObject @object) { + this.RedactedValue = redactedValue ?? throw new global::System.ArgumentNullException(nameof(redactedValue)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.CreatedAt = createdAt; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.LastUsedAt = lastUsedAt; - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Owner = owner ?? throw new global::System.ArgumentNullException(nameof(owner)); - this.RedactedValue = redactedValue ?? throw new global::System.ArgumentNullException(nameof(redactedValue)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyDeleteResponse.g.cs index ba3a8ca0..f7344c27 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyDeleteResponse.g.cs @@ -11,9 +11,9 @@ public sealed partial class ProjectApiKeyDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyDeleteResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponseObject Object { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class ProjectApiKeyDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyDeleteResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectApiKeyDeleteResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,19 +38,19 @@ public sealed partial class ProjectApiKeyDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectApiKeyDeleteResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.ProjectApiKeyDeleteResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyListResponse.g.cs index b28e6591..9f3604c6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class ProjectApiKeyListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectApiKeyListResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class ProjectApiKeyListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectApiKeyListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectApiKeyListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,25 +52,25 @@ public sealed partial class ProjectApiKeyListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectApiKeyListResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ProjectApiKeyListResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyOwner.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyOwner.g.cs index 61821d00..457d8e82 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyOwner.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectApiKeyOwner.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ProjectApiKeyOwner { - /// - /// Represents an individual service account in a project. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("service_account")] - public global::tryAGI.OpenAI.ProjectServiceAccount? ServiceAccount { get; set; } - /// /// `user` or `service_account` /// @@ -27,6 +21,12 @@ public sealed partial class ProjectApiKeyOwner [global::System.Text.Json.Serialization.JsonPropertyName("user")] public global::tryAGI.OpenAI.ProjectUser? User { get; set; } + /// + /// Represents an individual service account in a project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_account")] + public global::tryAGI.OpenAI.ProjectServiceAccount? ServiceAccount { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -36,26 +36,26 @@ public sealed partial class ProjectApiKeyOwner /// /// Initializes a new instance of the class. /// - /// - /// Represents an individual service account in a project. - /// /// /// `user` or `service_account` /// /// /// Represents an individual user in a project. /// + /// + /// Represents an individual service account in a project. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectApiKeyOwner( - global::tryAGI.OpenAI.ProjectServiceAccount? serviceAccount, global::tryAGI.OpenAI.ProjectApiKeyOwnerType? type, - global::tryAGI.OpenAI.ProjectUser? user) + global::tryAGI.OpenAI.ProjectUser? user, + global::tryAGI.OpenAI.ProjectServiceAccount? serviceAccount) { - this.ServiceAccount = serviceAccount; this.Type = type; this.User = user; + this.ServiceAccount = serviceAccount; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.Json.g.cs new file mode 100644 index 00000000..b2938886 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ProjectArchivedAt + { + /// + /// 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::tryAGI.OpenAI.ProjectArchivedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ProjectArchivedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.ProjectArchivedAt; + } + + /// + /// 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::tryAGI.OpenAI.ProjectArchivedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ProjectArchivedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ProjectArchivedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.g.cs new file mode 100644 index 00000000..ddd80cd2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectArchivedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ProjectArchivedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequest.g.cs index be992332..f9def72a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequest.g.cs @@ -15,6 +15,13 @@ public sealed partial class ProjectCreateRequest [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } + /// + /// Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("geography")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectCreateRequestGeographyJsonConverter))] + public global::tryAGI.OpenAI.ProjectCreateRequestGeography? Geography { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -27,13 +34,18 @@ public sealed partial class ProjectCreateRequest /// /// The friendly name of the project, this name appears in reports. /// + /// + /// Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectCreateRequest( - string name) + string name, + global::tryAGI.OpenAI.ProjectCreateRequestGeography? geography) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Geography = geography; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequestGeography.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequestGeography.g.cs new file mode 100644 index 00000000..3ba09396 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectCreateRequestGeography.g.cs @@ -0,0 +1,87 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + /// + public enum ProjectCreateRequestGeography + { + /// + /// + /// + Us, + /// + /// + /// + Eu, + /// + /// + /// + Jp, + /// + /// + /// + In, + /// + /// + /// + Kr, + /// + /// + /// + Ca, + /// + /// + /// + Au, + /// + /// + /// + Sg, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectCreateRequestGeographyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectCreateRequestGeography value) + { + return value switch + { + ProjectCreateRequestGeography.Us => "US", + ProjectCreateRequestGeography.Eu => "EU", + ProjectCreateRequestGeography.Jp => "JP", + ProjectCreateRequestGeography.In => "IN", + ProjectCreateRequestGeography.Kr => "KR", + ProjectCreateRequestGeography.Ca => "CA", + ProjectCreateRequestGeography.Au => "AU", + ProjectCreateRequestGeography.Sg => "SG", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectCreateRequestGeography? ToEnum(string value) + { + return value switch + { + "US" => ProjectCreateRequestGeography.Us, + "EU" => ProjectCreateRequestGeography.Eu, + "JP" => ProjectCreateRequestGeography.Jp, + "IN" => ProjectCreateRequestGeography.In, + "KR" => ProjectCreateRequestGeography.Kr, + "CA" => ProjectCreateRequestGeography.Ca, + "AU" => ProjectCreateRequestGeography.Au, + "SG" => ProjectCreateRequestGeography.Sg, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.Json.g.cs new file mode 100644 index 00000000..859ff22f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ProjectGroup + { + /// + /// 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::tryAGI.OpenAI.ProjectGroup? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ProjectGroup), + jsonSerializerContext) as global::tryAGI.OpenAI.ProjectGroup; + } + + /// + /// 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::tryAGI.OpenAI.ProjectGroup? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ProjectGroup), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ProjectGroup; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.g.cs new file mode 100644 index 00000000..8190458b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroup.g.cs @@ -0,0 +1,95 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Details about a group's membership in a project. + /// + public sealed partial class ProjectGroup + { + /// + /// Always `project.group`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectGroupObject Object { get; set; } + + /// + /// Identifier of the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ProjectId { get; set; } + + /// + /// Identifier of the group that has access to the project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GroupId { get; set; } + + /// + /// Display name of the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("group_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GroupName { get; set; } + + /// + /// Unix timestamp (in seconds) when the group was granted project access. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `project.group`. + /// + /// + /// Identifier of the project. + /// + /// + /// Identifier of the group that has access to the project. + /// + /// + /// Display name of the group. + /// + /// + /// Unix timestamp (in seconds) when the group was granted project access. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectGroup( + string projectId, + string groupId, + string groupName, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.ProjectGroupObject @object) + { + this.ProjectId = projectId ?? throw new global::System.ArgumentNullException(nameof(projectId)); + this.GroupId = groupId ?? throw new global::System.ArgumentNullException(nameof(groupId)); + this.GroupName = groupName ?? throw new global::System.ArgumentNullException(nameof(groupName)); + this.CreatedAt = createdAt; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectGroup() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.Json.g.cs new file mode 100644 index 00000000..efe4de33 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ProjectGroupDeletedResource + { + /// + /// 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::tryAGI.OpenAI.ProjectGroupDeletedResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ProjectGroupDeletedResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ProjectGroupDeletedResource; + } + + /// + /// 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::tryAGI.OpenAI.ProjectGroupDeletedResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ProjectGroupDeletedResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ProjectGroupDeletedResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.g.cs new file mode 100644 index 00000000..28a5e3b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResource.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after removing a group from a project. + /// + public sealed partial class ProjectGroupDeletedResource + { + /// + /// Always `project.group.deleted`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupDeletedResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject Object { get; set; } + + /// + /// Whether the group membership in the project was removed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `project.group.deleted`. + /// + /// + /// Whether the group membership in the project was removed. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectGroupDeletedResource( + bool deleted, + global::tryAGI.OpenAI.ProjectGroupDeletedResourceObject @object) + { + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectGroupDeletedResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResourceObject.g.cs new file mode 100644 index 00000000..05e58c8b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupDeletedResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `project.group.deleted`. + /// + public enum ProjectGroupDeletedResourceObject + { + /// + /// + /// + ProjectGroupDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectGroupDeletedResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectGroupDeletedResourceObject value) + { + return value switch + { + ProjectGroupDeletedResourceObject.ProjectGroupDeleted => "project.group.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectGroupDeletedResourceObject? ToEnum(string value) + { + return value switch + { + "project.group.deleted" => ProjectGroupDeletedResourceObject.ProjectGroupDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.Json.g.cs new file mode 100644 index 00000000..780fff12 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ProjectGroupListResource + { + /// + /// 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::tryAGI.OpenAI.ProjectGroupListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ProjectGroupListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ProjectGroupListResource; + } + + /// + /// 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::tryAGI.OpenAI.ProjectGroupListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ProjectGroupListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ProjectGroupListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.g.cs new file mode 100644 index 00000000..ee3e85ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Paginated list of groups that have access to a project. + /// + public sealed partial class ProjectGroupListResource + { + /// + /// Always `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectGroupListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectGroupListResourceObject Object { get; set; } + + /// + /// Project group memberships returned in the current page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// Whether additional project group memberships are available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Cursor to fetch the next page of results, or `null` when there are no more results. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Next { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `list`. + /// + /// + /// Project group memberships returned in the current page. + /// + /// + /// Whether additional project group memberships are available. + /// + /// + /// Cursor to fetch the next page of results, or `null` when there are no more results. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectGroupListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + string? next, + global::tryAGI.OpenAI.ProjectGroupListResourceObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Next = next ?? throw new global::System.ArgumentNullException(nameof(next)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectGroupListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.Json.g.cs new file mode 100644 index 00000000..b69205ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ProjectGroupListResourceNext + { + /// + /// 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::tryAGI.OpenAI.ProjectGroupListResourceNext? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ProjectGroupListResourceNext), + jsonSerializerContext) as global::tryAGI.OpenAI.ProjectGroupListResourceNext; + } + + /// + /// 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::tryAGI.OpenAI.ProjectGroupListResourceNext? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ProjectGroupListResourceNext), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ProjectGroupListResourceNext; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.g.cs new file mode 100644 index 00000000..1236a327 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceNext.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Cursor to fetch the next page of results, or `null` when there are no more results. + /// + public sealed partial class ProjectGroupListResourceNext + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceObject.g.cs new file mode 100644 index 00000000..f28e352e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `list`. + /// + public enum ProjectGroupListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectGroupListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectGroupListResourceObject value) + { + return value switch + { + ProjectGroupListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectGroupListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => ProjectGroupListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupObject.g.cs new file mode 100644 index 00000000..0638c365 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectGroupObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `project.group`. + /// + public enum ProjectGroupObject + { + /// + /// + /// + ProjectGroup, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectGroupObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectGroupObject value) + { + return value switch + { + ProjectGroupObject.ProjectGroup => "project.group", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectGroupObject? ToEnum(string value) + { + return value switch + { + "project.group" => ProjectGroupObject.ProjectGroup, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectListResponse.g.cs index 39050279..3d6e89d5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class ProjectListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectListResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class ProjectListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,25 +52,25 @@ public sealed partial class ProjectListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectListResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ProjectListResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimit.g.cs index 105bd532..02eaf0f3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimit.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ProjectRateLimit { /// - /// The maximum batch input tokens per day. Only present for relevant models. + /// The object type, which is always `project.rate_limit` /// - [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] - public int? Batch1DayMaxInputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectRateLimitObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectRateLimitObject Object { get; set; } /// /// The identifier, which can be referenced in API endpoints. @@ -22,22 +23,11 @@ public sealed partial class ProjectRateLimit public required string Id { get; set; } /// - /// The maximum audio megabytes per minute. Only present for relevant models. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] - public int? MaxAudioMegabytesPer1Minute { get; set; } - - /// - /// The maximum images per minute. Only present for relevant models. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_images_per_1_minute")] - public int? MaxImagesPer1Minute { get; set; } - - /// - /// The maximum requests per day. Only present for relevant models. + /// The model this rate limit applies to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] - public int? MaxRequestsPer1Day { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } /// /// The maximum requests per minute. @@ -54,18 +44,28 @@ public sealed partial class ProjectRateLimit public required int MaxTokensPer1Minute { get; set; } /// - /// The model this rate limit applies to. + /// The maximum images per minute. Only present for relevant models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_images_per_1_minute")] + public int? MaxImagesPer1Minute { get; set; } /// - /// The object type, which is always `project.rate_limit` + /// The maximum audio megabytes per minute. Only present for relevant models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectRateLimitObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectRateLimitObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] + public int? MaxAudioMegabytesPer1Minute { get; set; } + + /// + /// The maximum requests per day. Only present for relevant models. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] + public int? MaxRequestsPer1Day { get; set; } + + /// + /// The maximum batch input tokens per day. Only present for relevant models. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] + public int? Batch1DayMaxInputTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -76,20 +76,14 @@ public sealed partial class ProjectRateLimit /// /// Initializes a new instance of the class. /// - /// - /// The maximum batch input tokens per day. Only present for relevant models. + /// + /// The object type, which is always `project.rate_limit` /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// The maximum audio megabytes per minute. Only present for relevant models. - /// - /// - /// The maximum images per minute. Only present for relevant models. - /// - /// - /// The maximum requests per day. Only present for relevant models. + /// + /// The model this rate limit applies to. /// /// /// The maximum requests per minute. @@ -97,35 +91,41 @@ public sealed partial class ProjectRateLimit /// /// The maximum tokens per minute. /// - /// - /// The model this rate limit applies to. + /// + /// The maximum images per minute. Only present for relevant models. /// - /// - /// The object type, which is always `project.rate_limit` + /// + /// The maximum audio megabytes per minute. Only present for relevant models. + /// + /// + /// The maximum requests per day. Only present for relevant models. + /// + /// + /// The maximum batch input tokens per day. Only present for relevant models. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectRateLimit( string id, + string model, int maxRequestsPer1Minute, int maxTokensPer1Minute, - string model, - int? batch1DayMaxInputTokens, - int? maxAudioMegabytesPer1Minute, + global::tryAGI.OpenAI.ProjectRateLimitObject @object, int? maxImagesPer1Minute, + int? maxAudioMegabytesPer1Minute, int? maxRequestsPer1Day, - global::tryAGI.OpenAI.ProjectRateLimitObject @object) + int? batch1DayMaxInputTokens) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.MaxRequestsPer1Minute = maxRequestsPer1Minute; this.MaxTokensPer1Minute = maxTokensPer1Minute; - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; - this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; + this.Object = @object; this.MaxImagesPer1Minute = maxImagesPer1Minute; + this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; this.MaxRequestsPer1Day = maxRequestsPer1Day; - this.Object = @object; + this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitListResponse.g.cs index 5a8d6527..e35719ed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class ProjectRateLimitListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectRateLimitListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectRateLimitListResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class ProjectRateLimitListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectRateLimitListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectRateLimitListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,25 +52,25 @@ public sealed partial class ProjectRateLimitListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectRateLimitListResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ProjectRateLimitListResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitUpdateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitUpdateRequest.g.cs index 5390bf7d..8e216178 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitUpdateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectRateLimitUpdateRequest.g.cs @@ -9,16 +9,16 @@ namespace tryAGI.OpenAI public sealed partial class ProjectRateLimitUpdateRequest { /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// The maximum requests per minute. /// - [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] - public int? Batch1DayMaxInputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] + public int? MaxRequestsPer1Minute { get; set; } /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// The maximum tokens per minute. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] - public int? MaxAudioMegabytesPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens_per_1_minute")] + public int? MaxTokensPer1Minute { get; set; } /// /// The maximum images per minute. Only relevant for certain models. @@ -27,22 +27,22 @@ public sealed partial class ProjectRateLimitUpdateRequest public int? MaxImagesPer1Minute { get; set; } /// - /// The maximum requests per day. Only relevant for certain models. + /// The maximum audio megabytes per minute. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] - public int? MaxRequestsPer1Day { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_audio_megabytes_per_1_minute")] + public int? MaxAudioMegabytesPer1Minute { get; set; } /// - /// The maximum requests per minute. + /// The maximum requests per day. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] - public int? MaxRequestsPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_day")] + public int? MaxRequestsPer1Day { get; set; } /// - /// The maximum tokens per minute. + /// The maximum batch input tokens per day. Only relevant for certain models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens_per_1_minute")] - public int? MaxTokensPer1Minute { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("batch_1_day_max_input_tokens")] + public int? Batch1DayMaxInputTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,41 +53,41 @@ public sealed partial class ProjectRateLimitUpdateRequest /// /// Initializes a new instance of the class. /// - /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// + /// The maximum requests per minute. /// - /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// + /// The maximum tokens per minute. /// /// /// The maximum images per minute. Only relevant for certain models. /// + /// + /// The maximum audio megabytes per minute. Only relevant for certain models. + /// /// /// The maximum requests per day. Only relevant for certain models. /// - /// - /// The maximum requests per minute. - /// - /// - /// The maximum tokens per minute. + /// + /// The maximum batch input tokens per day. Only relevant for certain models. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectRateLimitUpdateRequest( - int? batch1DayMaxInputTokens, - int? maxAudioMegabytesPer1Minute, + int? maxRequestsPer1Minute, + int? maxTokensPer1Minute, int? maxImagesPer1Minute, + int? maxAudioMegabytesPer1Minute, int? maxRequestsPer1Day, - int? maxRequestsPer1Minute, - int? maxTokensPer1Minute) + int? batch1DayMaxInputTokens) { - this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; - this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; - this.MaxImagesPer1Minute = maxImagesPer1Minute; - this.MaxRequestsPer1Day = maxRequestsPer1Day; this.MaxRequestsPer1Minute = maxRequestsPer1Minute; this.MaxTokensPer1Minute = maxTokensPer1Minute; + this.MaxImagesPer1Minute = maxImagesPer1Minute; + this.MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute; + this.MaxRequestsPer1Day = maxRequestsPer1Day; + this.Batch1DayMaxInputTokens = batch1DayMaxInputTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccount.g.cs index 24293956..35a31246 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccount.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ProjectServiceAccount { /// - /// The Unix timestamp (in seconds) of when the service account was created + /// The object type, which is always `organization.project.service_account` /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectServiceAccountObject Object { get; set; } /// /// The identifier, which can be referenced in API endpoints @@ -30,13 +29,6 @@ public sealed partial class ProjectServiceAccount [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } - /// - /// The object type, which is always `organization.project.service_account` - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectServiceAccountObject Object { get; set; } - /// /// `owner` or `member` /// @@ -45,6 +37,14 @@ public sealed partial class ProjectServiceAccount [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ProjectServiceAccountRole Role { get; set; } + /// + /// The Unix timestamp (in seconds) of when the service account was created + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -54,8 +54,8 @@ public sealed partial class ProjectServiceAccount /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the service account was created + /// + /// The object type, which is always `organization.project.service_account` /// /// /// The identifier, which can be referenced in API endpoints @@ -63,26 +63,26 @@ public sealed partial class ProjectServiceAccount /// /// The name of the service account /// - /// - /// The object type, which is always `organization.project.service_account` - /// /// /// `owner` or `member` /// + /// + /// The Unix timestamp (in seconds) of when the service account was created + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectServiceAccount( - global::System.DateTimeOffset createdAt, string id, string name, global::tryAGI.OpenAI.ProjectServiceAccountRole role, + global::System.DateTimeOffset createdAt, global::tryAGI.OpenAI.ProjectServiceAccountObject @object) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Role = role; + this.CreatedAt = createdAt; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountApiKey.g.cs index f947ea2a..64390540 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountApiKey.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ProjectServiceAccountApiKey { /// - /// + /// The object type, which is always `organization.project.service_account.api_key` /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CreatedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountApiKeyObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectServiceAccountApiKeyObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("value")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string Value { get; set; } /// /// @@ -30,18 +30,18 @@ public sealed partial class ProjectServiceAccountApiKey public required string Name { get; set; } /// - /// The object type, which is always `organization.project.service_account.api_key` + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountApiKeyObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectServiceAccountApiKeyObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CreatedAt { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Value { get; set; } + public required string Id { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,27 +52,27 @@ public sealed partial class ProjectServiceAccountApiKey /// /// Initializes a new instance of the class. /// - /// - /// - /// /// /// The object type, which is always `organization.project.service_account.api_key` /// /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectServiceAccountApiKey( + string value, + string name, int createdAt, string id, - string name, - string value, global::tryAGI.OpenAI.ProjectServiceAccountApiKeyObject @object) { + this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountCreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountCreateResponse.g.cs index b94cbe64..079de55a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountCreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountCreateResponse.g.cs @@ -11,16 +11,9 @@ public sealed partial class ProjectServiceAccountCreateResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ProjectServiceAccountApiKey ApiKey { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CreatedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountCreateResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseObject Object { get; set; } /// /// @@ -36,13 +29,6 @@ public sealed partial class ProjectServiceAccountCreateResponse [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountCreateResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseObject Object { get; set; } - /// /// Service accounts can only have one role of type `member` /// @@ -50,6 +36,20 @@ public sealed partial class ProjectServiceAccountCreateResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountCreateResponseRoleJsonConverter))] public global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseRole Role { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ProjectServiceAccountApiKey ApiKey { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,29 +59,29 @@ public sealed partial class ProjectServiceAccountCreateResponse /// /// Initializes a new instance of the class. /// - /// - /// + /// /// /// - /// /// /// Service accounts can only have one role of type `member` /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectServiceAccountCreateResponse( - global::tryAGI.OpenAI.ProjectServiceAccountApiKey apiKey, - int createdAt, string id, string name, + int createdAt, + global::tryAGI.OpenAI.ProjectServiceAccountApiKey apiKey, global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseObject @object, global::tryAGI.OpenAI.ProjectServiceAccountCreateResponseRole role) { - this.ApiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; + this.ApiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); this.Object = @object; this.Role = role; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountDeleteResponse.g.cs index 904a91a4..4878ce71 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountDeleteResponse.g.cs @@ -11,9 +11,9 @@ public sealed partial class ProjectServiceAccountDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountDeleteResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponseObject Object { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class ProjectServiceAccountDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountDeleteResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,19 +38,19 @@ public sealed partial class ProjectServiceAccountDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectServiceAccountDeleteResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.ProjectServiceAccountDeleteResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountListResponse.g.cs index 66560558..077aca97 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectServiceAccountListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class ProjectServiceAccountListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectServiceAccountListResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class ProjectServiceAccountListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectServiceAccountListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectServiceAccountListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,25 +52,25 @@ public sealed partial class ProjectServiceAccountListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectServiceAccountListResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.ProjectServiceAccountListResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUser.g.cs index bd8d8b8f..f29a6ec9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUser.g.cs @@ -9,19 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ProjectUser { /// - /// The Unix timestamp (in seconds) of when the project was added. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("added_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset AddedAt { get; set; } - - /// - /// The email address of the user + /// The object type, which is always `organization.project.user` /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Email { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectUserObject Object { get; set; } /// /// The identifier, which can be referenced in API endpoints @@ -38,11 +30,11 @@ public sealed partial class ProjectUser public required string Name { get; set; } /// - /// The object type, which is always `organization.project.user` + /// The email address of the user /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectUserObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("email")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Email { get; set; } /// /// `owner` or `member` @@ -52,6 +44,14 @@ public sealed partial class ProjectUser [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.ProjectUserRole Role { get; set; } + /// + /// The Unix timestamp (in seconds) of when the project was added. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("added_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset AddedAt { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -61,11 +61,8 @@ public sealed partial class ProjectUser /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the project was added. - /// - /// - /// The email address of the user + /// + /// The object type, which is always `organization.project.user` /// /// /// The identifier, which can be referenced in API endpoints @@ -73,28 +70,31 @@ public sealed partial class ProjectUser /// /// The name of the user /// - /// - /// The object type, which is always `organization.project.user` + /// + /// The email address of the user /// /// /// `owner` or `member` /// + /// + /// The Unix timestamp (in seconds) of when the project was added. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectUser( - global::System.DateTimeOffset addedAt, - string email, string id, string name, + string email, global::tryAGI.OpenAI.ProjectUserRole role, + global::System.DateTimeOffset addedAt, global::tryAGI.OpenAI.ProjectUserObject @object) { - this.AddedAt = addedAt; - this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); this.Role = role; + this.AddedAt = addedAt; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserCreateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserCreateRequest.g.cs index 2efada7a..1c0dde13 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserCreateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserCreateRequest.g.cs @@ -9,19 +9,19 @@ namespace tryAGI.OpenAI public sealed partial class ProjectUserCreateRequest { /// - /// `owner` or `member` + /// The ID of the user. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserCreateRequestRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ProjectUserCreateRequestRole Role { get; set; } + public required string UserId { get; set; } /// - /// The ID of the user. + /// `owner` or `member` /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserCreateRequestRoleJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string UserId { get; set; } + public required global::tryAGI.OpenAI.ProjectUserCreateRequestRole Role { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -32,21 +32,21 @@ public sealed partial class ProjectUserCreateRequest /// /// Initializes a new instance of the class. /// - /// - /// `owner` or `member` - /// /// /// The ID of the user. /// + /// + /// `owner` or `member` + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectUserCreateRequest( - global::tryAGI.OpenAI.ProjectUserCreateRequestRole role, - string userId) + string userId, + global::tryAGI.OpenAI.ProjectUserCreateRequestRole role) { - this.Role = role; this.UserId = userId ?? throw new global::System.ArgumentNullException(nameof(userId)); + this.Role = role; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserDeleteResponse.g.cs index 02b85125..ee440e61 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserDeleteResponse.g.cs @@ -11,9 +11,9 @@ public sealed partial class ProjectUserDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserDeleteResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.ProjectUserDeleteResponseObject Object { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class ProjectUserDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ProjectUserDeleteResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.ProjectUserDeleteResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,19 +38,19 @@ public sealed partial class ProjectUserDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectUserDeleteResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.ProjectUserDeleteResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserListResponse.g.cs index f45976a1..8f62b2c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ProjectUserListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class ProjectUserListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("object")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + public required string Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class ProjectUserListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Object { get; set; } + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,26 +52,26 @@ public sealed partial class ProjectUserListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ProjectUserListResponse( + string @object, global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, - string @object) + bool hasMore) { + this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); - this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); + this.HasMore = hasMore; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Prompt2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Prompt2.g.cs index 5452a197..5a0727e5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Prompt2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Prompt2.g.cs @@ -4,70 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// ///
public sealed partial class Prompt2 { - /// - /// The unique identifier of the prompt template to use. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Optional map of values to substitute in for variables in your
- /// prompt. The substitution values can either be strings, or other
- /// Response input types like images or files. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - public object? Variables { get; set; } - - /// - /// Optional version of the prompt template. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("version")] - public string? Version { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The unique identifier of the prompt template to use. - /// - /// - /// Optional map of values to substitute in for variables in your
- /// prompt. The substitution values can either be strings, or other
- /// Response input types like images or files. - /// - /// - /// Optional version of the prompt template. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Prompt2( - string id, - object? variables, - string? version) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Variables = variables; - this.Version = version; - } - - /// - /// Initializes a new instance of the class. - /// - public Prompt2() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.Json.g.cs new file mode 100644 index 00000000..3325c2ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PromptVariant1 + { + /// + /// 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::tryAGI.OpenAI.PromptVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PromptVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.PromptVariant1; + } + + /// + /// 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::tryAGI.OpenAI.PromptVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PromptVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PromptVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.g.cs new file mode 100644 index 00000000..a06a923f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Reference to a prompt template and its variables.
+ /// [Learn more](/docs/guides/text?api-mode=responses#reusable-prompts). + ///
+ public sealed partial class PromptVariant1 + { + /// + /// The unique identifier of the prompt template to use. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public string? Version { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("variables")] + public object? Variables { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier of the prompt template to use. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PromptVariant1( + string id, + string? version, + object? variables) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Version = version; + this.Variables = variables; + } + + /// + /// Initializes a new instance of the class. + /// + public PromptVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.Json.g.cs new file mode 100644 index 00000000..8c40c232 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PromptVariant1Version + { + /// + /// 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::tryAGI.OpenAI.PromptVariant1Version? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PromptVariant1Version), + jsonSerializerContext) as global::tryAGI.OpenAI.PromptVariant1Version; + } + + /// + /// 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::tryAGI.OpenAI.PromptVariant1Version? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PromptVariant1Version), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PromptVariant1Version; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.g.cs new file mode 100644 index 00000000..1e69ce22 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PromptVariant1Version.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class PromptVariant1Version + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.Json.g.cs new file mode 100644 index 00000000..d60a32d4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicAssignOrganizationGroupRoleBody + { + /// + /// 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::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody; + } + + /// + /// 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::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.g.cs new file mode 100644 index 00000000..1231e36f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicAssignOrganizationGroupRoleBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for assigning a role to a group or user. + /// + public sealed partial class PublicAssignOrganizationGroupRoleBody + { + /// + /// Identifier of the role to assign. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string RoleId { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the role to assign. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PublicAssignOrganizationGroupRoleBody( + string roleId) + { + this.RoleId = roleId ?? throw new global::System.ArgumentNullException(nameof(roleId)); + } + + /// + /// Initializes a new instance of the class. + /// + public PublicAssignOrganizationGroupRoleBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.Json.g.cs new file mode 100644 index 00000000..546d585e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicCreateOrganizationRoleBody + { + /// + /// 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::tryAGI.OpenAI.PublicCreateOrganizationRoleBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody; + } + + /// + /// 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::tryAGI.OpenAI.PublicCreateOrganizationRoleBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.g.cs new file mode 100644 index 00000000..156f3553 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBody.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for creating a custom role. + /// + public sealed partial class PublicCreateOrganizationRoleBody + { + /// + /// Unique name for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string RoleName { get; set; } + + /// + /// Permissions to grant to the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Permissions { get; set; } + + /// + /// Optional description of the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique name for the role. + /// + /// + /// Permissions to grant to the role. + /// + /// + /// Optional description of the role. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PublicCreateOrganizationRoleBody( + string roleName, + global::System.Collections.Generic.IList permissions, + string? description) + { + this.RoleName = roleName ?? throw new global::System.ArgumentNullException(nameof(roleName)); + this.Permissions = permissions ?? throw new global::System.ArgumentNullException(nameof(permissions)); + this.Description = description; + } + + /// + /// Initializes a new instance of the class. + /// + public PublicCreateOrganizationRoleBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.Json.g.cs new file mode 100644 index 00000000..7089bb06 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicCreateOrganizationRoleBodyDescription + { + /// + /// 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::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription; + } + + /// + /// 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::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicCreateOrganizationRoleBodyDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.g.cs new file mode 100644 index 00000000..23efb115 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicCreateOrganizationRoleBodyDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional description of the role. + /// + public sealed partial class PublicCreateOrganizationRoleBodyDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.Json.g.cs new file mode 100644 index 00000000..ae486e83 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicRoleListResource + { + /// + /// 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::tryAGI.OpenAI.PublicRoleListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicRoleListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicRoleListResource; + } + + /// + /// 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::tryAGI.OpenAI.PublicRoleListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicRoleListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicRoleListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.g.cs new file mode 100644 index 00000000..c214bd98 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Paginated list of roles available on an organization or project. + /// + public sealed partial class PublicRoleListResource + { + /// + /// Always `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.PublicRoleListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.PublicRoleListResourceObject Object { get; set; } + + /// + /// Roles returned in the current page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// Whether more roles are available when paginating. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Cursor to fetch the next page of results, or `null` when there are no additional roles. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Next { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `list`. + /// + /// + /// Roles returned in the current page. + /// + /// + /// Whether more roles are available when paginating. + /// + /// + /// Cursor to fetch the next page of results, or `null` when there are no additional roles. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PublicRoleListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + string? next, + global::tryAGI.OpenAI.PublicRoleListResourceObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Next = next ?? throw new global::System.ArgumentNullException(nameof(next)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public PublicRoleListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.Json.g.cs new file mode 100644 index 00000000..4ce48640 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicRoleListResourceNext + { + /// + /// 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::tryAGI.OpenAI.PublicRoleListResourceNext? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicRoleListResourceNext), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicRoleListResourceNext; + } + + /// + /// 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::tryAGI.OpenAI.PublicRoleListResourceNext? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicRoleListResourceNext), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicRoleListResourceNext; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.g.cs new file mode 100644 index 00000000..2fe30bb9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceNext.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Cursor to fetch the next page of results, or `null` when there are no additional roles. + /// + public sealed partial class PublicRoleListResourceNext + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceObject.g.cs new file mode 100644 index 00000000..2517a6ab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicRoleListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `list`. + /// + public enum PublicRoleListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class PublicRoleListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this PublicRoleListResourceObject value) + { + return value switch + { + PublicRoleListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static PublicRoleListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => PublicRoleListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.Json.g.cs new file mode 100644 index 00000000..bdbb325e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicUpdateOrganizationRoleBody + { + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody; + } + + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.g.cs new file mode 100644 index 00000000..13370f6f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBody.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for updating an existing role. + /// + public sealed partial class PublicUpdateOrganizationRoleBody + { + /// + /// Updated set of permissions for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions")] + public global::System.Collections.Generic.IList? Permissions { get; set; } + + /// + /// New description for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// New name for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role_name")] + public string? RoleName { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Updated set of permissions for the role. + /// + /// + /// New description for the role. + /// + /// + /// New name for the role. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PublicUpdateOrganizationRoleBody( + global::System.Collections.Generic.IList? permissions, + string? description, + string? roleName) + { + this.Permissions = permissions; + this.Description = description; + this.RoleName = roleName; + } + + /// + /// Initializes a new instance of the class. + /// + public PublicUpdateOrganizationRoleBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.Json.g.cs new file mode 100644 index 00000000..fc350d3b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicUpdateOrganizationRoleBodyDescription + { + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription; + } + + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.g.cs new file mode 100644 index 00000000..4cc7a482 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// New description for the role. + /// + public sealed partial class PublicUpdateOrganizationRoleBodyDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.Json.g.cs new file mode 100644 index 00000000..d86c290e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicUpdateOrganizationRoleBodyPermissions + { + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions; + } + + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyPermissions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.g.cs new file mode 100644 index 00000000..24b4eb6f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyPermissions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Updated set of permissions for the role. + /// + public sealed partial class PublicUpdateOrganizationRoleBodyPermissions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.Json.g.cs new file mode 100644 index 00000000..7bc2685f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class PublicUpdateOrganizationRoleBodyRoleName + { + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName), + jsonSerializerContext) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName; + } + + /// + /// 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::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBodyRoleName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.g.cs new file mode 100644 index 00000000..a077cddd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.PublicUpdateOrganizationRoleBodyRoleName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// New name for the role. + /// + public sealed partial class PublicUpdateOrganizationRoleBodyRoleName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankingOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankingOptions.g.cs index 0ffc78c1..502bb85a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankingOptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankingOptions.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class RankingOptions { /// - /// + /// The ranker to use for the file search. /// [global::System.Text.Json.Serialization.JsonPropertyName("ranker")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RankerVersionTypeJsonConverter))] @@ -21,6 +21,12 @@ public sealed partial class RankingOptions [global::System.Text.Json.Serialization.JsonPropertyName("score_threshold")] public double? ScoreThreshold { get; set; } + /// + /// Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hybrid_search")] + public global::tryAGI.OpenAI.HybridSearchOptions? HybridSearch { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,19 +36,26 @@ public sealed partial class RankingOptions /// /// Initializes a new instance of the class. /// - /// + /// + /// The ranker to use for the file search. + /// /// /// The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. /// + /// + /// Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RankingOptions( global::tryAGI.OpenAI.RankerVersionType? ranker, - double? scoreThreshold) + double? scoreThreshold, + global::tryAGI.OpenAI.HybridSearchOptions? hybridSearch) { this.Ranker = ranker; this.ScoreThreshold = scoreThreshold; + this.HybridSearch = hybridSearch; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.Json.g.cs new file mode 100644 index 00000000..e9a41337 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RateLimitsParam + { + /// + /// 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::tryAGI.OpenAI.RateLimitsParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RateLimitsParam), + jsonSerializerContext) as global::tryAGI.OpenAI.RateLimitsParam; + } + + /// + /// 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::tryAGI.OpenAI.RateLimitsParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RateLimitsParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RateLimitsParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.g.cs new file mode 100644 index 00000000..e2632e30 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RateLimitsParam.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls request rate limits for the session. + /// + public sealed partial class RateLimitsParam + { + /// + /// Maximum number of requests allowed per minute for the session. Defaults to 10. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_1_minute")] + public int? MaxRequestsPer1Minute { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Maximum number of requests allowed per minute for the session. Defaults to 10. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RateLimitsParam( + int? maxRequestsPer1Minute) + { + this.MaxRequestsPer1Minute = maxRequestsPer1Minute; + } + + /// + /// Initializes a new instance of the class. + /// + public RateLimitsParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormats.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormats.g.cs index eabb0f10..d1733f7c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormats.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormats.g.cs @@ -13,137 +13,136 @@ namespace tryAGI.OpenAI /// The PCM audio format. Only a 24kHz sample rate is supported. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? Value1 { get; init; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? PcmAudioFormat { get; init; } #else - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? Value1 { get; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? PcmAudioFormat { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PcmAudioFormat))] #endif - public bool IsValue1 => Value1 != null; + public bool IsPcmAudioFormat => PcmAudioFormat != null; /// - /// - /// - public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1 value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1?)value); - - /// - /// + /// The G.711 μ-law format. /// - public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1?(RealtimeAudioFormats @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? PcmuAudioFormat { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? PcmuAudioFormat { get; } +#endif /// /// /// - public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PcmuAudioFormat))] +#endif + public bool IsPcmuAudioFormat => PcmuAudioFormat != null; /// - /// The G.711 μ-law format. + /// The G.711 A-law format. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? Value2 { get; init; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? PcmaAudioFormat { get; init; } #else - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? Value2 { get; } + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? PcmaAudioFormat { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PcmaAudioFormat))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsPcmaAudioFormat => PcmaAudioFormat != null; /// /// /// - public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2 value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2?)value); + public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2?(RealtimeAudioFormats @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat?(RealtimeAudioFormats @this) => @this.PcmAudioFormat; /// /// /// - public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? value) + public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? value) { - Value2 = value; + PcmAudioFormat = value; } /// - /// The G.711 A-law format. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? Value3 { get; } -#endif + public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat?(RealtimeAudioFormats @this) => @this.PcmuAudioFormat; + + /// + /// + /// + public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? value) + { + PcmuAudioFormat = value; + } /// /// /// - public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3 value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3?)value); + public static implicit operator RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat value) => new RealtimeAudioFormats((global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3?(RealtimeAudioFormats @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat?(RealtimeAudioFormats @this) => @this.PcmaAudioFormat; /// /// /// - public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? value) + public RealtimeAudioFormats(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? value) { - Value3 = value; + PcmaAudioFormat = value; } /// /// /// public RealtimeAudioFormats( - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? value1, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? value2, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? value3 + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? pcmAudioFormat, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? pcmuAudioFormat, + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? pcmaAudioFormat ) { - Value1 = value1; - Value2 = value2; - Value3 = value3; + PcmAudioFormat = pcmAudioFormat; + PcmuAudioFormat = pcmuAudioFormat; + PcmaAudioFormat = pcmaAudioFormat; } /// /// /// public object? Object => - Value3 as object ?? - Value2 as object ?? - Value1 as object + PcmaAudioFormat as object ?? + PcmuAudioFormat as object ?? + PcmAudioFormat as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() + PcmAudioFormat?.ToString() ?? + PcmuAudioFormat?.ToString() ?? + PcmaAudioFormat?.ToString() ; /// @@ -151,16 +150,16 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3; + return IsPcmAudioFormat || IsPcmuAudioFormat || IsPcmaAudioFormat; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, + global::System.Func? pcmAudioFormat = null, + global::System.Func? pcmuAudioFormat = null, + global::System.Func? pcmaAudioFormat = null, bool validate = true) { if (validate) @@ -168,17 +167,17 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsPcmAudioFormat && pcmAudioFormat != null) { - return value1(Value1!); + return pcmAudioFormat(PcmAudioFormat!); } - else if (IsValue2 && value2 != null) + else if (IsPcmuAudioFormat && pcmuAudioFormat != null) { - return value2(Value2!); + return pcmuAudioFormat(PcmuAudioFormat!); } - else if (IsValue3 && value3 != null) + else if (IsPcmaAudioFormat && pcmaAudioFormat != null) { - return value3(Value3!); + return pcmaAudioFormat(PcmaAudioFormat!); } return default(TResult); @@ -188,9 +187,9 @@ public bool Validate() /// ///
public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, + global::System.Action? pcmAudioFormat = null, + global::System.Action? pcmuAudioFormat = null, + global::System.Action? pcmaAudioFormat = null, bool validate = true) { if (validate) @@ -198,17 +197,17 @@ public void Match( Validate(); } - if (IsValue1) + if (IsPcmAudioFormat) { - value1?.Invoke(Value1!); + pcmAudioFormat?.Invoke(PcmAudioFormat!); } - else if (IsValue2) + else if (IsPcmuAudioFormat) { - value2?.Invoke(Value2!); + pcmuAudioFormat?.Invoke(PcmuAudioFormat!); } - else if (IsValue3) + else if (IsPcmaAudioFormat) { - value3?.Invoke(Value3!); + pcmaAudioFormat?.Invoke(PcmaAudioFormat!); } } @@ -219,12 +218,12 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), - Value2, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), - Value3, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), + PcmAudioFormat, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), + PcmuAudioFormat, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), + PcmaAudioFormat, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -241,9 +240,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RealtimeAudioFormats 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(PcmAudioFormat, other.PcmAudioFormat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PcmuAudioFormat, other.PcmuAudioFormat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PcmaAudioFormat, other.PcmaAudioFormat) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.Json.g.cs deleted file mode 100644 index 0d44e2b9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeAudioFormatsDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.g.cs deleted file mode 100644 index a645d726..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RealtimeAudioFormatsDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeAudioFormatsDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeAudioFormatsDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.Json.g.cs new file mode 100644 index 00000000..a5019d40 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeAudioFormatsPcmAudioFormat + { + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.g.cs new file mode 100644 index 00000000..c81d5ff9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormat.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The PCM audio format. Only a 24kHz sample rate is supported. + /// + public sealed partial class RealtimeAudioFormatsPcmAudioFormat + { + /// + /// The audio format. Always `audio/pcm`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmAudioFormatTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType? Type { get; set; } + + /// + /// The sample rate of the audio. Always `24000`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate")] + public int? Rate { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The audio format. Always `audio/pcm`. + /// + /// + /// The sample rate of the audio. Always `24000`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeAudioFormatsPcmAudioFormat( + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmAudioFormatType? type, + int? rate) + { + this.Type = type; + this.Rate = rate; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeAudioFormatsPcmAudioFormat() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormatType.g.cs new file mode 100644 index 00000000..35c76b88 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmAudioFormatType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The audio format. Always `audio/pcm`. + /// + public enum RealtimeAudioFormatsPcmAudioFormatType + { + /// + /// + /// + AudioPcm, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeAudioFormatsPcmAudioFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeAudioFormatsPcmAudioFormatType value) + { + return value switch + { + RealtimeAudioFormatsPcmAudioFormatType.AudioPcm => "audio/pcm", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeAudioFormatsPcmAudioFormatType? ToEnum(string value) + { + return value switch + { + "audio/pcm" => RealtimeAudioFormatsPcmAudioFormatType.AudioPcm, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.Json.g.cs new file mode 100644 index 00000000..1b573182 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeAudioFormatsPcmaAudioFormat + { + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.g.cs new file mode 100644 index 00000000..b886874b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormat.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The G.711 A-law format. + /// + public sealed partial class RealtimeAudioFormatsPcmaAudioFormat + { + /// + /// The audio format. Always `audio/pcma`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmaAudioFormatTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The audio format. Always `audio/pcma`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeAudioFormatsPcmaAudioFormat( + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmaAudioFormatType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeAudioFormatsPcmaAudioFormat() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormatType.g.cs new file mode 100644 index 00000000..dee26bdb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmaAudioFormatType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The audio format. Always `audio/pcma`. + /// + public enum RealtimeAudioFormatsPcmaAudioFormatType + { + /// + /// + /// + AudioPcma, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeAudioFormatsPcmaAudioFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeAudioFormatsPcmaAudioFormatType value) + { + return value switch + { + RealtimeAudioFormatsPcmaAudioFormatType.AudioPcma => "audio/pcma", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeAudioFormatsPcmaAudioFormatType? ToEnum(string value) + { + return value switch + { + "audio/pcma" => RealtimeAudioFormatsPcmaAudioFormatType.AudioPcma, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.Json.g.cs new file mode 100644 index 00000000..d3ced867 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeAudioFormatsPcmuAudioFormat + { + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormat; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.g.cs new file mode 100644 index 00000000..07508885 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormat.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The G.711 μ-law format. + /// + public sealed partial class RealtimeAudioFormatsPcmuAudioFormat + { + /// + /// The audio format. Always `audio/pcmu`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsPcmuAudioFormatTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The audio format. Always `audio/pcmu`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeAudioFormatsPcmuAudioFormat( + global::tryAGI.OpenAI.RealtimeAudioFormatsPcmuAudioFormatType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeAudioFormatsPcmuAudioFormat() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormatType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormatType.g.cs new file mode 100644 index 00000000..c1b6f61d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsPcmuAudioFormatType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The audio format. Always `audio/pcmu`. + /// + public enum RealtimeAudioFormatsPcmuAudioFormatType + { + /// + /// + /// + AudioPcmu, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeAudioFormatsPcmuAudioFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeAudioFormatsPcmuAudioFormatType value) + { + return value switch + { + RealtimeAudioFormatsPcmuAudioFormatType.AudioPcmu => "audio/pcmu", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeAudioFormatsPcmuAudioFormatType? ToEnum(string value) + { + return value switch + { + "audio/pcmu" => RealtimeAudioFormatsPcmuAudioFormatType.AudioPcmu, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.Json.g.cs deleted file mode 100644 index 56ca463f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeAudioFormatsVariant1 - { - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant1? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.g.cs deleted file mode 100644 index 5b396c1c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The PCM audio format. Only a 24kHz sample rate is supported. - /// - public sealed partial class RealtimeAudioFormatsVariant1 - { - /// - /// The sample rate of the audio. Always `24000`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rate")] - public int? Rate { get; set; } - - /// - /// The audio format. Always `audio/pcm`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant1TypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The sample rate of the audio. Always `24000`. - /// - /// - /// The audio format. Always `audio/pcm`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeAudioFormatsVariant1( - int? rate, - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant1Type? type) - { - this.Rate = rate; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeAudioFormatsVariant1() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1Type.g.cs deleted file mode 100644 index 752e1020..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant1Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The audio format. Always `audio/pcm`. - /// - public enum RealtimeAudioFormatsVariant1Type - { - /// - /// - /// - AudioPcm, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RealtimeAudioFormatsVariant1TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RealtimeAudioFormatsVariant1Type value) - { - return value switch - { - RealtimeAudioFormatsVariant1Type.AudioPcm => "audio/pcm", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RealtimeAudioFormatsVariant1Type? ToEnum(string value) - { - return value switch - { - "audio/pcm" => RealtimeAudioFormatsVariant1Type.AudioPcm, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.Json.g.cs deleted file mode 100644 index bf2a03d0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeAudioFormatsVariant2 - { - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.g.cs deleted file mode 100644 index ab94be7b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The G.711 μ-law format. - /// - public sealed partial class RealtimeAudioFormatsVariant2 - { - /// - /// The audio format. Always `audio/pcmu`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant2TypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The audio format. Always `audio/pcmu`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeAudioFormatsVariant2( - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant2Type? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeAudioFormatsVariant2() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2Type.g.cs deleted file mode 100644 index 0ced4163..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant2Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The audio format. Always `audio/pcmu`. - /// - public enum RealtimeAudioFormatsVariant2Type - { - /// - /// - /// - AudioPcmu, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RealtimeAudioFormatsVariant2TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RealtimeAudioFormatsVariant2Type value) - { - return value switch - { - RealtimeAudioFormatsVariant2Type.AudioPcmu => "audio/pcmu", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RealtimeAudioFormatsVariant2Type? ToEnum(string value) - { - return value switch - { - "audio/pcmu" => RealtimeAudioFormatsVariant2Type.AudioPcmu, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.Json.g.cs deleted file mode 100644 index f563401e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeAudioFormatsVariant3 - { - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeAudioFormatsVariant3? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.g.cs deleted file mode 100644 index 8edf906b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The G.711 A-law format. - /// - public sealed partial class RealtimeAudioFormatsVariant3 - { - /// - /// The audio format. Always `audio/pcma`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsVariant3TypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The audio format. Always `audio/pcma`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeAudioFormatsVariant3( - global::tryAGI.OpenAI.RealtimeAudioFormatsVariant3Type? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeAudioFormatsVariant3() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3Type.g.cs deleted file mode 100644 index 8b13ccfe..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeAudioFormatsVariant3Type.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The audio format. Always `audio/pcma`. - /// - public enum RealtimeAudioFormatsVariant3Type - { - /// - /// - /// - AudioPcma, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RealtimeAudioFormatsVariant3TypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RealtimeAudioFormatsVariant3Type value) - { - return value switch - { - RealtimeAudioFormatsVariant3Type.AudioPcma => "audio/pcma", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RealtimeAudioFormatsVariant3Type? ToEnum(string value) - { - return value switch - { - "audio/pcma" => RealtimeAudioFormatsVariant3Type.AudioPcma, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemCreate.g.cs index f76695ab..4eda6eff 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemCreate.g.cs @@ -20,15 +20,11 @@ public sealed partial class RealtimeBetaClientEventConversationItemCreate public string? EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.create`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType Type { get; set; } /// /// The ID of the preceding item after which the new item will be inserted.
@@ -41,11 +37,15 @@ public sealed partial class RealtimeBetaClientEventConversationItemCreate public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.create`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemCreateTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,12 +59,8 @@ public sealed partial class RealtimeBetaClientEventConversationItemCreate /// /// Optional client-generated ID used to identify this event. /// - /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// + /// The event type, must be `conversation.item.create`. /// /// /// The ID of the preceding item after which the new item will be inserted.
@@ -73,8 +69,12 @@ public sealed partial class RealtimeBetaClientEventConversationItemCreate /// If set to an existing ID, it allows an item to be inserted mid-conversation. If the
/// ID cannot be found, an error will be returned and the item will not be added. /// - /// - /// The event type, must be `conversation.item.create`. + /// + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -82,13 +82,13 @@ public sealed partial class RealtimeBetaClientEventConversationItemCreate public RealtimeBetaClientEventConversationItemCreate( global::tryAGI.OpenAI.RealtimeConversationItem item, string? eventId, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType type) + global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemCreateType type, + string? previousItemId) { this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.EventId = eventId; - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemDelete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemDelete.g.cs index 3b6caa99..22eb6d32 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemDelete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemDelete.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeBetaClientEventConversationItemDelete [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// The ID of the item to delete. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.delete`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeBetaClientEventConversationItemDelete [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemDeleteTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemDeleteType Type { get; set; } + /// + /// The ID of the item to delete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeBetaClientEventConversationItemDelete /// /// Optional client-generated ID used to identify this event. /// - /// - /// The ID of the item to delete. - /// /// /// The event type, must be `conversation.item.delete`. /// + /// + /// The ID of the item to delete. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemRetrieve.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemRetrieve.g.cs index 79c92c7a..202ee5f9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemRetrieve.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemRetrieve.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeBetaClientEventConversationItemRetrieve [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// The ID of the item to retrieve. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.retrieve`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeBetaClientEventConversationItemRetrieve [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemRetrieveTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemRetrieveType Type { get; set; } + /// + /// The ID of the item to retrieve. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeBetaClientEventConversationItemRetrieve /// /// Optional client-generated ID used to identify this event. /// - /// - /// The ID of the item to retrieve. - /// /// /// The event type, must be `conversation.item.retrieve`. /// + /// + /// The ID of the item to retrieve. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemTruncate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemTruncate.g.cs index 1349667c..e65f86eb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemTruncate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventConversationItemTruncate.g.cs @@ -16,28 +16,19 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaClientEventConversationItemTruncate { - /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If
- /// the audio_end_ms is greater than the actual audio duration, the server
- /// will respond with an error. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int AudioEndMs { get; set; } - - /// - /// The index of the content part to truncate. Set this to 0. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - /// /// Optional client-generated ID used to identify this event. /// [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } + /// + /// The event type, must be `conversation.item.truncate`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemTruncateTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncateType Type { get; set; } + /// /// The ID of the assistant message item to truncate. Only assistant message
/// items can be truncated. @@ -47,11 +38,20 @@ public sealed partial class RealtimeBetaClientEventConversationItemTruncate public required string ItemId { get; set; } /// - /// The event type, must be `conversation.item.truncate`. + /// The index of the content part to truncate. Set this to 0. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventConversationItemTruncateTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncateType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } + + /// + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int AudioEndMs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -62,37 +62,37 @@ public sealed partial class RealtimeBetaClientEventConversationItemTruncate /// /// Initializes a new instance of the class. /// - /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If
- /// the audio_end_ms is greater than the actual audio duration, the server
- /// will respond with an error. - /// - /// - /// The index of the content part to truncate. Set this to 0. - /// /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `conversation.item.truncate`. + /// /// /// The ID of the assistant message item to truncate. Only assistant message
/// items can be truncated. /// - /// - /// The event type, must be `conversation.item.truncate`. + /// + /// The index of the content part to truncate. Set this to 0. + /// + /// + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaClientEventConversationItemTruncate( - int audioEndMs, - int contentIndex, string itemId, + int contentIndex, + int audioEndMs, string? eventId, global::tryAGI.OpenAI.RealtimeBetaClientEventConversationItemTruncateType type) { - this.AudioEndMs = audioEndMs; - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.AudioEndMs = audioEndMs; this.EventId = eventId; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventInputAudioBufferAppend.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventInputAudioBufferAppend.g.cs index 19393d64..98f47250 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventInputAudioBufferAppend.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventInputAudioBufferAppend.g.cs @@ -16,14 +16,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeBetaClientEventInputAudioBufferAppend { - /// - /// Base64-encoded audio bytes. This must be in the format specified by the
- /// `input_audio_format` field in the session configuration. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Audio { get; set; } - /// /// Optional client-generated ID used to identify this event. /// @@ -37,6 +29,14 @@ public sealed partial class RealtimeBetaClientEventInputAudioBufferAppend [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventInputAudioBufferAppendTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventInputAudioBufferAppendType Type { get; set; } + /// + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Audio { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -46,16 +46,16 @@ public sealed partial class RealtimeBetaClientEventInputAudioBufferAppend /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio bytes. This must be in the format specified by the
- /// `input_audio_format` field in the session configuration. - /// /// /// Optional client-generated ID used to identify this event. /// /// /// The event type, must be `input_audio_buffer.append`. /// + /// + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventOutputAudioBufferClear.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventOutputAudioBufferClear.g.cs index e77bc617..52747fcf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventOutputAudioBufferClear.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventOutputAudioBufferClear.g.cs @@ -4,11 +4,11 @@ namespace tryAGI.OpenAI { /// - /// **WebRTC Only:** Emit to cut off the current audio response. This will trigger the server to
- /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
- /// event should be preceded by a `response.cancel` client event to stop the
+ /// **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to
+ /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
+ /// event should be preceded by a `response.cancel` client event to stop the
/// generation of the current response.
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
public sealed partial class RealtimeBetaClientEventOutputAudioBufferClear { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCancel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCancel.g.cs index fef358e8..10741fd3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCancel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCancel.g.cs @@ -16,13 +16,6 @@ public sealed partial class RealtimeBetaClientEventResponseCancel [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// A specific response ID to cancel - if not provided, will cancel an
- /// in-progress response in the default conversation. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] - public string? ResponseId { get; set; } - /// /// The event type, must be `response.cancel`. /// @@ -30,6 +23,13 @@ public sealed partial class RealtimeBetaClientEventResponseCancel [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCancelTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancelType Type { get; set; } + /// + /// A specific response ID to cancel - if not provided, will cancel an
+ /// in-progress response in the default conversation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + public string? ResponseId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,24 +42,24 @@ public sealed partial class RealtimeBetaClientEventResponseCancel /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `response.cancel`. + /// /// /// A specific response ID to cancel - if not provided, will cancel an
/// in-progress response in the default conversation. /// - /// - /// The event type, must be `response.cancel`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaClientEventResponseCancel( string? eventId, - string? responseId, - global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancelType type) + global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCancelType type, + string? responseId) { this.EventId = eventId; - this.ResponseId = responseId; this.Type = type; + this.ResponseId = responseId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCreate.g.cs index c327d99d..6fecc47b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventResponseCreate.g.cs @@ -32,12 +32,6 @@ public sealed partial class RealtimeBetaClientEventResponseCreate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// Create a new Realtime response with these parameters - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? Response { get; set; } - /// /// The event type, must be `response.create`. /// @@ -45,6 +39,12 @@ public sealed partial class RealtimeBetaClientEventResponseCreate [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventResponseCreateTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreateType Type { get; set; } + /// + /// Create a new Realtime response with these parameters + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -57,23 +57,23 @@ public sealed partial class RealtimeBetaClientEventResponseCreate /// /// Optional client-generated ID used to identify this event. /// - /// - /// Create a new Realtime response with these parameters - /// /// /// The event type, must be `response.create`. /// + /// + /// Create a new Realtime response with these parameters + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaClientEventResponseCreate( string? eventId, - global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? response, - global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreateType type) + global::tryAGI.OpenAI.RealtimeBetaClientEventResponseCreateType type, + global::tryAGI.OpenAI.RealtimeBetaResponseCreateParams? response) { this.EventId = eventId; - this.Response = response; this.Type = type; + this.Response = response; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventSessionUpdate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventSessionUpdate.g.cs index 5ba62283..33dd8a7f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventSessionUpdate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventSessionUpdate.g.cs @@ -22,6 +22,13 @@ public sealed partial class RealtimeBetaClientEventSessionUpdate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } + /// + /// The event type, must be `session.update`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdateType Type { get; set; } + /// /// A new Realtime session configuration, with an ephemeral key. Default TTL
/// for keys is one minute. @@ -30,13 +37,6 @@ public sealed partial class RealtimeBetaClientEventSessionUpdate [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeSessionCreateRequest Session { get; set; } - /// - /// The event type, must be `session.update`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventSessionUpdateTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaClientEventSessionUpdateType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -49,13 +49,13 @@ public sealed partial class RealtimeBetaClientEventSessionUpdate /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `session.update`. + /// /// /// A new Realtime session configuration, with an ephemeral key. Default TTL
/// for keys is one minute. /// - /// - /// The event type, must be `session.update`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventTranscriptionSessionUpdate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventTranscriptionSessionUpdate.g.cs index 54a5c070..6bb64a20 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventTranscriptionSessionUpdate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaClientEventTranscriptionSessionUpdate.g.cs @@ -14,13 +14,6 @@ public sealed partial class RealtimeBetaClientEventTranscriptionSessionUpdate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// Realtime transcription session object configuration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest Session { get; set; } - /// /// The event type, must be `transcription_session.update`. /// @@ -28,6 +21,13 @@ public sealed partial class RealtimeBetaClientEventTranscriptionSessionUpdate [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaClientEventTranscriptionSessionUpdateTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaClientEventTranscriptionSessionUpdateType Type { get; set; } + /// + /// Realtime transcription session object configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest Session { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,12 +40,12 @@ public sealed partial class RealtimeBetaClientEventTranscriptionSessionUpdate /// /// Optional client-generated ID used to identify this event. /// - /// - /// Realtime transcription session object configuration. - /// /// /// The event type, must be `transcription_session.update`. /// + /// + /// Realtime transcription session object configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponse.g.cs index 259003ad..ca0c627e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponse.g.cs @@ -10,50 +10,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeBetaResponse { - /// - /// Which conversation the response is added to, determined by the `conversation`
- /// field in the `response.create` event. If `auto`, the response will be added to
- /// the default conversation and the value of `conversation_id` will be an id like
- /// `conv_1234`. If `none`, the response will not be added to any conversation and
- /// the value of `conversation_id` will be `null`. If responses are being triggered
- /// by server VAD, the response will be added to the default conversation, thus
- /// the `conversation_id` will be an id like `conv_1234`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")] - public string? ConversationId { get; set; } - /// /// The unique ID of the response. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls, that was used in this response. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The set of modalities the model used to respond. If there are multiple modalities,
- /// the model will pick one, for example if `modalities` is `["text", "audio"]`, the model
- /// could be responding in either text or audio. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] - public global::System.Collections.Generic.IList? Modalities { get; set; } - /// /// The object type, must be `realtime.response`. /// @@ -61,19 +23,6 @@ public sealed partial class RealtimeBetaResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseObjectJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaResponseObject? Object { get; set; } - /// - /// The list of output items generated by the response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] - public global::System.Collections.Generic.IList? Output { get; set; } - - /// - /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? OutputAudioFormat { get; set; } - /// /// The final status of the response (`completed`, `cancelled`, `failed`, or
/// `incomplete`, `in_progress`). @@ -89,10 +38,16 @@ public sealed partial class RealtimeBetaResponse public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetails? StatusDetails { get; set; } /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// The list of output items generated by the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public global::System.Collections.Generic.IList? Output { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Usage statistics for the Response, this will correspond to billing. A
@@ -104,6 +59,21 @@ public sealed partial class RealtimeBetaResponse public global::tryAGI.OpenAI.RealtimeBetaResponseUsage? Usage { get; set; } /// + /// Which conversation the response is added to, determined by the `conversation`
+ /// field in the `response.create` event. If `auto`, the response will be added to
+ /// the default conversation and the value of `conversation_id` will be an id like
+ /// `conv_1234`. If `none`, the response will not be added to any conversation and
+ /// the value of `conversation_id` will be `null`. If responses are being triggered
+ /// by server VAD, the response will be added to the default conversation, thus
+ /// the `conversation_id` will be an id like `conv_1234`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")] + public string? ConversationId { get; set; } + + /// + /// The voice the model used to respond.
+ /// Current voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
+ /// `shimmer`, and `verse`.
/// Example: ash ///
/// ash @@ -111,6 +81,35 @@ public sealed partial class RealtimeBetaResponse [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + /// + /// The set of modalities the model used to respond. If there are multiple modalities,
+ /// the model will pick one, for example if `modalities` is `["text", "audio"]`, the model
+ /// could be responding in either text or audio. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] + public global::System.Collections.Generic.IList? Modalities { get; set; } + + /// + /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseOutputAudioFormatJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? OutputAudioFormat { get; set; } + + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls, that was used in this response. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -120,43 +119,12 @@ public sealed partial class RealtimeBetaResponse /// /// Initializes a new instance of the class. /// - /// - /// Which conversation the response is added to, determined by the `conversation`
- /// field in the `response.create` event. If `auto`, the response will be added to
- /// the default conversation and the value of `conversation_id` will be an id like
- /// `conv_1234`. If `none`, the response will not be added to any conversation and
- /// the value of `conversation_id` will be `null`. If responses are being triggered
- /// by server VAD, the response will be added to the default conversation, thus
- /// the `conversation_id` will be an id like `conv_1234`. - /// /// /// The unique ID of the response. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls, that was used in this response. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The set of modalities the model used to respond. If there are multiple modalities,
- /// the model will pick one, for example if `modalities` is `["text", "audio"]`, the model
- /// could be responding in either text or audio. - /// /// /// The object type, must be `realtime.response`. /// - /// - /// The list of output items generated by the response. - /// - /// - /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// /// /// The final status of the response (`completed`, `cancelled`, `failed`, or
/// `incomplete`, `in_progress`). @@ -164,49 +132,77 @@ public sealed partial class RealtimeBetaResponse /// /// Additional details about the status. /// - /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// The list of output items generated by the response. /// + /// /// /// Usage statistics for the Response, this will correspond to billing. A
/// Realtime API session will maintain a conversation context and append new
/// Items to the Conversation, thus output from previous turns (text and
/// audio tokens) will become the input for later turns. /// + /// + /// Which conversation the response is added to, determined by the `conversation`
+ /// field in the `response.create` event. If `auto`, the response will be added to
+ /// the default conversation and the value of `conversation_id` will be an id like
+ /// `conv_1234`. If `none`, the response will not be added to any conversation and
+ /// the value of `conversation_id` will be `null`. If responses are being triggered
+ /// by server VAD, the response will be added to the default conversation, thus
+ /// the `conversation_id` will be an id like `conv_1234`. + /// /// + /// The voice the model used to respond.
+ /// Current voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
+ /// `shimmer`, and `verse`.
/// Example: ash /// + /// + /// The set of modalities the model used to respond. If there are multiple modalities,
+ /// the model will pick one, for example if `modalities` is `["text", "audio"]`, the model
+ /// could be responding in either text or audio. + /// + /// + /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + /// + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls, that was used in this response. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponse( - string? conversationId, string? id, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, - global::System.Collections.Generic.Dictionary? metadata, - global::System.Collections.Generic.IList? modalities, global::tryAGI.OpenAI.RealtimeBetaResponseObject? @object, - global::System.Collections.Generic.IList? output, - global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? outputAudioFormat, global::tryAGI.OpenAI.RealtimeBetaResponseStatus? status, global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetails? statusDetails, - double? temperature, + global::System.Collections.Generic.IList? output, + global::System.Collections.Generic.Dictionary? metadata, global::tryAGI.OpenAI.RealtimeBetaResponseUsage? usage, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + string? conversationId, + global::tryAGI.OpenAI.VoiceIdsShared? voice, + global::System.Collections.Generic.IList? modalities, + global::tryAGI.OpenAI.RealtimeBetaResponseOutputAudioFormat? outputAudioFormat, + double? temperature, + global::tryAGI.OpenAI.OneOf? maxOutputTokens) { - this.ConversationId = conversationId; this.Id = id; - this.MaxOutputTokens = maxOutputTokens; - this.Metadata = metadata; - this.Modalities = modalities; this.Object = @object; - this.Output = output; - this.OutputAudioFormat = outputAudioFormat; this.Status = status; this.StatusDetails = statusDetails; - this.Temperature = temperature; + this.Output = output; + this.Metadata = metadata; this.Usage = usage; + this.ConversationId = conversationId; this.Voice = voice; + this.Modalities = modalities; + this.OutputAudioFormat = outputAudioFormat; + this.Temperature = temperature; + this.MaxOutputTokens = maxOutputTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParams.g.cs index 4e8044f8..6b918532 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParams.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParams.g.cs @@ -11,24 +11,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaResponseCreateParams { /// - /// Controls which conversation the response is added to. Currently supports
- /// `auto` and `none`, with `auto` as the default value. The `auto` value
- /// means that the contents of the response will be added to the default
- /// conversation. Set this to `none` to create an out-of-band response which
- /// will not add items to default conversation. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Conversation { get; set; } - - /// - /// Input items to include in the prompt for the model. Using this field
- /// creates a new context for this Response instead of using the default
- /// conversation. An empty array `[]` will clear the context for this Response.
- /// Note that this can include references to items from the default conversation. + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input")] - public global::System.Collections.Generic.IList? Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] + public global::System.Collections.Generic.IList? Modalities { get; set; } /// /// The default system instructions (i.e. system message) prepended to model
@@ -47,31 +34,15 @@ public sealed partial class RealtimeBetaResponseCreateParams public string? Instructions { get; set; } /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] - public global::System.Collections.Generic.IList? Modalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? Voice { get; set; } /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. @@ -81,11 +52,19 @@ public sealed partial class RealtimeBetaResponseCreateParams public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsOutputAudioFormat? OutputAudioFormat { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// Tools (functions) available to the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// How the model chooses tools. Provide one of the string modes or force a specific
+ /// function/MCP tool.
+ /// Default Value: auto + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ToolChoice { get; set; } /// /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. @@ -94,27 +73,46 @@ public sealed partial class RealtimeBetaResponseCreateParams public double? Temperature { get; set; } /// - /// How the model chooses tools. Provide one of the string modes or force a specific
- /// function/MCP tool.
- /// Default Value: auto + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ToolChoice { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { get; set; } /// - /// Tools (functions) available to the model. + /// Controls which conversation the response is added to. Currently supports
+ /// `auto` and `none`, with `auto` as the default value. The `auto` value
+ /// means that the contents of the response will be added to the default
+ /// conversation. Set this to `none` to create an out-of-band response which
+ /// will not add items to default conversation. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Conversation { get; set; } /// - /// Example: ash + /// /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } + + /// + /// Input items to include in the prompt for the model. Using this field
+ /// creates a new context for this Response instead of using the default
+ /// conversation. An empty array `[]` will clear the context for this Response.
+ /// Note that this can include references to items from the default conversation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public global::System.Collections.Generic.IList? Input { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -125,18 +123,9 @@ public sealed partial class RealtimeBetaResponseCreateParams /// /// Initializes a new instance of the class. /// - /// - /// Controls which conversation the response is added to. Currently supports
- /// `auto` and `none`, with `auto` as the default value. The `auto` value
- /// means that the contents of the response will be added to the default
- /// conversation. Set this to `none` to create an out-of-band response which
- /// will not add items to default conversation. - /// - /// - /// Input items to include in the prompt for the model. Using this field
- /// creates a new context for this Response instead of using the default
- /// conversation. An empty array `[]` will clear the context for this Response.
- /// Note that this can include references to items from the default conversation. + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. /// /// /// The default system instructions (i.e. system message) prepended to model
@@ -151,73 +140,77 @@ public sealed partial class RealtimeBetaResponseCreateParams /// field is not set and are visible in the `session.created` event at the
/// start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. /// /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). - /// - /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// Tools (functions) available to the model. /// /// /// How the model chooses tools. Provide one of the string modes or force a specific
/// function/MCP tool.
/// Default Value: auto /// - /// - /// Tools (functions) available to the model. + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. /// - /// - /// Example: ash + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// + /// + /// Controls which conversation the response is added to. Currently supports
+ /// `auto` and `none`, with `auto` as the default value. The `auto` value
+ /// means that the contents of the response will be added to the default
+ /// conversation. Set this to `none` to create an out-of-band response which
+ /// will not add items to default conversation. + /// + /// + /// + /// + /// Input items to include in the prompt for the model. Using this field
+ /// creates a new context for this Response instead of using the default
+ /// conversation. An empty array `[]` will clear the context for this Response.
+ /// Note that this can include references to items from the default conversation. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseCreateParams( - global::tryAGI.OpenAI.AnyOf? conversation, - global::System.Collections.Generic.IList? input, - string? instructions, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, - global::System.Collections.Generic.Dictionary? metadata, global::System.Collections.Generic.IList? modalities, + string? instructions, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice, global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsOutputAudioFormat? outputAudioFormat, - global::tryAGI.OpenAI.Prompt2? prompt, - double? temperature, - global::tryAGI.OpenAI.AnyOf? toolChoice, global::System.Collections.Generic.IList? tools, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.OneOf? toolChoice, + double? temperature, + global::tryAGI.OpenAI.OneOf? maxOutputTokens, + global::tryAGI.OpenAI.OneOf? conversation, + global::System.Collections.Generic.Dictionary? metadata, + global::tryAGI.OpenAI.PromptVariant1? prompt, + global::System.Collections.Generic.IList? input) { - this.Conversation = conversation; - this.Input = input; + this.Modalities = modalities; this.Instructions = instructions; + this.Voice = voice; + this.OutputAudioFormat = outputAudioFormat; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.Temperature = temperature; this.MaxOutputTokens = maxOutputTokens; + this.Conversation = conversation; this.Metadata = metadata; - this.Modalities = modalities; - this.OutputAudioFormat = outputAudioFormat; this.Prompt = prompt; - this.Temperature = temperature; - this.ToolChoice = toolChoice; - this.Tools = tools; - this.Voice = voice; + this.Input = input; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParamsTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParamsTool.g.cs index 0222f274..b4f67416 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParamsTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseCreateParamsTool.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaResponseCreateParamsTool { /// - /// The description of the function, including guidance on when and how
- /// to call it, and guidance about what to tell the user when calling
- /// (if anything). + /// The type of the tool, i.e. `function`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsToolTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? Type { get; set; } /// /// The name of the function. @@ -23,17 +22,18 @@ public sealed partial class RealtimeBetaResponseCreateParamsTool public string? Name { get; set; } /// - /// Parameters of the function in JSON Schema. + /// The description of the function, including guidance on when and how
+ /// to call it, and guidance about what to tell the user when calling
+ /// (if anything). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] - public object? Parameters { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// - /// The type of the tool, i.e. `function`. + /// Parameters of the function in JSON Schema. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseCreateParamsToolTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public object? Parameters { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,33 +44,33 @@ public sealed partial class RealtimeBetaResponseCreateParamsTool /// /// Initializes a new instance of the class. /// + /// + /// The type of the tool, i.e. `function`. + /// + /// + /// The name of the function. + /// /// /// The description of the function, including guidance on when and how
/// to call it, and guidance about what to tell the user when calling
/// (if anything). /// - /// - /// The name of the function. - /// /// /// Parameters of the function in JSON Schema. /// - /// - /// The type of the tool, i.e. `function`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseCreateParamsTool( - string? description, + global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? type, string? name, - object? parameters, - global::tryAGI.OpenAI.RealtimeBetaResponseCreateParamsToolType? type) + string? description, + object? parameters) { - this.Description = description; + this.Type = type; this.Name = name; + this.Description = description; this.Parameters = parameters; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetails.g.cs index 33de7537..2ec004f9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetails.g.cs @@ -9,11 +9,13 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaResponseStatusDetails { /// - /// A description of the error that caused the response to fail,
- /// populated when the `status` is `failed`. + /// The type of error that caused the response to fail, corresponding
+ /// with the `status` field (`completed`, `cancelled`, `incomplete`,
+ /// `failed`). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? Type { get; set; } /// /// The reason the Response did not complete. For a `cancelled` Response,
@@ -27,13 +29,11 @@ public sealed partial class RealtimeBetaResponseStatusDetails public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsReason? Reason { get; set; } /// - /// The type of error that caused the response to fail, corresponding
- /// with the `status` field (`completed`, `cancelled`, `incomplete`,
- /// `failed`). + /// A description of the error that caused the response to fail,
+ /// populated when the `status` is `failed`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaResponseStatusDetailsTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,9 +44,10 @@ public sealed partial class RealtimeBetaResponseStatusDetails /// /// Initializes a new instance of the class. /// - /// - /// A description of the error that caused the response to fail,
- /// populated when the `status` is `failed`. + /// + /// The type of error that caused the response to fail, corresponding
+ /// with the `status` field (`completed`, `cancelled`, `incomplete`,
+ /// `failed`). /// /// /// The reason the Response did not complete. For a `cancelled` Response,
@@ -55,22 +56,21 @@ public sealed partial class RealtimeBetaResponseStatusDetails /// `incomplete` Response, one of `max_output_tokens` or `content_filter`
/// (the server-side safety filter activated and cut off the response). /// - /// - /// The type of error that caused the response to fail, corresponding
- /// with the `status` field (`completed`, `cancelled`, `incomplete`,
- /// `failed`). + /// + /// A description of the error that caused the response to fail,
+ /// populated when the `status` is `failed`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseStatusDetails( - global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? error, + global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? type, global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsReason? reason, - global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsType? type) + global::tryAGI.OpenAI.RealtimeBetaResponseStatusDetailsError? error) { - this.Error = error; - this.Reason = reason; this.Type = type; + this.Reason = reason; + this.Error = error; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsError.g.cs index fca8d279..d063e1b2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsError.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaResponseStatusDetailsError { - /// - /// Error code, if any. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } - /// /// The type of error. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] public string? Type { get; set; } + /// + /// Error code, if any. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +30,21 @@ public sealed partial class RealtimeBetaResponseStatusDetailsError /// /// Initializes a new instance of the class. /// - /// - /// Error code, if any. - /// /// /// The type of error. /// + /// + /// Error code, if any. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseStatusDetailsError( - string? code, - string? type) + string? type, + string? code) { - this.Code = code; this.Type = type; + this.Code = code; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsType.g.cs index 272e66c9..563c2123 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseStatusDetailsType.g.cs @@ -21,11 +21,11 @@ public enum RealtimeBetaResponseStatusDetailsType /// /// /// - Incomplete, + Failed, /// /// /// - Failed, + Incomplete, } /// @@ -42,8 +42,8 @@ public static string ToValueString(this RealtimeBetaResponseStatusDetailsType va { RealtimeBetaResponseStatusDetailsType.Completed => "completed", RealtimeBetaResponseStatusDetailsType.Cancelled => "cancelled", - RealtimeBetaResponseStatusDetailsType.Incomplete => "incomplete", RealtimeBetaResponseStatusDetailsType.Failed => "failed", + RealtimeBetaResponseStatusDetailsType.Incomplete => "incomplete", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -56,8 +56,8 @@ public static string ToValueString(this RealtimeBetaResponseStatusDetailsType va { "completed" => RealtimeBetaResponseStatusDetailsType.Completed, "cancelled" => RealtimeBetaResponseStatusDetailsType.Cancelled, - "incomplete" => RealtimeBetaResponseStatusDetailsType.Incomplete, "failed" => RealtimeBetaResponseStatusDetailsType.Failed, + "incomplete" => RealtimeBetaResponseStatusDetailsType.Incomplete, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsage.g.cs index a5afb622..e6301f65 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsage.g.cs @@ -12,10 +12,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaResponseUsage { /// - /// Details about the input tokens used in the Response. + /// The total number of tokens in the Response including input and output
+ /// text and audio tokens. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_token_details")] - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? InputTokenDetails { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + public int? TotalTokens { get; set; } /// /// The number of input tokens used in the Response, including text and
@@ -24,12 +25,6 @@ public sealed partial class RealtimeBetaResponseUsage [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] public int? InputTokens { get; set; } - /// - /// Details about the output tokens used in the Response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_token_details")] - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? OutputTokenDetails { get; set; } - /// /// The number of output tokens sent in the Response, including text and
/// audio tokens. @@ -38,11 +33,16 @@ public sealed partial class RealtimeBetaResponseUsage public int? OutputTokens { get; set; } /// - /// The total number of tokens in the Response including input and output
- /// text and audio tokens. + /// Details about the input tokens used in the Response. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] - public int? TotalTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_token_details")] + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? InputTokenDetails { get; set; } + + /// + /// Details about the output tokens used in the Response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_token_details")] + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? OutputTokenDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,39 +53,39 @@ public sealed partial class RealtimeBetaResponseUsage /// /// Initializes a new instance of the class. /// - /// - /// Details about the input tokens used in the Response. + /// + /// The total number of tokens in the Response including input and output
+ /// text and audio tokens. /// /// /// The number of input tokens used in the Response, including text and
/// audio tokens. /// - /// - /// Details about the output tokens used in the Response. - /// /// /// The number of output tokens sent in the Response, including text and
/// audio tokens. /// - /// - /// The total number of tokens in the Response including input and output
- /// text and audio tokens. + /// + /// Details about the input tokens used in the Response. + /// + /// + /// Details about the output tokens used in the Response. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseUsage( - global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? inputTokenDetails, + int? totalTokens, int? inputTokens, - global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? outputTokenDetails, int? outputTokens, - int? totalTokens) + global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetails? inputTokenDetails, + global::tryAGI.OpenAI.RealtimeBetaResponseUsageOutputTokenDetails? outputTokenDetails) { - this.InputTokenDetails = inputTokenDetails; + this.TotalTokens = totalTokens; this.InputTokens = inputTokens; - this.OutputTokenDetails = outputTokenDetails; this.OutputTokens = outputTokens; - this.TotalTokens = totalTokens; + this.InputTokenDetails = inputTokenDetails; + this.OutputTokenDetails = outputTokenDetails; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetails.g.cs index b549103d..f4551858 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetails.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaResponseUsageInputTokenDetails { - /// - /// The number of audio tokens used as input for the Response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] - public int? AudioTokens { get; set; } - /// /// The number of cached tokens used as input for the Response. /// @@ -21,10 +15,10 @@ public sealed partial class RealtimeBetaResponseUsageInputTokenDetails public int? CachedTokens { get; set; } /// - /// Details about the cached tokens used as input for the Response. + /// The number of text tokens used as input for the Response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens_details")] - public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? CachedTokensDetails { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] + public int? TextTokens { get; set; } /// /// The number of image tokens used as input for the Response. @@ -33,10 +27,16 @@ public sealed partial class RealtimeBetaResponseUsageInputTokenDetails public int? ImageTokens { get; set; } /// - /// The number of text tokens used as input for the Response. + /// The number of audio tokens used as input for the Response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] - public int? TextTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] + public int? AudioTokens { get; set; } + + /// + /// Details about the cached tokens used as input for the Response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens_details")] + public global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? CachedTokensDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -47,36 +47,36 @@ public sealed partial class RealtimeBetaResponseUsageInputTokenDetails /// /// Initializes a new instance of the class. /// - /// - /// The number of audio tokens used as input for the Response. - /// /// /// The number of cached tokens used as input for the Response. /// - /// - /// Details about the cached tokens used as input for the Response. + /// + /// The number of text tokens used as input for the Response. /// /// /// The number of image tokens used as input for the Response. /// - /// - /// The number of text tokens used as input for the Response. + /// + /// The number of audio tokens used as input for the Response. + /// + /// + /// Details about the cached tokens used as input for the Response. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseUsageInputTokenDetails( - int? audioTokens, int? cachedTokens, - global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? cachedTokensDetails, + int? textTokens, int? imageTokens, - int? textTokens) + int? audioTokens, + global::tryAGI.OpenAI.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails? cachedTokensDetails) { - this.AudioTokens = audioTokens; this.CachedTokens = cachedTokens; - this.CachedTokensDetails = cachedTokensDetails; - this.ImageTokens = imageTokens; this.TextTokens = textTokens; + this.ImageTokens = imageTokens; + this.AudioTokens = audioTokens; + this.CachedTokensDetails = cachedTokensDetails; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails.g.cs index dc3a1792..62d736cb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails.g.cs @@ -9,10 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails { /// - /// The number of cached audio tokens used as input for the Response. + /// The number of cached text tokens used as input for the Response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] - public int? AudioTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] + public int? TextTokens { get; set; } /// /// The number of cached image tokens used as input for the Response. @@ -21,10 +21,10 @@ public sealed partial class RealtimeBetaResponseUsageInputTokenDetailsCachedToke public int? ImageTokens { get; set; } /// - /// The number of cached text tokens used as input for the Response. + /// The number of cached audio tokens used as input for the Response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] - public int? TextTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] + public int? AudioTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -35,26 +35,26 @@ public sealed partial class RealtimeBetaResponseUsageInputTokenDetailsCachedToke /// /// Initializes a new instance of the class. /// - /// - /// The number of cached audio tokens used as input for the Response. + /// + /// The number of cached text tokens used as input for the Response. /// /// /// The number of cached image tokens used as input for the Response. /// - /// - /// The number of cached text tokens used as input for the Response. + /// + /// The number of cached audio tokens used as input for the Response. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseUsageInputTokenDetailsCachedTokensDetails( - int? audioTokens, + int? textTokens, int? imageTokens, - int? textTokens) + int? audioTokens) { - this.AudioTokens = audioTokens; - this.ImageTokens = imageTokens; this.TextTokens = textTokens; + this.ImageTokens = imageTokens; + this.AudioTokens = audioTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageOutputTokenDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageOutputTokenDetails.g.cs index ea0dc0a9..d762869e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageOutputTokenDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaResponseUsageOutputTokenDetails.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaResponseUsageOutputTokenDetails { - /// - /// The number of audio tokens used in the Response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] - public int? AudioTokens { get; set; } - /// /// The number of text tokens used in the Response. /// [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] public int? TextTokens { get; set; } + /// + /// The number of audio tokens used in the Response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] + public int? AudioTokens { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class RealtimeBetaResponseUsageOutputTokenDetails /// /// Initializes a new instance of the class. /// - /// - /// The number of audio tokens used in the Response. - /// /// /// The number of text tokens used in the Response. /// + /// + /// The number of audio tokens used in the Response. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaResponseUsageOutputTokenDetails( - int? audioTokens, - int? textTokens) + int? textTokens, + int? audioTokens) { - this.AudioTokens = audioTokens; this.TextTokens = textTokens; + this.AudioTokens = audioTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreated.g.cs index 73f1752d..5ce75eea 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreated.g.cs @@ -24,30 +24,28 @@ public sealed partial class RealtimeBetaServerEventConversationItemCreated public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.created`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemCreatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType Type { get; set; } /// - /// The ID of the preceding item in the Conversation context, allows the
- /// client to understand the order of the conversation. Can be `null` if the
- /// item has no predecessor. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.created`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemCreatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -61,6 +59,10 @@ public sealed partial class RealtimeBetaServerEventConversationItemCreated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.created`. + /// + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -68,27 +70,19 @@ public sealed partial class RealtimeBetaServerEventConversationItemCreated /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The ID of the preceding item in the Conversation context, allows the
- /// client to understand the order of the conversation. Can be `null` if the
- /// item has no predecessor. - /// - /// - /// The event type, must be `conversation.item.created`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemCreated( string eventId, global::tryAGI.OpenAI.RealtimeConversationItem item, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType type) + global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.Json.g.cs new file mode 100644 index 00000000..545d90be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventConversationItemCreatedPreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemCreatedPreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.g.cs new file mode 100644 index 00000000..948877fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemCreatedPreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventConversationItemCreatedPreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemDeleted.g.cs index 9eb69e16..47456020 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemDeleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemDeleted.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeBetaServerEventConversationItemDeleted [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the item that was deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.deleted`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeBetaServerEventConversationItemDeleted [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemDeletedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemDeletedType Type { get; set; } + /// + /// The ID of the item that was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeBetaServerEventConversationItemDeleted /// /// The unique ID of the server event. /// - /// - /// The ID of the item that was deleted. - /// /// /// The event type, must be `conversation.item.deleted`. /// + /// + /// The ID of the item that was deleted. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted.g.cs index eb038518..8c4a14bf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted.g.cs @@ -18,13 +18,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted { - /// - /// The index of the content part containing the audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - /// /// The unique ID of the server event. /// @@ -32,6 +25,14 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; } + /// /// The ID of the user message item containing the audio. /// @@ -40,10 +41,11 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra public required string ItemId { get; set; } /// - /// The log probabilities of the transcription. + /// The index of the content part containing the audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } /// /// The transcribed text. @@ -53,20 +55,18 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra public required string Transcript { get; set; } /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.completed`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } /// /// Usage statistics for the transcription. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Usage { get; set; } + public required global::tryAGI.OpenAI.OneOf Usage { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -77,25 +77,23 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part containing the audio. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. + /// /// /// The ID of the user message item containing the audio. /// - /// - /// The log probabilities of the transcription. + /// + /// The index of the content part containing the audio. /// /// /// The transcribed text. /// - /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.completed`. - /// + /// /// /// Usage statistics for the transcription. /// @@ -103,21 +101,21 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompleted( - int contentIndex, string eventId, string itemId, + int contentIndex, string transcript, - global::tryAGI.OpenAI.AnyOf usage, - global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType type) + global::tryAGI.OpenAI.OneOf usage, + global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedType type, + global::System.Collections.Generic.IList? logprobs) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); this.Usage = usage; - this.Logprobs = logprobs; this.Type = type; + this.Logprobs = logprobs; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs new file mode 100644 index 00000000..5fa8946e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs new file mode 100644 index 00000000..cbb19946 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionCompletedLogprobs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta.g.cs index 1ee0abf2..038e2e3c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta.g.cs @@ -8,18 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta { - /// - /// The index of the content part in the item's content array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - public int? ContentIndex { get; set; } - - /// - /// The text delta. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - public string? Delta { get; set; } - /// /// The unique ID of the server event. /// @@ -27,6 +15,13 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType Type { get; set; } + /// /// The ID of the item. /// @@ -35,17 +30,22 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra public required string ItemId { get; set; } /// - /// The log probabilities of the transcription. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + public int? ContentIndex { get; set; } /// - /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// The text delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public string? Delta { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,41 +56,39 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The text delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// /// /// The ID of the item. /// - /// - /// The log probabilities of the transcription. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// + /// The text delta. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemInputAudioTranscriptionDelta( string eventId, string itemId, + global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType type, int? contentIndex, string? delta, - global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaType type) + global::System.Collections.Generic.IList? logprobs) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; this.ContentIndex = contentIndex; this.Delta = delta; this.Logprobs = logprobs; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs new file mode 100644 index 00000000..9f8f2f8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs new file mode 100644 index 00000000..4259d5de --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionDeltaLogprobs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed.g.cs index 008a52fe..5c6a2946 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed.g.cs @@ -11,40 +11,40 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed { /// - /// The index of the content part containing the audio. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// Details of the transcription error. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.failed`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the user message item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ItemId { get; set; } /// - /// The ID of the user message item. + /// The index of the content part containing the audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.failed`. + /// Details of the transcription error. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -55,36 +55,36 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part containing the audio. - /// - /// - /// Details of the transcription error. - /// /// /// The unique ID of the server event. /// - /// - /// The ID of the user message item. - /// /// /// The event type, must be
/// `conversation.item.input_audio_transcription.failed`. /// + /// + /// The ID of the user message item. + /// + /// + /// The index of the content part containing the audio. + /// + /// + /// Details of the transcription error. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailed( - int contentIndex, - global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId, string itemId, + int contentIndex, + global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError error, global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedType type) { - this.ContentIndex = contentIndex; - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError.g.cs index a7d6dca6..f6fe7a52 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError { + /// + /// The type of error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + /// /// Error code, if any. /// @@ -26,12 +32,6 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra [global::System.Text.Json.Serialization.JsonPropertyName("param")] public string? Param { get; set; } - /// - /// The type of error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,6 +41,9 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Initializes a new instance of the class. /// + /// + /// The type of error. + /// /// /// Error code, if any. /// @@ -50,22 +53,19 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Parameter related to the error, if any. /// - /// - /// The type of error. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemInputAudioTranscriptionFailedError( + string? type, string? code, string? message, - string? param, - string? type) + string? param) { + this.Type = type; this.Code = code; this.Message = message; this.Param = param; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment.g.cs index ec91823f..41a0a319 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment.g.cs @@ -9,39 +9,46 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment { /// - /// The index of the input audio content part within the item. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// End time of the segment in seconds. + /// The event type, must be `conversation.item.input_audio_transcription.segment`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentType Type { get; set; } + + /// + /// The ID of the item containing the input audio content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required float End { get; set; } + public required string ItemId { get; set; } /// - /// The unique ID of the server event. + /// The index of the input audio content part within the item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required int ContentIndex { get; set; } /// - /// The segment identifier. + /// The text for this segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string Text { get; set; } /// - /// The ID of the item containing the input audio content. + /// The segment identifier. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required string Id { get; set; } /// /// The detected speaker label for this segment. @@ -58,18 +65,11 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra public required float Start { get; set; } /// - /// The text for this segment. + /// End time of the segment in seconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonPropertyName("end")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// The event type, must be `conversation.item.input_audio_transcription.segment`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentType Type { get; set; } + public required float End { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -80,55 +80,55 @@ public sealed partial class RealtimeBetaServerEventConversationItemInputAudioTra /// /// Initializes a new instance of the class. /// - /// - /// The index of the input audio content part within the item. - /// - /// - /// End time of the segment in seconds. - /// /// /// The unique ID of the server event. /// - /// - /// The segment identifier. + /// + /// The event type, must be `conversation.item.input_audio_transcription.segment`. /// /// /// The ID of the item containing the input audio content. /// + /// + /// The index of the input audio content part within the item. + /// + /// + /// The text for this segment. + /// + /// + /// The segment identifier. + /// /// /// The detected speaker label for this segment. /// /// /// Start time of the segment in seconds. /// - /// - /// The text for this segment. - /// - /// - /// The event type, must be `conversation.item.input_audio_transcription.segment`. + /// + /// End time of the segment in seconds. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegment( - int contentIndex, - float end, string eventId, - string id, string itemId, + int contentIndex, + string text, + string id, string speaker, float start, - string text, + float end, global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemInputAudioTranscriptionSegmentType type) { - this.ContentIndex = contentIndex; - this.End = end; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Speaker = speaker ?? throw new global::System.ArgumentNullException(nameof(speaker)); this.Start = start; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.End = end; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemRetrieved.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemRetrieved.g.cs index 32408262..afeabbe6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemRetrieved.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemRetrieved.g.cs @@ -15,6 +15,13 @@ public sealed partial class RealtimeBetaServerEventConversationItemRetrieved [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `conversation.item.retrieved`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemRetrievedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrievedType Type { get; set; } + /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -26,13 +33,6 @@ public sealed partial class RealtimeBetaServerEventConversationItemRetrieved [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } - /// - /// The event type, must be `conversation.item.retrieved`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemRetrievedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemRetrievedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class RealtimeBetaServerEventConversationItemRetrieved /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.retrieved`. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -52,9 +55,6 @@ public sealed partial class RealtimeBetaServerEventConversationItemRetrieved /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The event type, must be `conversation.item.retrieved`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemTruncated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemTruncated.g.cs index c1cdd26a..75031703 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemTruncated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventConversationItemTruncated.g.cs @@ -13,39 +13,39 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventConversationItemTruncated { /// - /// The duration up to which the audio was truncated, in milliseconds. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int AudioEndMs { get; set; } + public required string EventId { get; set; } /// - /// The index of the content part that was truncated. + /// The event type, must be `conversation.item.truncated`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemTruncatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncatedType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the assistant message item that was truncated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ItemId { get; set; } /// - /// The ID of the assistant message item that was truncated. + /// The index of the content part that was truncated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `conversation.item.truncated`. + /// The duration up to which the audio was truncated, in milliseconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventConversationItemTruncatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncatedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int AudioEndMs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,35 +56,35 @@ public sealed partial class RealtimeBetaServerEventConversationItemTruncated /// /// Initializes a new instance of the class. /// - /// - /// The duration up to which the audio was truncated, in milliseconds. - /// - /// - /// The index of the content part that was truncated. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.truncated`. + /// /// /// The ID of the assistant message item that was truncated. /// - /// - /// The event type, must be `conversation.item.truncated`. + /// + /// The index of the content part that was truncated. + /// + /// + /// The duration up to which the audio was truncated, in milliseconds. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventConversationItemTruncated( - int audioEndMs, - int contentIndex, string eventId, string itemId, + int contentIndex, + int audioEndMs, global::tryAGI.OpenAI.RealtimeBetaServerEventConversationItemTruncatedType type) { - this.AudioEndMs = audioEndMs; - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.AudioEndMs = audioEndMs; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventError.g.cs index 00563b6a..3849df70 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventError.g.cs @@ -10,13 +10,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaServerEventError { - /// - /// Details of the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError Error { get; set; } - /// /// The unique ID of the server event. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeBetaServerEventError [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventErrorTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventErrorType Type { get; set; } + /// + /// Details of the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError Error { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,25 +40,25 @@ public sealed partial class RealtimeBetaServerEventError /// /// Initializes a new instance of the class. /// - /// - /// Details of the error. - /// /// /// The unique ID of the server event. /// /// /// The event type, must be `error`. /// + /// + /// Details of the error. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventError( - global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError error, string eventId, + global::tryAGI.OpenAI.RealtimeBetaServerEventErrorError error, global::tryAGI.OpenAI.RealtimeBetaServerEventErrorType type) { - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorError.g.cs index 9e84a211..485bdc91 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorError.g.cs @@ -9,16 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventErrorError { /// - /// Error code, if any. + /// The type of error (e.g., "invalid_request_error", "server_error"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } /// - /// The event_id of the client event that caused the error, if applicable. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - public string? EventId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } /// /// A human-readable error message. @@ -28,17 +29,16 @@ public sealed partial class RealtimeBetaServerEventErrorError public required string Message { get; set; } /// - /// Parameter related to the error, if any. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("param")] public string? Param { get; set; } /// - /// The type of error (e.g., "invalid_request_error", "server_error"). + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + public string? EventId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,36 +49,30 @@ public sealed partial class RealtimeBetaServerEventErrorError /// /// Initializes a new instance of the class. /// - /// - /// Error code, if any. - /// - /// - /// The event_id of the client event that caused the error, if applicable. + /// + /// The type of error (e.g., "invalid_request_error", "server_error"). /// + /// /// /// A human-readable error message. /// - /// - /// Parameter related to the error, if any. - /// - /// - /// The type of error (e.g., "invalid_request_error", "server_error"). - /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventErrorError( - string message, string type, + string message, string? code, - string? eventId, - string? param) + string? param, + string? eventId) { - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); this.Code = code; - this.EventId = eventId; this.Param = param; + this.EventId = eventId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.Json.g.cs new file mode 100644 index 00000000..b4d75f1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventErrorErrorCode + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.g.cs new file mode 100644 index 00000000..cbc13d3f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventErrorErrorCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.Json.g.cs new file mode 100644 index 00000000..e6f431f2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventErrorErrorEventId + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorEventId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.g.cs new file mode 100644 index 00000000..c55fb517 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorEventId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventErrorErrorEventId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.Json.g.cs new file mode 100644 index 00000000..6cdf1aa3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventErrorErrorParam + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventErrorErrorParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.g.cs new file mode 100644 index 00000000..bed3e889 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventErrorErrorParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventErrorErrorParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommitted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommitted.g.cs index 3f23b927..235e1ea1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommitted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommitted.g.cs @@ -19,25 +19,24 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferCommitted public required string EventId { get; set; } /// - /// The ID of the user message item that will be created. + /// The event type, must be `input_audio_buffer.committed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferCommittedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType Type { get; set; } /// - /// The ID of the preceding item after which the new item will be inserted.
- /// Can be `null` if the item has no predecessor. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `input_audio_buffer.committed`. + /// The ID of the user message item that will be created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferCommittedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,29 +50,26 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferCommitted /// /// The unique ID of the server event. /// - /// - /// The ID of the user message item that will be created. - /// - /// - /// The ID of the preceding item after which the new item will be inserted.
- /// Can be `null` if the item has no predecessor. - /// /// /// The event type, must be `input_audio_buffer.committed`. /// + /// + /// + /// The ID of the user message item that will be created. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventInputAudioBufferCommitted( string eventId, string itemId, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType type) + global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs new file mode 100644 index 00000000..a9436b66 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.g.cs new file mode 100644 index 00000000..1bdf9960 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventInputAudioBufferCommittedPreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStarted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStarted.g.cs index 17f2fcb2..c829ca85 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStarted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStarted.g.cs @@ -16,6 +16,20 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStarted { + /// + /// The unique ID of the server event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EventId { get; set; } + + /// + /// The event type, must be `input_audio_buffer.speech_started`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferSpeechStartedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStartedType Type { get; set; } + /// /// Milliseconds from the start of all audio written to the buffer during the
/// session when speech was first detected. This will correspond to the
@@ -26,13 +40,6 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStarted [global::System.Text.Json.Serialization.JsonRequired] public required int AudioStartMs { get; set; } - /// - /// The unique ID of the server event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } - /// /// The ID of the user message item that will be created when speech stops. /// @@ -40,13 +47,6 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStarted [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The event type, must be `input_audio_buffer.speech_started`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferSpeechStartedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStartedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,32 +56,32 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStarted /// /// Initializes a new instance of the class. /// + /// + /// The unique ID of the server event. + /// + /// + /// The event type, must be `input_audio_buffer.speech_started`. + /// /// /// Milliseconds from the start of all audio written to the buffer during the
/// session when speech was first detected. This will correspond to the
/// beginning of audio sent to the model, and thus includes the
/// `prefix_padding_ms` configured in the Session. /// - /// - /// The unique ID of the server event. - /// /// /// The ID of the user message item that will be created when speech stops. /// - /// - /// The event type, must be `input_audio_buffer.speech_started`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventInputAudioBufferSpeechStarted( - int audioStartMs, string eventId, + int audioStartMs, string itemId, global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStartedType type) { - this.AudioStartMs = audioStartMs; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.AudioStartMs = audioStartMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStopped.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStopped.g.cs index a46993c6..1bd91342 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStopped.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventInputAudioBufferSpeechStopped.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStopped { + /// + /// The unique ID of the server event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EventId { get; set; } + + /// + /// The event type, must be `input_audio_buffer.speech_stopped`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferSpeechStoppedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStoppedType Type { get; set; } + /// /// Milliseconds since the session started when speech stopped. This will
/// correspond to the end of audio sent to the model, and thus includes the
@@ -19,13 +33,6 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStopped [global::System.Text.Json.Serialization.JsonRequired] public required int AudioEndMs { get; set; } - /// - /// The unique ID of the server event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } - /// /// The ID of the user message item that will be created. /// @@ -33,13 +40,6 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStopped [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The event type, must be `input_audio_buffer.speech_stopped`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventInputAudioBufferSpeechStoppedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStoppedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -49,31 +49,31 @@ public sealed partial class RealtimeBetaServerEventInputAudioBufferSpeechStopped /// /// Initializes a new instance of the class. /// + /// + /// The unique ID of the server event. + /// + /// + /// The event type, must be `input_audio_buffer.speech_stopped`. + /// /// /// Milliseconds since the session started when speech stopped. This will
/// correspond to the end of audio sent to the model, and thus includes the
/// `min_silence_duration_ms` configured in the Session. /// - /// - /// The unique ID of the server event. - /// /// /// The ID of the user message item that will be created. /// - /// - /// The event type, must be `input_audio_buffer.speech_stopped`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventInputAudioBufferSpeechStopped( - int audioEndMs, string eventId, + int audioEndMs, string itemId, global::tryAGI.OpenAI.RealtimeBetaServerEventInputAudioBufferSpeechStoppedType type) { - this.AudioEndMs = audioEndMs; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.AudioEndMs = audioEndMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsCompleted.g.cs index cde19fa0..6f452df1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsCompleted.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsCompleted [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.completed`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsCompleted [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsCompletedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsCompletedType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsCompleted /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.completed`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsFailed.g.cs index f0c6b64c..1c932ed8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsFailed.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsFailed [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.failed`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsFailed [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsFailedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsFailedType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsFailed /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.failed`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsInProgress.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsInProgress.g.cs index 92919c68..be81c970 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsInProgress.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventMCPListToolsInProgress.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsInProgress [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.in_progress`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsInProgress [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventMCPListToolsInProgressTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventMCPListToolsInProgressType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeBetaServerEventMCPListToolsInProgress /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.in_progress`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdated.g.cs index 9457df6f..d011663b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdated.g.cs @@ -18,13 +18,6 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// List of rate limit information. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList RateLimits { get; set; } - /// /// The event type, must be `rate_limits.updated`. /// @@ -32,6 +25,13 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedType Type { get; set; } + /// + /// List of rate limit information. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList RateLimits { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,12 +44,12 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdated /// /// The unique ID of the server event. /// - /// - /// List of rate limit information. - /// /// /// The event type, must be `rate_limits.updated`. /// + /// + /// List of rate limit information. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdatedRateLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdatedRateLimit.g.cs index eb922dd4..014e1c3a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdatedRateLimit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventRateLimitsUpdatedRateLimit.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeBetaServerEventRateLimitsUpdatedRateLimit { - /// - /// The maximum allowed value for the rate limit. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("limit")] - public int? Limit { get; set; } - /// /// The name of the rate limit (`requests`, `tokens`). /// @@ -21,6 +15,12 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdatedRateLimit [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventRateLimitsUpdatedRateLimitNameJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimitName? Name { get; set; } + /// + /// The maximum allowed value for the rate limit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + /// /// The remaining value before the limit is reached. /// @@ -42,12 +42,12 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdatedRateLimit /// /// Initializes a new instance of the class. /// - /// - /// The maximum allowed value for the rate limit. - /// /// /// The name of the rate limit (`requests`, `tokens`). /// + /// + /// The maximum allowed value for the rate limit. + /// /// /// The remaining value before the limit is reached. /// @@ -58,13 +58,13 @@ public sealed partial class RealtimeBetaServerEventRateLimitsUpdatedRateLimit [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventRateLimitsUpdatedRateLimit( - int? limit, global::tryAGI.OpenAI.RealtimeBetaServerEventRateLimitsUpdatedRateLimitName? name, + int? limit, int? remaining, double? resetSeconds) { - this.Limit = limit; this.Name = name; + this.Limit = limit; this.Remaining = remaining; this.ResetSeconds = resetSeconds; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDelta.g.cs index 937e1e34..54d7de3a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseAudioDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// Base64-encoded audio data delta. + /// The event type, must be `response.output_audio.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeBetaServerEventResponseAudioDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_audio.delta`. + /// Base64-encoded audio data delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeBetaServerEventResponseAudioDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// Base64-encoded audio data delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_audio.delta`. + /// + /// Base64-encoded audio data delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseAudioDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDone.g.cs index 963edcfe..40804483 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseAudioDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_audio.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,18 +45,11 @@ public sealed partial class RealtimeBetaServerEventResponseAudioDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_audio.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDoneType Type { get; set; } + public required int ContentIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,40 +60,40 @@ public sealed partial class RealtimeBetaServerEventResponseAudioDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.output_audio.done`. + /// + /// The index of the content part in the item's content array. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseAudioDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDelta.g.cs index efea9260..b06aa2f2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The transcript delta. + /// The event type, must be `response.output_audio_transcript.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_audio_transcript.delta`. + /// The transcript delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The transcript delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio_transcript.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_audio_transcript.delta`. + /// + /// The transcript delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseAudioTranscriptDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDone.g.cs index 63f6bc63..b8f2e46e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseAudioTranscriptDone.g.cs @@ -11,18 +11,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_audio_transcript.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -39,11 +46,11 @@ public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// /// The final transcript of the audio. @@ -52,13 +59,6 @@ public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDone [global::System.Text.Json.Serialization.JsonRequired] public required string Transcript { get; set; } - /// - /// The event type, must be `response.output_audio_transcript.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseAudioTranscriptDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDoneType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -68,44 +68,44 @@ public sealed partial class RealtimeBetaServerEventResponseAudioTranscriptDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio_transcript.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// /// /// The final transcript of the audio. /// - /// - /// The event type, must be `response.output_audio_transcript.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseAudioTranscriptDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, string transcript, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseAudioTranscriptDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAdded.g.cs index a11b3281..72382dec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAdded.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseContentPartAdded { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.content_part.added`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item to which the content part was added. @@ -38,25 +45,18 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartAdded public required int OutputIndex { get; set; } /// - /// The content part that was added. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPart Part { get; set; } + public required int ContentIndex { get; set; } /// - /// The ID of the response. + /// The content part that was added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.content_part.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +67,45 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartAdded /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.content_part.added`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item to which the content part was added. /// /// /// The index of the output item in the response. /// + /// + /// The index of the content part in the item's content array. + /// /// /// The content part that was added. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.content_part.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseContentPartAdded( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, + int contentIndex, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPart part, - string responseId, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPart.g.cs index 45eb39c9..e8100c73 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPart.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseContentPartAddedPart { /// - /// Base64-encoded audio data (if type is "audio"). + /// The content type ("text", "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? Type { get; set; } /// /// The text content (if type is "text"). @@ -21,17 +22,16 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartAddedPart public string? Text { get; set; } /// - /// The transcript of the audio (if type is "audio"). + /// Base64-encoded audio data (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - public string? Transcript { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// - /// The content type ("text", "audio"). + /// The transcript of the audio (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartAddedPartTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + public string? Transcript { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -42,31 +42,31 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartAddedPart /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio data (if type is "audio"). + /// + /// The content type ("text", "audio"). /// /// /// The text content (if type is "text"). /// + /// + /// Base64-encoded audio data (if type is "audio"). + /// /// /// The transcript of the audio (if type is "audio"). /// - /// - /// The content type ("text", "audio"). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseContentPartAddedPart( - string? audio, + global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartAddedPartType? type) + string? audio, + string? transcript) { - this.Audio = audio; + this.Type = type; this.Text = text; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPartType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPartType.g.cs index 150218fd..6315cf01 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPartType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartAddedPartType.g.cs @@ -11,11 +11,11 @@ public enum RealtimeBetaServerEventResponseContentPartAddedPartType /// /// /// - Text, + Audio, /// /// /// - Audio, + Text, } /// @@ -30,8 +30,8 @@ public static string ToValueString(this RealtimeBetaServerEventResponseContentPa { return value switch { - RealtimeBetaServerEventResponseContentPartAddedPartType.Text => "text", RealtimeBetaServerEventResponseContentPartAddedPartType.Audio => "audio", + RealtimeBetaServerEventResponseContentPartAddedPartType.Text => "text", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +42,8 @@ public static string ToValueString(this RealtimeBetaServerEventResponseContentPa { return value switch { - "text" => RealtimeBetaServerEventResponseContentPartAddedPartType.Text, "audio" => RealtimeBetaServerEventResponseContentPartAddedPartType.Audio, + "text" => RealtimeBetaServerEventResponseContentPartAddedPartType.Text, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDone.g.cs index a73da409..a60149d4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseContentPartDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.content_part.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,25 +45,18 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartDone public required int OutputIndex { get; set; } /// - /// The content part that is done. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePart Part { get; set; } + public required int ContentIndex { get; set; } /// - /// The ID of the response. + /// The content part that is done. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.content_part.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDoneType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +67,45 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.content_part.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// + /// + /// The index of the content part in the item's content array. + /// /// /// The content part that is done. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.content_part.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseContentPartDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, + int contentIndex, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePart part, - string responseId, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePart.g.cs index 2d1680c8..39a49cb7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePart.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseContentPartDonePart { /// - /// Base64-encoded audio data (if type is "audio"). + /// The content type ("text", "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? Type { get; set; } /// /// The text content (if type is "text"). @@ -21,17 +22,16 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartDonePart public string? Text { get; set; } /// - /// The transcript of the audio (if type is "audio"). + /// Base64-encoded audio data (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - public string? Transcript { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// - /// The content type ("text", "audio"). + /// The transcript of the audio (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseContentPartDonePartTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + public string? Transcript { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -42,31 +42,31 @@ public sealed partial class RealtimeBetaServerEventResponseContentPartDonePart /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio data (if type is "audio"). + /// + /// The content type ("text", "audio"). /// /// /// The text content (if type is "text"). /// + /// + /// Base64-encoded audio data (if type is "audio"). + /// /// /// The transcript of the audio (if type is "audio"). /// - /// - /// The content type ("text", "audio"). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseContentPartDonePart( - string? audio, + global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeBetaServerEventResponseContentPartDonePartType? type) + string? audio, + string? transcript) { - this.Audio = audio; + this.Type = type; this.Text = text; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePartType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePartType.g.cs index 8ea66492..c1cff684 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePartType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseContentPartDonePartType.g.cs @@ -11,11 +11,11 @@ public enum RealtimeBetaServerEventResponseContentPartDonePartType /// /// /// - Text, + Audio, /// /// /// - Audio, + Text, } /// @@ -30,8 +30,8 @@ public static string ToValueString(this RealtimeBetaServerEventResponseContentPa { return value switch { - RealtimeBetaServerEventResponseContentPartDonePartType.Text => "text", RealtimeBetaServerEventResponseContentPartDonePartType.Audio => "audio", + RealtimeBetaServerEventResponseContentPartDonePartType.Text => "text", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +42,8 @@ public static string ToValueString(this RealtimeBetaServerEventResponseContentPa { return value switch { - "text" => RealtimeBetaServerEventResponseContentPartDonePartType.Text, "audio" => RealtimeBetaServerEventResponseContentPartDonePartType.Audio, + "text" => RealtimeBetaServerEventResponseContentPartDonePartType.Text, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseCreated.g.cs index 04aeb3a5..891396c8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseCreated.g.cs @@ -16,13 +16,6 @@ public sealed partial class RealtimeBetaServerEventResponseCreated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The response resource. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaResponse Response { get; set; } - /// /// The event type, must be `response.created`. /// @@ -30,6 +23,13 @@ public sealed partial class RealtimeBetaServerEventResponseCreated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseCreatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseCreatedType Type { get; set; } + /// + /// The response resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeBetaResponse Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,12 +42,12 @@ public sealed partial class RealtimeBetaServerEventResponseCreated /// /// The unique ID of the server event. /// - /// - /// The response resource. - /// /// /// The event type, must be `response.created`. /// + /// + /// The response resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseDone.g.cs index ece3d350..9dc51679 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseDone.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeBetaServerEventResponseDone [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The response resource. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeBetaResponse Response { get; set; } - /// /// The event type, must be `response.done`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeBetaServerEventResponseDone [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseDoneTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseDoneType Type { get; set; } + /// + /// The response resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeBetaResponse Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeBetaServerEventResponseDone /// /// The unique ID of the server event. /// - /// - /// The response resource. - /// /// /// The event type, must be `response.done`. /// + /// + /// The response resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta.g.cs index b1fe98a0..86ec4784 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseFunctionCallArgumentsDelta { /// - /// The ID of the function call. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + public required string EventId { get; set; } /// - /// The arguments delta as a JSON string. + /// The event type, must be `response.function_call_arguments.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the function call item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeBetaServerEventResponseFunctionCallArguments public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The ID of the function call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string CallId { get; set; } /// - /// The event type, must be `response.function_call_arguments.delta`. + /// The arguments delta as a JSON string. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeBetaServerEventResponseFunctionCallArguments /// /// Initializes a new instance of the class. /// - /// - /// The ID of the function call. - /// - /// - /// The arguments delta as a JSON string. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.function_call_arguments.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the function call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The ID of the function call. /// - /// - /// The event type, must be `response.function_call_arguments.delta`. + /// + /// The arguments delta as a JSON string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseFunctionCallArgumentsDelta( - string callId, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string callId, + string delta, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDeltaType type) { - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDone.g.cs index f94aa1fd..ca64595d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseFunctionCallArgumentsDone.g.cs @@ -10,25 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseFunctionCallArgumentsDone { /// - /// The final arguments as a JSON string. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string EventId { get; set; } /// - /// The ID of the function call. + /// The event type, must be `response.function_call_arguments.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the function call item. @@ -45,18 +45,25 @@ public sealed partial class RealtimeBetaServerEventResponseFunctionCallArguments public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The ID of the function call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string CallId { get; set; } /// - /// The event type, must be `response.function_call_arguments.done`. + /// The name of the function that was called. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The final arguments as a JSON string. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +74,50 @@ public sealed partial class RealtimeBetaServerEventResponseFunctionCallArguments /// /// Initializes a new instance of the class. /// - /// - /// The final arguments as a JSON string. - /// - /// - /// The ID of the function call. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.function_call_arguments.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the function call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The ID of the function call. /// - /// - /// The event type, must be `response.function_call_arguments.done`. + /// + /// The name of the function that was called. + /// + /// + /// The final arguments as a JSON string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseFunctionCallArgumentsDone( - string arguments, - string callId, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string callId, + string name, + string arguments, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseFunctionCallArgumentsDoneType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDelta.g.cs index 44a2247c..6d6b3a00 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDelta.g.cs @@ -9,18 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDelta { /// - /// The JSON-encoded arguments delta. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.mcp_call_arguments.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the MCP tool call item. @@ -29,12 +36,6 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDelta [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// If present, indicates the delta text was obfuscated. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("obfuscation")] - public string? Obfuscation { get; set; } - /// /// The index of the output item in the response. /// @@ -43,18 +44,17 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The JSON-encoded arguments delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string Delta { get; set; } /// - /// The event type, must be `response.mcp_call_arguments.delta`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("obfuscation")] + public string? Obfuscation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -65,46 +65,44 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDelta /// /// Initializes a new instance of the class. /// - /// - /// The JSON-encoded arguments delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.mcp_call_arguments.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the MCP tool call item. /// - /// - /// If present, indicates the delta text was obfuscated. - /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.mcp_call_arguments.delta`. + /// + /// The JSON-encoded arguments delta. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseMCPCallArgumentsDelta( - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, - string? obfuscation, - global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType type) + string delta, + global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaType type, + string? obfuscation) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); - this.Obfuscation = obfuscation; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; + this.Obfuscation = obfuscation; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs new file mode 100644 index 00000000..8b0635d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation + { + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs new file mode 100644 index 00000000..896d915b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDeltaObfuscation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDone.g.cs index c3b2b3de..db5a5792 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallArgumentsDone.g.cs @@ -9,18 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDone { /// - /// The final JSON-encoded arguments string. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.mcp_call_arguments.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallArgumentsDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the MCP tool call item. @@ -37,18 +44,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The final JSON-encoded arguments string. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.mcp_call_arguments.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallArgumentsDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDoneType Type { get; set; } + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,40 +59,40 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallArgumentsDone /// /// Initializes a new instance of the class. /// - /// - /// The final JSON-encoded arguments string. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.mcp_call_arguments.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the MCP tool call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.mcp_call_arguments.done`. + /// + /// The final JSON-encoded arguments string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseMCPCallArgumentsDone( - string arguments, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string arguments, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallArgumentsDoneType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallCompleted.g.cs index f9b4254b..e6e566e8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallCompleted.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallCompleted public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallCompletedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompletedType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallCompleted public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.completed`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallCompletedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompletedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallCompleted /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.completed`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.completed`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseMCPCallCompleted( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallCompletedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallFailed.g.cs index 9f0836ee..640f8949 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallFailed.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallFailed public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.failed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallFailedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailedType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallFailed public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.failed`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallFailedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallFailed /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.failed`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.failed`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseMCPCallFailed( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallFailedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallInProgress.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallInProgress.g.cs index 164c7cf7..2ca88c7b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallInProgress.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseMCPCallInProgress.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallInProgress public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.in_progress`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallInProgressTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgressType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallInProgress public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.in_progress`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseMCPCallInProgressTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgressType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeBetaServerEventResponseMCPCallInProgress /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.in_progress`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.in_progress`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseMCPCallInProgress( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseMCPCallInProgressType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemAdded.g.cs index 4f77e103..30afd3fb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemAdded.g.cs @@ -16,15 +16,18 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemAdded public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `response.output_item.added`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseOutputItemAddedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAddedType Type { get; set; } + + /// + /// The ID of the Response to which the item belongs. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + public required string ResponseId { get; set; } /// /// The index of the output item in the Response. @@ -34,18 +37,15 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemAdded public required int OutputIndex { get; set; } /// - /// The ID of the Response to which the item belongs. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_item.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseOutputItemAddedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAddedType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,6 +59,15 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemAdded /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_item.added`. + /// + /// + /// The ID of the Response to which the item belongs. + /// + /// + /// The index of the output item in the Response. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -66,29 +75,20 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemAdded /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The index of the output item in the Response. - /// - /// - /// The ID of the Response to which the item belongs. - /// - /// - /// The event type, must be `response.output_item.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseOutputItemAdded( string eventId, - global::tryAGI.OpenAI.RealtimeConversationItem item, - int outputIndex, string responseId, + int outputIndex, + global::tryAGI.OpenAI.RealtimeConversationItem item, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemAddedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.OutputIndex = outputIndex; this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.OutputIndex = outputIndex; + this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemDone.g.cs index 0dda209c..40a00218 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseOutputItemDone.g.cs @@ -17,15 +17,18 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemDone public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `response.output_item.done`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseOutputItemDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDoneType Type { get; set; } + + /// + /// The ID of the Response to which the item belongs. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + public required string ResponseId { get; set; } /// /// The index of the output item in the Response. @@ -35,18 +38,15 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemDone public required int OutputIndex { get; set; } /// - /// The ID of the Response to which the item belongs. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_item.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseOutputItemDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDoneType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,6 +60,15 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemDone /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_item.done`. + /// + /// + /// The ID of the Response to which the item belongs. + /// + /// + /// The index of the output item in the Response. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -67,29 +76,20 @@ public sealed partial class RealtimeBetaServerEventResponseOutputItemDone /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The index of the output item in the Response. - /// - /// - /// The ID of the Response to which the item belongs. - /// - /// - /// The event type, must be `response.output_item.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseOutputItemDone( string eventId, - global::tryAGI.OpenAI.RealtimeConversationItem item, - int outputIndex, string responseId, + int outputIndex, + global::tryAGI.OpenAI.RealtimeConversationItem item, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseOutputItemDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.OutputIndex = outputIndex; this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.OutputIndex = outputIndex; + this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDelta.g.cs index f1d45bf1..bdaf0adb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseTextDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The text delta. + /// The event type, must be `response.output_text.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeBetaServerEventResponseTextDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_text.delta`. + /// The text delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeBetaServerEventResponseTextDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The text delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_text.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_text.delta`. + /// + /// The text delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseTextDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDone.g.cs index d319887b..b33fa898 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventResponseTextDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeBetaServerEventResponseTextDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_text.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,11 +45,11 @@ public sealed partial class RealtimeBetaServerEventResponseTextDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// /// The final text content. @@ -51,13 +58,6 @@ public sealed partial class RealtimeBetaServerEventResponseTextDone [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } - /// - /// The event type, must be `response.output_text.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventResponseTextDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDoneType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -67,44 +67,44 @@ public sealed partial class RealtimeBetaServerEventResponseTextDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_text.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// /// /// The final text content. /// - /// - /// The event type, must be `response.output_text.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeBetaServerEventResponseTextDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, string text, global::tryAGI.OpenAI.RealtimeBetaServerEventResponseTextDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionCreated.g.cs index a7415f05..6ad4cbc4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionCreated.g.cs @@ -4,8 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a Session is created. Emitted automatically when a new
- /// connection is established as the first server event. This event will contain
+ /// Returned when a Session is created. Emitted automatically when a new
+ /// connection is established as the first server event. This event will contain
/// the default Session configuration. ///
public sealed partial class RealtimeBetaServerEventSessionCreated @@ -17,6 +17,13 @@ public sealed partial class RealtimeBetaServerEventSessionCreated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `session.created`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreatedType Type { get; set; } + /// /// A session refers to a single WebSocket connection between a client and the server.
/// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
@@ -29,13 +36,6 @@ public sealed partial class RealtimeBetaServerEventSessionCreated [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeSession Session { get; set; } - /// - /// The event type, must be `session.created`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionCreatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionCreatedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,6 +48,9 @@ public sealed partial class RealtimeBetaServerEventSessionCreated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `session.created`. + /// /// /// A session refers to a single WebSocket connection between a client and the server.
/// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
@@ -56,9 +59,6 @@ public sealed partial class RealtimeBetaServerEventSessionCreated /// A realtime Session represents the overall client-server interaction, and contains default configuration.
/// It has a set of default values which can be updated at any time (via session.update) or on a per-response level (via response.create). /// - /// - /// The event type, must be `session.created`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionUpdated.g.cs index e52520bc..99ec85de 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventSessionUpdated.g.cs @@ -16,6 +16,13 @@ public sealed partial class RealtimeBetaServerEventSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `session.updated`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionUpdatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdatedType Type { get; set; } + /// /// A session refers to a single WebSocket connection between a client and the server.
/// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
@@ -28,13 +35,6 @@ public sealed partial class RealtimeBetaServerEventSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeSession Session { get; set; } - /// - /// The event type, must be `session.updated`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventSessionUpdatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventSessionUpdatedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -47,6 +47,9 @@ public sealed partial class RealtimeBetaServerEventSessionUpdated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `session.updated`. + /// /// /// A session refers to a single WebSocket connection between a client and the server.
/// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
@@ -55,9 +58,6 @@ public sealed partial class RealtimeBetaServerEventSessionUpdated /// A realtime Session represents the overall client-server interaction, and contains default configuration.
/// It has a set of default values which can be updated at any time (via session.update) or on a per-response level (via response.create). /// - /// - /// The event type, must be `session.updated`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionCreated.g.cs index 103e7918..71c913e9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionCreated.g.cs @@ -15,6 +15,13 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionCreated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `transcription_session.created`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionCreatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreatedType Type { get; set; } + /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
@@ -25,13 +32,6 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionCreated [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse Session { get; set; } - /// - /// The event type, must be `transcription_session.created`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionCreatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionCreatedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,15 +44,15 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionCreated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `transcription_session.created`. + /// /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
/// also contains an ephemeral key. Default TTL for keys is 10 minutes. This
/// property is not present when a session is updated via the WebSocket API. /// - /// - /// The event type, must be `transcription_session.created`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionUpdated.g.cs index 344daaca..bb8dbe90 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeBetaServerEventTranscriptionSessionUpdated.g.cs @@ -16,6 +16,13 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `transcription_session.updated`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionUpdatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdatedType Type { get; set; } + /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
@@ -26,13 +33,6 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse Session { get; set; } - /// - /// The event type, must be `transcription_session.updated`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeBetaServerEventTranscriptionSessionUpdatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeBetaServerEventTranscriptionSessionUpdatedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,15 +45,15 @@ public sealed partial class RealtimeBetaServerEventTranscriptionSessionUpdated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `transcription_session.updated`. + /// /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
/// also contains an ephemeral key. Default TTL for keys is 10 minutes. This
/// property is not present when a session is updated via the WebSocket API. /// - /// - /// The event type, must be `transcription_session.updated`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.Json.g.cs new file mode 100644 index 00000000..dce645b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeCallCreateRequest + { + /// + /// 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::tryAGI.OpenAI.RealtimeCallCreateRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeCallCreateRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeCallCreateRequest; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeCallCreateRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeCallCreateRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeCallCreateRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.g.cs new file mode 100644 index 00000000..0402b531 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallCreateRequest.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters required to initiate a realtime call and receive the SDP answer
+ /// needed to complete a WebRTC peer connection. Provide an SDP offer generated
+ /// by your client and optionally configure the session that will answer the call. + ///
+ public sealed partial class RealtimeCallCreateRequest + { + /// + /// WebRTC Session Description Protocol (SDP) offer generated by the caller. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sdp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Sdp { get; set; } + + /// + /// Optional session configuration to apply before the realtime session is
+ /// created. Use the same parameters you would send in a [`create client secret`](/docs/api-reference/realtime-sessions/create-realtime-client-secret)
+ /// request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("session")] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? Session { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// WebRTC Session Description Protocol (SDP) offer generated by the caller. + /// + /// + /// Optional session configuration to apply before the realtime session is
+ /// created. Use the same parameters you would send in a [`create client secret`](/docs/api-reference/realtime-sessions/create-realtime-client-secret)
+ /// request. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeCallCreateRequest( + string sdp, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? session) + { + this.Sdp = sdp ?? throw new global::System.ArgumentNullException(nameof(sdp)); + this.Session = session; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeCallCreateRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.Json.g.cs new file mode 100644 index 00000000..217eeb19 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeCallReferRequest + { + /// + /// 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::tryAGI.OpenAI.RealtimeCallReferRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeCallReferRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeCallReferRequest; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeCallReferRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeCallReferRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeCallReferRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.g.cs new file mode 100644 index 00000000..943fd2e9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallReferRequest.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters required to transfer a SIP call to a new destination using the
+ /// Realtime API. + ///
+ public sealed partial class RealtimeCallReferRequest + { + /// + /// URI that should appear in the SIP Refer-To header. Supports values like
+ /// `tel:+14155550123` or `sip:agent@example.com`.
+ /// Example: tel:+14155550123 + ///
+ /// tel:+14155550123 + [global::System.Text.Json.Serialization.JsonPropertyName("target_uri")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TargetUri { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// URI that should appear in the SIP Refer-To header. Supports values like
+ /// `tel:+14155550123` or `sip:agent@example.com`.
+ /// Example: tel:+14155550123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeCallReferRequest( + string targetUri) + { + this.TargetUri = targetUri ?? throw new global::System.ArgumentNullException(nameof(targetUri)); + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeCallReferRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.Json.g.cs new file mode 100644 index 00000000..1389c90d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeCallRejectRequest + { + /// + /// 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::tryAGI.OpenAI.RealtimeCallRejectRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeCallRejectRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeCallRejectRequest; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeCallRejectRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeCallRejectRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeCallRejectRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.g.cs new file mode 100644 index 00000000..1d0c70f3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCallRejectRequest.g.cs @@ -0,0 +1,50 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Parameters used to decline an incoming SIP call handled by the Realtime API. + /// + public sealed partial class RealtimeCallRejectRequest + { + /// + /// SIP response code to send back to the caller. Defaults to `603` (Decline)
+ /// when omitted.
+ /// Example: 486 + ///
+ /// 486 + [global::System.Text.Json.Serialization.JsonPropertyName("status_code")] + public int? StatusCode { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// SIP response code to send back to the caller. Defaults to `603` (Decline)
+ /// when omitted.
+ /// Example: 486 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeCallRejectRequest( + int? statusCode) + { + this.StatusCode = statusCode; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeCallRejectRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEvent.g.cs index 93cc96c6..49f366b4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEvent.g.cs @@ -31,24 +31,6 @@ namespace tryAGI.OpenAI #endif public bool IsConversationItemCreate => ConversationItemCreate != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate?(RealtimeClientEvent @this) => @this.ConversationItemCreate; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate? value) - { - ConversationItemCreate = value; - } - /// /// Send this event when you want to remove any item from the conversation
/// history. The server will respond with a `conversation.item.deleted` event,
@@ -69,24 +51,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversation #endif public bool IsConversationItemDelete => ConversationItemDelete != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete?(RealtimeClientEvent @this) => @this.ConversationItemDelete; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete? value) - { - ConversationItemDelete = value; - } - /// /// Send this event when you want to retrieve the server's representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.
/// The server will respond with a `conversation.item.retrieved` event,
@@ -107,24 +71,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversation #endif public bool IsConversationItemRetrieve => ConversationItemRetrieve != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve?(RealtimeClientEvent @this) => @this.ConversationItemRetrieve; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve? value) - { - ConversationItemRetrieve = value; - } - /// /// Send this event to truncate a previous assistant message’s audio. The server
/// will produce audio faster than realtime, so this event is useful when the user
@@ -150,24 +96,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversation #endif public bool IsConversationItemTruncate => ConversationItemTruncate != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate?(RealtimeClientEvent @this) => @this.ConversationItemTruncate; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate? value) - { - ConversationItemTruncate = value; - } - /// /// Send this event to append audio bytes to the input audio buffer. The audio
/// buffer is temporary storage you can write to and later commit. A "commit" will create a new
@@ -195,24 +123,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversation #endif public bool IsInputAudioBufferAppend => InputAudioBufferAppend != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend?(RealtimeClientEvent @this) => @this.InputAudioBufferAppend; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend? value) - { - InputAudioBufferAppend = value; - } - /// /// Send this event to clear the audio bytes in the buffer. The server will
/// respond with an `input_audio_buffer.cleared` event. @@ -232,29 +142,11 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBu public bool IsInputAudioBufferClear => InputAudioBufferClear != null; /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear?(RealtimeClientEvent @this) => @this.InputAudioBufferClear; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear? value) - { - InputAudioBufferClear = value; - } - - /// - /// **WebRTC Only:** Emit to cut off the current audio response. This will trigger the server to
- /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
- /// event should be preceded by a `response.cancel` client event to stop the
+ /// **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to
+ /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
+ /// event should be preceded by a `response.cancel` client event to stop the
/// generation of the current response.
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
#if NET6_0_OR_GREATER public global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear? OutputAudioBufferClear { get; init; } @@ -270,24 +162,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBu #endif public bool IsOutputAudioBufferClear => OutputAudioBufferClear != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear?(RealtimeClientEvent @this) => @this.OutputAudioBufferClear; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear? value) - { - OutputAudioBufferClear = value; - } - /// /// Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically.
/// Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event. @@ -306,24 +180,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventOutputAudioB #endif public bool IsInputAudioBufferCommit => InputAudioBufferCommit != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit?(RealtimeClientEvent @this) => @this.InputAudioBufferCommit; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit? value) - { - InputAudioBufferCommit = value; - } - /// /// Send this event to cancel an in-progress response. The server will respond
/// with a `response.done` event with a status of `response.status=cancelled`. If
@@ -345,24 +201,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBu #endif public bool IsResponseCancel => ResponseCancel != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCancel value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventResponseCancel?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventResponseCancel?(RealtimeClientEvent @this) => @this.ResponseCancel; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCancel? value) - { - ResponseCancel = value; - } - /// /// This event instructs the server to create a Response, which means triggering
/// model inference. When in Server VAD mode, the server will create Responses
@@ -399,24 +237,6 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCanc #endif public bool IsResponseCreate => ResponseCreate != null; - /// - /// - /// - public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCreate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventResponseCreate?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventResponseCreate?(RealtimeClientEvent @this) => @this.ResponseCreate; - - /// - /// - /// - public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCreate? value) - { - ResponseCreate = value; - } - /// /// Send this event to update the session’s configuration.
/// The client may send this event at any time to update any field
@@ -440,6 +260,185 @@ public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCrea [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionUpdate))] #endif public bool IsSessionUpdate => SessionUpdate != null; + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate?(RealtimeClientEvent @this) => @this.ConversationItemCreate; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreate? value) + { + ConversationItemCreate = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete?(RealtimeClientEvent @this) => @this.ConversationItemDelete; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemDelete? value) + { + ConversationItemDelete = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve?(RealtimeClientEvent @this) => @this.ConversationItemRetrieve; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieve? value) + { + ConversationItemRetrieve = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate?(RealtimeClientEvent @this) => @this.ConversationItemTruncate; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncate? value) + { + ConversationItemTruncate = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend?(RealtimeClientEvent @this) => @this.InputAudioBufferAppend; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppend? value) + { + InputAudioBufferAppend = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear?(RealtimeClientEvent @this) => @this.InputAudioBufferClear; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferClear? value) + { + InputAudioBufferClear = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear?(RealtimeClientEvent @this) => @this.OutputAudioBufferClear; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventOutputAudioBufferClear? value) + { + OutputAudioBufferClear = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit?(RealtimeClientEvent @this) => @this.InputAudioBufferCommit; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferCommit? value) + { + InputAudioBufferCommit = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCancel value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventResponseCancel?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventResponseCancel?(RealtimeClientEvent @this) => @this.ResponseCancel; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCancel? value) + { + ResponseCancel = value; + } + + /// + /// + /// + public static implicit operator RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCreate value) => new RealtimeClientEvent((global::tryAGI.OpenAI.RealtimeClientEventResponseCreate?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeClientEventResponseCreate?(RealtimeClientEvent @this) => @this.ResponseCreate; + + /// + /// + /// + public RealtimeClientEvent(global::tryAGI.OpenAI.RealtimeClientEventResponseCreate? value) + { + ResponseCreate = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs index 3e3175b3..b52266a1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs @@ -20,32 +20,30 @@ public sealed partial class RealtimeClientEventConversationItemCreate public string? EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.create`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType Type { get; set; } /// - /// The ID of the preceding item after which the new item will be inserted.
- /// If not set, the new item will be appended to the end of the conversation.
+ /// The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation.
/// If set to `root`, the new item will be added to the beginning of the conversation.
- /// If set to an existing ID, it allows an item to be inserted mid-conversation. If the
- /// ID cannot be found, an error will be returned and the item will not be added. + /// If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added. ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.create`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,6 +57,14 @@ public sealed partial class RealtimeClientEventConversationItemCreate /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `conversation.item.create`. + /// + /// + /// The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation.
+ /// If set to `root`, the new item will be added to the beginning of the conversation.
+ /// If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -66,29 +72,19 @@ public sealed partial class RealtimeClientEventConversationItemCreate /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The ID of the preceding item after which the new item will be inserted.
- /// If not set, the new item will be appended to the end of the conversation.
- /// If set to `root`, the new item will be added to the beginning of the conversation.
- /// If set to an existing ID, it allows an item to be inserted mid-conversation. If the
- /// ID cannot be found, an error will be returned and the item will not be added. - /// - /// - /// The event type, must be `conversation.item.create`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeClientEventConversationItemCreate( global::tryAGI.OpenAI.RealtimeConversationItem item, string? eventId, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType type) + global::tryAGI.OpenAI.RealtimeClientEventConversationItemCreateType type, + string? previousItemId) { this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.EventId = eventId; - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs index cdb74eaf..885b593b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeClientEventConversationItemDelete [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// The ID of the item to delete. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.delete`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeClientEventConversationItemDelete [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemDeleteTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventConversationItemDeleteType Type { get; set; } + /// + /// The ID of the item to delete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeClientEventConversationItemDelete /// /// Optional client-generated ID used to identify this event. /// - /// - /// The ID of the item to delete. - /// /// /// The event type, must be `conversation.item.delete`. /// + /// + /// The ID of the item to delete. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemRetrieve.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemRetrieve.g.cs index e2778511..0ea3f4d6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemRetrieve.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemRetrieve.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeClientEventConversationItemRetrieve [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// The ID of the item to retrieve. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.retrieve`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeClientEventConversationItemRetrieve [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemRetrieveTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventConversationItemRetrieveType Type { get; set; } + /// + /// The ID of the item to retrieve. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeClientEventConversationItemRetrieve /// /// Optional client-generated ID used to identify this event. /// - /// - /// The ID of the item to retrieve. - /// /// /// The event type, must be `conversation.item.retrieve`. /// + /// + /// The ID of the item to retrieve. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs index 409695ae..9f88497d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs @@ -16,28 +16,19 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeClientEventConversationItemTruncate { - /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If
- /// the audio_end_ms is greater than the actual audio duration, the server
- /// will respond with an error. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int AudioEndMs { get; set; } - - /// - /// The index of the content part to truncate. Set this to `0`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - /// /// Optional client-generated ID used to identify this event. /// [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } + /// + /// The event type, must be `conversation.item.truncate`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemTruncateTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncateType Type { get; set; } + /// /// The ID of the assistant message item to truncate. Only assistant message
/// items can be truncated. @@ -47,11 +38,20 @@ public sealed partial class RealtimeClientEventConversationItemTruncate public required string ItemId { get; set; } /// - /// The event type, must be `conversation.item.truncate`. + /// The index of the content part to truncate. Set this to `0`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventConversationItemTruncateTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncateType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } + + /// + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int AudioEndMs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -62,37 +62,37 @@ public sealed partial class RealtimeClientEventConversationItemTruncate /// /// Initializes a new instance of the class. /// - /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If
- /// the audio_end_ms is greater than the actual audio duration, the server
- /// will respond with an error. - /// - /// - /// The index of the content part to truncate. Set this to `0`. - /// /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `conversation.item.truncate`. + /// /// /// The ID of the assistant message item to truncate. Only assistant message
/// items can be truncated. /// - /// - /// The event type, must be `conversation.item.truncate`. + /// + /// The index of the content part to truncate. Set this to `0`. + /// + /// + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeClientEventConversationItemTruncate( - int audioEndMs, - int contentIndex, string itemId, + int contentIndex, + int audioEndMs, string? eventId, global::tryAGI.OpenAI.RealtimeClientEventConversationItemTruncateType type) { - this.AudioEndMs = audioEndMs; - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.AudioEndMs = audioEndMs; this.EventId = eventId; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs index 6646734e..9dfa4c57 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs @@ -18,14 +18,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeClientEventInputAudioBufferAppend { - /// - /// Base64-encoded audio bytes. This must be in the format specified by the
- /// `input_audio_format` field in the session configuration. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Audio { get; set; } - /// /// Optional client-generated ID used to identify this event. /// @@ -39,6 +31,14 @@ public sealed partial class RealtimeClientEventInputAudioBufferAppend [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventInputAudioBufferAppendType Type { get; set; } + /// + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Audio { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,16 +48,16 @@ public sealed partial class RealtimeClientEventInputAudioBufferAppend /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio bytes. This must be in the format specified by the
- /// `input_audio_format` field in the session configuration. - /// /// /// Optional client-generated ID used to identify this event. /// /// /// The event type, must be `input_audio_buffer.append`. /// + /// + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventOutputAudioBufferClear.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventOutputAudioBufferClear.g.cs index eca4f26e..d91a7c83 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventOutputAudioBufferClear.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventOutputAudioBufferClear.g.cs @@ -4,11 +4,11 @@ namespace tryAGI.OpenAI { /// - /// **WebRTC Only:** Emit to cut off the current audio response. This will trigger the server to
- /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
- /// event should be preceded by a `response.cancel` client event to stop the
+ /// **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to
+ /// stop generating audio and emit a `output_audio_buffer.cleared` event. This
+ /// event should be preceded by a `response.cancel` client event to stop the
/// generation of the current response.
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
public sealed partial class RealtimeClientEventOutputAudioBufferClear { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCancel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCancel.g.cs index 42cd4c92..c5912462 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCancel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCancel.g.cs @@ -18,13 +18,6 @@ public sealed partial class RealtimeClientEventResponseCancel [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// A specific response ID to cancel - if not provided, will cancel an
- /// in-progress response in the default conversation. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] - public string? ResponseId { get; set; } - /// /// The event type, must be `response.cancel`. /// @@ -32,6 +25,13 @@ public sealed partial class RealtimeClientEventResponseCancel [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventResponseCancelType Type { get; set; } + /// + /// A specific response ID to cancel - if not provided, will cancel an
+ /// in-progress response in the default conversation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + public string? ResponseId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,24 +44,24 @@ public sealed partial class RealtimeClientEventResponseCancel /// /// Optional client-generated ID used to identify this event. /// + /// + /// The event type, must be `response.cancel`. + /// /// /// A specific response ID to cancel - if not provided, will cancel an
/// in-progress response in the default conversation. /// - /// - /// The event type, must be `response.cancel`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeClientEventResponseCancel( string? eventId, - string? responseId, - global::tryAGI.OpenAI.RealtimeClientEventResponseCancelType type) + global::tryAGI.OpenAI.RealtimeClientEventResponseCancelType type, + string? responseId) { this.EventId = eventId; - this.ResponseId = responseId; this.Type = type; + this.ResponseId = responseId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCreate.g.cs index df6b6bc6..06860591 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventResponseCreate.g.cs @@ -33,12 +33,6 @@ public sealed partial class RealtimeClientEventResponseCreate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// Create a new Realtime response with these parameters - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - public global::tryAGI.OpenAI.RealtimeResponseCreateParams? Response { get; set; } - /// /// The event type, must be `response.create`. /// @@ -46,6 +40,12 @@ public sealed partial class RealtimeClientEventResponseCreate [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventResponseCreateType Type { get; set; } + /// + /// Create a new Realtime response with these parameters + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + public global::tryAGI.OpenAI.RealtimeResponseCreateParams? Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -58,23 +58,23 @@ public sealed partial class RealtimeClientEventResponseCreate /// /// Optional client-generated ID used to identify this event. /// - /// - /// Create a new Realtime response with these parameters - /// /// /// The event type, must be `response.create`. /// + /// + /// Create a new Realtime response with these parameters + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeClientEventResponseCreate( string? eventId, - global::tryAGI.OpenAI.RealtimeResponseCreateParams? response, - global::tryAGI.OpenAI.RealtimeClientEventResponseCreateType type) + global::tryAGI.OpenAI.RealtimeClientEventResponseCreateType type, + global::tryAGI.OpenAI.RealtimeResponseCreateParams? response) { this.EventId = eventId; - this.Response = response; this.Type = type; + this.Response = response; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs index 1b856314..d79c8f7e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs @@ -23,15 +23,6 @@ public sealed partial class RealtimeClientEventSessionUpdate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// Update the Realtime session. Choose either a realtime
- /// session or a transcription session. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Session { get; set; } - /// /// The event type, must be `session.update`. /// @@ -39,6 +30,15 @@ public sealed partial class RealtimeClientEventSessionUpdate [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventSessionUpdateType Type { get; set; } + /// + /// Update the Realtime session. Choose either a realtime
+ /// session or a transcription session. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("session")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Session { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,18 +51,18 @@ public sealed partial class RealtimeClientEventSessionUpdate /// /// Optional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it. /// + /// + /// The event type, must be `session.update`. + /// /// /// Update the Realtime session. Choose either a realtime
/// session or a transcription session. /// - /// - /// The event type, must be `session.update`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeClientEventSessionUpdate( - global::tryAGI.OpenAI.AnyOf session, + global::tryAGI.OpenAI.OneOf session, string? eventId, global::tryAGI.OpenAI.RealtimeClientEventSessionUpdateType type) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventTranscriptionSessionUpdate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventTranscriptionSessionUpdate.g.cs index ad893183..0aa239f3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventTranscriptionSessionUpdate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeClientEventTranscriptionSessionUpdate.g.cs @@ -14,13 +14,6 @@ public sealed partial class RealtimeClientEventTranscriptionSessionUpdate [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] public string? EventId { get; set; } - /// - /// Realtime transcription session object configuration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest Session { get; set; } - /// /// The event type, must be `transcription_session.update`. /// @@ -28,6 +21,13 @@ public sealed partial class RealtimeClientEventTranscriptionSessionUpdate [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeClientEventTranscriptionSessionUpdateTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeClientEventTranscriptionSessionUpdateType Type { get; set; } + /// + /// Realtime transcription session object configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest Session { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,12 +40,12 @@ public sealed partial class RealtimeClientEventTranscriptionSessionUpdate /// /// Optional client-generated ID used to identify this event. /// - /// - /// Realtime transcription session object configuration. - /// /// /// The event type, must be `transcription_session.update`. /// + /// + /// Realtime transcription session object configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.Json.g.cs deleted file mode 100644 index 5ce7bb89..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeConnectParams - { - /// - /// 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::tryAGI.OpenAI.RealtimeConnectParams? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeConnectParams), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeConnectParams; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeConnectParams? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeConnectParams), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeConnectParams; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.g.cs deleted file mode 100644 index ab6d2ead..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConnectParams.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RealtimeConnectParams - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Model { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeConnectParams( - string model) - { - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeConnectParams() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversation.g.cs index bcb16e3d..41d6e19d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversation.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// A realtime Conversation consists of a list of Items.
/// By default, there is only one Conversation, and it gets created at the beginning of the Session.
- /// In the future, we may add support for additional conversations. + /// In the future, we may add support for additional conversations.
+ /// Example: {"id":"conv_001","object":"realtime.conversation"} ///
public sealed partial class RealtimeConversation { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationCreated.g.cs index 0efbf90c..2ac5f71f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationCreated.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a conversation is created. Emitted right after session creation. + /// Returned when a conversation is created. Emitted right after session creation.
+ /// Example: {"event_id":"event_9101","type":"conversation.created","conversation":{"id":"conv_001","object":"realtime.conversation"}} ///
public sealed partial class RealtimeConversationCreated { @@ -28,8 +29,10 @@ public sealed partial class RealtimeConversationCreated /// /// A realtime Conversation consists of a list of Items.
/// By default, there is only one Conversation, and it gets created at the beginning of the Session.
- /// In the future, we may add support for additional conversations. + /// In the future, we may add support for additional conversations.
+ /// Example: {"id":"conv_001","object":"realtime.conversation"} ///
+ /// {"id":"conv_001","object":"realtime.conversation"} [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] public global::tryAGI.OpenAI.RealtimeConversation? Conversation { get; set; } @@ -53,7 +56,8 @@ public sealed partial class RealtimeConversationCreated /// /// A realtime Conversation consists of a list of Items.
/// By default, there is only one Conversation, and it gets created at the beginning of the Session.
- /// In the future, we may add support for additional conversations. + /// In the future, we may add support for additional conversations.
+ /// Example: {"id":"conv_001","object":"realtime.conversation"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreate.g.cs index 99bcd5ec..1bda6399 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreate.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event when adding an item to the conversation. + /// Send this event when adding an item to the conversation.
+ /// Example: {"event_id":"event_345","type":"conversation.item.create","previous_item_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","item":{"id":"msg_001","type":"message","status":"completed","role":"user","content":[{"type":"input_text","text":"Hello, how are you?"}]}} ///
public sealed partial class RealtimeConversationItemCreate { @@ -26,8 +27,10 @@ public sealed partial class RealtimeConversationItemCreate public global::tryAGI.OpenAI.RealtimeConversationItemCreateType? Type { get; set; } /// - /// The ID of the preceding item after which the new item will be inserted. + /// The ID of the preceding item after which the new item will be inserted.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
+ /// openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 [global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } @@ -59,7 +62,8 @@ public sealed partial class RealtimeConversationItemCreate /// Example: conversation.item.create /// /// - /// The ID of the preceding item after which the new item will be inserted. + /// The ID of the preceding item after which the new item will be inserted.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreated.g.cs index c6599c93..cb0c8c81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemCreated.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a conversation item is created. + /// Returned when a conversation item is created.
+ /// Example: {"event_id":"event_1920","type":"conversation.item.created","previous_item_id":"msg_002","item":{"id":"msg_003","object":"realtime.item","type":"message","status":"completed","role":"user","content":[{"type":"input_audio","transcript":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}]}} ///
public sealed partial class RealtimeConversationItemCreated { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDelete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDelete.g.cs index 42808c21..52eda6db 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDelete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDelete.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event when you want to remove any item from the conversation history. + /// Send this event when you want to remove any item from the conversation history.
+ /// Example: {"event_id":"event_901","type":"conversation.item.delete","item_id":"msg_003"} ///
public sealed partial class RealtimeConversationItemDelete { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDeleted.g.cs index 3ddde22c..662f719c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDeleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemDeleted.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when an item in the conversation is deleted. + /// Returned when an item in the conversation is deleted.
+ /// Example: {"event_id":"event_2728","type":"conversation.item.deleted","item_id":"msg_005"} ///
public sealed partial class RealtimeConversationItemDeleted { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCall.g.cs index 92850c4e..9cfc30ad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCall.g.cs @@ -8,32 +8,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeConversationItemFunctionCall { - /// - /// The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } - - /// - /// The ID of the function call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - public string? CallId { get; set; } - /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// The name of the function being called. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// @@ -41,6 +21,13 @@ public sealed partial class RealtimeConversationItemFunctionCall [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallObjectJsonConverter))] public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallObject? Object { get; set; } + /// + /// The type of the item. Always `function_call`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType Type { get; set; } + /// /// The status of the item. Has no effect on the conversation. /// @@ -49,11 +36,24 @@ public sealed partial class RealtimeConversationItemFunctionCall public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallStatus? Status { get; set; } /// - /// The type of the item. Always `function_call`. + /// The ID of the function call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + public string? CallId { get; set; } + + /// + /// The name of the function being called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -64,46 +64,46 @@ public sealed partial class RealtimeConversationItemFunctionCall /// /// Initializes a new instance of the class. /// - /// - /// The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`. - /// - /// - /// The ID of the function call. - /// /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// - /// - /// The name of the function being called. - /// /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// + /// + /// The type of the item. Always `function_call`. + /// /// /// The status of the item. Has no effect on the conversation. /// - /// - /// The type of the item. Always `function_call`. + /// + /// The ID of the function call. + /// + /// + /// The name of the function being called. + /// + /// + /// The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemFunctionCall( - string arguments, string name, - string? callId, + string arguments, string? id, global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallObject? @object, + global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType type, global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallType type) + string? callId) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.CallId = callId; + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id; this.Object = @object; - this.Status = status; this.Type = type; + this.Status = status; + this.CallId = callId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCallOutput.g.cs index 4cd9cfbd..dadc3c68 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCallOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemFunctionCallOutput.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeConversationItemFunctionCallOutput { - /// - /// The ID of the function call this output is for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } - /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// @@ -29,11 +22,11 @@ public sealed partial class RealtimeConversationItemFunctionCallOutput public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputObject? Object { get; set; } /// - /// The output of the function call, this is free text and can contain any information or simply be empty. + /// The type of the item. Always `function_call_output`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Output { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType Type { get; set; } /// /// The status of the item. Has no effect on the conversation. @@ -43,11 +36,18 @@ public sealed partial class RealtimeConversationItemFunctionCallOutput public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputStatus? Status { get; set; } /// - /// The type of the item. Always `function_call_output`. + /// The ID of the function call this output is for. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemFunctionCallOutputTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The output of the function call, this is free text and can contain any information or simply be empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Output { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -58,23 +58,23 @@ public sealed partial class RealtimeConversationItemFunctionCallOutput /// /// Initializes a new instance of the class. /// - /// - /// The ID of the function call this output is for. - /// /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// - /// - /// The output of the function call, this is free text and can contain any information or simply be empty. + /// + /// The type of the item. Always `function_call_output`. /// /// /// The status of the item. Has no effect on the conversation. /// - /// - /// The type of the item. Always `function_call_output`. + /// + /// The ID of the function call this output is for. + /// + /// + /// The output of the function call, this is free text and can contain any information or simply be empty. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -84,15 +84,15 @@ public RealtimeConversationItemFunctionCallOutput( string output, string? id, global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputObject? @object, - global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType type) + global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputType type, + global::tryAGI.OpenAI.RealtimeConversationItemFunctionCallOutputStatus? status) { this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); this.Id = id; this.Object = @object; - this.Status = status; this.Type = type; + this.Status = status; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionCompleted.g.cs index 3a9117b3..56b8323d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionCompleted.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when input audio transcription is enabled and a transcription succeeds. + /// Returned when input audio transcription is enabled and a transcription succeeds.
+ /// Example: {"event_id":"event_2122","type":"conversation.item.input_audio_transcription.completed","item_id":"msg_003","content_index":0,"transcript":"Hello, how are you?"} ///
public sealed partial class RealtimeConversationItemInputAudioTranscriptionCompleted { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionFailed.g.cs index 1ad251ed..c6ca7b33 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemInputAudioTranscriptionFailed.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when input audio transcription is configured, and a transcription request for a user message failed. + /// Returned when input audio transcription is configured, and a transcription request for a user message failed.
+ /// Example: {"event_id":"event_2324","type":"conversation.item.input_audio_transcription.failed","item_id":"msg_003","content_index":0,"error":{"type":"transcription_error","code":"audio_unintelligible","message":"The audio could not be transcribed.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}} ///
public sealed partial class RealtimeConversationItemInputAudioTranscriptionFailed { @@ -42,8 +43,10 @@ public sealed partial class RealtimeConversationItemInputAudioTranscriptionFaile public int? ContentIndex { get; set; } /// - /// Details of the error. + /// Details of the error.
+ /// Example: {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} ///
+ /// {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} [global::System.Text.Json.Serialization.JsonPropertyName("error")] public global::tryAGI.OpenAI.RealtimeErrorDetails? Error { get; set; } @@ -73,7 +76,8 @@ public sealed partial class RealtimeConversationItemInputAudioTranscriptionFaile /// Example: 0 /// /// - /// Details of the error. + /// Details of the error.
+ /// Example: {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistant.g.cs index cb491c4c..43752814 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistant.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistant.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeConversationItemMessageAssistant { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// @@ -29,11 +22,11 @@ public sealed partial class RealtimeConversationItemMessageAssistant public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantObject? Object { get; set; } /// - /// The role of the message sender. Always `assistant`. + /// The type of the item. Always `message`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType Type { get; set; } /// /// The status of the item. Has no effect on the conversation. @@ -43,11 +36,18 @@ public sealed partial class RealtimeConversationItemMessageAssistant public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantStatus? Status { get; set; } /// - /// The type of the item. Always `message`. + /// The role of the message sender. Always `assistant`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantRoleJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole Role { get; set; } + + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -58,23 +58,23 @@ public sealed partial class RealtimeConversationItemMessageAssistant /// /// Initializes a new instance of the class. /// - /// - /// The content of the message. - /// /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// - /// - /// The role of the message sender. Always `assistant`. + /// + /// The type of the item. Always `message`. /// /// /// The status of the item. Has no effect on the conversation. /// - /// - /// The type of the item. Always `message`. + /// + /// The role of the message sender. Always `assistant`. + /// + /// + /// The content of the message. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public RealtimeConversationItemMessageAssistant( global::System.Collections.Generic.IList content, string? id, global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantObject? @object, - global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole role, + global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType type, global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantType type) + global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantRole role) { this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Id = id; this.Object = @object; - this.Role = role; - this.Status = status; this.Type = type; + this.Status = status; + this.Role = role; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistantContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistantContentItem.g.cs index 8436a21c..3edba5ff 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistantContentItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageAssistantContentItem.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeConversationItemMessageAssistantContentItem { /// - /// Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. + /// The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? Type { get; set; } /// /// The text content. @@ -21,17 +22,16 @@ public sealed partial class RealtimeConversationItemMessageAssistantContentItem public string? Text { get; set; } /// - /// The transcript of the audio content, this will always be present if the output type is `audio`. + /// Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - public string? Transcript { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// - /// The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration. + /// The transcript of the audio content, this will always be present if the output type is `audio`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageAssistantContentItemTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + public string? Transcript { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -42,31 +42,31 @@ public sealed partial class RealtimeConversationItemMessageAssistantContentItem /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. + /// + /// The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration. /// /// /// The text content. /// + /// + /// Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. + /// /// /// The transcript of the audio content, this will always be present if the output type is `audio`. /// - /// - /// The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemMessageAssistantContentItem( - string? audio, + global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeConversationItemMessageAssistantContentItemType? type) + string? audio, + string? transcript) { - this.Audio = audio; + this.Type = type; this.Text = text; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystem.g.cs index b503c455..19f51085 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystem.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeConversationItemMessageSystem { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// @@ -29,11 +22,11 @@ public sealed partial class RealtimeConversationItemMessageSystem public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemObject? Object { get; set; } /// - /// The role of the message sender. Always `system`. + /// The type of the item. Always `message`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType Type { get; set; } /// /// The status of the item. Has no effect on the conversation. @@ -43,11 +36,18 @@ public sealed partial class RealtimeConversationItemMessageSystem public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemStatus? Status { get; set; } /// - /// The type of the item. Always `message`. + /// The role of the message sender. Always `system`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemRoleJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole Role { get; set; } + + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -58,23 +58,23 @@ public sealed partial class RealtimeConversationItemMessageSystem /// /// Initializes a new instance of the class. /// - /// - /// The content of the message. - /// /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// - /// - /// The role of the message sender. Always `system`. + /// + /// The type of the item. Always `message`. /// /// /// The status of the item. Has no effect on the conversation. /// - /// - /// The type of the item. Always `message`. + /// + /// The role of the message sender. Always `system`. + /// + /// + /// The content of the message. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public RealtimeConversationItemMessageSystem( global::System.Collections.Generic.IList content, string? id, global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemObject? @object, - global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole role, + global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType type, global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemType type) + global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemRole role) { this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Id = id; this.Object = @object; - this.Role = role; - this.Status = status; this.Type = type; + this.Status = status; + this.Role = role; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystemContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystemContentItem.g.cs index d1c10004..8e814b54 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystemContentItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageSystemContentItem.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeConversationItemMessageSystemContentItem { - /// - /// The text content. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - /// /// The content type. Always `input_text` for system messages. /// @@ -21,6 +15,12 @@ public sealed partial class RealtimeConversationItemMessageSystemContentItem [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageSystemContentItemTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItemType? Type { get; set; } + /// + /// The text content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +30,21 @@ public sealed partial class RealtimeConversationItemMessageSystemContentItem /// /// Initializes a new instance of the class. /// - /// - /// The text content. - /// /// /// The content type. Always `input_text` for system messages. /// + /// + /// The text content. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemMessageSystemContentItem( - string? text, - global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItemType? type) + global::tryAGI.OpenAI.RealtimeConversationItemMessageSystemContentItemType? type, + string? text) { - this.Text = text; this.Type = type; + this.Text = text; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUser.g.cs index 6edc4311..428810bd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUser.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeConversationItemMessageUser { - /// - /// The content of the message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// @@ -29,11 +22,11 @@ public sealed partial class RealtimeConversationItemMessageUser public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserObject? Object { get; set; } /// - /// The role of the message sender. Always `user`. + /// The type of the item. Always `message`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole Role { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType Type { get; set; } /// /// The status of the item. Has no effect on the conversation. @@ -43,11 +36,18 @@ public sealed partial class RealtimeConversationItemMessageUser public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserStatus? Status { get; set; } /// - /// The type of the item. Always `message`. + /// The role of the message sender. Always `user`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserRoleJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole Role { get; set; } + + /// + /// The content of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -58,23 +58,23 @@ public sealed partial class RealtimeConversationItemMessageUser /// /// Initializes a new instance of the class. /// - /// - /// The content of the message. - /// /// /// The unique ID of the item. This may be provided by the client or generated by the server. /// /// /// Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item. /// - /// - /// The role of the message sender. Always `user`. + /// + /// The type of the item. Always `message`. /// /// /// The status of the item. Has no effect on the conversation. /// - /// - /// The type of the item. Always `message`. + /// + /// The role of the message sender. Always `user`. + /// + /// + /// The content of the message. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public RealtimeConversationItemMessageUser( global::System.Collections.Generic.IList content, string? id, global::tryAGI.OpenAI.RealtimeConversationItemMessageUserObject? @object, - global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole role, + global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType type, global::tryAGI.OpenAI.RealtimeConversationItemMessageUserStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemMessageUserType type) + global::tryAGI.OpenAI.RealtimeConversationItemMessageUserRole role) { this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.Id = id; this.Object = @object; - this.Role = role; - this.Status = status; this.Type = type; + this.Status = status; + this.Role = role; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUserContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUserContentItem.g.cs index 94124487..74d01cc0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUserContentItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemMessageUserContentItem.g.cs @@ -9,18 +9,23 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeConversationItemMessageUserContentItem { /// - /// Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. + /// The content type (`input_text`, `input_audio`, or `input_image`). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? Type { get; set; } /// - /// The detail level of the image (for `input_image`). `auto` will default to `high`.
- /// Default Value: auto + /// The text content (for `input_text`). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("detail")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? Detail { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// /// Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG. @@ -29,10 +34,12 @@ public sealed partial class RealtimeConversationItemMessageUserContentItem public string? ImageUrl { get; set; } /// - /// The text content (for `input_text`). + /// The detail level of the image (for `input_image`). `auto` will default to `high`.
+ /// Default Value: auto ///
- [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemDetailJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? Detail { get; set; } /// /// Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference. @@ -40,13 +47,6 @@ public sealed partial class RealtimeConversationItemMessageUserContentItem [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] public string? Transcript { get; set; } - /// - /// The content type (`input_text`, `input_audio`, or `input_image`). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemMessageUserContentItemTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,42 +56,42 @@ public sealed partial class RealtimeConversationItemMessageUserContentItem /// /// Initializes a new instance of the class. /// + /// + /// The content type (`input_text`, `input_audio`, or `input_image`). + /// + /// + /// The text content (for `input_text`). + /// /// /// Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified. /// - /// - /// The detail level of the image (for `input_image`). `auto` will default to `high`.
- /// Default Value: auto - /// /// /// Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG. /// - /// - /// The text content (for `input_text`). + /// + /// The detail level of the image (for `input_image`). `auto` will default to `high`.
+ /// Default Value: auto /// /// /// Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference. /// - /// - /// The content type (`input_text`, `input_audio`, or `input_image`). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemMessageUserContentItem( + global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? type, + string? text, string? audio, - global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? detail, string? imageUrl, - string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemType? type) + global::tryAGI.OpenAI.RealtimeConversationItemMessageUserContentItemDetail? detail, + string? transcript) { + this.Type = type; + this.Text = text; this.Audio = audio; - this.Detail = detail; this.ImageUrl = imageUrl; - this.Text = text; + this.Detail = detail; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncate.g.cs index 91879be7..7a806e49 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncate.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event when you want to truncate a previous assistant message’s audio. + /// Send this event when you want to truncate a previous assistant message’s audio.
+ /// Example: {"event_id":"event_678","type":"conversation.item.truncate","item_id":"msg_002","content_index":0,"audio_end_ms":1500} ///
public sealed partial class RealtimeConversationItemTruncate { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncated.g.cs index 027cf375..929a529f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemTruncated.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when an earlier assistant audio message item is truncated by the client. + /// Returned when an earlier assistant audio message item is truncated by the client.
+ /// Example: {"event_id":"event_2526","type":"conversation.item.truncated","item_id":"msg_004","content_index":0,"audio_end_ms":1500} ///
public sealed partial class RealtimeConversationItemTruncated { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReference.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReference.g.cs index 02ae5ed2..772b04ae 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReference.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReference.g.cs @@ -8,31 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeConversationItemWithReference { - /// - /// The arguments of the function call (for `function_call` items). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - public string? Arguments { get; set; } - - /// - /// The ID of the function call (for `function_call` and
- /// `function_call_output` items). If passed on a `function_call_output`
- /// item, the server will check that a `function_call` item with the same
- /// ID exists in the conversation history. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - public string? CallId { get; set; } - - /// - /// The content of the message, applicable for `message` items.
- /// - Message items of role `system` support only `input_text` content
- /// - Message items of role `user` support `input_text` and `input_audio`
- /// content
- /// - Message items of role `assistant` support `text` content. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public global::System.Collections.Generic.IList? Content { get; set; } - /// /// For an item of type (`message` | `function_call` | `function_call_output`)
/// this field allows the client to assign the unique ID of the item. It is
@@ -44,10 +19,11 @@ public sealed partial class RealtimeConversationItemWithReference public string? Id { get; set; } /// - /// The name of the function being called (for `function_call` items). + /// The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? Type { get; set; } /// /// Identifier for the API object being returned - always `realtime.item`. @@ -57,10 +33,13 @@ public sealed partial class RealtimeConversationItemWithReference public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceObject? Object { get; set; } /// - /// The output of the function call (for `function_call_output` items). + /// The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect
+ /// on the conversation, but are accepted for consistency with the
+ /// `conversation.item.created` event. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output")] - public string? Output { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceStatusJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceStatus? Status { get; set; } /// /// The role of the message sender (`user`, `assistant`, `system`), only
@@ -71,20 +50,41 @@ public sealed partial class RealtimeConversationItemWithReference public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceRole? Role { get; set; } /// - /// The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect
- /// on the conversation, but are accepted for consistency with the
- /// `conversation.item.created` event. + /// The content of the message, applicable for `message` items.
+ /// - Message items of role `system` support only `input_text` content
+ /// - Message items of role `user` support `input_text` and `input_audio`
+ /// content
+ /// - Message items of role `assistant` support `text` content. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceStatusJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceStatus? Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::System.Collections.Generic.IList? Content { get; set; } /// - /// The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). + /// The ID of the function call (for `function_call` and
+ /// `function_call_output` items). If passed on a `function_call_output`
+ /// item, the server will check that a `function_call` item with the same
+ /// ID exists in the conversation history. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + public string? CallId { get; set; } + + /// + /// The name of the function being called (for `function_call` items). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The arguments of the function call (for `function_call` items). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + + /// + /// The output of the function call (for `function_call_output` items). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public string? Output { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -95,22 +95,6 @@ public sealed partial class RealtimeConversationItemWithReference /// /// Initializes a new instance of the class. /// - /// - /// The arguments of the function call (for `function_call` items). - /// - /// - /// The ID of the function call (for `function_call` and
- /// `function_call_output` items). If passed on a `function_call_output`
- /// item, the server will check that a `function_call` item with the same
- /// ID exists in the conversation history. - /// - /// - /// The content of the message, applicable for `message` items.
- /// - Message items of role `system` support only `input_text` content
- /// - Message items of role `user` support `input_text` and `input_audio`
- /// content
- /// - Message items of role `assistant` support `text` content. - /// /// /// For an item of type (`message` | `function_call` | `function_call_output`)
/// this field allows the client to assign the unique ID of the item. It is
@@ -118,52 +102,68 @@ public sealed partial class RealtimeConversationItemWithReference /// For an item of type `item_reference`, this field is required and is a
/// reference to any item that has previously existed in the conversation. /// - /// - /// The name of the function being called (for `function_call` items). + /// + /// The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). /// /// /// Identifier for the API object being returned - always `realtime.item`. /// - /// - /// The output of the function call (for `function_call_output` items). + /// + /// The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect
+ /// on the conversation, but are accepted for consistency with the
+ /// `conversation.item.created` event. /// /// /// The role of the message sender (`user`, `assistant`, `system`), only
/// applicable for `message` items. /// - /// - /// The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect
- /// on the conversation, but are accepted for consistency with the
- /// `conversation.item.created` event. + /// + /// The content of the message, applicable for `message` items.
+ /// - Message items of role `system` support only `input_text` content
+ /// - Message items of role `user` support `input_text` and `input_audio`
+ /// content
+ /// - Message items of role `assistant` support `text` content. /// - /// - /// The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`). + /// + /// The ID of the function call (for `function_call` and
+ /// `function_call_output` items). If passed on a `function_call_output`
+ /// item, the server will check that a `function_call` item with the same
+ /// ID exists in the conversation history. + /// + /// + /// The name of the function being called (for `function_call` items). + /// + /// + /// The arguments of the function call (for `function_call` items). + /// + /// + /// The output of the function call (for `function_call_output` items). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemWithReference( - string? arguments, - string? callId, - global::System.Collections.Generic.IList? content, string? id, - string? name, + global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? type, global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceObject? @object, - string? output, - global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceRole? role, global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceStatus? status, - global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceType? type) + global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceRole? role, + global::System.Collections.Generic.IList? content, + string? callId, + string? name, + string? arguments, + string? output) { - this.Arguments = arguments; - this.CallId = callId; - this.Content = content; this.Id = id; - this.Name = name; + this.Type = type; this.Object = @object; - this.Output = output; - this.Role = role; this.Status = status; - this.Type = type; + this.Role = role; + this.Content = content; + this.CallId = callId; + this.Name = name; + this.Arguments = arguments; + this.Output = output; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItem.g.cs index 0b9b8bfd..67bfc0e7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItem.g.cs @@ -9,10 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeConversationItemWithReferenceContentItem { /// - /// Base64-encoded audio bytes, used for `input_audio` content type. + /// The content type (`input_text`, `input_audio`, `item_reference`, `text`). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? Type { get; set; } + + /// + /// The text content, used for `input_text` and `text` content types. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } /// /// ID of a previous conversation item to reference (for `item_reference`
@@ -23,10 +30,10 @@ public sealed partial class RealtimeConversationItemWithReferenceContentItem public string? Id { get; set; } /// - /// The text content, used for `input_text` and `text` content types. + /// Base64-encoded audio bytes, used for `input_audio` content type. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// /// The transcript of the audio, used for `input_audio` content type. @@ -34,13 +41,6 @@ public sealed partial class RealtimeConversationItemWithReferenceContentItem [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] public string? Transcript { get; set; } - /// - /// The content type (`input_text`, `input_audio`, `item_reference`, `text`). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeConversationItemWithReferenceContentItemTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -50,38 +50,38 @@ public sealed partial class RealtimeConversationItemWithReferenceContentItem /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio bytes, used for `input_audio` content type. + /// + /// The content type (`input_text`, `input_audio`, `item_reference`, `text`). + /// + /// + /// The text content, used for `input_text` and `text` content types. /// /// /// ID of a previous conversation item to reference (for `item_reference`
/// content types in `response.create` events). These can reference both
/// client and server created items. /// - /// - /// The text content, used for `input_text` and `text` content types. + /// + /// Base64-encoded audio bytes, used for `input_audio` content type. /// /// /// The transcript of the audio, used for `input_audio` content type. /// - /// - /// The content type (`input_text`, `input_audio`, `item_reference`, `text`). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeConversationItemWithReferenceContentItem( - string? audio, - string? id, + global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeConversationItemWithReferenceContentItemType? type) + string? id, + string? audio, + string? transcript) { - this.Audio = audio; - this.Id = id; + this.Type = type; this.Text = text; + this.Id = id; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItemType.g.cs index 6748dac7..b90e8830 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItemType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceContentItemType.g.cs @@ -11,11 +11,11 @@ public enum RealtimeConversationItemWithReferenceContentItemType /// /// /// - InputText, + InputAudio, /// /// /// - InputAudio, + InputText, /// /// /// @@ -38,8 +38,8 @@ public static string ToValueString(this RealtimeConversationItemWithReferenceCon { return value switch { - RealtimeConversationItemWithReferenceContentItemType.InputText => "input_text", RealtimeConversationItemWithReferenceContentItemType.InputAudio => "input_audio", + RealtimeConversationItemWithReferenceContentItemType.InputText => "input_text", RealtimeConversationItemWithReferenceContentItemType.ItemReference => "item_reference", RealtimeConversationItemWithReferenceContentItemType.Text => "text", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), @@ -52,8 +52,8 @@ public static string ToValueString(this RealtimeConversationItemWithReferenceCon { return value switch { - "input_text" => RealtimeConversationItemWithReferenceContentItemType.InputText, "input_audio" => RealtimeConversationItemWithReferenceContentItemType.InputAudio, + "input_text" => RealtimeConversationItemWithReferenceContentItemType.InputText, "item_reference" => RealtimeConversationItemWithReferenceContentItemType.ItemReference, "text" => RealtimeConversationItemWithReferenceContentItemType.Text, _ => null, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceType.g.cs index c85fcfda..aa237821 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeConversationItemWithReferenceType.g.cs @@ -20,10 +20,6 @@ public enum RealtimeConversationItemWithReferenceType /// /// FunctionCallOutput, - /// - /// - /// - ItemReference, } /// @@ -41,7 +37,6 @@ public static string ToValueString(this RealtimeConversationItemWithReferenceTyp RealtimeConversationItemWithReferenceType.Message => "message", RealtimeConversationItemWithReferenceType.FunctionCall => "function_call", RealtimeConversationItemWithReferenceType.FunctionCallOutput => "function_call_output", - RealtimeConversationItemWithReferenceType.ItemReference => "item_reference", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -55,7 +50,6 @@ public static string ToValueString(this RealtimeConversationItemWithReferenceTyp "message" => RealtimeConversationItemWithReferenceType.Message, "function_call" => RealtimeConversationItemWithReferenceType.FunctionCall, "function_call_output" => RealtimeConversationItemWithReferenceType.FunctionCallOutput, - "item_reference" => RealtimeConversationItemWithReferenceType.ItemReference, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequest.g.cs index 44a00a0b..1dad1d84 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequest.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -6,7 +8,7 @@ namespace tryAGI.OpenAI /// /// Create a session and client secret for the Realtime API. The request can specify
/// either a realtime or a transcription session configuration.
- /// [Learn more about the Realtime API](https://platform.openai.com/docs/guides/realtime). + /// [Learn more about the Realtime API](/docs/guides/realtime). ///
public sealed partial class RealtimeCreateClientSecretRequest { @@ -24,8 +26,8 @@ public sealed partial class RealtimeCreateClientSecretRequest /// session or a transcription session. ///
[global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SessionJsonConverter))] - public global::tryAGI.OpenAI.Session? Session { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Session { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,7 +53,7 @@ public sealed partial class RealtimeCreateClientSecretRequest #endif public RealtimeCreateClientSecretRequest( global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? expiresAfter, - global::tryAGI.OpenAI.Session? session) + global::tryAGI.OpenAI.OneOf? session) { this.ExpiresAfter = expiresAfter; this.Session = session; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.Json.g.cs deleted file mode 100644 index 05a09802..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeCreateClientSecretRequestSessionDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestSessionDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.g.cs deleted file mode 100644 index 16ba6a57..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretRequestSessionDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RealtimeCreateClientSecretRequestSessionDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeCreateClientSecretRequestSessionDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeCreateClientSecretRequestSessionDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretResponse.g.cs index fcd806fd..7069095c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeCreateClientSecretResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeCreateClientSecretResponse { + /// + /// The generated client secret value. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Value { get; set; } + /// /// Expiration timestamp for the client secret, in seconds since epoch. /// @@ -23,13 +30,6 @@ public sealed partial class RealtimeCreateClientSecretResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.Session2 Session { get; set; } - /// - /// The generated client secret value. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("value")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Value { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,26 +39,26 @@ public sealed partial class RealtimeCreateClientSecretResponse /// /// Initializes a new instance of the class. /// + /// + /// The generated client secret value. + /// /// /// Expiration timestamp for the client secret, in seconds since epoch. /// /// /// The session configuration for either a realtime or transcription session. /// - /// - /// The generated client secret value. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeCreateClientSecretResponse( + string value, int expiresAt, - global::tryAGI.OpenAI.Session2 session, - string value) + global::tryAGI.OpenAI.Session2 session) { + this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); this.ExpiresAt = expiresAt; this.Session = session; - this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeError.g.cs index 9cef478a..8a98edd8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeError.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when an error occurs. + /// Returned when an error occurs.
+ /// Example: {"event_id":"event_890","type":"error","error":{"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"}} ///
public sealed partial class RealtimeError { @@ -26,8 +27,10 @@ public sealed partial class RealtimeError public global::tryAGI.OpenAI.RealtimeErrorType? Type { get; set; } /// - /// Details of the error. + /// Details of the error.
+ /// Example: {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} ///
+ /// {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} [global::System.Text.Json.Serialization.JsonPropertyName("error")] public global::tryAGI.OpenAI.RealtimeErrorDetails? Error { get; set; } @@ -49,7 +52,8 @@ public sealed partial class RealtimeError /// Example: error /// /// - /// Details of the error. + /// Details of the error.
+ /// Example: {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeErrorDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeErrorDetails.g.cs index 2d3b8326..3190b7f0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeErrorDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeErrorDetails.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Details of the error. + /// Details of the error.
+ /// Example: {"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"} ///
public sealed partial class RealtimeErrorDetails { @@ -33,8 +34,10 @@ public sealed partial class RealtimeErrorDetails public string? Message { get; set; } /// - /// Parameter related to the error, if any. + /// Parameter related to the error, if any.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
+ /// openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 [global::System.Text.Json.Serialization.JsonPropertyName("param")] public string? Param { get; set; } @@ -68,7 +71,8 @@ public sealed partial class RealtimeErrorDetails /// Example: The 'type' field is missing. /// /// - /// Parameter related to the error, if any. + /// Parameter related to the error, if any.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The event_id of the client event that caused the error, if applicable.
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeFunctionTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeFunctionTool.g.cs index d258b08a..4551c26f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeFunctionTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeFunctionTool.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeFunctionTool { /// - /// The description of the function, including guidance on when and how
- /// to call it, and guidance about what to tell the user when calling
- /// (if anything). + /// The type of the tool, i.e. `function`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeFunctionToolType? Type { get; set; } /// /// The name of the function. @@ -23,17 +22,18 @@ public sealed partial class RealtimeFunctionTool public string? Name { get; set; } /// - /// Parameters of the function in JSON Schema. + /// The description of the function, including guidance on when and how
+ /// to call it, and guidance about what to tell the user when calling
+ /// (if anything). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] - public object? Parameters { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// - /// The type of the tool, i.e. `function`. + /// Parameters of the function in JSON Schema. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeFunctionToolTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeFunctionToolType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public object? Parameters { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,33 +44,33 @@ public sealed partial class RealtimeFunctionTool /// /// Initializes a new instance of the class. /// + /// + /// The type of the tool, i.e. `function`. + /// + /// + /// The name of the function. + /// /// /// The description of the function, including guidance on when and how
/// to call it, and guidance about what to tell the user when calling
/// (if anything). /// - /// - /// The name of the function. - /// /// /// Parameters of the function in JSON Schema. /// - /// - /// The type of the tool, i.e. `function`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeFunctionTool( - string? description, + global::tryAGI.OpenAI.RealtimeFunctionToolType? type, string? name, - object? parameters, - global::tryAGI.OpenAI.RealtimeFunctionToolType? type) + string? description, + object? parameters) { - this.Description = description; + this.Type = type; this.Name = name; + this.Description = description; this.Parameters = parameters; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferAppend.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferAppend.g.cs index 21d61291..ed6a36df 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferAppend.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferAppend.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event to append audio bytes to the input audio buffer. + /// Send this event to append audio bytes to the input audio buffer.
+ /// Example: {"event_id":"event_456","type":"input_audio_buffer.append","audio":"Base64EncodedAudioData"} ///
public sealed partial class RealtimeInputAudioBufferAppend { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferClear.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferClear.g.cs index ca70bb49..17dded2f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferClear.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferClear.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event to clear the audio bytes in the buffer. + /// Send this event to clear the audio bytes in the buffer.
+ /// Example: {"event_id":"event_012","type":"input_audio_buffer.clear"} ///
public sealed partial class RealtimeInputAudioBufferClear { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCleared.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCleared.g.cs index fbbece3b..93ffdc36 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCleared.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCleared.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the input audio buffer is cleared by the client. + /// Returned when the input audio buffer is cleared by the client.
+ /// Example: {"event_id":"event_1314","type":"input_audio_buffer.cleared"} ///
public sealed partial class RealtimeInputAudioBufferCleared { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommit.g.cs index 1b2ddac1..714ab157 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommit.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event to commit audio bytes to a user message. + /// Send this event to commit audio bytes to a user message.
+ /// Example: {"event_id":"event_789","type":"input_audio_buffer.commit"} ///
public sealed partial class RealtimeInputAudioBufferCommit { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommitted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommitted.g.cs index 21464f5d..01bae9b3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommitted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferCommitted.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. + /// Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode.
+ /// Example: {"event_id":"event_1121","type":"input_audio_buffer.committed","previous_item_id":"msg_001","item_id":"msg_002"} ///
public sealed partial class RealtimeInputAudioBufferCommitted { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStarted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStarted.g.cs index 4788332d..65f878b7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStarted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStarted.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned in server turn detection mode when speech is detected. + /// Returned in server turn detection mode when speech is detected.
+ /// Example: {"event_id":"event_1516","type":"input_audio_buffer.speech_started","audio_start_ms":1000,"item_id":"msg_003"} ///
public sealed partial class RealtimeInputAudioBufferSpeechStarted { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStopped.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStopped.g.cs index 90ae3564..8a422640 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStopped.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeInputAudioBufferSpeechStopped.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned in server turn detection mode when speech stops. + /// Returned in server turn detection mode when speech stops.
+ /// Example: {"event_id":"event_1718","type":"input_audio_buffer.speech_stopped","audio_end_ms":2000,"item_id":"msg_003"} ///
public sealed partial class RealtimeInputAudioBufferSpeechStopped { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalRequest.g.cs index 762047e8..f3a38736 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalRequest.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeMCPApprovalRequest { /// - /// A JSON string of arguments for the tool. + /// The type of the item. Always `mcp_approval_request`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalRequestTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPApprovalRequestType Type { get; set; } /// /// The unique ID of the approval request. @@ -23,25 +23,25 @@ public sealed partial class RealtimeMCPApprovalRequest public required string Id { get; set; } /// - /// The name of the tool to run. + /// The label of the MCP server making the request. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string ServerLabel { get; set; } /// - /// The label of the MCP server making the request. + /// The name of the tool to run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ServerLabel { get; set; } + public required string Name { get; set; } /// - /// The type of the item. Always `mcp_approval_request`. + /// A JSON string of arguments for the tool. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalRequestTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPApprovalRequestType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,35 +52,35 @@ public sealed partial class RealtimeMCPApprovalRequest /// /// Initializes a new instance of the class. /// - /// - /// A JSON string of arguments for the tool. + /// + /// The type of the item. Always `mcp_approval_request`. /// /// /// The unique ID of the approval request. /// - /// - /// The name of the tool to run. - /// /// /// The label of the MCP server making the request. /// - /// - /// The type of the item. Always `mcp_approval_request`. + /// + /// The name of the tool to run. + /// + /// + /// A JSON string of arguments for the tool. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeMCPApprovalRequest( - string arguments, string id, - string name, string serverLabel, + string name, + string arguments, global::tryAGI.OpenAI.RealtimeMCPApprovalRequestType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponse.g.cs index 09d6070c..d10f25e0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponse.g.cs @@ -8,6 +8,20 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeMCPApprovalResponse { + /// + /// The type of the item. Always `mcp_approval_response`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalResponseTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType Type { get; set; } + + /// + /// The unique ID of the approval response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The ID of the approval request being answered. /// @@ -23,25 +37,11 @@ public sealed partial class RealtimeMCPApprovalResponse public required bool Approve { get; set; } /// - /// The unique ID of the approval response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Optional reason for the decision. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("reason")] public string? Reason { get; set; } - /// - /// The type of the item. Always `mcp_approval_response`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPApprovalResponseTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,36 +51,34 @@ public sealed partial class RealtimeMCPApprovalResponse /// /// Initializes a new instance of the class. /// - /// - /// The ID of the approval request being answered. - /// - /// - /// Whether the request was approved. + /// + /// The type of the item. Always `mcp_approval_response`. /// /// /// The unique ID of the approval response. /// - /// - /// Optional reason for the decision. + /// + /// The ID of the approval request being answered. /// - /// - /// The type of the item. Always `mcp_approval_response`. + /// + /// Whether the request was approved. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeMCPApprovalResponse( + string id, string approvalRequestId, bool approve, - string id, - string? reason, - global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType type) + global::tryAGI.OpenAI.RealtimeMCPApprovalResponseType type, + string? reason) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ApprovalRequestId = approvalRequestId ?? throw new global::System.ArgumentNullException(nameof(approvalRequestId)); this.Approve = approve; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Reason = reason; this.Type = type; + this.Reason = reason; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.Json.g.cs new file mode 100644 index 00000000..23f68e81 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeMCPApprovalResponseReason + { + /// + /// 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::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeMCPApprovalResponseReason; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.g.cs new file mode 100644 index 00000000..de2aa2a0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPApprovalResponseReason.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeMCPApprovalResponseReason + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPHTTPError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPHTTPError.g.cs index d8252c3d..692b102f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPHTTPError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPHTTPError.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeMCPHTTPError { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPHTTPErrorTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPHTTPErrorType Type { get; set; } + /// /// /// @@ -22,13 +29,6 @@ public sealed partial class RealtimeMCPHTTPError [global::System.Text.Json.Serialization.JsonRequired] public required string Message { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPHTTPErrorTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPHTTPErrorType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,9 +38,9 @@ public sealed partial class RealtimeMCPHTTPError /// /// Initializes a new instance of the class. /// + /// /// /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPListTools.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPListTools.g.cs index e2f775ca..4f242af3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPListTools.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPListTools.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeMCPListTools { + /// + /// The type of the item. Always `mcp_list_tools`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPListToolsTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPListToolsType Type { get; set; } + /// /// The unique ID of the list. /// @@ -28,13 +35,6 @@ public sealed partial class RealtimeMCPListTools [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Tools { get; set; } - /// - /// The type of the item. Always `mcp_list_tools`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPListToolsTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPListToolsType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,6 +44,9 @@ public sealed partial class RealtimeMCPListTools /// /// Initializes a new instance of the class. /// + /// + /// The type of the item. Always `mcp_list_tools`. + /// /// /// The unique ID of the list. /// @@ -53,22 +56,19 @@ public sealed partial class RealtimeMCPListTools /// /// The tools available on the server. /// - /// - /// The type of the item. Always `mcp_list_tools`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeMCPListTools( string serverLabel, global::System.Collections.Generic.IList tools, - string? id, - global::tryAGI.OpenAI.RealtimeMCPListToolsType type) + global::tryAGI.OpenAI.RealtimeMCPListToolsType type, + string? id) { this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); - this.Id = id; this.Type = type; + this.Id = id; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPProtocolError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPProtocolError.g.cs index fc8a684c..792bd22a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPProtocolError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPProtocolError.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeMCPProtocolError { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPProtocolErrorTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPProtocolErrorType Type { get; set; } + /// /// /// @@ -22,13 +29,6 @@ public sealed partial class RealtimeMCPProtocolError [global::System.Text.Json.Serialization.JsonRequired] public required string Message { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPProtocolErrorTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPProtocolErrorType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,9 +38,9 @@ public sealed partial class RealtimeMCPProtocolError /// /// Initializes a new instance of the class. /// + /// /// /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCall.g.cs index 95bf08d5..4f090d25 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCall.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,30 +11,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeMCPToolCall { /// - /// The ID of an associated approval request, if any. + /// The type of the item. Always `mcp_call`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("approval_request_id")] - public string? ApprovalRequestId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPToolCallType Type { get; set; } /// - /// A JSON string of the arguments passed to the tool. + /// The unique ID of the tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public object? Error { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the tool call. + /// The label of the MCP server running the tool. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string ServerLabel { get; set; } /// /// The name of the tool that was run. @@ -42,24 +39,29 @@ public sealed partial class RealtimeMCPToolCall public required string Name { get; set; } /// - /// The output from the tool call. + /// A JSON string of the arguments passed to the tool. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] - public string? Output { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// - /// The label of the MCP server running the tool. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ServerLabel { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("approval_request_id")] + public string? ApprovalRequestId { get; set; } /// - /// The type of the item. Always `mcp_call`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public string? Output { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public global::tryAGI.OpenAI.OneOf? Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -70,49 +72,45 @@ public sealed partial class RealtimeMCPToolCall /// /// Initializes a new instance of the class. /// - /// - /// The ID of an associated approval request, if any. - /// - /// - /// A JSON string of the arguments passed to the tool. + /// + /// The type of the item. Always `mcp_call`. /// - /// /// /// The unique ID of the tool call. /// - /// - /// The name of the tool that was run. - /// - /// - /// The output from the tool call. - /// /// /// The label of the MCP server running the tool. /// - /// - /// The type of the item. Always `mcp_call`. + /// + /// The name of the tool that was run. + /// + /// + /// A JSON string of the arguments passed to the tool. /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeMCPToolCall( - string arguments, string id, - string name, string serverLabel, + string name, + string arguments, + global::tryAGI.OpenAI.RealtimeMCPToolCallType type, string? approvalRequestId, - object? error, string? output, - global::tryAGI.OpenAI.RealtimeMCPToolCallType type) + global::tryAGI.OpenAI.OneOf? error) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Type = type; this.ApprovalRequestId = approvalRequestId; - this.Error = error; this.Output = output; - this.Type = type; + this.Error = error; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.Json.g.cs new file mode 100644 index 00000000..d06994fe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeMCPToolCallApprovalRequestId + { + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeMCPToolCallApprovalRequestId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.g.cs new file mode 100644 index 00000000..60524b0b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallApprovalRequestId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeMCPToolCallApprovalRequestId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.Json.g.cs new file mode 100644 index 00000000..0ccd9e69 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeMCPToolCallError + { + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallError), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeMCPToolCallError; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallError), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeMCPToolCallError; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.g.cs new file mode 100644 index 00000000..476ac66b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallError.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeMCPToolCallError + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.Json.g.cs new file mode 100644 index 00000000..1984e3dd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeMCPToolCallOutput + { + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeMCPToolCallOutput; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeMCPToolCallOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeMCPToolCallOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeMCPToolCallOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.g.cs new file mode 100644 index 00000000..d97f2021 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeMCPToolCallOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolExecutionError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolExecutionError.g.cs index 53a5cbc8..4c08defc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolExecutionError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolExecutionError.g.cs @@ -11,16 +11,16 @@ public sealed partial class RealtimeMCPToolExecutionError /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPToolExecutionErrorTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeMCPToolExecutionErrorType Type { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeMCPToolExecutionErrorTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeMCPToolExecutionErrorType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,8 +31,8 @@ public sealed partial class RealtimeMCPToolExecutionError /// /// Initializes a new instance of the class. /// - /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeRateLimitsUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeRateLimitsUpdated.g.cs index f755a0e5..ecd4051a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeRateLimitsUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeRateLimitsUpdated.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Emitted after every "response.done" event to indicate the updated rate limits. + /// Emitted after every "response.done" event to indicate the updated rate limits.
+ /// Example: {"event_id":"event_5758","type":"rate_limits.updated","rate_limits":[{"name":"requests","limit":1000,"remaining":999,"reset_seconds":60},{"name":"tokens","limit":50000,"remaining":49950,"reset_seconds":60}]} ///
public sealed partial class RealtimeRateLimitsUpdated { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponse.g.cs index a379b691..d7464fa1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponse.g.cs @@ -35,8 +35,10 @@ public sealed partial class RealtimeResponse public global::tryAGI.OpenAI.RealtimeResponseStatus? Status { get; set; } /// - /// Additional details about the status. + /// Additional details about the status.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
+ /// openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 [global::System.Text.Json.Serialization.JsonPropertyName("status_details")] public object? StatusDetails { get; set; } @@ -74,7 +76,8 @@ public sealed partial class RealtimeResponse /// Example: in_progress /// /// - /// Additional details about the status. + /// Additional details about the status.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The list of output items generated by the response. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDelta.g.cs index ddd01869..0e282b59 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDelta.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated audio is updated. + /// Returned when the model-generated audio is updated.
+ /// Example: {"event_id":"event_4950","type":"response.audio.delta","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"delta":"Base64EncodedAudioDelta"} ///
public sealed partial class RealtimeResponseAudioDelta { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDone.g.cs index 6a43bd92..82f94672 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_5152","type":"response.audio.done","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0} ///
public sealed partial class RealtimeResponseAudioDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDelta.g.cs index f24c8f21..be3ec844 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDelta.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated transcription of audio output is updated. + /// Returned when the model-generated transcription of audio output is updated.
+ /// Example: {"event_id":"event_4546","type":"response.audio_transcript.delta","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"delta":"Hello, how can I a"} ///
public sealed partial class RealtimeResponseAudioTranscriptDelta { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDone.g.cs index d8ec7df4..0b77fe53 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseAudioTranscriptDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_4748","type":"response.audio_transcript.done","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"transcript":"Hello, how can I assist you today?"} ///
public sealed partial class RealtimeResponseAudioTranscriptDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCancel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCancel.g.cs index f082b1a3..c8cf8e52 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCancel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCancel.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event to cancel an in-progress response. + /// Send this event to cancel an in-progress response.
+ /// Example: {"event_id":"event_567","type":"response.cancel"} ///
public sealed partial class RealtimeResponseCancel { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartAdded.g.cs index 5052236a..4dea7ca0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartAdded.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a new content part is added to an assistant message item during response generation. + /// Returned when a new content part is added to an assistant message item during response generation.
+ /// Example: {"event_id":"event_3738","type":"response.content_part.added","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"part":{"type":"text","text":""}} ///
public sealed partial class RealtimeResponseContentPartAdded { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartDone.g.cs index e31c90ab..5b4122c6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseContentPartDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_3940","type":"response.content_part.done","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"part":{"type":"text","text":"Sure, I can help with that."}} ///
public sealed partial class RealtimeResponseContentPartDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParams.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParams.g.cs index 3411ac4c..56582876 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParams.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParams.g.cs @@ -11,38 +11,40 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeResponseCreateParams { /// - /// Configuration for audio input and output. + /// The set of modalities the model used to respond, currently the only possible values are
+ /// `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
+ /// output to mode `text` will disable audio output from the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] + public global::System.Collections.Generic.IList? OutputModalities { get; set; } /// - /// Controls which conversation the response is added to. Currently supports
- /// `auto` and `none`, with `auto` as the default value. The `auto` value
- /// means that the contents of the response will be added to the default
- /// conversation. Set this to `none` to create an out-of-band response which
- /// will not add items to default conversation. + /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
+ /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Conversation { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } /// - /// Input items to include in the prompt for the model. Using this field
- /// creates a new context for this Response instead of using the default
- /// conversation. An empty array `[]` will clear the context for this Response.
- /// Note that this can include references to items that previously appeared in the session
- /// using their id. + /// Configuration for audio input and output. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input")] - public global::System.Collections.Generic.IList? Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? Audio { get; set; } /// - /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
- /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. + /// Tools available to the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] - public string? Instructions { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } + + /// + /// How the model chooses tools. Provide one of the string modes or force a specific
+ /// function/MCP tool.
+ /// Default Value: auto + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ToolChoice { get; set; } /// /// Maximum number of output tokens for a single assistant response,
@@ -51,48 +53,41 @@ public sealed partial class RealtimeResponseCreateParams /// given model. Defaults to `inf`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// Controls which conversation the response is added to. Currently supports
+ /// `auto` and `none`, with `auto` as the default value. The `auto` value
+ /// means that the contents of the response will be added to the default
+ /// conversation. Set this to `none` to create an out-of-band response which
+ /// will not add items to default conversation. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Conversation { get; set; } /// - /// The set of modalities the model used to respond, currently the only possible values are
- /// `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
- /// output to mode `text` will disable audio output from the model. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] - public global::System.Collections.Generic.IList? OutputModalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } /// - /// How the model chooses tools. Provide one of the string modes or force a specific
- /// function/MCP tool.
- /// Default Value: auto - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ToolChoice { get; set; } - - /// - /// Tools available to the model. + /// Input items to include in the prompt for the model. Using this field
+ /// creates a new context for this Response instead of using the default
+ /// conversation. An empty array `[]` will clear the context for this Response.
+ /// Note that this can include references to items that previously appeared in the session
+ /// using their id. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public global::System.Collections.Generic.IList? Input { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -103,9 +98,32 @@ public sealed partial class RealtimeResponseCreateParams /// /// Initializes a new instance of the class. /// + /// + /// The set of modalities the model used to respond, currently the only possible values are
+ /// `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
+ /// output to mode `text` will disable audio output from the model. + /// + /// + /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
+ /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. + /// /// /// Configuration for audio input and output. /// + /// + /// Tools available to the model. + /// + /// + /// How the model chooses tools. Provide one of the string modes or force a specific
+ /// function/MCP tool.
+ /// Default Value: auto + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// /// /// Controls which conversation the response is added to. Currently supports
/// `auto` and `none`, with `auto` as the default value. The `auto` value
@@ -113,6 +131,8 @@ public sealed partial class RealtimeResponseCreateParams /// conversation. Set this to `none` to create an out-of-band response which
/// will not add items to default conversation. /// + /// + /// /// /// Input items to include in the prompt for the model. Using this field
/// creates a new context for this Response instead of using the default
@@ -120,65 +140,31 @@ public sealed partial class RealtimeResponseCreateParams /// Note that this can include references to items that previously appeared in the session
/// using their id. /// - /// - /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
- /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. - /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// - /// - /// The set of modalities the model used to respond, currently the only possible values are
- /// `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the
- /// output to mode `text` will disable audio output from the model. - /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). - /// - /// - /// How the model chooses tools. Provide one of the string modes or force a specific
- /// function/MCP tool.
- /// Default Value: auto - /// - /// - /// Tools available to the model. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeResponseCreateParams( - global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? audio, - global::tryAGI.OpenAI.AnyOf? conversation, - global::System.Collections.Generic.IList? input, + global::System.Collections.Generic.IList? outputModalities, string? instructions, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, + global::tryAGI.OpenAI.RealtimeResponseCreateParamsAudio? audio, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.OneOf? toolChoice, + global::tryAGI.OpenAI.OneOf? maxOutputTokens, + global::tryAGI.OpenAI.OneOf? conversation, global::System.Collections.Generic.Dictionary? metadata, - global::System.Collections.Generic.IList? outputModalities, - global::tryAGI.OpenAI.Prompt2? prompt, - global::tryAGI.OpenAI.AnyOf? toolChoice, - global::System.Collections.Generic.IList>? tools) + global::tryAGI.OpenAI.PromptVariant1? prompt, + global::System.Collections.Generic.IList? input) { - this.Audio = audio; - this.Conversation = conversation; - this.Input = input; + this.OutputModalities = outputModalities; this.Instructions = instructions; + this.Audio = audio; + this.Tools = tools; + this.ToolChoice = toolChoice; this.MaxOutputTokens = maxOutputTokens; + this.Conversation = conversation; this.Metadata = metadata; - this.OutputModalities = outputModalities; this.Prompt = prompt; - this.ToolChoice = toolChoice; - this.Tools = tools; + this.Input = input; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParamsAudioOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParamsAudioOutput.g.cs index df32ff83..4a383619 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParamsAudioOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreateParamsAudioOutput.g.cs @@ -9,19 +9,24 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeResponseCreateParamsAudioOutput { /// - /// + /// The format of the output audio. /// [global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } /// - /// Example: ash + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with
+ /// an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
+ /// during the session once the model has responded with audio at least once.
+ /// We recommend `marin` and `cedar` for best quality.
+ /// Default Value: alloy ///
- /// ash [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? Voice { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -32,16 +37,24 @@ public sealed partial class RealtimeResponseCreateParamsAudioOutput /// /// Initializes a new instance of the class. /// - /// + /// + /// The format of the output audio. + /// /// - /// Example: ash + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with
+ /// an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
+ /// during the session once the model has responded with audio at least once.
+ /// We recommend `marin` and `cedar` for best quality.
+ /// Default Value: alloy /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeResponseCreateParamsAudioOutput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice) { this.Format = format; this.Voice = voice; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreated.g.cs index 7ff60dfd..f6d58570 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseCreated.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a new Response is created. The first event of response creation, where the response is in an initial state of "in_progress". + /// Returned when a new Response is created. The first event of response creation, where the response is in an initial state of "in_progress".
+ /// Example: {"event_id":"event_2930","type":"response.created","response":{"id":"resp_001","object":"realtime.response","status":"in_progress","status_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","output":[],"usage":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}} ///
public sealed partial class RealtimeResponseCreated { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseDone.g.cs index fd1d53f4..1c92a995 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a Response is done streaming. Always emitted, no matter the final state. + /// Returned when a Response is done streaming. Always emitted, no matter the final state.
+ /// Example: {"event_id":"event_3132","type":"response.done","response":{"id":"resp_001","object":"realtime.response","status":"completed","status_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","output":[{"id":"msg_006","object":"realtime.item","type":"message","status":"completed","role":"assistant","content":[{"type":"text","text":"Sure, how can I assist you today?"}]}],"usage":{"total_tokens":50,"input_tokens":20,"output_tokens":30}}} ///
public sealed partial class RealtimeResponseDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDelta.g.cs index a4f3f047..f4b0a502 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDelta.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated function call arguments are updated. + /// Returned when the model-generated function call arguments are updated.
+ /// Example: {"event_id":"event_5354","type":"response.function_call_arguments.delta","response_id":"resp_002","item_id":"fc_001","output_index":0,"call_id":"call_001","delta":"{\u0022location\u0022: \u0022San\u0022"} ///
public sealed partial class RealtimeResponseFunctionCallArgumentsDelta { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDone.g.cs index 46646f80..10a42b22 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseFunctionCallArgumentsDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_5556","type":"response.function_call_arguments.done","response_id":"resp_002","item_id":"fc_001","output_index":0,"call_id":"call_001","arguments":"{\u0022location\u0022: \u0022San Francisco\u0022}"} ///
public sealed partial class RealtimeResponseFunctionCallArgumentsDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemAdded.g.cs index a0519869..c55fd881 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemAdded.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when a new Item is created during response generation. + /// Returned when a new Item is created during response generation.
+ /// Example: {"event_id":"event_3334","type":"response.output_item.added","response_id":"resp_001","output_index":0,"item":{"id":"msg_007","object":"realtime.item","type":"message","status":"in_progress","role":"assistant","content":[]}} ///
public sealed partial class RealtimeResponseOutputItemAdded { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemDone.g.cs index 9c328a92..935997de 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseOutputItemDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_3536","type":"response.output_item.done","response_id":"resp_001","output_index":0,"item":{"id":"msg_007","object":"realtime.item","type":"message","status":"completed","role":"assistant","content":[{"type":"text","text":"Sure, I can help with that."}]}} ///
public sealed partial class RealtimeResponseOutputItemDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseStatusDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseStatusDetails.g.cs index c06b0111..20eda5d1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseStatusDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseStatusDetails.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Additional details about the status. + /// Additional details about the status.
+ /// Example: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class RealtimeResponseStatusDetails { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDelta.g.cs index 9bb59515..1269a73d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDelta.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the text value of a "text" content part is updated. + /// Returned when the text value of a "text" content part is updated.
+ /// Example: {"event_id":"event_4142","type":"response.text.delta","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"delta":"Sure, I can h"} ///
public sealed partial class RealtimeResponseTextDelta { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDone.g.cs index 4b784b79..e4cd4b76 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeResponseTextDone.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_4344","type":"response.text.done","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"text":"Sure, I can help with that."} ///
public sealed partial class RealtimeResponseTextDone { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEvent.g.cs index 1bf7b65e..fcf8df4e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEvent.g.cs @@ -10,7 +10,8 @@ namespace tryAGI.OpenAI public readonly partial struct RealtimeServerEvent : global::System.IEquatable { /// - /// Returned when an error occurs. + /// Returned when an error occurs.
+ /// Example: {"event_id":"event_890","type":"error","error":{"type":"invalid_request_error","code":"invalid_event","message":"The \u0027type\u0027 field is missing.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","event_id":"event_567"}} ///
#if NET6_0_OR_GREATER public global::tryAGI.OpenAI.RealtimeError? Error { get; init; } @@ -27,389 +28,685 @@ namespace tryAGI.OpenAI public bool IsError => Error != null; /// - /// + /// Returned when a session is created. Emitted automatically when a new connection is established. /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeError value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeError?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeSessionCreated? SessionCreated { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeSessionCreated? SessionCreated { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeError?(RealtimeServerEvent @this) => @this.Error; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionCreated))] +#endif + public bool IsSessionCreated => SessionCreated != null; + + /// + /// Returned when a session is updated. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeSessionUpdated? SessionUpdated { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeSessionUpdated? SessionUpdated { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeError? value) - { - Error = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionUpdated))] +#endif + public bool IsSessionUpdated => SessionUpdated != null; /// - /// Returned when a session is created. Emitted automatically when a new connection is established. + /// Returned when a conversation is created. Emitted right after session creation.
+ /// Example: {"event_id":"event_9101","type":"conversation.created","conversation":{"id":"conv_001","object":"realtime.conversation"}} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeSessionCreated? SessionCreated { get; init; } + public global::tryAGI.OpenAI.RealtimeConversationCreated? ConversationCreated { get; init; } #else - public global::tryAGI.OpenAI.RealtimeSessionCreated? SessionCreated { get; } + public global::tryAGI.OpenAI.RealtimeConversationCreated? ConversationCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionCreated))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationCreated))] +#endif + public bool IsConversationCreated => ConversationCreated != null; + + /// + /// Returned when a conversation item is created.
+ /// Example: {"event_id":"event_1920","type":"conversation.item.created","previous_item_id":"msg_002","item":{"id":"msg_003","object":"realtime.item","type":"message","status":"completed","role":"user","content":[{"type":"input_audio","transcript":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}]}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeConversationItemCreated? ConversationItemCreated { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeConversationItemCreated? ConversationItemCreated { get; } #endif - public bool IsSessionCreated => SessionCreated != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeSessionCreated?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemCreated))] +#endif + public bool IsConversationItemCreated => ConversationItemCreated != null; + + /// + /// Returned when input audio transcription is enabled and a transcription succeeds.
+ /// Example: {"event_id":"event_2122","type":"conversation.item.input_audio_transcription.completed","item_id":"msg_003","content_index":0,"transcript":"Hello, how are you?"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? ConversationItemInputAudioTranscriptionCompleted { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? ConversationItemInputAudioTranscriptionCompleted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeSessionCreated?(RealtimeServerEvent @this) => @this.SessionCreated; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemInputAudioTranscriptionCompleted))] +#endif + public bool IsConversationItemInputAudioTranscriptionCompleted => ConversationItemInputAudioTranscriptionCompleted != null; + + /// + /// Returned when input audio transcription is configured, and a transcription request for a user message failed.
+ /// Example: {"event_id":"event_2324","type":"conversation.item.input_audio_transcription.failed","item_id":"msg_003","content_index":0,"error":{"type":"transcription_error","code":"audio_unintelligible","message":"The audio could not be transcribed.","param":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? ConversationItemInputAudioTranscriptionFailed { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? ConversationItemInputAudioTranscriptionFailed { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionCreated? value) - { - SessionCreated = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemInputAudioTranscriptionFailed))] +#endif + public bool IsConversationItemInputAudioTranscriptionFailed => ConversationItemInputAudioTranscriptionFailed != null; /// - /// Returned when a session is updated. + /// Returned when an earlier assistant audio message item is truncated by the client.
+ /// Example: {"event_id":"event_2526","type":"conversation.item.truncated","item_id":"msg_004","content_index":0,"audio_end_ms":1500} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeSessionUpdated? SessionUpdated { get; init; } + public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? ConversationItemTruncated { get; init; } #else - public global::tryAGI.OpenAI.RealtimeSessionUpdated? SessionUpdated { get; } + public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? ConversationItemTruncated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SessionUpdated))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemTruncated))] +#endif + public bool IsConversationItemTruncated => ConversationItemTruncated != null; + + /// + /// Returned when an item in the conversation is deleted.
+ /// Example: {"event_id":"event_2728","type":"conversation.item.deleted","item_id":"msg_005"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? ConversationItemDeleted { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? ConversationItemDeleted { get; } #endif - public bool IsSessionUpdated => SessionUpdated != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionUpdated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeSessionUpdated?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemDeleted))] +#endif + public bool IsConversationItemDeleted => ConversationItemDeleted != null; + + /// + /// Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode.
+ /// Example: {"event_id":"event_1121","type":"input_audio_buffer.committed","previous_item_id":"msg_001","item_id":"msg_002"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? InputAudioBufferCommitted { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? InputAudioBufferCommitted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeSessionUpdated?(RealtimeServerEvent @this) => @this.SessionUpdated; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferCommitted))] +#endif + public bool IsInputAudioBufferCommitted => InputAudioBufferCommitted != null; + + /// + /// Returned when the input audio buffer is cleared by the client.
+ /// Example: {"event_id":"event_1314","type":"input_audio_buffer.cleared"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? InputAudioBufferCleared { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? InputAudioBufferCleared { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionUpdated? value) - { - SessionUpdated = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferCleared))] +#endif + public bool IsInputAudioBufferCleared => InputAudioBufferCleared != null; /// - /// Returned when a conversation is created. Emitted right after session creation. + /// Returned in server turn detection mode when speech is detected.
+ /// Example: {"event_id":"event_1516","type":"input_audio_buffer.speech_started","audio_start_ms":1000,"item_id":"msg_003"} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationCreated? ConversationCreated { get; init; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? InputAudioBufferSpeechStarted { get; init; } #else - public global::tryAGI.OpenAI.RealtimeConversationCreated? ConversationCreated { get; } + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? InputAudioBufferSpeechStarted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationCreated))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferSpeechStarted))] +#endif + public bool IsInputAudioBufferSpeechStarted => InputAudioBufferSpeechStarted != null; + + /// + /// Returned in server turn detection mode when speech stops.
+ /// Example: {"event_id":"event_1718","type":"input_audio_buffer.speech_stopped","audio_end_ms":2000,"item_id":"msg_003"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? InputAudioBufferSpeechStopped { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? InputAudioBufferSpeechStopped { get; } #endif - public bool IsConversationCreated => ConversationCreated != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationCreated?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferSpeechStopped))] +#endif + public bool IsInputAudioBufferSpeechStopped => InputAudioBufferSpeechStopped != null; + + /// + /// Returned when a new Response is created. The first event of response creation, where the response is in an initial state of "in_progress".
+ /// Example: {"event_id":"event_2930","type":"response.created","response":{"id":"resp_001","object":"realtime.response","status":"in_progress","status_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","output":[],"usage":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseCreated? ResponseCreated { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseCreated? ResponseCreated { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationCreated?(RealtimeServerEvent @this) => @this.ConversationCreated; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCreated))] +#endif + public bool IsResponseCreated => ResponseCreated != null; + + /// + /// Returned when a Response is done streaming. Always emitted, no matter the final state.
+ /// Example: {"event_id":"event_3132","type":"response.done","response":{"id":"resp_001","object":"realtime.response","status":"completed","status_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","output":[{"id":"msg_006","object":"realtime.item","type":"message","status":"completed","role":"assistant","content":[{"type":"text","text":"Sure, how can I assist you today?"}]}],"usage":{"total_tokens":50,"input_tokens":20,"output_tokens":30}}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseDone? ResponseDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseDone? ResponseDone { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationCreated? value) - { - ConversationCreated = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseDone))] +#endif + public bool IsResponseDone => ResponseDone != null; /// - /// Returned when a conversation item is created. + /// Returned when a new Item is created during response generation.
+ /// Example: {"event_id":"event_3334","type":"response.output_item.added","response_id":"resp_001","output_index":0,"item":{"id":"msg_007","object":"realtime.item","type":"message","status":"in_progress","role":"assistant","content":[]}} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationItemCreated? ConversationItemCreated { get; init; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? ResponseOutputItemAdded { get; init; } #else - public global::tryAGI.OpenAI.RealtimeConversationItemCreated? ConversationItemCreated { get; } + public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? ResponseOutputItemAdded { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemCreated))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemAdded))] +#endif + public bool IsResponseOutputItemAdded => ResponseOutputItemAdded != null; + + /// + /// Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_3536","type":"response.output_item.done","response_id":"resp_001","output_index":0,"item":{"id":"msg_007","object":"realtime.item","type":"message","status":"completed","role":"assistant","content":[{"type":"text","text":"Sure, I can help with that."}]}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? ResponseOutputItemDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? ResponseOutputItemDone { get; } #endif - public bool IsConversationItemCreated => ConversationItemCreated != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemCreated?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemDone))] +#endif + public bool IsResponseOutputItemDone => ResponseOutputItemDone != null; + + /// + /// Returned when a new content part is added to an assistant message item during response generation.
+ /// Example: {"event_id":"event_3738","type":"response.content_part.added","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"part":{"type":"text","text":""}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? ResponseContentPartAdded { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? ResponseContentPartAdded { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemCreated?(RealtimeServerEvent @this) => @this.ConversationItemCreated; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartAdded))] +#endif + public bool IsResponseContentPartAdded => ResponseContentPartAdded != null; + + /// + /// Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_3940","type":"response.content_part.done","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"part":{"type":"text","text":"Sure, I can help with that."}} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? ResponseContentPartDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? ResponseContentPartDone { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemCreated? value) - { - ConversationItemCreated = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartDone))] +#endif + public bool IsResponseContentPartDone => ResponseContentPartDone != null; /// - /// Returned when input audio transcription is enabled and a transcription succeeds. + /// Returned when the text value of a "text" content part is updated.
+ /// Example: {"event_id":"event_4142","type":"response.text.delta","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"delta":"Sure, I can h"} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? ConversationItemInputAudioTranscriptionCompleted { get; init; } + public global::tryAGI.OpenAI.RealtimeResponseTextDelta? ResponseTextDelta { get; init; } #else - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? ConversationItemInputAudioTranscriptionCompleted { get; } + public global::tryAGI.OpenAI.RealtimeResponseTextDelta? ResponseTextDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemInputAudioTranscriptionCompleted))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseTextDelta))] +#endif + public bool IsResponseTextDelta => ResponseTextDelta != null; + + /// + /// Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_4344","type":"response.text.done","response_id":"resp_001","item_id":"msg_007","output_index":0,"content_index":0,"text":"Sure, I can help with that."} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseTextDone? ResponseTextDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseTextDone? ResponseTextDone { get; } #endif - public bool IsConversationItemInputAudioTranscriptionCompleted => ConversationItemInputAudioTranscriptionCompleted != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseTextDone))] +#endif + public bool IsResponseTextDone => ResponseTextDone != null; + + /// + /// Returned when the model-generated transcription of audio output is updated.
+ /// Example: {"event_id":"event_4546","type":"response.audio_transcript.delta","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"delta":"Hello, how can I a"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? ResponseAudioTranscriptDelta { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? ResponseAudioTranscriptDelta { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted?(RealtimeServerEvent @this) => @this.ConversationItemInputAudioTranscriptionCompleted; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDelta))] +#endif + public bool IsResponseAudioTranscriptDelta => ResponseAudioTranscriptDelta != null; + + /// + /// Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_4748","type":"response.audio_transcript.done","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"transcript":"Hello, how can I assist you today?"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? ResponseAudioTranscriptDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? ResponseAudioTranscriptDone { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? value) - { - ConversationItemInputAudioTranscriptionCompleted = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDone))] +#endif + public bool IsResponseAudioTranscriptDone => ResponseAudioTranscriptDone != null; /// - /// Returned when input audio transcription is configured, and a transcription request for a user message failed. + /// Returned when the model-generated audio is updated.
+ /// Example: {"event_id":"event_4950","type":"response.audio.delta","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0,"delta":"Base64EncodedAudioDelta"} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? ConversationItemInputAudioTranscriptionFailed { get; init; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? ResponseAudioDelta { get; init; } #else - public global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? ConversationItemInputAudioTranscriptionFailed { get; } + public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? ResponseAudioDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemInputAudioTranscriptionFailed))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDelta))] +#endif + public bool IsResponseAudioDelta => ResponseAudioDelta != null; + + /// + /// Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_5152","type":"response.audio.done","response_id":"resp_001","item_id":"msg_008","output_index":0,"content_index":0} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseAudioDone? ResponseAudioDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseAudioDone? ResponseAudioDone { get; } #endif - public bool IsConversationItemInputAudioTranscriptionFailed => ConversationItemInputAudioTranscriptionFailed != null; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDone))] +#endif + public bool IsResponseAudioDone => ResponseAudioDone != null; + + /// + /// Returned when the model-generated function call arguments are updated.
+ /// Example: {"event_id":"event_5354","type":"response.function_call_arguments.delta","response_id":"resp_002","item_id":"fc_001","output_index":0,"call_id":"call_001","delta":"{\u0022location\u0022: \u0022San\u0022"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? ResponseFunctionCallArgumentsDelta { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? ResponseFunctionCallArgumentsDelta { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed?(RealtimeServerEvent @this) => @this.ConversationItemInputAudioTranscriptionFailed; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDelta))] +#endif + public bool IsResponseFunctionCallArgumentsDelta => ResponseFunctionCallArgumentsDelta != null; + + /// + /// Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
+ /// Example: {"event_id":"event_5556","type":"response.function_call_arguments.done","response_id":"resp_002","item_id":"fc_001","output_index":0,"call_id":"call_001","arguments":"{\u0022location\u0022: \u0022San Francisco\u0022}"} + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? ResponseFunctionCallArgumentsDone { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? ResponseFunctionCallArgumentsDone { get; } +#endif /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? value) - { - ConversationItemInputAudioTranscriptionFailed = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDone))] +#endif + public bool IsResponseFunctionCallArgumentsDone => ResponseFunctionCallArgumentsDone != null; /// - /// Returned when an earlier assistant audio message item is truncated by the client. + /// Emitted after every "response.done" event to indicate the updated rate limits.
+ /// Example: {"event_id":"event_5758","type":"rate_limits.updated","rate_limits":[{"name":"requests","limit":1000,"remaining":999,"reset_seconds":60},{"name":"tokens","limit":50000,"remaining":49950,"reset_seconds":60}]} ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? ConversationItemTruncated { get; init; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? RateLimitsUpdated { get; init; } #else - public global::tryAGI.OpenAI.RealtimeConversationItemTruncated? ConversationItemTruncated { get; } + public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? RateLimitsUpdated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemTruncated))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RateLimitsUpdated))] #endif - public bool IsConversationItemTruncated => ConversationItemTruncated != null; + public bool IsRateLimitsUpdated => RateLimitsUpdated != null; + /// + /// + /// + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeError value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeError?)value); /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemTruncated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemTruncated?)value); + public static implicit operator global::tryAGI.OpenAI.RealtimeError?(RealtimeServerEvent @this) => @this.Error; /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemTruncated?(RealtimeServerEvent @this) => @this.ConversationItemTruncated; + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeError? value) + { + Error = value; + } /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemTruncated? value) + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeSessionCreated?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeSessionCreated?(RealtimeServerEvent @this) => @this.SessionCreated; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionCreated? value) { - ConversationItemTruncated = value; + SessionCreated = value; } /// - /// Returned when an item in the conversation is deleted. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? ConversationItemDeleted { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeConversationItemDeleted? ConversationItemDeleted { get; } -#endif + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionUpdated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeSessionUpdated?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ConversationItemDeleted))] -#endif - public bool IsConversationItemDeleted => ConversationItemDeleted != null; + public static implicit operator global::tryAGI.OpenAI.RealtimeSessionUpdated?(RealtimeServerEvent @this) => @this.SessionUpdated; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemDeleted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemDeleted?)value); + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeSessionUpdated? value) + { + SessionUpdated = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemDeleted?(RealtimeServerEvent @this) => @this.ConversationItemDeleted; + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationCreated?)value); /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemDeleted? value) + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationCreated?(RealtimeServerEvent @this) => @this.ConversationCreated; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationCreated? value) { - ConversationItemDeleted = value; + ConversationCreated = value; } /// - /// Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? InputAudioBufferCommitted { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? InputAudioBufferCommitted { get; } -#endif + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemCreated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemCreated?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferCommitted))] -#endif - public bool IsInputAudioBufferCommitted => InputAudioBufferCommitted != null; + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemCreated?(RealtimeServerEvent @this) => @this.ConversationItemCreated; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted?)value); + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemCreated? value) + { + ConversationItemCreated = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted?(RealtimeServerEvent @this) => @this.InputAudioBufferCommitted; + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted?)value); /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? value) + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted?(RealtimeServerEvent @this) => @this.ConversationItemInputAudioTranscriptionCompleted; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? value) { - InputAudioBufferCommitted = value; + ConversationItemInputAudioTranscriptionCompleted = value; } /// - /// Returned when the input audio buffer is cleared by the client. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? InputAudioBufferCleared { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? InputAudioBufferCleared { get; } -#endif + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferCleared))] -#endif - public bool IsInputAudioBufferCleared => InputAudioBufferCleared != null; + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed?(RealtimeServerEvent @this) => @this.ConversationItemInputAudioTranscriptionFailed; /// /// /// - public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared?)value); + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? value) + { + ConversationItemInputAudioTranscriptionFailed = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared?(RealtimeServerEvent @this) => @this.InputAudioBufferCleared; + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemTruncated value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemTruncated?)value); /// /// /// - public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? value) + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemTruncated?(RealtimeServerEvent @this) => @this.ConversationItemTruncated; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemTruncated? value) { - InputAudioBufferCleared = value; + ConversationItemTruncated = value; } /// - /// Returned in server turn detection mode when speech is detected. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? InputAudioBufferSpeechStarted { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStarted? InputAudioBufferSpeechStarted { get; } -#endif + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemDeleted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeConversationItemDeleted?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferSpeechStarted))] -#endif - public bool IsInputAudioBufferSpeechStarted => InputAudioBufferSpeechStarted != null; + public static implicit operator global::tryAGI.OpenAI.RealtimeConversationItemDeleted?(RealtimeServerEvent @this) => @this.ConversationItemDeleted; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeConversationItemDeleted? value) + { + ConversationItemDeleted = value; + } + + /// + /// + /// + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted?(RealtimeServerEvent @this) => @this.InputAudioBufferCommitted; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCommitted? value) + { + InputAudioBufferCommitted = value; + } + + /// + /// + /// + public static implicit operator RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared value) => new RealtimeServerEvent((global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared?(RealtimeServerEvent @this) => @this.InputAudioBufferCleared; + + /// + /// + /// + public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferCleared? value) + { + InputAudioBufferCleared = value; + } /// /// @@ -429,23 +726,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechS InputAudioBufferSpeechStarted = value; } - /// - /// Returned in server turn detection mode when speech stops. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? InputAudioBufferSpeechStopped { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechStopped? InputAudioBufferSpeechStopped { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputAudioBufferSpeechStopped))] -#endif - public bool IsInputAudioBufferSpeechStopped => InputAudioBufferSpeechStopped != null; - /// /// /// @@ -464,23 +744,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeInputAudioBufferSpeechS InputAudioBufferSpeechStopped = value; } - /// - /// Returned when a new Response is created. The first event of response creation, where the response is in an initial state of "in_progress". - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseCreated? ResponseCreated { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseCreated? ResponseCreated { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCreated))] -#endif - public bool IsResponseCreated => ResponseCreated != null; - /// /// /// @@ -499,23 +762,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseCreated? value) ResponseCreated = value; } - /// - /// Returned when a Response is done streaming. Always emitted, no matter the final state. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseDone? ResponseDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseDone? ResponseDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseDone))] -#endif - public bool IsResponseDone => ResponseDone != null; - /// /// /// @@ -534,23 +780,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseDone? value) ResponseDone = value; } - /// - /// Returned when a new Item is created during response generation. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? ResponseOutputItemAdded { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded? ResponseOutputItemAdded { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemAdded))] -#endif - public bool IsResponseOutputItemAdded => ResponseOutputItemAdded != null; - /// /// /// @@ -569,23 +798,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseOutputItemAdded ResponseOutputItemAdded = value; } - /// - /// Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? ResponseOutputItemDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? ResponseOutputItemDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemDone))] -#endif - public bool IsResponseOutputItemDone => ResponseOutputItemDone != null; - /// /// /// @@ -604,23 +816,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseOutputItemDone? ResponseOutputItemDone = value; } - /// - /// Returned when a new content part is added to an assistant message item during response generation. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? ResponseContentPartAdded { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseContentPartAdded? ResponseContentPartAdded { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartAdded))] -#endif - public bool IsResponseContentPartAdded => ResponseContentPartAdded != null; - /// /// /// @@ -639,23 +834,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseContentPartAdde ResponseContentPartAdded = value; } - /// - /// Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? ResponseContentPartDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseContentPartDone? ResponseContentPartDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartDone))] -#endif - public bool IsResponseContentPartDone => ResponseContentPartDone != null; - /// /// /// @@ -674,23 +852,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseContentPartDone ResponseContentPartDone = value; } - /// - /// Returned when the text value of a "text" content part is updated. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseTextDelta? ResponseTextDelta { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseTextDelta? ResponseTextDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseTextDelta))] -#endif - public bool IsResponseTextDelta => ResponseTextDelta != null; - /// /// /// @@ -709,23 +870,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseTextDelta? valu ResponseTextDelta = value; } - /// - /// Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseTextDone? ResponseTextDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseTextDone? ResponseTextDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseTextDone))] -#endif - public bool IsResponseTextDone => ResponseTextDone != null; - /// /// /// @@ -744,23 +888,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseTextDone? value ResponseTextDone = value; } - /// - /// Returned when the model-generated transcription of audio output is updated. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? ResponseAudioTranscriptDelta { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDelta? ResponseAudioTranscriptDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDelta))] -#endif - public bool IsResponseAudioTranscriptDelta => ResponseAudioTranscriptDelta != null; - /// /// /// @@ -779,23 +906,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseAudioTranscript ResponseAudioTranscriptDelta = value; } - /// - /// Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? ResponseAudioTranscriptDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseAudioTranscriptDone? ResponseAudioTranscriptDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDone))] -#endif - public bool IsResponseAudioTranscriptDone => ResponseAudioTranscriptDone != null; - /// /// /// @@ -814,23 +924,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseAudioTranscript ResponseAudioTranscriptDone = value; } - /// - /// Returned when the model-generated audio is updated. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? ResponseAudioDelta { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseAudioDelta? ResponseAudioDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDelta))] -#endif - public bool IsResponseAudioDelta => ResponseAudioDelta != null; - /// /// /// @@ -849,23 +942,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseAudioDelta? val ResponseAudioDelta = value; } - /// - /// Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseAudioDone? ResponseAudioDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseAudioDone? ResponseAudioDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDone))] -#endif - public bool IsResponseAudioDone => ResponseAudioDone != null; - /// /// /// @@ -884,23 +960,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseAudioDone? valu ResponseAudioDone = value; } - /// - /// Returned when the model-generated function call arguments are updated. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? ResponseFunctionCallArgumentsDelta { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDelta? ResponseFunctionCallArgumentsDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDelta))] -#endif - public bool IsResponseFunctionCallArgumentsDelta => ResponseFunctionCallArgumentsDelta != null; - /// /// /// @@ -919,23 +978,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseFunctionCallArg ResponseFunctionCallArgumentsDelta = value; } - /// - /// Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? ResponseFunctionCallArgumentsDone { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeResponseFunctionCallArgumentsDone? ResponseFunctionCallArgumentsDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDone))] -#endif - public bool IsResponseFunctionCallArgumentsDone => ResponseFunctionCallArgumentsDone != null; - /// /// /// @@ -954,23 +996,6 @@ public RealtimeServerEvent(global::tryAGI.OpenAI.RealtimeResponseFunctionCallArg ResponseFunctionCallArgumentsDone = value; } - /// - /// Emitted after every "response.done" event to indicate the updated rate limits. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? RateLimitsUpdated { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeRateLimitsUpdated? RateLimitsUpdated { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RateLimitsUpdated))] -#endif - public bool IsRateLimitsUpdated => RateLimitsUpdated != null; - /// /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreated.g.cs index b6b51667..9cf22ab0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreated.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeServerEventConversationCreated { - /// - /// The conversation resource. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation Conversation { get; set; } - /// /// The unique ID of the server event. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeServerEventConversationCreated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedType Type { get; set; } + /// + /// The conversation resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation Conversation { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RealtimeServerEventConversationCreated /// /// Initializes a new instance of the class. /// - /// - /// The conversation resource. - /// /// /// The unique ID of the server event. /// /// /// The event type, must be `conversation.created`. /// + /// + /// The conversation resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationCreated( - global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation conversation, string eventId, + global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversation conversation, global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedType type) { - this.Conversation = conversation ?? throw new global::System.ArgumentNullException(nameof(conversation)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.Conversation = conversation ?? throw new global::System.ArgumentNullException(nameof(conversation)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs index 8c57ba0c..995c5177 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs @@ -18,8 +18,7 @@ public sealed partial class RealtimeServerEventConversationCreatedConversation /// The object type, must be `realtime.conversation`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationCreatedConversationObjectJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject? Object { get; set; } + public string? Object { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,7 +40,7 @@ public sealed partial class RealtimeServerEventConversationCreatedConversation #endif public RealtimeServerEventConversationCreatedConversation( string? id, - global::tryAGI.OpenAI.RealtimeServerEventConversationCreatedConversationObject? @object) + string? @object) { this.Id = id; this.Object = @object; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversationObject.g.cs deleted file mode 100644 index d24a7b66..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationCreatedConversationObject.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The object type, must be `realtime.conversation`. - /// - public enum RealtimeServerEventConversationCreatedConversationObject - { - /// - /// - /// - RealtimeConversation, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RealtimeServerEventConversationCreatedConversationObjectExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RealtimeServerEventConversationCreatedConversationObject value) - { - return value switch - { - RealtimeServerEventConversationCreatedConversationObject.RealtimeConversation => "realtime.conversation", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RealtimeServerEventConversationCreatedConversationObject? ToEnum(string value) - { - return value switch - { - "realtime.conversation" => RealtimeServerEventConversationCreatedConversationObject.RealtimeConversation, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAdded.g.cs index b13682de..58ce5fd1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAdded.g.cs @@ -20,29 +20,28 @@ public sealed partial class RealtimeServerEventConversationItemAdded public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.added`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemAddedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType Type { get; set; } /// - /// The ID of the item that precedes this one, if any. This is used to
- /// maintain ordering when items are inserted. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.added`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemAddedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,6 +55,10 @@ public sealed partial class RealtimeServerEventConversationItemAdded /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.added`. + /// + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -63,26 +66,19 @@ public sealed partial class RealtimeServerEventConversationItemAdded /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The ID of the item that precedes this one, if any. This is used to
- /// maintain ordering when items are inserted. - /// - /// - /// The event type, must be `conversation.item.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemAdded( string eventId, global::tryAGI.OpenAI.RealtimeConversationItem item, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType type) + global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.Json.g.cs new file mode 100644 index 00000000..0eeb19b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventConversationItemAddedPreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemAddedPreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.g.cs new file mode 100644 index 00000000..71e8553d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemAddedPreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventConversationItemAddedPreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs index 12e6d4b0..f7ea7e2e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs @@ -24,30 +24,28 @@ public sealed partial class RealtimeServerEventConversationItemCreated public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.created`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemCreatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType Type { get; set; } /// - /// The ID of the preceding item in the Conversation context, allows the
- /// client to understand the order of the conversation. Can be `null` if the
- /// item has no predecessor. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.created`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemCreatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -61,6 +59,10 @@ public sealed partial class RealtimeServerEventConversationItemCreated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.created`. + /// + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -68,27 +70,19 @@ public sealed partial class RealtimeServerEventConversationItemCreated /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The ID of the preceding item in the Conversation context, allows the
- /// client to understand the order of the conversation. Can be `null` if the
- /// item has no predecessor. - /// - /// - /// The event type, must be `conversation.item.created`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemCreated( string eventId, global::tryAGI.OpenAI.RealtimeConversationItem item, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType type) + global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.Json.g.cs new file mode 100644 index 00000000..7463d5d7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventConversationItemCreatedPreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemCreatedPreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.g.cs new file mode 100644 index 00000000..13af0f5f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemCreatedPreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventConversationItemCreatedPreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs index 4e51066c..9fc0d3b9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs @@ -17,13 +17,6 @@ public sealed partial class RealtimeServerEventConversationItemDeleted [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the item that was deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `conversation.item.deleted`. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeServerEventConversationItemDeleted [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemDeletedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDeletedType Type { get; set; } + /// + /// The ID of the item that was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,12 +43,12 @@ public sealed partial class RealtimeServerEventConversationItemDeleted /// /// The unique ID of the server event. /// - /// - /// The ID of the item that was deleted. - /// /// /// The event type, must be `conversation.item.deleted`. /// + /// + /// The ID of the item that was deleted. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDone.g.cs index 84c2f7ae..6313f846 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDone.g.cs @@ -17,29 +17,28 @@ public sealed partial class RealtimeServerEventConversationItemDone public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `conversation.item.done`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType Type { get; set; } /// - /// The ID of the item that precedes this one, if any. This is used to
- /// maintain ordering when items are inserted. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `conversation.item.done`. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -53,6 +52,10 @@ public sealed partial class RealtimeServerEventConversationItemDone /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.done`. + /// + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -60,26 +63,19 @@ public sealed partial class RealtimeServerEventConversationItemDone /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The ID of the item that precedes this one, if any. This is used to
- /// maintain ordering when items are inserted. - /// - /// - /// The event type, must be `conversation.item.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemDone( string eventId, global::tryAGI.OpenAI.RealtimeConversationItem item, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType type) + global::tryAGI.OpenAI.RealtimeServerEventConversationItemDoneType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.Json.g.cs new file mode 100644 index 00000000..21d3e191 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventConversationItemDonePreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemDonePreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.g.cs new file mode 100644 index 00000000..3e33ee0a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemDonePreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventConversationItemDonePreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs index 24185a60..fb8d3cde 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs @@ -18,13 +18,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionCompleted { - /// - /// The index of the content part containing the audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - /// /// The unique ID of the server event. /// @@ -32,6 +25,14 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; } + /// /// The ID of the item containing the audio that is being transcribed. /// @@ -40,10 +41,11 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required string ItemId { get; set; } /// - /// The log probabilities of the transcription. + /// The index of the content part containing the audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } /// /// The transcribed text. @@ -53,20 +55,18 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required string Transcript { get; set; } /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.completed`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } /// /// Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing. /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Usage { get; set; } + public required global::tryAGI.OpenAI.OneOf Usage { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -77,25 +77,23 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part containing the audio. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. + /// /// /// The ID of the item containing the audio that is being transcribed. /// - /// - /// The log probabilities of the transcription. + /// + /// The index of the content part containing the audio. /// /// /// The transcribed text. /// - /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.completed`. - /// + /// /// /// Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing. /// @@ -103,21 +101,21 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemInputAudioTranscriptionCompleted( - int contentIndex, string eventId, string itemId, + int contentIndex, string transcript, - global::tryAGI.OpenAI.AnyOf usage, - global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType type) + global::tryAGI.OpenAI.OneOf usage, + global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType type, + global::System.Collections.Generic.IList? logprobs) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); this.Usage = usage; - this.Logprobs = logprobs; this.Type = type; + this.Logprobs = logprobs; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs new file mode 100644 index 00000000..b94ae56b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs new file mode 100644 index 00000000..5cecec08 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionCompletedLogprobs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDelta.g.cs index 330e6b36..db0bad60 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDelta.g.cs @@ -8,18 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionDelta { - /// - /// The index of the content part in the item's content array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - public int? ContentIndex { get; set; } - - /// - /// The text delta. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - public string? Delta { get; set; } - /// /// The unique ID of the server event. /// @@ -27,6 +15,13 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType Type { get; set; } + /// /// The ID of the item containing the audio that is being transcribed. /// @@ -35,17 +30,22 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required string ItemId { get; set; } /// - /// The log probabilities of the transcription. These can be enabled by configurating the session with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + public int? ContentIndex { get; set; } /// - /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// The text delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public string? Delta { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,41 +56,39 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The text delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// /// /// The ID of the item containing the audio that is being transcribed. /// - /// - /// The log probabilities of the transcription. These can be enabled by configurating the session with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `conversation.item.input_audio_transcription.delta`. + /// + /// The text delta. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemInputAudioTranscriptionDelta( string eventId, string itemId, + global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType type, int? contentIndex, string? delta, - global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaType type) + global::System.Collections.Generic.IList? logprobs) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; this.ContentIndex = contentIndex; this.Delta = delta; this.Logprobs = logprobs; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs new file mode 100644 index 00000000..acbb66a3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs new file mode 100644 index 00000000..aaadcb4f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionDeltaLogprobs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs index 1f08bd19..155f7d09 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs @@ -11,40 +11,40 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionFailed { /// - /// The index of the content part containing the audio. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// Details of the transcription error. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.failed`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the user message item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ItemId { get; set; } /// - /// The ID of the user message item. + /// The index of the content part containing the audio. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be
- /// `conversation.item.input_audio_transcription.failed`. + /// Details of the transcription error. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError Error { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -55,36 +55,36 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part containing the audio. - /// - /// - /// Details of the transcription error. - /// /// /// The unique ID of the server event. /// - /// - /// The ID of the user message item. - /// /// /// The event type, must be
/// `conversation.item.input_audio_transcription.failed`. /// + /// + /// The ID of the user message item. + /// + /// + /// The index of the content part containing the audio. + /// + /// + /// Details of the transcription error. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemInputAudioTranscriptionFailed( - int contentIndex, - global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, string eventId, string itemId, + int contentIndex, + global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType type) { - this.ContentIndex = contentIndex; - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError.g.cs index bf5ea737..2f7d08cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionFailedError { + /// + /// The type of error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + /// /// Error code, if any. /// @@ -26,12 +32,6 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Text.Json.Serialization.JsonPropertyName("param")] public string? Param { get; set; } - /// - /// The type of error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,6 +41,9 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Initializes a new instance of the class. /// + /// + /// The type of error. + /// /// /// Error code, if any. /// @@ -50,22 +53,19 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Parameter related to the error, if any. /// - /// - /// The type of error. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemInputAudioTranscriptionFailedError( + string? type, string? code, string? message, - string? param, - string? type) + string? param) { + this.Type = type; this.Code = code; this.Message = message; this.Param = param; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionSegment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionSegment.g.cs index 737611d6..a142a17d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionSegment.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionSegment.g.cs @@ -9,39 +9,46 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionSegment { /// - /// The index of the input audio content part within the item. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// End time of the segment in seconds. + /// The event type, must be `conversation.item.input_audio_transcription.segment`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentType Type { get; set; } + + /// + /// The ID of the item containing the input audio content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required float End { get; set; } + public required string ItemId { get; set; } /// - /// The unique ID of the server event. + /// The index of the input audio content part within the item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required int ContentIndex { get; set; } /// - /// The segment identifier. + /// The text for this segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string Text { get; set; } /// - /// The ID of the item containing the input audio content. + /// The segment identifier. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required string Id { get; set; } /// /// The detected speaker label for this segment. @@ -58,18 +65,11 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required float Start { get; set; } /// - /// The text for this segment. + /// End time of the segment in seconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonPropertyName("end")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// The event type, must be `conversation.item.input_audio_transcription.segment`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentType Type { get; set; } + public required float End { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -80,55 +80,55 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// /// Initializes a new instance of the class. /// - /// - /// The index of the input audio content part within the item. - /// - /// - /// End time of the segment in seconds. - /// /// /// The unique ID of the server event. /// - /// - /// The segment identifier. + /// + /// The event type, must be `conversation.item.input_audio_transcription.segment`. /// /// /// The ID of the item containing the input audio content. /// + /// + /// The index of the input audio content part within the item. + /// + /// + /// The text for this segment. + /// + /// + /// The segment identifier. + /// /// /// The detected speaker label for this segment. /// /// /// Start time of the segment in seconds. /// - /// - /// The text for this segment. - /// - /// - /// The event type, must be `conversation.item.input_audio_transcription.segment`. + /// + /// End time of the segment in seconds. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemInputAudioTranscriptionSegment( - int contentIndex, - float end, string eventId, - string id, string itemId, + int contentIndex, + string text, + string id, string speaker, float start, - string text, + float end, global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionSegmentType type) { - this.ContentIndex = contentIndex; - this.End = end; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Speaker = speaker ?? throw new global::System.ArgumentNullException(nameof(speaker)); this.Start = start; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.End = end; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemRetrieved.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemRetrieved.g.cs index d89fd499..b6348a6a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemRetrieved.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemRetrieved.g.cs @@ -15,6 +15,13 @@ public sealed partial class RealtimeServerEventConversationItemRetrieved [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `conversation.item.retrieved`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemRetrievedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrievedType Type { get; set; } + /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -26,13 +33,6 @@ public sealed partial class RealtimeServerEventConversationItemRetrieved [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } - /// - /// The event type, must be `conversation.item.retrieved`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemRetrievedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemRetrievedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class RealtimeServerEventConversationItemRetrieved /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.retrieved`. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -52,9 +55,6 @@ public sealed partial class RealtimeServerEventConversationItemRetrieved /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The event type, must be `conversation.item.retrieved`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs index 41f346fa..26fac1d0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs @@ -13,39 +13,39 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventConversationItemTruncated { /// - /// The duration up to which the audio was truncated, in milliseconds. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int AudioEndMs { get; set; } + public required string EventId { get; set; } /// - /// The index of the content part that was truncated. + /// The event type, must be `conversation.item.truncated`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemTruncatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncatedType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the assistant message item that was truncated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ItemId { get; set; } /// - /// The ID of the assistant message item that was truncated. + /// The index of the content part that was truncated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `conversation.item.truncated`. + /// The duration up to which the audio was truncated, in milliseconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemTruncatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncatedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int AudioEndMs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -56,35 +56,35 @@ public sealed partial class RealtimeServerEventConversationItemTruncated /// /// Initializes a new instance of the class. /// - /// - /// The duration up to which the audio was truncated, in milliseconds. - /// - /// - /// The index of the content part that was truncated. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `conversation.item.truncated`. + /// /// /// The ID of the assistant message item that was truncated. /// - /// - /// The event type, must be `conversation.item.truncated`. + /// + /// The index of the content part that was truncated. + /// + /// + /// The duration up to which the audio was truncated, in milliseconds. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventConversationItemTruncated( - int audioEndMs, - int contentIndex, string eventId, string itemId, + int contentIndex, + int audioEndMs, global::tryAGI.OpenAI.RealtimeServerEventConversationItemTruncatedType type) { - this.AudioEndMs = audioEndMs; - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.ContentIndex = contentIndex; + this.AudioEndMs = audioEndMs; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventError.g.cs index bb9124b5..ad1cb51b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventError.g.cs @@ -10,13 +10,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeServerEventError { - /// - /// Details of the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeServerEventErrorError Error { get; set; } - /// /// The unique ID of the server event. /// @@ -31,6 +24,13 @@ public sealed partial class RealtimeServerEventError [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventErrorTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventErrorType Type { get; set; } + /// + /// Details of the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeServerEventErrorError Error { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,25 +40,25 @@ public sealed partial class RealtimeServerEventError /// /// Initializes a new instance of the class. /// - /// - /// Details of the error. - /// /// /// The unique ID of the server event. /// /// /// The event type, must be `error`. /// + /// + /// Details of the error. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventError( - global::tryAGI.OpenAI.RealtimeServerEventErrorError error, string eventId, + global::tryAGI.OpenAI.RealtimeServerEventErrorError error, global::tryAGI.OpenAI.RealtimeServerEventErrorType type) { - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorError.g.cs index 282ac558..37e88fd0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorError.g.cs @@ -9,16 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventErrorError { /// - /// Error code, if any. + /// The type of error (e.g., "invalid_request_error", "server_error"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - public string? Code { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } /// - /// The event_id of the client event that caused the error, if applicable. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - public string? EventId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } /// /// A human-readable error message. @@ -28,17 +29,16 @@ public sealed partial class RealtimeServerEventErrorError public required string Message { get; set; } /// - /// Parameter related to the error, if any. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("param")] public string? Param { get; set; } /// - /// The type of error (e.g., "invalid_request_error", "server_error"). + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + public string? EventId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,36 +49,30 @@ public sealed partial class RealtimeServerEventErrorError /// /// Initializes a new instance of the class. /// - /// - /// Error code, if any. - /// - /// - /// The event_id of the client event that caused the error, if applicable. + /// + /// The type of error (e.g., "invalid_request_error", "server_error"). /// + /// /// /// A human-readable error message. /// - /// - /// Parameter related to the error, if any. - /// - /// - /// The type of error (e.g., "invalid_request_error", "server_error"). - /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventErrorError( - string message, string type, + string message, string? code, - string? eventId, - string? param) + string? param, + string? eventId) { - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); this.Code = code; - this.EventId = eventId; this.Param = param; + this.EventId = eventId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.Json.g.cs new file mode 100644 index 00000000..142a2d81 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventErrorErrorCode + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.g.cs new file mode 100644 index 00000000..3e201671 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventErrorErrorCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.Json.g.cs new file mode 100644 index 00000000..d6b65f62 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventErrorErrorEventId + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorEventId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.g.cs new file mode 100644 index 00000000..5f91c50b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorEventId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventErrorErrorEventId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.Json.g.cs new file mode 100644 index 00000000..e7dafd7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventErrorErrorParam + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventErrorErrorParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.g.cs new file mode 100644 index 00000000..31f6e04c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventErrorErrorParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventErrorErrorParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs index f77601d0..fd284ae8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs @@ -19,25 +19,24 @@ public sealed partial class RealtimeServerEventInputAudioBufferCommitted public required string EventId { get; set; } /// - /// The ID of the user message item that will be created. + /// The event type, must be `input_audio_buffer.committed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType Type { get; set; } /// - /// The ID of the preceding item after which the new item will be inserted.
- /// Can be `null` if the item has no predecessor. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } /// - /// The event type, must be `input_audio_buffer.committed`. + /// The ID of the user message item that will be created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,29 +50,26 @@ public sealed partial class RealtimeServerEventInputAudioBufferCommitted /// /// The unique ID of the server event. /// - /// - /// The ID of the user message item that will be created. - /// - /// - /// The ID of the preceding item after which the new item will be inserted.
- /// Can be `null` if the item has no predecessor. - /// /// /// The event type, must be `input_audio_buffer.committed`. /// + /// + /// + /// The ID of the user message item that will be created. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventInputAudioBufferCommitted( string eventId, string itemId, - string? previousItemId, - global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType type) + global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedType type, + string? previousItemId) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.PreviousItemId = previousItemId; this.Type = type; + this.PreviousItemId = previousItemId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs new file mode 100644 index 00000000..8af30b79 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventInputAudioBufferCommittedPreviousItemId + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferCommittedPreviousItemId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.g.cs new file mode 100644 index 00000000..890a12a5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedPreviousItemId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventInputAudioBufferCommittedPreviousItemId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.Json.g.cs new file mode 100644 index 00000000..71f664ac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventInputAudioBufferDtmfEventReceived + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceived; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.g.cs new file mode 100644 index 00000000..2ae14228 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceived.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that
+ /// represents a telephone keypad press (0–9, *, #, A–D). The `event` property
+ /// is the keypad that the user press. The `received_at` is the UTC Unix Timestamp
+ /// that the server received the event. + ///
+ public sealed partial class RealtimeServerEventInputAudioBufferDtmfEventReceived + { + /// + /// The event type, must be `input_audio_buffer.dtmf_event_received`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType Type { get; set; } + + /// + /// The telephone keypad that was pressed by the user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Event { get; set; } + + /// + /// UTC Unix Timestamp when DTMF Event was received by server. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("received_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset ReceivedAt { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The event type, must be `input_audio_buffer.dtmf_event_received`. + /// + /// + /// The telephone keypad that was pressed by the user. + /// + /// + /// UTC Unix Timestamp when DTMF Event was received by server. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeServerEventInputAudioBufferDtmfEventReceived( + string @event, + global::System.DateTimeOffset receivedAt, + global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferDtmfEventReceivedType type) + { + this.Event = @event ?? throw new global::System.ArgumentNullException(nameof(@event)); + this.ReceivedAt = receivedAt; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeServerEventInputAudioBufferDtmfEventReceived() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs new file mode 100644 index 00000000..c93ecefd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferDtmfEventReceivedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.dtmf_event_received`. + /// + public enum RealtimeServerEventInputAudioBufferDtmfEventReceivedType + { + /// + /// + /// + InputAudioBufferDtmfEventReceived, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventInputAudioBufferDtmfEventReceivedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventInputAudioBufferDtmfEventReceivedType value) + { + return value switch + { + RealtimeServerEventInputAudioBufferDtmfEventReceivedType.InputAudioBufferDtmfEventReceived => "input_audio_buffer.dtmf_event_received", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventInputAudioBufferDtmfEventReceivedType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.dtmf_event_received" => RealtimeServerEventInputAudioBufferDtmfEventReceivedType.InputAudioBufferDtmfEventReceived, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs index f06945e7..b428da72 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs @@ -16,6 +16,20 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted { + /// + /// The unique ID of the server event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EventId { get; set; } + + /// + /// The event type, must be `input_audio_buffer.speech_started`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType Type { get; set; } + /// /// Milliseconds from the start of all audio written to the buffer during the
/// session when speech was first detected. This will correspond to the
@@ -26,13 +40,6 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted [global::System.Text.Json.Serialization.JsonRequired] public required int AudioStartMs { get; set; } - /// - /// The unique ID of the server event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } - /// /// The ID of the user message item that will be created when speech stops. /// @@ -40,13 +47,6 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The event type, must be `input_audio_buffer.speech_started`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,32 +56,32 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted /// /// Initializes a new instance of the class. /// + /// + /// The unique ID of the server event. + /// + /// + /// The event type, must be `input_audio_buffer.speech_started`. + /// /// /// Milliseconds from the start of all audio written to the buffer during the
/// session when speech was first detected. This will correspond to the
/// beginning of audio sent to the model, and thus includes the
/// `prefix_padding_ms` configured in the Session. /// - /// - /// The unique ID of the server event. - /// /// /// The ID of the user message item that will be created when speech stops. /// - /// - /// The event type, must be `input_audio_buffer.speech_started`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventInputAudioBufferSpeechStarted( - int audioStartMs, string eventId, + int audioStartMs, string itemId, global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType type) { - this.AudioStartMs = audioStartMs; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.AudioStartMs = audioStartMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs index d8f450a9..8026b5e3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped { + /// + /// The unique ID of the server event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EventId { get; set; } + + /// + /// The event type, must be `input_audio_buffer.speech_stopped`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType Type { get; set; } + /// /// Milliseconds since the session started when speech stopped. This will
/// correspond to the end of audio sent to the model, and thus includes the
@@ -19,13 +33,6 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped [global::System.Text.Json.Serialization.JsonRequired] public required int AudioEndMs { get; set; } - /// - /// The unique ID of the server event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } - /// /// The ID of the user message item that will be created. /// @@ -33,13 +40,6 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The event type, must be `input_audio_buffer.speech_stopped`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -49,31 +49,31 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped /// /// Initializes a new instance of the class. /// + /// + /// The unique ID of the server event. + /// + /// + /// The event type, must be `input_audio_buffer.speech_stopped`. + /// /// /// Milliseconds since the session started when speech stopped. This will
/// correspond to the end of audio sent to the model, and thus includes the
/// `min_silence_duration_ms` configured in the Session. /// - /// - /// The unique ID of the server event. - /// /// /// The ID of the user message item that will be created. /// - /// - /// The event type, must be `input_audio_buffer.speech_stopped`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventInputAudioBufferSpeechStopped( - int audioEndMs, string eventId, + int audioEndMs, string itemId, global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType type) { - this.AudioEndMs = audioEndMs; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.AudioEndMs = audioEndMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferTimeoutTriggered.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferTimeoutTriggered.g.cs index 5a98efe4..02ce55a6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferTimeoutTriggered.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventInputAudioBufferTimeoutTriggered.g.cs @@ -19,11 +19,18 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventInputAudioBufferTimeoutTriggered { /// - /// Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int AudioEndMs { get; set; } + public required string EventId { get; set; } + + /// + /// The event type, must be `input_audio_buffer.timeout_triggered`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferTimeoutTriggeredTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggeredType Type { get; set; } /// /// Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response. @@ -33,11 +40,11 @@ public sealed partial class RealtimeServerEventInputAudioBufferTimeoutTriggered public required int AudioStartMs { get; set; } /// - /// The unique ID of the server event. + /// Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required int AudioEndMs { get; set; } /// /// The ID of the item associated with this segment. @@ -46,13 +53,6 @@ public sealed partial class RealtimeServerEventInputAudioBufferTimeoutTriggered [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The event type, must be `input_audio_buffer.timeout_triggered`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferTimeoutTriggeredTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggeredType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -62,34 +62,34 @@ public sealed partial class RealtimeServerEventInputAudioBufferTimeoutTriggered /// /// Initializes a new instance of the class. /// - /// - /// Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered. + /// + /// The unique ID of the server event. + /// + /// + /// The event type, must be `input_audio_buffer.timeout_triggered`. /// /// /// Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response. /// - /// - /// The unique ID of the server event. + /// + /// Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered. /// /// /// The ID of the item associated with this segment. /// - /// - /// The event type, must be `input_audio_buffer.timeout_triggered`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventInputAudioBufferTimeoutTriggered( - int audioEndMs, - int audioStartMs, string eventId, + int audioStartMs, + int audioEndMs, string itemId, global::tryAGI.OpenAI.RealtimeServerEventInputAudioBufferTimeoutTriggeredType type) { - this.AudioEndMs = audioEndMs; - this.AudioStartMs = audioStartMs; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.AudioStartMs = audioStartMs; + this.AudioEndMs = audioEndMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsCompleted.g.cs index ceb5e4c3..ee0b92da 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsCompleted.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeServerEventMCPListToolsCompleted [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.completed`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeServerEventMCPListToolsCompleted [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventMCPListToolsCompletedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsCompletedType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeServerEventMCPListToolsCompleted /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.completed`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsFailed.g.cs index e2ec8c41..328dcaa3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsFailed.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeServerEventMCPListToolsFailed [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.failed`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeServerEventMCPListToolsFailed [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventMCPListToolsFailedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsFailedType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeServerEventMCPListToolsFailed /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.failed`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsInProgress.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsInProgress.g.cs index f53ee3f2..33f54454 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsInProgress.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventMCPListToolsInProgress.g.cs @@ -15,13 +15,6 @@ public sealed partial class RealtimeServerEventMCPListToolsInProgress [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The ID of the MCP list tools item. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } - /// /// The event type, must be `mcp_list_tools.in_progress`. /// @@ -29,6 +22,13 @@ public sealed partial class RealtimeServerEventMCPListToolsInProgress [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventMCPListToolsInProgressTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventMCPListToolsInProgressType Type { get; set; } + /// + /// The ID of the MCP list tools item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -41,12 +41,12 @@ public sealed partial class RealtimeServerEventMCPListToolsInProgress /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP list tools item. - /// /// /// The event type, must be `mcp_list_tools.in_progress`. /// + /// + /// The ID of the MCP list tools item. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferCleared.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferCleared.g.cs index 1a6f1811..4fdba834 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferCleared.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferCleared.g.cs @@ -4,11 +4,11 @@ namespace tryAGI.OpenAI { /// - /// **WebRTC Only:** Emitted when the output audio buffer is cleared. This happens either in VAD
+ /// **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD
/// mode when the user has interrupted (`input_audio_buffer.speech_started`),
/// or when the client has emitted the `output_audio_buffer.clear` event to manually
/// cut off the current audio response.
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
public sealed partial class RealtimeServerEventOutputAudioBufferCleared { @@ -19,13 +19,6 @@ public sealed partial class RealtimeServerEventOutputAudioBufferCleared [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The unique ID of the response that produced the audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - /// /// The event type, must be `output_audio_buffer.cleared`. /// @@ -33,6 +26,13 @@ public sealed partial class RealtimeServerEventOutputAudioBufferCleared [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferClearedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferClearedType Type { get; set; } + /// + /// The unique ID of the response that produced the audio. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResponseId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,12 +45,12 @@ public sealed partial class RealtimeServerEventOutputAudioBufferCleared /// /// The unique ID of the server event. /// - /// - /// The unique ID of the response that produced the audio. - /// /// /// The event type, must be `output_audio_buffer.cleared`. /// + /// + /// The unique ID of the response that produced the audio. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStarted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStarted.g.cs index c2fafedb..9e67a22a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStarted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStarted.g.cs @@ -4,10 +4,10 @@ namespace tryAGI.OpenAI { /// - /// **WebRTC Only:** Emitted when the server begins streaming audio to the client. This event is
+ /// **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is
/// emitted after an audio content part has been added (`response.content_part.added`)
/// to the response.
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
public sealed partial class RealtimeServerEventOutputAudioBufferStarted { @@ -18,13 +18,6 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStarted [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The unique ID of the response that produced the audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - /// /// The event type, must be `output_audio_buffer.started`. /// @@ -32,6 +25,13 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStarted [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferStartedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStartedType Type { get; set; } + /// + /// The unique ID of the response that produced the audio. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResponseId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,12 +44,12 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStarted /// /// The unique ID of the server event. /// - /// - /// The unique ID of the response that produced the audio. - /// /// /// The event type, must be `output_audio_buffer.started`. /// + /// + /// The unique ID of the response that produced the audio. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStopped.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStopped.g.cs index b29c96d9..1531dbd4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStopped.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventOutputAudioBufferStopped.g.cs @@ -4,10 +4,10 @@ namespace tryAGI.OpenAI { /// - /// **WebRTC Only:** Emitted when the output audio buffer has been completely drained on the server,
+ /// **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,
/// and no more audio is forthcoming. This event is emitted after the full response
/// data has been sent to the client (`response.done`).
- /// [Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). + /// [Learn more](/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc). ///
public sealed partial class RealtimeServerEventOutputAudioBufferStopped { @@ -18,13 +18,6 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStopped [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The unique ID of the response that produced the audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - /// /// The event type, must be `output_audio_buffer.stopped`. /// @@ -32,6 +25,13 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStopped [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventOutputAudioBufferStoppedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventOutputAudioBufferStoppedType Type { get; set; } + /// + /// The unique ID of the response that produced the audio. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResponseId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,12 +44,12 @@ public sealed partial class RealtimeServerEventOutputAudioBufferStopped /// /// The unique ID of the server event. /// - /// - /// The unique ID of the response that produced the audio. - /// /// /// The event type, must be `output_audio_buffer.stopped`. /// + /// + /// The unique ID of the response that produced the audio. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs index e715546d..5c46c6a0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs @@ -18,13 +18,6 @@ public sealed partial class RealtimeServerEventRateLimitsUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// List of rate limit information. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList RateLimits { get; set; } - /// /// The event type, must be `rate_limits.updated`. /// @@ -32,6 +25,13 @@ public sealed partial class RealtimeServerEventRateLimitsUpdated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedType Type { get; set; } + /// + /// List of rate limit information. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList RateLimits { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,12 +44,12 @@ public sealed partial class RealtimeServerEventRateLimitsUpdated /// /// The unique ID of the server event. /// - /// - /// List of rate limit information. - /// /// /// The event type, must be `rate_limits.updated`. /// + /// + /// List of rate limit information. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdatedRateLimit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdatedRateLimit.g.cs index c25de1b5..02182774 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdatedRateLimit.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventRateLimitsUpdatedRateLimit.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeServerEventRateLimitsUpdatedRateLimit { - /// - /// The maximum allowed value for the rate limit. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("limit")] - public int? Limit { get; set; } - /// /// The name of the rate limit (`requests`, `tokens`). /// @@ -21,6 +15,12 @@ public sealed partial class RealtimeServerEventRateLimitsUpdatedRateLimit [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedRateLimitNameJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimitName? Name { get; set; } + /// + /// The maximum allowed value for the rate limit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + /// /// The remaining value before the limit is reached. /// @@ -42,12 +42,12 @@ public sealed partial class RealtimeServerEventRateLimitsUpdatedRateLimit /// /// Initializes a new instance of the class. /// - /// - /// The maximum allowed value for the rate limit. - /// /// /// The name of the rate limit (`requests`, `tokens`). /// + /// + /// The maximum allowed value for the rate limit. + /// /// /// The remaining value before the limit is reached. /// @@ -58,13 +58,13 @@ public sealed partial class RealtimeServerEventRateLimitsUpdatedRateLimit [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventRateLimitsUpdatedRateLimit( - int? limit, global::tryAGI.OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimitName? name, + int? limit, int? remaining, double? resetSeconds) { - this.Limit = limit; this.Name = name; + this.Limit = limit; this.Remaining = remaining; this.ResetSeconds = resetSeconds; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs index d315275e..b6e55aba 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseAudioDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// Base64-encoded audio data delta. + /// The event type, must be `response.output_audio.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeServerEventResponseAudioDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_audio.delta`. + /// Base64-encoded audio data delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeServerEventResponseAudioDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// Base64-encoded audio data delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_audio.delta`. + /// + /// Base64-encoded audio data delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseAudioDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs index 2ced4239..68401430 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseAudioDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_audio.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,18 +45,11 @@ public sealed partial class RealtimeServerEventResponseAudioDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_audio.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDoneType Type { get; set; } + public required int ContentIndex { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,40 +60,40 @@ public sealed partial class RealtimeServerEventResponseAudioDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.output_audio.done`. + /// + /// The index of the content part in the item's content array. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseAudioDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, global::tryAGI.OpenAI.RealtimeServerEventResponseAudioDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs index 402a598a..083b2430 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The transcript delta. + /// The event type, must be `response.output_audio_transcript.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_audio_transcript.delta`. + /// The transcript delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The transcript delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio_transcript.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_audio_transcript.delta`. + /// + /// The transcript delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseAudioTranscriptDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs index 8a8d7df5..3c4e4e5d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs @@ -11,18 +11,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseAudioTranscriptDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_audio_transcript.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -39,11 +46,11 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// /// The final transcript of the audio. @@ -52,13 +59,6 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone [global::System.Text.Json.Serialization.JsonRequired] public required string Transcript { get; set; } - /// - /// The event type, must be `response.output_audio_transcript.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -68,44 +68,44 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_audio_transcript.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// /// /// The final transcript of the audio. /// - /// - /// The event type, must be `response.output_audio_transcript.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseAudioTranscriptDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, string transcript, global::tryAGI.OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs index 69b7709d..5e230f3f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseContentPartAdded { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.content_part.added`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item to which the content part was added. @@ -38,25 +45,18 @@ public sealed partial class RealtimeServerEventResponseContentPartAdded public required int OutputIndex { get; set; } /// - /// The content part that was added. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPart Part { get; set; } + public required int ContentIndex { get; set; } /// - /// The ID of the response. + /// The content part that was added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.content_part.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +67,45 @@ public sealed partial class RealtimeServerEventResponseContentPartAdded /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.content_part.added`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item to which the content part was added. /// /// /// The index of the output item in the response. /// + /// + /// The index of the content part in the item's content array. + /// /// /// The content part that was added. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.content_part.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseContentPartAdded( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, + int contentIndex, global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPart part, - string responseId, global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs index 060c19df..d4da3d56 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseContentPartAddedPart { /// - /// Base64-encoded audio data (if type is "audio"). + /// The content type ("text", "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type { get; set; } /// /// The text content (if type is "text"). @@ -21,17 +22,16 @@ public sealed partial class RealtimeServerEventResponseContentPartAddedPart public string? Text { get; set; } /// - /// The transcript of the audio (if type is "audio"). + /// Base64-encoded audio data (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - public string? Transcript { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// - /// The content type ("text", "audio"). + /// The transcript of the audio (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + public string? Transcript { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -42,31 +42,31 @@ public sealed partial class RealtimeServerEventResponseContentPartAddedPart /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio data (if type is "audio"). + /// + /// The content type ("text", "audio"). /// /// /// The text content (if type is "text"). /// + /// + /// Base64-encoded audio data (if type is "audio"). + /// /// /// The transcript of the audio (if type is "audio"). /// - /// - /// The content type ("text", "audio"). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseContentPartAddedPart( - string? audio, + global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartAddedPartType? type) + string? audio, + string? transcript) { - this.Audio = audio; + this.Type = type; this.Text = text; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs index ae32e184..ca55029d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs @@ -11,11 +11,11 @@ public enum RealtimeServerEventResponseContentPartAddedPartType /// /// /// - Text, + Audio, /// /// /// - Audio, + Text, } /// @@ -30,8 +30,8 @@ public static string ToValueString(this RealtimeServerEventResponseContentPartAd { return value switch { - RealtimeServerEventResponseContentPartAddedPartType.Text => "text", RealtimeServerEventResponseContentPartAddedPartType.Audio => "audio", + RealtimeServerEventResponseContentPartAddedPartType.Text => "text", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +42,8 @@ public static string ToValueString(this RealtimeServerEventResponseContentPartAd { return value switch { - "text" => RealtimeServerEventResponseContentPartAddedPartType.Text, "audio" => RealtimeServerEventResponseContentPartAddedPartType.Audio, + "text" => RealtimeServerEventResponseContentPartAddedPartType.Text, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs index cec8f533..773a0383 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseContentPartDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.content_part.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,25 +45,18 @@ public sealed partial class RealtimeServerEventResponseContentPartDone public required int OutputIndex { get; set; } /// - /// The content part that is done. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePart Part { get; set; } + public required int ContentIndex { get; set; } /// - /// The ID of the response. + /// The content part that is done. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.content_part.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDoneType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +67,45 @@ public sealed partial class RealtimeServerEventResponseContentPartDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.content_part.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// + /// + /// The index of the content part in the item's content array. + /// /// /// The content part that is done. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.content_part.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseContentPartDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, + int contentIndex, global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePart part, - string responseId, global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePart.g.cs index 3894ad39..a26dab27 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePart.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseContentPartDonePart { /// - /// Base64-encoded audio data (if type is "audio"). + /// The content type ("text", "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public string? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? Type { get; set; } /// /// The text content (if type is "text"). @@ -21,17 +22,16 @@ public sealed partial class RealtimeServerEventResponseContentPartDonePart public string? Text { get; set; } /// - /// The transcript of the audio (if type is "audio"). + /// Base64-encoded audio data (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - public string? Transcript { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public string? Audio { get; set; } /// - /// The content type ("text", "audio"). + /// The transcript of the audio (if type is "audio"). /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDonePartTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] + public string? Transcript { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -42,31 +42,31 @@ public sealed partial class RealtimeServerEventResponseContentPartDonePart /// /// Initializes a new instance of the class. /// - /// - /// Base64-encoded audio data (if type is "audio"). + /// + /// The content type ("text", "audio"). /// /// /// The text content (if type is "text"). /// + /// + /// Base64-encoded audio data (if type is "audio"). + /// /// /// The transcript of the audio (if type is "audio"). /// - /// - /// The content type ("text", "audio"). - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseContentPartDonePart( - string? audio, + global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? type, string? text, - string? transcript, - global::tryAGI.OpenAI.RealtimeServerEventResponseContentPartDonePartType? type) + string? audio, + string? transcript) { - this.Audio = audio; + this.Type = type; this.Text = text; + this.Audio = audio; this.Transcript = transcript; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePartType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePartType.g.cs index 7ab3c6fb..365985e6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePartType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseContentPartDonePartType.g.cs @@ -11,11 +11,11 @@ public enum RealtimeServerEventResponseContentPartDonePartType /// /// /// - Text, + Audio, /// /// /// - Audio, + Text, } /// @@ -30,8 +30,8 @@ public static string ToValueString(this RealtimeServerEventResponseContentPartDo { return value switch { - RealtimeServerEventResponseContentPartDonePartType.Text => "text", RealtimeServerEventResponseContentPartDonePartType.Audio => "audio", + RealtimeServerEventResponseContentPartDonePartType.Text => "text", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -42,8 +42,8 @@ public static string ToValueString(this RealtimeServerEventResponseContentPartDo { return value switch { - "text" => RealtimeServerEventResponseContentPartDonePartType.Text, "audio" => RealtimeServerEventResponseContentPartDonePartType.Audio, + "text" => RealtimeServerEventResponseContentPartDonePartType.Text, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseCreated.g.cs index 7c92cb20..56b5638c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseCreated.g.cs @@ -16,13 +16,6 @@ public sealed partial class RealtimeServerEventResponseCreated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The response resource. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeResponse Response { get; set; } - /// /// The event type, must be `response.created`. /// @@ -30,6 +23,13 @@ public sealed partial class RealtimeServerEventResponseCreated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventResponseCreatedType Type { get; set; } + /// + /// The response resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeResponse Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,12 +42,12 @@ public sealed partial class RealtimeServerEventResponseCreated /// /// The unique ID of the server event. /// - /// - /// The response resource. - /// /// /// The event type, must be `response.created`. /// + /// + /// The response resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseDone.g.cs index 554a0fae..8685eb49 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseDone.g.cs @@ -21,13 +21,6 @@ public sealed partial class RealtimeServerEventResponseDone [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The response resource. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeResponse Response { get; set; } - /// /// The event type, must be `response.done`. /// @@ -35,6 +28,13 @@ public sealed partial class RealtimeServerEventResponseDone [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseDoneTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventResponseDoneType Type { get; set; } + /// + /// The response resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RealtimeResponse Response { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -47,12 +47,12 @@ public sealed partial class RealtimeServerEventResponseDone /// /// The unique ID of the server event. /// - /// - /// The response resource. - /// /// /// The event type, must be `response.done`. /// + /// + /// The response resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs index be710eb4..d2fbaa81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelta { /// - /// The ID of the function call. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + public required string EventId { get; set; } /// - /// The arguments delta as a JSON string. + /// The event type, must be `response.function_call_arguments.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the function call item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelt public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The ID of the function call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string CallId { get; set; } /// - /// The event type, must be `response.function_call_arguments.delta`. + /// The arguments delta as a JSON string. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelt /// /// Initializes a new instance of the class. /// - /// - /// The ID of the function call. - /// - /// - /// The arguments delta as a JSON string. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.function_call_arguments.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the function call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The ID of the function call. /// - /// - /// The event type, must be `response.function_call_arguments.delta`. + /// + /// The arguments delta as a JSON string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseFunctionCallArgumentsDelta( - string callId, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string callId, + string delta, global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType type) { - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs index 6dfeec21..c443db51 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs @@ -10,25 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone { /// - /// The final arguments as a JSON string. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string EventId { get; set; } /// - /// The ID of the function call. + /// The event type, must be `response.function_call_arguments.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the function call item. @@ -45,18 +45,25 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The ID of the function call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string CallId { get; set; } /// - /// The event type, must be `response.function_call_arguments.done`. + /// The name of the function that was called. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The final arguments as a JSON string. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -67,45 +74,50 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone /// /// Initializes a new instance of the class. /// - /// - /// The final arguments as a JSON string. - /// - /// - /// The ID of the function call. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.function_call_arguments.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the function call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The ID of the function call. /// - /// - /// The event type, must be `response.function_call_arguments.done`. + /// + /// The name of the function that was called. + /// + /// + /// The final arguments as a JSON string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseFunctionCallArgumentsDone( - string arguments, - string callId, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string callId, + string name, + string arguments, global::tryAGI.OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); - this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDelta.g.cs index 95e3a365..443e2a50 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDelta.g.cs @@ -9,18 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDelta { /// - /// The JSON-encoded arguments delta. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.mcp_call_arguments.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallArgumentsDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the MCP tool call item. @@ -29,12 +36,6 @@ public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDelta [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// If present, indicates the delta text was obfuscated. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("obfuscation")] - public string? Obfuscation { get; set; } - /// /// The index of the output item in the response. /// @@ -43,18 +44,17 @@ public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The JSON-encoded arguments delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required string Delta { get; set; } /// - /// The event type, must be `response.mcp_call_arguments.delta`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallArgumentsDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("obfuscation")] + public string? Obfuscation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -65,46 +65,44 @@ public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDelta /// /// Initializes a new instance of the class. /// - /// - /// The JSON-encoded arguments delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.mcp_call_arguments.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the MCP tool call item. /// - /// - /// If present, indicates the delta text was obfuscated. - /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.mcp_call_arguments.delta`. + /// + /// The JSON-encoded arguments delta. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseMCPCallArgumentsDelta( - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, - string? obfuscation, - global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType type) + string delta, + global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaType type, + string? obfuscation) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); - this.Obfuscation = obfuscation; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; + this.Obfuscation = obfuscation; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs new file mode 100644 index 00000000..eb91288b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation + { + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs new file mode 100644 index 00000000..70213fe8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDeltaObfuscation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDone.g.cs index 279e9842..be37005a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallArgumentsDone.g.cs @@ -9,18 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDone { /// - /// The final JSON-encoded arguments string. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.mcp_call_arguments.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallArgumentsDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the MCP tool call item. @@ -37,18 +44,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The final JSON-encoded arguments string. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.mcp_call_arguments.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallArgumentsDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDoneType Type { get; set; } + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,40 +59,40 @@ public sealed partial class RealtimeServerEventResponseMCPCallArgumentsDone /// /// Initializes a new instance of the class. /// - /// - /// The final JSON-encoded arguments string. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.mcp_call_arguments.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the MCP tool call item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. - /// - /// - /// The event type, must be `response.mcp_call_arguments.done`. + /// + /// The final JSON-encoded arguments string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseMCPCallArgumentsDone( - string arguments, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + string arguments, global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallArgumentsDoneType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallCompleted.g.cs index 5c658e25..a7ef4551 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallCompleted.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallCompleted public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallCompletedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompletedType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallCompleted public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.completed`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallCompletedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompletedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeServerEventResponseMCPCallCompleted /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.completed`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.completed`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseMCPCallCompleted( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallCompletedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallFailed.g.cs index 57e172bf..e5e546c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallFailed.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallFailed public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.failed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallFailedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailedType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallFailed public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.failed`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallFailedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailedType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeServerEventResponseMCPCallFailed /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.failed`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.failed`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseMCPCallFailed( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallFailedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallInProgress.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallInProgress.g.cs index 68305145..a7c038db 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallInProgress.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseMCPCallInProgress.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallInProgress public required string EventId { get; set; } /// - /// The ID of the MCP tool call item. + /// The event type, must be `response.mcp_call.in_progress`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallInProgressTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgressType Type { get; set; } /// /// The index of the output item in the response. @@ -30,11 +30,11 @@ public sealed partial class RealtimeServerEventResponseMCPCallInProgress public required int OutputIndex { get; set; } /// - /// The event type, must be `response.mcp_call.in_progress`. + /// The ID of the MCP tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseMCPCallInProgressTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgressType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,27 +48,27 @@ public sealed partial class RealtimeServerEventResponseMCPCallInProgress /// /// The unique ID of the server event. /// - /// - /// The ID of the MCP tool call item. + /// + /// The event type, must be `response.mcp_call.in_progress`. /// /// /// The index of the output item in the response. /// - /// - /// The event type, must be `response.mcp_call.in_progress`. + /// + /// The ID of the MCP tool call item. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseMCPCallInProgress( string eventId, - string itemId, int outputIndex, + string itemId, global::tryAGI.OpenAI.RealtimeServerEventResponseMCPCallInProgressType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs index 6da8d964..561a52f1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs @@ -16,15 +16,18 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `response.output_item.added`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAddedType Type { get; set; } + + /// + /// The ID of the Response to which the item belongs. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + public required string ResponseId { get; set; } /// /// The index of the output item in the Response. @@ -34,18 +37,15 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded public required int OutputIndex { get; set; } /// - /// The ID of the Response to which the item belongs. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_item.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAddedType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,6 +59,15 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_item.added`. + /// + /// + /// The ID of the Response to which the item belongs. + /// + /// + /// The index of the output item in the Response. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -66,29 +75,20 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The index of the output item in the Response. - /// - /// - /// The ID of the Response to which the item belongs. - /// - /// - /// The event type, must be `response.output_item.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseOutputItemAdded( string eventId, - global::tryAGI.OpenAI.RealtimeConversationItem item, - int outputIndex, string responseId, + int outputIndex, + global::tryAGI.OpenAI.RealtimeConversationItem item, global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemAddedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.OutputIndex = outputIndex; this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.OutputIndex = outputIndex; + this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs index 9765f159..618de1ab 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs @@ -17,15 +17,18 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone public required string EventId { get; set; } /// - /// A realtime Item is of three types: message, function_call, or function_call_output.
- /// A message item can contain text or audio.
- /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
- /// A function_call_output item indicates a function response.
- /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. + /// The event type, must be `response.output_item.done`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDoneType Type { get; set; } + + /// + /// The ID of the Response to which the item belongs. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } + public required string ResponseId { get; set; } /// /// The index of the output item in the Response. @@ -35,18 +38,15 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone public required int OutputIndex { get; set; } /// - /// The ID of the Response to which the item belongs. + /// A realtime Item is of three types: message, function_call, or function_call_output.
+ /// A message item can contain text or audio.
+ /// A function_call item indicates a model's desire to call a function, which is the only tool supported for now
+ /// A function_call_output item indicates a function response.
+ /// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("item")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } - - /// - /// The event type, must be `response.output_item.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDoneType Type { get; set; } + public required global::tryAGI.OpenAI.RealtimeConversationItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,6 +60,15 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_item.done`. + /// + /// + /// The ID of the Response to which the item belongs. + /// + /// + /// The index of the output item in the Response. + /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
/// A message item can contain text or audio.
@@ -67,29 +76,20 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone /// A function_call_output item indicates a function response.
/// The client may add and remove message and function_call_output Items using conversation.item.create and conversation.item.delete. /// - /// - /// The index of the output item in the Response. - /// - /// - /// The ID of the Response to which the item belongs. - /// - /// - /// The event type, must be `response.output_item.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseOutputItemDone( string eventId, - global::tryAGI.OpenAI.RealtimeConversationItem item, - int outputIndex, string responseId, + int outputIndex, + global::tryAGI.OpenAI.RealtimeConversationItem item, global::tryAGI.OpenAI.RealtimeServerEventResponseOutputItemDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); - this.OutputIndex = outputIndex; this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.OutputIndex = outputIndex; + this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs index 79657bb9..3372847d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs @@ -9,25 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseTextDelta { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The text delta. + /// The event type, must be `response.output_text.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseTextDeltaTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDeltaType Type { get; set; } /// - /// The unique ID of the server event. + /// The ID of the response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -44,18 +44,18 @@ public sealed partial class RealtimeServerEventResponseTextDelta public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// - /// The event type, must be `response.output_text.delta`. + /// The text delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseTextDeltaTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDeltaType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class RealtimeServerEventResponseTextDelta /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// - /// - /// The text delta. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_text.delta`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// - /// - /// The event type, must be `response.output_text.delta`. + /// + /// The text delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseTextDelta( - int contentIndex, - string delta, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, + string delta, global::tryAGI.OpenAI.RealtimeServerEventResponseTextDeltaType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs index 40332e30..89a28499 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs @@ -10,18 +10,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeServerEventResponseTextDone { /// - /// The index of the content part in the item's content array. + /// The unique ID of the server event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required string EventId { get; set; } /// - /// The unique ID of the server event. + /// The event type, must be `response.output_text.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("event_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseTextDoneTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDoneType Type { get; set; } + + /// + /// The ID of the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string EventId { get; set; } + public required string ResponseId { get; set; } /// /// The ID of the item. @@ -38,11 +45,11 @@ public sealed partial class RealtimeServerEventResponseTextDone public required int OutputIndex { get; set; } /// - /// The ID of the response. + /// The index of the content part in the item's content array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ResponseId { get; set; } + public required int ContentIndex { get; set; } /// /// The final text content. @@ -51,13 +58,6 @@ public sealed partial class RealtimeServerEventResponseTextDone [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } - /// - /// The event type, must be `response.output_text.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventResponseTextDoneTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventResponseTextDoneType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -67,44 +67,44 @@ public sealed partial class RealtimeServerEventResponseTextDone /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part in the item's content array. - /// /// /// The unique ID of the server event. /// + /// + /// The event type, must be `response.output_text.done`. + /// + /// + /// The ID of the response. + /// /// /// The ID of the item. /// /// /// The index of the output item in the response. /// - /// - /// The ID of the response. + /// + /// The index of the content part in the item's content array. /// /// /// The final text content. /// - /// - /// The event type, must be `response.output_text.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventResponseTextDone( - int contentIndex, string eventId, + string responseId, string itemId, int outputIndex, - string responseId, + int contentIndex, string text, global::tryAGI.OpenAI.RealtimeServerEventResponseTextDoneType type) { - this.ContentIndex = contentIndex; this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); + this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); + this.ContentIndex = contentIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionCreated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionCreated.g.cs index 488ee8f5..991a4cb0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionCreated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionCreated.g.cs @@ -19,14 +19,6 @@ public sealed partial class RealtimeServerEventSessionCreated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The session configuration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Session { get; set; } - /// /// The event type, must be `session.created`. /// @@ -34,6 +26,14 @@ public sealed partial class RealtimeServerEventSessionCreated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventSessionCreatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventSessionCreatedType Type { get; set; } + /// + /// The session configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Session { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -46,18 +46,18 @@ public sealed partial class RealtimeServerEventSessionCreated /// /// The unique ID of the server event. /// - /// - /// The session configuration. - /// /// /// The event type, must be `session.created`. /// + /// + /// The session configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventSessionCreated( string eventId, - global::tryAGI.OpenAI.AnyOf session, + global::tryAGI.OpenAI.OneOf session, global::tryAGI.OpenAI.RealtimeServerEventSessionCreatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs index cfa3f681..35308a4f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs @@ -18,14 +18,6 @@ public sealed partial class RealtimeServerEventSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } - /// - /// The session configuration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("session")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Session { get; set; } - /// /// The event type, must be `session.updated`. /// @@ -33,6 +25,14 @@ public sealed partial class RealtimeServerEventSessionUpdated [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventSessionUpdatedTypeJsonConverter))] public global::tryAGI.OpenAI.RealtimeServerEventSessionUpdatedType Type { get; set; } + /// + /// The session configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf Session { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,18 +45,18 @@ public sealed partial class RealtimeServerEventSessionUpdated /// /// The unique ID of the server event. /// - /// - /// The session configuration. - /// /// /// The event type, must be `session.updated`. /// + /// + /// The session configuration. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeServerEventSessionUpdated( string eventId, - global::tryAGI.OpenAI.AnyOf session, + global::tryAGI.OpenAI.OneOf session, global::tryAGI.OpenAI.RealtimeServerEventSessionUpdatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventTranscriptionSessionUpdated.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventTranscriptionSessionUpdated.g.cs index cf4d9cb3..f74b424c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventTranscriptionSessionUpdated.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeServerEventTranscriptionSessionUpdated.g.cs @@ -16,6 +16,13 @@ public sealed partial class RealtimeServerEventTranscriptionSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required string EventId { get; set; } + /// + /// The event type, must be `transcription_session.updated`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventTranscriptionSessionUpdatedTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdatedType Type { get; set; } + /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
@@ -26,13 +33,6 @@ public sealed partial class RealtimeServerEventTranscriptionSessionUpdated [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse Session { get; set; } - /// - /// The event type, must be `transcription_session.updated`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventTranscriptionSessionUpdatedTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeServerEventTranscriptionSessionUpdatedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,15 +45,15 @@ public sealed partial class RealtimeServerEventTranscriptionSessionUpdated /// /// The unique ID of the server event. /// + /// + /// The event type, must be `transcription_session.updated`. + /// /// /// A new Realtime transcription session configuration.
/// When a session is created on the server via REST API, the session object
/// also contains an ephemeral key. Default TTL for keys is 10 minutes. This
/// property is not present when a session is updated via the WebSocket API. /// - /// - /// The event type, must be `transcription_session.updated`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequest.g.cs index c3107209..e0b2490c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequest.g.cs @@ -19,20 +19,11 @@ public sealed partial class RealtimeSessionCreateRequest public required global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret ClientSecret { get; set; } /// - /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_format")] - public string? InputAudioFormat { get; set; } - - /// - /// Configuration for input audio transcription, defaults to off and can be
- /// set to `null` to turn off once on. Input audio transcription is not native
- /// to the model, since the model consumes audio directly. Transcription runs
- /// asynchronously and should be treated as rough guidance
- /// rather than the representation understood by the model. + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_transcription")] - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? InputAudioTranscription { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] + public global::System.Collections.Generic.IList? Modalities { get; set; } /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
@@ -42,21 +33,21 @@ public sealed partial class RealtimeSessionCreateRequest public string? Instructions { get; set; } /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_response_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxResponseOutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? Voice { get; set; } /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] - public global::System.Collections.Generic.IList? Modalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_format")] + public string? InputAudioFormat { get; set; } /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. @@ -65,11 +56,14 @@ public sealed partial class RealtimeSessionCreateRequest public string? OutputAudioFormat { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// Configuration for input audio transcription, defaults to off and can be
+ /// set to `null` to turn off once on. Input audio transcription is not native
+ /// to the model, since the model consumes audio directly. Transcription runs
+ /// asynchronously and should be treated as rough guidance
+ /// rather than the representation understood by the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_transcription")] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? InputAudioTranscription { get; set; } /// /// The speed of the model's spoken response. 1.0 is the default speed. 0.25 is
@@ -81,10 +75,28 @@ public sealed partial class RealtimeSessionCreateRequest public double? Speed { get; set; } /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// Configuration options for tracing. Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Tracing { get; set; } + + /// + /// Configuration for turn detection. Can be set to `null` to turn off. Server
+ /// VAD means that the model will detect the start and end of speech based on
+ /// audio volume and respond at the end of user speech. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? TurnDetection { get; set; } + + /// + /// Tools (functions) available to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// How the model chooses tools. Options are `auto`, `none`, `required`, or
@@ -94,44 +106,36 @@ public sealed partial class RealtimeSessionCreateRequest public string? ToolChoice { get; set; } /// - /// Tools (functions) available to the model. + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } /// - /// Configuration options for tracing. Set to null to disable tracing. Once
- /// tracing is enabled for a session, the configuration cannot be modified.
- /// `auto` will create a trace for the session with default values for the
- /// workflow name, group id, and metadata. + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Tracing { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_response_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxResponseOutputTokens { get; set; } /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. ///
[global::System.Text.Json.Serialization.JsonPropertyName("truncation")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationJsonConverter))] public global::tryAGI.OpenAI.RealtimeTruncation? Truncation { get; set; } /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server
- /// VAD means that the model will detect the start and end of speech based on
- /// audio volume and respond at the end of user speech. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? TurnDetection { get; set; } - - /// - /// Example: ash + /// /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -145,36 +149,33 @@ public sealed partial class RealtimeSessionCreateRequest /// /// Ephemeral key returned by the API. /// - /// - /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - /// - /// Configuration for input audio transcription, defaults to off and can be
- /// set to `null` to turn off once on. Input audio transcription is not native
- /// to the model, since the model consumes audio directly. Transcription runs
- /// asynchronously and should be treated as rough guidance
- /// rather than the representation understood by the model. + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. /// /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
/// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. /// - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// + /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// + /// Configuration for input audio transcription, defaults to off and can be
+ /// set to `null` to turn off once on. Input audio transcription is not native
+ /// to the model, since the model consumes audio directly. Transcription runs
+ /// asynchronously and should be treated as rough guidance
+ /// rather than the representation understood by the model. /// /// /// The speed of the model's spoken response. 1.0 is the default speed. 0.25 is
@@ -182,71 +183,77 @@ public sealed partial class RealtimeSessionCreateRequest /// in between model turns, not while a response is in progress.
/// Default Value: 1 /// - /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. - /// - /// - /// How the model chooses tools. Options are `auto`, `none`, `required`, or
- /// specify a function. - /// - /// - /// Tools (functions) available to the model. - /// /// /// Configuration options for tracing. Set to null to disable tracing. Once
/// tracing is enabled for a session, the configuration cannot be modified.
/// `auto` will create a trace for the session with default values for the
/// workflow name, group id, and metadata. /// - /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. - /// /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
/// audio volume and respond at the end of user speech. /// - /// - /// Example: ash + /// + /// Tools (functions) available to the model. + /// + /// + /// How the model chooses tools. Options are `auto`, `none`, `required`, or
+ /// specify a function. + /// + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// + /// + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequest( global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret clientSecret, - string? inputAudioFormat, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription, - string? instructions, - global::tryAGI.OpenAI.AnyOf? maxResponseOutputTokens, global::System.Collections.Generic.IList? modalities, + string? instructions, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice, + string? inputAudioFormat, string? outputAudioFormat, - global::tryAGI.OpenAI.Prompt2? prompt, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription, double? speed, - double? temperature, - string? toolChoice, + global::tryAGI.OpenAI.OneOf? tracing, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection, global::System.Collections.Generic.IList? tools, - global::tryAGI.OpenAI.AnyOf? tracing, + string? toolChoice, + double? temperature, + global::tryAGI.OpenAI.OneOf? maxResponseOutputTokens, global::tryAGI.OpenAI.RealtimeTruncation? truncation, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.PromptVariant1? prompt) { this.ClientSecret = clientSecret ?? throw new global::System.ArgumentNullException(nameof(clientSecret)); - this.InputAudioFormat = inputAudioFormat; - this.InputAudioTranscription = inputAudioTranscription; - this.Instructions = instructions; - this.MaxResponseOutputTokens = maxResponseOutputTokens; this.Modalities = modalities; + this.Instructions = instructions; + this.Voice = voice; + this.InputAudioFormat = inputAudioFormat; this.OutputAudioFormat = outputAudioFormat; - this.Prompt = prompt; + this.InputAudioTranscription = inputAudioTranscription; this.Speed = speed; - this.Temperature = temperature; - this.ToolChoice = toolChoice; - this.Tools = tools; this.Tracing = tracing; - this.Truncation = truncation; this.TurnDetection = turnDetection; - this.Voice = voice; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.Temperature = temperature; + this.MaxResponseOutputTokens = maxResponseOutputTokens; + this.Truncation = truncation; + this.Prompt = prompt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestClientSecret.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestClientSecret.g.cs index c999b2c3..22e6aa46 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestClientSecret.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestClientSecret.g.cs @@ -8,14 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeSessionCreateRequestClientSecret { - /// - /// Timestamp for when the token expires. Currently, all tokens expire
- /// after one minute. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ExpiresAt { get; set; } - /// /// Ephemeral key usable in client environments to authenticate connections
/// to the Realtime API. Use this in client-side environments rather than
@@ -25,6 +17,14 @@ public sealed partial class RealtimeSessionCreateRequestClientSecret [global::System.Text.Json.Serialization.JsonRequired] public required string Value { get; set; } + /// + /// Timestamp for when the token expires. Currently, all tokens expire
+ /// after one minute. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ExpiresAt { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -34,24 +34,24 @@ public sealed partial class RealtimeSessionCreateRequestClientSecret /// /// Initializes a new instance of the class. /// - /// - /// Timestamp for when the token expires. Currently, all tokens expire
- /// after one minute. - /// /// /// Ephemeral key usable in client environments to authenticate connections
/// to the Realtime API. Use this in client-side environments rather than
/// a standard API token, which should only be used server-side. /// + /// + /// Timestamp for when the token expires. Currently, all tokens expire
+ /// after one minute. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestClientSecret( - int expiresAt, - string value) + string value, + int expiresAt) { - this.ExpiresAt = expiresAt; this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + this.ExpiresAt = expiresAt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGA.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGA.g.cs index edc413fc..c123e5ab 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGA.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGA.g.cs @@ -11,17 +11,27 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateRequestGA { /// - /// Configuration for input and output audio. + /// The type of session to create. Always `realtime` for the Realtime API. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType Type { get; set; } /// - /// Additional fields to include in server outputs.
- /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
+ /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
+ /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
+ /// Default Value: [audio] ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] + public global::System.Collections.Generic.IList? OutputModalities { get; set; } + + /// + /// The Realtime model used for this session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
@@ -31,37 +41,34 @@ public sealed partial class RealtimeSessionCreateRequestGA public string? Instructions { get; set; } /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// Configuration for input and output audio. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? Audio { get; set; } /// - /// The Realtime model used for this session. + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } /// - /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
- /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
- /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
- /// Default Value: [audio] + /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] - public global::System.Collections.Generic.IList? OutputModalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Tracing { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// Tools available to the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// /// How the model chooses tools. Provide one of the string modes or force a specific
@@ -69,39 +76,34 @@ public sealed partial class RealtimeSessionCreateRequestGA /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ToolChoice { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ToolChoice { get; set; } /// - /// Tools available to the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } - - /// - /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
- /// tracing is enabled for a session, the configuration cannot be modified.
- /// `auto` will create a trace for the session with default values for the
- /// workflow name, group id, and metadata. + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Tracing { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { get; set; } /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. ///
[global::System.Text.Json.Serialization.JsonPropertyName("truncation")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationJsonConverter))] public global::tryAGI.OpenAI.RealtimeTruncation? Truncation { get; set; } /// - /// The type of session to create. Always `realtime` for the Realtime API. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestGATypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -112,86 +114,86 @@ public sealed partial class RealtimeSessionCreateRequestGA /// /// Initializes a new instance of the class. /// - /// - /// Configuration for input and output audio. + /// + /// The type of session to create. Always `realtime` for the Realtime API. /// - /// - /// Additional fields to include in server outputs.
- /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// + /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
+ /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
+ /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
+ /// Default Value: [audio] + /// + /// + /// The Realtime model used for this session. /// /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
/// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// + /// Configuration for input and output audio. /// - /// - /// The Realtime model used for this session. + /// + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. /// - /// - /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
- /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
- /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
- /// Default Value: [audio] + /// + /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// + /// Tools available to the model. /// /// /// How the model chooses tools. Provide one of the string modes or force a specific
/// function/MCP tool.
/// Default Value: auto /// - /// - /// Tools available to the model. - /// - /// - /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
- /// tracing is enabled for a session, the configuration cannot be modified.
- /// `auto` will create a trace for the session with default values for the
- /// workflow name, group id, and metadata. + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. /// /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. - /// - /// - /// The type of session to create. Always `realtime` for the Realtime API. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestGA( + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType type, + global::System.Collections.Generic.IList? outputModalities, + global::tryAGI.OpenAI.AnyOf? model, + string? instructions, global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? audio, global::System.Collections.Generic.IList? include, - string? instructions, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, - global::tryAGI.OpenAI.AnyOf? model, - global::System.Collections.Generic.IList? outputModalities, - global::tryAGI.OpenAI.Prompt2? prompt, - global::tryAGI.OpenAI.AnyOf? toolChoice, - global::System.Collections.Generic.IList? tools, - global::tryAGI.OpenAI.AnyOf? tracing, + global::tryAGI.OpenAI.OneOf? tracing, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.OneOf? toolChoice, + global::tryAGI.OpenAI.OneOf? maxOutputTokens, global::tryAGI.OpenAI.RealtimeTruncation? truncation, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType type) + global::tryAGI.OpenAI.PromptVariant1? prompt) { + this.Type = type; + this.OutputModalities = outputModalities; + this.Model = model; + this.Instructions = instructions; this.Audio = audio; this.Include = include; - this.Instructions = instructions; - this.MaxOutputTokens = maxOutputTokens; - this.Model = model; - this.OutputModalities = outputModalities; - this.Prompt = prompt; - this.ToolChoice = toolChoice; - this.Tools = tools; this.Tracing = tracing; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.MaxOutputTokens = maxOutputTokens; this.Truncation = truncation; - this.Type = type; + this.Prompt = prompt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInput.g.cs index 0fda14e5..04e5e7f1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInput.g.cs @@ -9,31 +9,32 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateRequestGAAudioInput { /// - /// + /// The format of the input audio. /// [global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] + public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } + /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInputNoiseReduction? NoiseReduction { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] - public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } - /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public object? TurnDetection { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? TurnDetection { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,26 +45,31 @@ public sealed partial class RealtimeSessionCreateRequestGAAudioInput /// /// Initializes a new instance of the class. /// - /// + /// + /// The format of the input audio. + /// + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// - /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestGAAudioInput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.AudioTranscription? transcription, - object? turnDetection) + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudioInputNoiseReduction? noiseReduction, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? turnDetection) { this.Format = format; - this.NoiseReduction = noiseReduction; this.Transcription = transcription; + this.NoiseReduction = noiseReduction; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInputNoiseReduction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInputNoiseReduction.g.cs index 128cf4e2..6543c11e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInputNoiseReduction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioInputNoiseReduction.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class RealtimeSessionCreateRequestGAAudioInputNoiseReduction { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioOutput.g.cs index 0c1dbe48..e3b935e4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAAudioOutput.g.cs @@ -9,12 +9,25 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateRequestGAAudioOutput { /// - /// + /// The format of the output audio. /// [global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with
+ /// an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
+ /// during the session once the model has responded with audio at least once.
+ /// We recommend `marin` and `cedar` for best quality.
+ /// Default Value: alloy + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsOrCustomVoiceJsonConverter))] + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? Voice { get; set; } + /// /// The speed of the model's spoken response as a multiple of the original speed.
/// 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.
@@ -25,14 +38,6 @@ public sealed partial class RealtimeSessionCreateRequestGAAudioOutput [global::System.Text.Json.Serialization.JsonPropertyName("speed")] public double? Speed { get; set; } - /// - /// Example: ash - /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,7 +47,18 @@ public sealed partial class RealtimeSessionCreateRequestGAAudioOutput /// /// Initializes a new instance of the class. /// - /// + /// + /// The format of the output audio. + /// + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with
+ /// an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
+ /// during the session once the model has responded with audio at least once.
+ /// We recommend `marin` and `cedar` for best quality.
+ /// Default Value: alloy + /// /// /// The speed of the model's spoken response as a multiple of the original speed.
/// 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.
@@ -50,20 +66,17 @@ public sealed partial class RealtimeSessionCreateRequestGAAudioOutput /// also possible to prompt the model to speak faster or slower.
/// Default Value: 1 /// - /// - /// Example: ash - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestGAAudioOutput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - double? speed, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice, + double? speed) { this.Format = format; - this.Speed = speed; this.Voice = voice; + this.Speed = speed; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAModel.g.cs index 3a1106f0..390a14a9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAModel.g.cs @@ -15,6 +15,10 @@ public enum RealtimeSessionCreateRequestGAModel /// /// /// + GptRealtime15, + /// + /// + /// GptRealtime20250828, /// /// @@ -40,6 +44,34 @@ public enum RealtimeSessionCreateRequestGAModel /// /// Gpt4oMiniRealtimePreview20241217, + /// + /// + /// + GptRealtimeMini, + /// + /// + /// + GptRealtimeMini20251006, + /// + /// + /// + GptRealtimeMini20251215, + /// + /// + /// + GptAudio15, + /// + /// + /// + GptAudioMini, + /// + /// + /// + GptAudioMini20251006, + /// + /// + /// + GptAudioMini20251215, } /// @@ -55,6 +87,7 @@ public static string ToValueString(this RealtimeSessionCreateRequestGAModel valu return value switch { RealtimeSessionCreateRequestGAModel.GptRealtime => "gpt-realtime", + RealtimeSessionCreateRequestGAModel.GptRealtime15 => "gpt-realtime-1.5", RealtimeSessionCreateRequestGAModel.GptRealtime20250828 => "gpt-realtime-2025-08-28", RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview => "gpt-4o-realtime-preview", RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview20241001 => "gpt-4o-realtime-preview-2024-10-01", @@ -62,6 +95,13 @@ public static string ToValueString(this RealtimeSessionCreateRequestGAModel valu RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview20250603 => "gpt-4o-realtime-preview-2025-06-03", RealtimeSessionCreateRequestGAModel.Gpt4oMiniRealtimePreview => "gpt-4o-mini-realtime-preview", RealtimeSessionCreateRequestGAModel.Gpt4oMiniRealtimePreview20241217 => "gpt-4o-mini-realtime-preview-2024-12-17", + RealtimeSessionCreateRequestGAModel.GptRealtimeMini => "gpt-realtime-mini", + RealtimeSessionCreateRequestGAModel.GptRealtimeMini20251006 => "gpt-realtime-mini-2025-10-06", + RealtimeSessionCreateRequestGAModel.GptRealtimeMini20251215 => "gpt-realtime-mini-2025-12-15", + RealtimeSessionCreateRequestGAModel.GptAudio15 => "gpt-audio-1.5", + RealtimeSessionCreateRequestGAModel.GptAudioMini => "gpt-audio-mini", + RealtimeSessionCreateRequestGAModel.GptAudioMini20251006 => "gpt-audio-mini-2025-10-06", + RealtimeSessionCreateRequestGAModel.GptAudioMini20251215 => "gpt-audio-mini-2025-12-15", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -73,6 +113,7 @@ public static string ToValueString(this RealtimeSessionCreateRequestGAModel valu return value switch { "gpt-realtime" => RealtimeSessionCreateRequestGAModel.GptRealtime, + "gpt-realtime-1.5" => RealtimeSessionCreateRequestGAModel.GptRealtime15, "gpt-realtime-2025-08-28" => RealtimeSessionCreateRequestGAModel.GptRealtime20250828, "gpt-4o-realtime-preview" => RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview, "gpt-4o-realtime-preview-2024-10-01" => RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview20241001, @@ -80,6 +121,13 @@ public static string ToValueString(this RealtimeSessionCreateRequestGAModel valu "gpt-4o-realtime-preview-2025-06-03" => RealtimeSessionCreateRequestGAModel.Gpt4oRealtimePreview20250603, "gpt-4o-mini-realtime-preview" => RealtimeSessionCreateRequestGAModel.Gpt4oMiniRealtimePreview, "gpt-4o-mini-realtime-preview-2024-12-17" => RealtimeSessionCreateRequestGAModel.Gpt4oMiniRealtimePreview20241217, + "gpt-realtime-mini" => RealtimeSessionCreateRequestGAModel.GptRealtimeMini, + "gpt-realtime-mini-2025-10-06" => RealtimeSessionCreateRequestGAModel.GptRealtimeMini20251006, + "gpt-realtime-mini-2025-12-15" => RealtimeSessionCreateRequestGAModel.GptRealtimeMini20251215, + "gpt-audio-1.5" => RealtimeSessionCreateRequestGAModel.GptAudio15, + "gpt-audio-mini" => RealtimeSessionCreateRequestGAModel.GptAudioMini, + "gpt-audio-mini-2025-10-06" => RealtimeSessionCreateRequestGAModel.GptAudioMini20251006, + "gpt-audio-mini-2025-12-15" => RealtimeSessionCreateRequestGAModel.GptAudioMini20251215, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.Json.g.cs deleted file mode 100644 index e41038e4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RealtimeSessionCreateRequestGAToolDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAToolDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.g.cs deleted file mode 100644 index 24c304e4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGAToolDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RealtimeSessionCreateRequestGAToolDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RealtimeSessionCreateRequestGAToolDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RealtimeSessionCreateRequestGAToolDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum.g.cs index 9dfd257b..c6eb7d37 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Default tracing mode for the session.
+ /// Enables tracing and sets default values for tracing configuration options. Always `auto`.
/// Default Value: auto ///
public enum RealtimeSessionCreateRequestGATracingEnum diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum2.g.cs index 897baa76..a94862e7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestGATracingEnum2.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeSessionCreateRequestGATracingEnum2 { + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the Traces Dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] + public string? WorkflowName { get; set; } + /// /// The group id to attach to this trace to enable filtering and
/// grouping in the Traces Dashboard. @@ -22,13 +29,6 @@ public sealed partial class RealtimeSessionCreateRequestGATracingEnum2 [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public object? Metadata { get; set; } - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the Traces Dashboard. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] - public string? WorkflowName { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,6 +38,10 @@ public sealed partial class RealtimeSessionCreateRequestGATracingEnum2 /// /// Initializes a new instance of the class. /// + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the Traces Dashboard. + /// /// /// The group id to attach to this trace to enable filtering and
/// grouping in the Traces Dashboard. @@ -46,21 +50,17 @@ public sealed partial class RealtimeSessionCreateRequestGATracingEnum2 /// The arbitrary metadata to attach to this trace to enable
/// filtering in the Traces Dashboard. /// - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the Traces Dashboard. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestGATracingEnum2( + string? workflowName, string? groupId, - object? metadata, - string? workflowName) + object? metadata) { + this.WorkflowName = workflowName; this.GroupId = groupId; this.Metadata = metadata; - this.WorkflowName = workflowName; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTool.g.cs index ec01057a..20def7b9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTool.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateRequestTool { /// - /// The description of the function, including guidance on when and how
- /// to call it, and guidance about what to tell the user when calling
- /// (if anything). + /// The type of the tool, i.e. `function`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? Type { get; set; } /// /// The name of the function. @@ -23,17 +22,18 @@ public sealed partial class RealtimeSessionCreateRequestTool public string? Name { get; set; } /// - /// Parameters of the function in JSON Schema. + /// The description of the function, including guidance on when and how
+ /// to call it, and guidance about what to tell the user when calling
+ /// (if anything). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] - public object? Parameters { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } /// - /// The type of the tool, i.e. `function`. + /// Parameters of the function in JSON Schema. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateRequestToolTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public object? Parameters { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,33 +44,33 @@ public sealed partial class RealtimeSessionCreateRequestTool /// /// Initializes a new instance of the class. /// + /// + /// The type of the tool, i.e. `function`. + /// + /// + /// The name of the function. + /// /// /// The description of the function, including guidance on when and how
/// to call it, and guidance about what to tell the user when calling
/// (if anything). /// - /// - /// The name of the function. - /// /// /// Parameters of the function in JSON Schema. /// - /// - /// The type of the tool, i.e. `function`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestTool( - string? description, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? type, string? name, - object? parameters, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestToolType? type) + string? description, + object? parameters) { - this.Description = description; + this.Type = type; this.Name = name; + this.Description = description; this.Parameters = parameters; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTracingEnum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTracingEnum2.g.cs index 553985a1..ca289c02 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTracingEnum2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTracingEnum2.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeSessionCreateRequestTracingEnum2 { + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the traces dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] + public string? WorkflowName { get; set; } + /// /// The group id to attach to this trace to enable filtering and
/// grouping in the traces dashboard. @@ -22,13 +29,6 @@ public sealed partial class RealtimeSessionCreateRequestTracingEnum2 [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public object? Metadata { get; set; } - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the traces dashboard. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] - public string? WorkflowName { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,6 +38,10 @@ public sealed partial class RealtimeSessionCreateRequestTracingEnum2 /// /// Initializes a new instance of the class. /// + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the traces dashboard. + /// /// /// The group id to attach to this trace to enable filtering and
/// grouping in the traces dashboard. @@ -46,21 +50,17 @@ public sealed partial class RealtimeSessionCreateRequestTracingEnum2 /// The arbitrary metadata to attach to this trace to enable
/// filtering in the traces dashboard. /// - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the traces dashboard. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestTracingEnum2( + string? workflowName, string? groupId, - object? metadata, - string? workflowName) + object? metadata) { + this.WorkflowName = workflowName; this.GroupId = groupId; this.Metadata = metadata; - this.WorkflowName = workflowName; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTurnDetection.g.cs index ee4569c1..ccbc6752 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateRequestTurnDetection.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeSessionCreateRequestTurnDetection { + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -25,20 +39,6 @@ public sealed partial class RealtimeSessionCreateRequestTurnDetection [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] public int? SilenceDurationMs { get; set; } - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } - - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,6 +48,14 @@ public sealed partial class RealtimeSessionCreateRequestTurnDetection /// /// Initializes a new instance of the class. /// + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -57,27 +65,19 @@ public sealed partial class RealtimeSessionCreateRequestTurnDetection /// to 500ms. With shorter values the model will respond more quickly,
/// but may jump in on short pauses from the user. /// - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - /// - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateRequestTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + string? type, double? threshold, - string? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponse.g.cs index 112f12e7..a2b96de1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponse.g.cs @@ -11,22 +11,22 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateResponse { /// - /// Configuration for input and output audio for the session. + /// Unique identifier for the session that looks like `sess_1234567890abcdef`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? Audio { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } /// - /// Expiration timestamp for the session, in seconds since epoch. + /// The object type. Always `realtime.session`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - public int? ExpiresAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + public string? Object { get; set; } /// - /// Unique identifier for the session that looks like `sess_1234567890abcdef`. + /// Expiration timestamp for the session, in seconds since epoch. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - public string? Id { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + public int? ExpiresAt { get; set; } /// /// Additional fields to include in server outputs.
@@ -35,6 +35,19 @@ public sealed partial class RealtimeSessionCreateResponse [global::System.Text.Json.Serialization.JsonPropertyName("include")] public global::System.Collections.Generic.IList? Include { get; set; } + /// + /// The Realtime model used for this session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] + public global::System.Collections.Generic.IList? OutputModalities { get; set; } + /// /// The default system instructions (i.e. system message) prepended to model
/// calls. This field allows the client to guide the model on desired
@@ -52,33 +65,34 @@ public sealed partial class RealtimeSessionCreateResponse public string? Instructions { get; set; } /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// Configuration for input and output audio for the session. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? Audio { get; set; } /// - /// The Realtime model used for this session. + /// Configuration options for tracing. Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Tracing { get; set; } /// - /// The object type. Always `realtime.session`. + /// Configuration for turn detection. Can be set to `null` to turn off. Server
+ /// VAD means that the model will detect the start and end of speech based on
+ /// audio volume and respond at the end of user speech. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("object")] - public string? Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? TurnDetection { get; set; } /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// Tools (functions) available to the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] - public global::System.Collections.Generic.IList? OutputModalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// How the model chooses tools. Options are `auto`, `none`, `required`, or
@@ -88,28 +102,14 @@ public sealed partial class RealtimeSessionCreateResponse public string? ToolChoice { get; set; } /// - /// Tools (functions) available to the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } - - /// - /// Configuration options for tracing. Set to null to disable tracing. Once
- /// tracing is enabled for a session, the configuration cannot be modified.
- /// `auto` will create a trace for the session with default values for the
- /// workflow name, group id, and metadata. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Tracing { get; set; } - - /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server
- /// VAD means that the model will detect the start and end of speech based on
- /// audio volume and respond at the end of user speech. + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? TurnDetection { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -120,19 +120,26 @@ public sealed partial class RealtimeSessionCreateResponse /// /// Initializes a new instance of the class. /// - /// - /// Configuration for input and output audio for the session. + /// + /// Unique identifier for the session that looks like `sess_1234567890abcdef`. + /// + /// + /// The object type. Always `realtime.session`. /// /// /// Expiration timestamp for the session, in seconds since epoch. /// - /// - /// Unique identifier for the session that looks like `sess_1234567890abcdef`. - /// /// /// Additional fields to include in server outputs.
/// - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. /// + /// + /// The Realtime model used for this session. + /// + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. + /// /// /// The default system instructions (i.e. system message) prepended to model
/// calls. This field allows the client to guide the model on desired
@@ -146,28 +153,8 @@ public sealed partial class RealtimeSessionCreateResponse /// field is not set and are visible in the `session.created` event at the
/// start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. - /// - /// - /// The Realtime model used for this session. - /// - /// - /// The object type. Always `realtime.session`. - /// - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. - /// - /// - /// How the model chooses tools. Options are `auto`, `none`, `required`, or
- /// specify a function. - /// - /// - /// Tools (functions) available to the model. + /// + /// Configuration for input and output audio for the session. /// /// /// Configuration options for tracing. Set to null to disable tracing. Once
@@ -180,37 +167,50 @@ public sealed partial class RealtimeSessionCreateResponse /// VAD means that the model will detect the start and end of speech based on
/// audio volume and respond at the end of user speech. /// + /// + /// Tools (functions) available to the model. + /// + /// + /// How the model chooses tools. Options are `auto`, `none`, `required`, or
+ /// specify a function. + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponse( - global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? audio, - int? expiresAt, string? id, + string? @object, + int? expiresAt, global::System.Collections.Generic.IList? include, - string? instructions, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, string? model, - string? @object, global::System.Collections.Generic.IList? outputModalities, - string? toolChoice, + string? instructions, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudio? audio, + global::tryAGI.OpenAI.OneOf? tracing, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? turnDetection, global::System.Collections.Generic.IList? tools, - global::tryAGI.OpenAI.AnyOf? tracing, - global::tryAGI.OpenAI.RealtimeSessionCreateResponseTurnDetection? turnDetection) + string? toolChoice, + global::tryAGI.OpenAI.OneOf? maxOutputTokens) { - this.Audio = audio; - this.ExpiresAt = expiresAt; this.Id = id; + this.Object = @object; + this.ExpiresAt = expiresAt; this.Include = include; - this.Instructions = instructions; - this.MaxOutputTokens = maxOutputTokens; this.Model = model; - this.Object = @object; this.OutputModalities = outputModalities; - this.ToolChoice = toolChoice; - this.Tools = tools; + this.Instructions = instructions; + this.Audio = audio; this.Tracing = tracing; this.TurnDetection = turnDetection; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.MaxOutputTokens = maxOutputTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInput.g.cs index 9fd8470f..7125fedc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInput.g.cs @@ -16,16 +16,16 @@ public sealed partial class RealtimeSessionCreateResponseAudioInput public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } /// - /// Configuration for input audio noise reduction. + /// Configuration for input audio transcription. /// - [global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? NoiseReduction { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] + public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } /// - /// + /// Configuration for input audio noise reduction. /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] - public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? NoiseReduction { get; set; } /// /// Configuration for turn detection. @@ -43,10 +43,12 @@ public sealed partial class RealtimeSessionCreateResponseAudioInput /// Initializes a new instance of the class. /// /// + /// + /// Configuration for input audio transcription. + /// /// /// Configuration for input audio noise reduction. /// - /// /// /// Configuration for turn detection. /// @@ -55,13 +57,13 @@ public sealed partial class RealtimeSessionCreateResponseAudioInput #endif public RealtimeSessionCreateResponseAudioInput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.AudioTranscription? transcription, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.RealtimeSessionCreateResponseAudioInputTurnDetection? turnDetection) { this.Format = format; - this.NoiseReduction = noiseReduction; this.Transcription = transcription; + this.NoiseReduction = noiseReduction; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInputTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInputTurnDetection.g.cs index 1b0aa146..cf2b8d46 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInputTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioInputTurnDetection.g.cs @@ -9,28 +9,28 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateResponseAudioInputTurnDetection { /// - /// + /// Type of turn detection, only `server_vad` is currently supported. /// - [global::System.Text.Json.Serialization.JsonPropertyName("prefix_padding_ms")] - public int? PrefixPaddingMs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] - public int? SilenceDurationMs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("prefix_padding_ms")] + public int? PrefixPaddingMs { get; set; } /// - /// Type of turn detection, only `server_vad` is currently supported. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] + public int? SilenceDurationMs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,25 +41,25 @@ public sealed partial class RealtimeSessionCreateResponseAudioInputTurnDetection /// /// Initializes a new instance of the class. /// - /// - /// - /// /// /// Type of turn detection, only `server_vad` is currently supported. /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseAudioInputTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + string? type, double? threshold, - string? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioOutput.g.cs index a81bcdcf..5d0afc25 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseAudioOutput.g.cs @@ -15,12 +15,6 @@ public sealed partial class RealtimeSessionCreateResponseAudioOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("speed")] - public double? Speed { get; set; } - /// /// Example: ash /// @@ -29,6 +23,12 @@ public sealed partial class RealtimeSessionCreateResponseAudioOutput [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("speed")] + public double? Speed { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,21 +39,21 @@ public sealed partial class RealtimeSessionCreateResponseAudioOutput /// Initializes a new instance of the class. /// /// - /// /// /// Example: ash /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseAudioOutput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - double? speed, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.VoiceIdsShared? voice, + double? speed) { this.Format = format; - this.Speed = speed; this.Voice = voice; + this.Speed = speed; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGA.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGA.g.cs index ae8c5c56..46647c0f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGA.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGA.g.cs @@ -11,12 +11,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeSessionCreateResponseGA { - /// - /// Configuration for input and output audio. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudio? Audio { get; set; } - /// /// Ephemeral key returned by the API. /// @@ -25,11 +19,27 @@ public sealed partial class RealtimeSessionCreateResponseGA public required global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAClientSecret ClientSecret { get; set; } /// - /// Additional fields to include in server outputs.
- /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// The type of session to create. Always `realtime` for the Realtime API. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType Type { get; set; } + + /// + /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
+ /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
+ /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
+ /// Default Value: [audio] + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] + public global::System.Collections.Generic.IList? OutputModalities { get; set; } + + /// + /// The Realtime model used for this session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + public global::tryAGI.OpenAI.AnyOf? Model { get; set; } /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
@@ -39,37 +49,29 @@ public sealed partial class RealtimeSessionCreateResponseGA public string? Instructions { get; set; } /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// Configuration for input and output audio. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? MaxOutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudio? Audio { get; set; } /// - /// The Realtime model used for this session. + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("model")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } /// - /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
- /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
- /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
- /// Default Value: [audio] + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("output_modalities")] - public global::System.Collections.Generic.IList? OutputModalities { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + public global::tryAGI.OpenAI.OneOf? Tracing { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// Tools available to the model. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } /// /// How the model chooses tools. Provide one of the string modes or force a specific
@@ -77,35 +79,34 @@ public sealed partial class RealtimeSessionCreateResponseGA /// Default Value: auto ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? ToolChoice { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ToolChoice { get; set; } /// - /// Tools available to the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } - - /// - /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] - public object? Tracing { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? MaxOutputTokens { get; set; } /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. ///
[global::System.Text.Json.Serialization.JsonPropertyName("truncation")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationJsonConverter))] public global::tryAGI.OpenAI.RealtimeTruncation? Truncation { get; set; } /// - /// The type of session to create. Always `realtime` for the Realtime API. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeSessionCreateResponseGATypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -116,28 +117,11 @@ public sealed partial class RealtimeSessionCreateResponseGA /// /// Initializes a new instance of the class. /// - /// - /// Configuration for input and output audio. - /// /// /// Ephemeral key returned by the API. /// - /// - /// Additional fields to include in server outputs.
- /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. - /// - /// - /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
- /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. - /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. - /// - /// - /// The Realtime model used for this session. + /// + /// The type of session to create. Always `realtime` for the Realtime API. /// /// /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
@@ -145,57 +129,73 @@ public sealed partial class RealtimeSessionCreateResponseGA /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
/// Default Value: [audio] /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// + /// The Realtime model used for this session. + /// + /// + /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
+ /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. + /// + /// + /// Configuration for input and output audio. + /// + /// + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// + /// + /// + /// Tools available to the model. /// /// /// How the model chooses tools. Provide one of the string modes or force a specific
/// function/MCP tool.
/// Default Value: auto /// - /// - /// Tools available to the model. + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. /// - /// /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. - /// - /// - /// The type of session to create. Always `realtime` for the Realtime API. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseGA( global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAClientSecret clientSecret, + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType type, + global::System.Collections.Generic.IList? outputModalities, + global::tryAGI.OpenAI.AnyOf? model, + string? instructions, global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudio? audio, global::System.Collections.Generic.IList? include, - string? instructions, - global::tryAGI.OpenAI.AnyOf? maxOutputTokens, - global::tryAGI.OpenAI.AnyOf? model, - global::System.Collections.Generic.IList? outputModalities, - global::tryAGI.OpenAI.Prompt2? prompt, - global::tryAGI.OpenAI.AnyOf? toolChoice, - global::System.Collections.Generic.IList>? tools, - object? tracing, + global::tryAGI.OpenAI.OneOf? tracing, + global::System.Collections.Generic.IList>? tools, + global::tryAGI.OpenAI.OneOf? toolChoice, + global::tryAGI.OpenAI.OneOf? maxOutputTokens, global::tryAGI.OpenAI.RealtimeTruncation? truncation, - global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAType type) + global::tryAGI.OpenAI.PromptVariant1? prompt) { this.ClientSecret = clientSecret ?? throw new global::System.ArgumentNullException(nameof(clientSecret)); + this.Type = type; + this.OutputModalities = outputModalities; + this.Model = model; + this.Instructions = instructions; this.Audio = audio; this.Include = include; - this.Instructions = instructions; - this.MaxOutputTokens = maxOutputTokens; - this.Model = model; - this.OutputModalities = outputModalities; - this.Prompt = prompt; - this.ToolChoice = toolChoice; - this.Tools = tools; this.Tracing = tracing; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.MaxOutputTokens = maxOutputTokens; this.Truncation = truncation; - this.Type = type; + this.Prompt = prompt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInput.g.cs index f19e9549..702c1468 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInput.g.cs @@ -9,31 +9,32 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateResponseGAAudioInput { /// - /// + /// The format of the input audio. /// [global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] + public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } + /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInputNoiseReduction? NoiseReduction { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] - public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } - /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public object? TurnDetection { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? TurnDetection { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -44,26 +45,31 @@ public sealed partial class RealtimeSessionCreateResponseGAAudioInput /// /// Initializes a new instance of the class. /// - /// + /// + /// The format of the input audio. + /// + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// - /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseGAAudioInput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.AudioTranscription? transcription, - object? turnDetection) + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGAAudioInputNoiseReduction? noiseReduction, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? turnDetection) { this.Format = format; - this.NoiseReduction = noiseReduction; this.Transcription = transcription; + this.NoiseReduction = noiseReduction; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInputNoiseReduction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInputNoiseReduction.g.cs index 8247cc31..9b586b79 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInputNoiseReduction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioInputNoiseReduction.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class RealtimeSessionCreateResponseGAAudioInputNoiseReduction { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioOutput.g.cs index 26723ac9..d9e3e516 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAAudioOutput.g.cs @@ -9,12 +9,26 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateResponseGAAudioOutput { /// - /// + /// The format of the output audio. /// [global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } + /// + /// The voice the model uses to respond. Voice cannot be changed during the
+ /// session once the model has responded with audio at least once. Current
+ /// voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
+ /// `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for
+ /// best quality.
+ /// Default Value: alloy
+ /// Example: ash + ///
+ /// ash + [global::System.Text.Json.Serialization.JsonPropertyName("voice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] + public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } + /// /// The speed of the model's spoken response as a multiple of the original speed.
/// 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.
@@ -25,14 +39,6 @@ public sealed partial class RealtimeSessionCreateResponseGAAudioOutput [global::System.Text.Json.Serialization.JsonPropertyName("speed")] public double? Speed { get; set; } - /// - /// Example: ash - /// - /// ash - [global::System.Text.Json.Serialization.JsonPropertyName("voice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceIdsSharedJsonConverter))] - public global::tryAGI.OpenAI.VoiceIdsShared? Voice { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,7 +48,18 @@ public sealed partial class RealtimeSessionCreateResponseGAAudioOutput /// /// Initializes a new instance of the class. /// - /// + /// + /// The format of the output audio. + /// + /// + /// The voice the model uses to respond. Voice cannot be changed during the
+ /// session once the model has responded with audio at least once. Current
+ /// voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
+ /// `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for
+ /// best quality.
+ /// Default Value: alloy
+ /// Example: ash + /// /// /// The speed of the model's spoken response as a multiple of the original speed.
/// 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.
@@ -50,20 +67,17 @@ public sealed partial class RealtimeSessionCreateResponseGAAudioOutput /// also possible to prompt the model to speak faster or slower.
/// Default Value: 1 /// - /// - /// Example: ash - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseGAAudioOutput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - double? speed, - global::tryAGI.OpenAI.VoiceIdsShared? voice) + global::tryAGI.OpenAI.VoiceIdsShared? voice, + double? speed) { this.Format = format; - this.Speed = speed; this.Voice = voice; + this.Speed = speed; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAClientSecret.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAClientSecret.g.cs index ac6a0647..91b5635d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAClientSecret.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAClientSecret.g.cs @@ -9,19 +9,19 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeSessionCreateResponseGAClientSecret { /// - /// Timestamp for when the token expires. Currently, all tokens expire
- /// after one minute. + /// Ephemeral key usable in client environments to authenticate connections to the Realtime API. Use this in client-side environments rather than a standard API token, which should only be used server-side. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonPropertyName("value")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ExpiresAt { get; set; } + public required string Value { get; set; } /// - /// Ephemeral key usable in client environments to authenticate connections to the Realtime API. Use this in client-side environments rather than a standard API token, which should only be used server-side. + /// Timestamp for when the token expires. Currently, all tokens expire
+ /// after one minute. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Value { get; set; } + public required int ExpiresAt { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -32,22 +32,22 @@ public sealed partial class RealtimeSessionCreateResponseGAClientSecret /// /// Initializes a new instance of the class. /// + /// + /// Ephemeral key usable in client environments to authenticate connections to the Realtime API. Use this in client-side environments rather than a standard API token, which should only be used server-side. + /// /// /// Timestamp for when the token expires. Currently, all tokens expire
/// after one minute. /// - /// - /// Ephemeral key usable in client environments to authenticate connections to the Realtime API. Use this in client-side environments rather than a standard API token, which should only be used server-side. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseGAClientSecret( - int expiresAt, - string value) + string value, + int expiresAt) { - this.ExpiresAt = expiresAt; this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + this.ExpiresAt = expiresAt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAModel.g.cs index 821b9d51..d888acf3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGAModel.g.cs @@ -15,6 +15,10 @@ public enum RealtimeSessionCreateResponseGAModel /// /// /// + GptRealtime15, + /// + /// + /// GptRealtime20250828, /// /// @@ -40,6 +44,34 @@ public enum RealtimeSessionCreateResponseGAModel /// /// Gpt4oMiniRealtimePreview20241217, + /// + /// + /// + GptRealtimeMini, + /// + /// + /// + GptRealtimeMini20251006, + /// + /// + /// + GptRealtimeMini20251215, + /// + /// + /// + GptAudio15, + /// + /// + /// + GptAudioMini, + /// + /// + /// + GptAudioMini20251006, + /// + /// + /// + GptAudioMini20251215, } /// @@ -55,6 +87,7 @@ public static string ToValueString(this RealtimeSessionCreateResponseGAModel val return value switch { RealtimeSessionCreateResponseGAModel.GptRealtime => "gpt-realtime", + RealtimeSessionCreateResponseGAModel.GptRealtime15 => "gpt-realtime-1.5", RealtimeSessionCreateResponseGAModel.GptRealtime20250828 => "gpt-realtime-2025-08-28", RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview => "gpt-4o-realtime-preview", RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview20241001 => "gpt-4o-realtime-preview-2024-10-01", @@ -62,6 +95,13 @@ public static string ToValueString(this RealtimeSessionCreateResponseGAModel val RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview20250603 => "gpt-4o-realtime-preview-2025-06-03", RealtimeSessionCreateResponseGAModel.Gpt4oMiniRealtimePreview => "gpt-4o-mini-realtime-preview", RealtimeSessionCreateResponseGAModel.Gpt4oMiniRealtimePreview20241217 => "gpt-4o-mini-realtime-preview-2024-12-17", + RealtimeSessionCreateResponseGAModel.GptRealtimeMini => "gpt-realtime-mini", + RealtimeSessionCreateResponseGAModel.GptRealtimeMini20251006 => "gpt-realtime-mini-2025-10-06", + RealtimeSessionCreateResponseGAModel.GptRealtimeMini20251215 => "gpt-realtime-mini-2025-12-15", + RealtimeSessionCreateResponseGAModel.GptAudio15 => "gpt-audio-1.5", + RealtimeSessionCreateResponseGAModel.GptAudioMini => "gpt-audio-mini", + RealtimeSessionCreateResponseGAModel.GptAudioMini20251006 => "gpt-audio-mini-2025-10-06", + RealtimeSessionCreateResponseGAModel.GptAudioMini20251215 => "gpt-audio-mini-2025-12-15", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -73,6 +113,7 @@ public static string ToValueString(this RealtimeSessionCreateResponseGAModel val return value switch { "gpt-realtime" => RealtimeSessionCreateResponseGAModel.GptRealtime, + "gpt-realtime-1.5" => RealtimeSessionCreateResponseGAModel.GptRealtime15, "gpt-realtime-2025-08-28" => RealtimeSessionCreateResponseGAModel.GptRealtime20250828, "gpt-4o-realtime-preview" => RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview, "gpt-4o-realtime-preview-2024-10-01" => RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview20241001, @@ -80,6 +121,13 @@ public static string ToValueString(this RealtimeSessionCreateResponseGAModel val "gpt-4o-realtime-preview-2025-06-03" => RealtimeSessionCreateResponseGAModel.Gpt4oRealtimePreview20250603, "gpt-4o-mini-realtime-preview" => RealtimeSessionCreateResponseGAModel.Gpt4oMiniRealtimePreview, "gpt-4o-mini-realtime-preview-2024-12-17" => RealtimeSessionCreateResponseGAModel.Gpt4oMiniRealtimePreview20241217, + "gpt-realtime-mini" => RealtimeSessionCreateResponseGAModel.GptRealtimeMini, + "gpt-realtime-mini-2025-10-06" => RealtimeSessionCreateResponseGAModel.GptRealtimeMini20251006, + "gpt-realtime-mini-2025-12-15" => RealtimeSessionCreateResponseGAModel.GptRealtimeMini20251215, + "gpt-audio-1.5" => RealtimeSessionCreateResponseGAModel.GptAudio15, + "gpt-audio-mini" => RealtimeSessionCreateResponseGAModel.GptAudioMini, + "gpt-audio-mini-2025-10-06" => RealtimeSessionCreateResponseGAModel.GptAudioMini20251006, + "gpt-audio-mini-2025-12-15" => RealtimeSessionCreateResponseGAModel.GptAudioMini20251215, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.Json.g.cs new file mode 100644 index 00000000..1761b28a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeSessionCreateResponseGATracing + { + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracing; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.g.cs new file mode 100644 index 00000000..51867328 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracing.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeSessionCreateResponseGATracing + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs new file mode 100644 index 00000000..7bb18ff9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Enables tracing and sets default values for tracing configuration options. Always `auto`.
+ /// Default Value: auto + ///
+ public enum RealtimeSessionCreateResponseGATracingTracingConfigurationEnum + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeSessionCreateResponseGATracingTracingConfigurationEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeSessionCreateResponseGATracingTracingConfigurationEnum value) + { + return value switch + { + RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeSessionCreateResponseGATracingTracingConfigurationEnum? ToEnum(string value) + { + return value switch + { + "auto" => RealtimeSessionCreateResponseGATracingTracingConfigurationEnum.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.Json.g.cs new file mode 100644 index 00000000..6fa4ef59 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2 + { + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.g.cs new file mode 100644 index 00000000..8ef84e4c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Granular configuration for tracing. + /// + public sealed partial class RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2 + { + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the Traces Dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] + public string? WorkflowName { get; set; } + + /// + /// The group id to attach to this trace to enable filtering and
+ /// grouping in the Traces Dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("group_id")] + public string? GroupId { get; set; } + + /// + /// The arbitrary metadata to attach to this trace to enable
+ /// filtering in the Traces Dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the Traces Dashboard. + /// + /// + /// The group id to attach to this trace to enable filtering and
+ /// grouping in the Traces Dashboard. + /// + /// + /// The arbitrary metadata to attach to this trace to enable
+ /// filtering in the Traces Dashboard. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2( + string? workflowName, + string? groupId, + object? metadata) + { + this.WorkflowName = workflowName; + this.GroupId = groupId; + this.Metadata = metadata; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeSessionCreateResponseGATracingTracingConfigurationEnum2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.Json.g.cs new file mode 100644 index 00000000..0912df0d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata + { + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.g.cs new file mode 100644 index 00000000..a20c9529 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The arbitrary metadata to attach to this trace to enable
+ /// filtering in the Traces Dashboard. + ///
+ public sealed partial class RealtimeSessionCreateResponseGATracingTracingConfigurationEnumMetadata + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTracingEnum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTracingEnum2.g.cs index 56f71230..eea10cfe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTracingEnum2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTracingEnum2.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeSessionCreateResponseTracingEnum2 { + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the traces dashboard. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] + public string? WorkflowName { get; set; } + /// /// The group id to attach to this trace to enable filtering and
/// grouping in the traces dashboard. @@ -22,13 +29,6 @@ public sealed partial class RealtimeSessionCreateResponseTracingEnum2 [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] public object? Metadata { get; set; } - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the traces dashboard. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("workflow_name")] - public string? WorkflowName { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,6 +38,10 @@ public sealed partial class RealtimeSessionCreateResponseTracingEnum2 /// /// Initializes a new instance of the class. /// + /// + /// The name of the workflow to attach to this trace. This is used to
+ /// name the trace in the traces dashboard. + /// /// /// The group id to attach to this trace to enable filtering and
/// grouping in the traces dashboard. @@ -46,21 +50,17 @@ public sealed partial class RealtimeSessionCreateResponseTracingEnum2 /// The arbitrary metadata to attach to this trace to enable
/// filtering in the traces dashboard. /// - /// - /// The name of the workflow to attach to this trace. This is used to
- /// name the trace in the traces dashboard. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseTracingEnum2( + string? workflowName, string? groupId, - object? metadata, - string? workflowName) + object? metadata) { + this.WorkflowName = workflowName; this.GroupId = groupId; this.Metadata = metadata; - this.WorkflowName = workflowName; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTurnDetection.g.cs index b251d25c..22be132e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionCreateResponseTurnDetection.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeSessionCreateResponseTurnDetection { + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -25,20 +39,6 @@ public sealed partial class RealtimeSessionCreateResponseTurnDetection [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] public int? SilenceDurationMs { get; set; } - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } - - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,6 +48,14 @@ public sealed partial class RealtimeSessionCreateResponseTurnDetection /// /// Initializes a new instance of the class. /// + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -57,27 +65,19 @@ public sealed partial class RealtimeSessionCreateResponseTurnDetection /// to 500ms. With shorter values the model will respond more quickly,
/// but may jump in on short pauses from the user. /// - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - /// - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeSessionCreateResponseTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + string? type, double? threshold, - string? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionUpdate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionUpdate.g.cs index e15dd2ba..5fd0c458 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionUpdate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeSessionUpdate.g.cs @@ -4,7 +4,8 @@ namespace tryAGI.OpenAI { /// - /// Send this event to update the session’s default configuration. + /// Send this event to update the session’s default configuration.
+ /// Example: {"event_id":"event_123","type":"session.update","session":{"modalities":["text","audio"],"instructions":"Your knowledge cutoff is 2023-10. You are a helpful assistant.","voice":"alloy","input_audio_format":"pcm16","output_audio_format":"pcm16","input_audio_transcription":{"enabled":true,"model":"whisper-1"},"turn_detection":{"type":"server_vad","threshold":0.5,"prefix_padding_ms":300,"silence_duration_ms":200},"tools":[{"type":"function","name":"get_weather","description":"Get the current weather for a location.","parameters":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]}}],"tool_choice":"auto","temperature":0.8,"max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"}} ///
public sealed partial class RealtimeSessionUpdate { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequest.g.cs index f9e02cb5..6fc13e62 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequest.g.cs @@ -9,11 +9,19 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeTranscriptionSessionCreateRequest { /// - /// The set of items to include in the transcription. Current available items are:
- /// `item.input_audio_transcription.logprobs` + /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? TurnDetection { get; set; } + + /// + /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
+ /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
+ /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_noise_reduction")] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? InputAudioNoiseReduction { get; set; } /// /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
@@ -26,24 +34,17 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequest public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? InputAudioFormat { get; set; } /// - /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
- /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_noise_reduction")] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? InputAudioNoiseReduction { get; set; } - - /// - /// + /// Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. /// [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_transcription")] public global::tryAGI.OpenAI.AudioTranscription? InputAudioTranscription { get; set; } /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// The set of items to include in the transcription. Current available items are:
+ /// `item.input_audio_transcription.logprobs` ///
- [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? TurnDetection { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,9 +55,14 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequest /// /// Initializes a new instance of the class. /// - /// - /// The set of items to include in the transcription. Current available items are:
- /// `item.input_audio_transcription.logprobs` + /// + /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// + /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
+ /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
+ /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
@@ -64,30 +70,28 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequest /// single channel (mono), and little-endian byte order.
/// Default Value: pcm16 /// - /// - /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
- /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// + /// Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. /// - /// - /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// The set of items to include in the transcription. Current available items are:
+ /// `item.input_audio_transcription.logprobs` /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateRequest( - global::System.Collections.Generic.IList? include, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? inputAudioNoiseReduction, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat, global::tryAGI.OpenAI.AudioTranscription? inputAudioTranscription, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection) + global::System.Collections.Generic.IList? include) { - this.Include = include; - this.InputAudioFormat = inputAudioFormat; + this.TurnDetection = turnDetection; this.InputAudioNoiseReduction = inputAudioNoiseReduction; + this.InputAudioFormat = inputAudioFormat; this.InputAudioTranscription = inputAudioTranscription; - this.TurnDetection = turnDetection; + this.Include = include; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGA.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGA.g.cs index 17e403d4..311e263b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGA.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGA.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeTranscriptionSessionCreateRequestGA { + /// + /// The type of session to create. Always `transcription` for transcription sessions. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType Type { get; set; } + /// /// Configuration for input and output audio. /// @@ -21,13 +28,6 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestGA [global::System.Text.Json.Serialization.JsonPropertyName("include")] public global::System.Collections.Generic.IList? Include { get; set; } - /// - /// The type of session to create. Always `transcription` for transcription sessions. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestGATypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,6 +37,9 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestGA /// /// Initializes a new instance of the class. /// + /// + /// The type of session to create. Always `transcription` for transcription sessions. + /// /// /// Configuration for input and output audio. /// @@ -44,20 +47,17 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestGA /// Additional fields to include in server outputs.
/// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. /// - /// - /// The type of session to create. Always `transcription` for transcription sessions. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateRequestGA( + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType type, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudio? audio, - global::System.Collections.Generic.IList? include, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAType type) + global::System.Collections.Generic.IList? include) { + this.Type = type; this.Audio = audio; this.Include = include; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInput.g.cs index 31782111..1458642c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInput.g.cs @@ -15,25 +15,26 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestGAAudioInpu [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeAudioFormatsJsonConverter))] public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] + public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } + /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction? NoiseReduction { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] - public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } - /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("turn_detection")] - public object? TurnDetection { get; set; } + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? TurnDetection { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,25 +46,28 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestGAAudioInpu /// Initializes a new instance of the class. /// /// + /// + /// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. + /// /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// - /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateRequestGAAudioInput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.AudioTranscription? transcription, - object? turnDetection) + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction? noiseReduction, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? turnDetection) { this.Format = format; - this.NoiseReduction = noiseReduction; this.Transcription = transcription; + this.NoiseReduction = noiseReduction; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction.g.cs index f35687e1..6841e845 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class RealtimeTranscriptionSessionCreateRequestGAAudioInputNoiseReduction { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction.g.cs index 46e44133..d70d5c68 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction.g.cs @@ -6,7 +6,8 @@ namespace tryAGI.OpenAI /// /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public sealed partial class RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestTurnDetection.g.cs index 33c0058a..c93ddfe6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateRequestTurnDetection.g.cs @@ -8,6 +8,21 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeTranscriptionSessionCreateRequestTurnDetection { + /// + /// Type of turn detection. Only `server_vad` is currently supported for transcription sessions. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? Type { get; set; } + + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -23,21 +38,6 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestTurnDetecti [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] public int? SilenceDurationMs { get; set; } - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } - - /// - /// Type of turn detection. Only `server_vad` is currently supported for transcription sessions. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateRequestTurnDetectionTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -47,6 +47,14 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestTurnDetecti /// /// Initializes a new instance of the class. /// + /// + /// Type of turn detection. Only `server_vad` is currently supported for transcription sessions. + /// + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -56,27 +64,19 @@ public sealed partial class RealtimeTranscriptionSessionCreateRequestTurnDetecti /// to 500ms. With shorter values the model will respond more quickly,
/// but may jump in on short pauses from the user. /// - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - /// - /// - /// Type of turn detection. Only `server_vad` is currently supported for transcription sessions. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateRequestTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? type, double? threshold, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetectionType? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponse.g.cs index 34a75b0e..0f1c61c7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponse.g.cs @@ -19,6 +19,13 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponse [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseClientSecret ClientSecret { get; set; } + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] + public global::System.Collections.Generic.IList? Modalities { get; set; } + /// /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// @@ -26,18 +33,11 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponse public string? InputAudioFormat { get; set; } /// - /// + /// Configuration of the transcription model. /// [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_transcription")] public global::tryAGI.OpenAI.AudioTranscription? InputAudioTranscription { get; set; } - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("modalities")] - public global::System.Collections.Generic.IList? Modalities { get; set; } - /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
@@ -59,14 +59,16 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponse /// Ephemeral key returned by the API. Only present when the session is
/// created on the server via REST API. /// - /// - /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - /// /// /// The set of modalities the model can respond with. To disable audio,
/// set this to ["text"]. /// + /// + /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. + /// + /// + /// Configuration of the transcription model. + /// /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
@@ -77,15 +79,15 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponse #endif public RealtimeTranscriptionSessionCreateResponse( global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseClientSecret clientSecret, + global::System.Collections.Generic.IList? modalities, string? inputAudioFormat, global::tryAGI.OpenAI.AudioTranscription? inputAudioTranscription, - global::System.Collections.Generic.IList? modalities, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseTurnDetection? turnDetection) { this.ClientSecret = clientSecret ?? throw new global::System.ArgumentNullException(nameof(clientSecret)); + this.Modalities = modalities; this.InputAudioFormat = inputAudioFormat; this.InputAudioTranscription = inputAudioTranscription; - this.Modalities = modalities; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseClientSecret.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseClientSecret.g.cs index c4a1d401..73223b56 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseClientSecret.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseClientSecret.g.cs @@ -9,14 +9,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeTranscriptionSessionCreateResponseClientSecret { - /// - /// Timestamp for when the token expires. Currently, all tokens expire
- /// after one minute. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ExpiresAt { get; set; } - /// /// Ephemeral key usable in client environments to authenticate connections
/// to the Realtime API. Use this in client-side environments rather than
@@ -26,6 +18,14 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseClientSecr [global::System.Text.Json.Serialization.JsonRequired] public required string Value { get; set; } + /// + /// Timestamp for when the token expires. Currently, all tokens expire
+ /// after one minute. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ExpiresAt { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -35,24 +35,24 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseClientSecr /// /// Initializes a new instance of the class. /// - /// - /// Timestamp for when the token expires. Currently, all tokens expire
- /// after one minute. - /// /// /// Ephemeral key usable in client environments to authenticate connections
/// to the Realtime API. Use this in client-side environments rather than
/// a standard API token, which should only be used server-side. /// + /// + /// Timestamp for when the token expires. Currently, all tokens expire
+ /// after one minute. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateResponseClientSecret( - int expiresAt, - string value) + string value, + int expiresAt) { - this.ExpiresAt = expiresAt; this.Value = value ?? throw new global::System.ArgumentNullException(nameof(value)); + this.ExpiresAt = expiresAt; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGA.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGA.g.cs index 4b634b3c..f6569920 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGA.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGA.g.cs @@ -9,16 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeTranscriptionSessionCreateResponseGA { /// - /// Configuration for input audio for the session. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? Audio { get; set; } - - /// - /// Expiration timestamp for the session, in seconds since epoch. + /// The type of session. Always `transcription` for transcription sessions. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - public int? ExpiresAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGATypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType Type { get; set; } /// /// Unique identifier for the session that looks like `sess_1234567890abcdef`. @@ -27,13 +22,6 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGA [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } - /// - /// Additional fields to include in server outputs.
- /// - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include")] - public global::System.Collections.Generic.IList? Include { get; set; } - /// /// The object type. Always `realtime.transcription_session`. /// @@ -42,11 +30,23 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGA public required string Object { get; set; } /// - /// The type of session. Always `transcription` for transcription sessions. + /// Expiration timestamp for the session, in seconds since epoch. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTranscriptionSessionCreateResponseGATypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + public int? ExpiresAt { get; set; } + + /// + /// Additional fields to include in server outputs.
+ /// - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } + + /// + /// Configuration for input audio for the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? Audio { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,24 +57,24 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGA /// /// Initializes a new instance of the class. /// - /// - /// Configuration for input audio for the session. - /// - /// - /// Expiration timestamp for the session, in seconds since epoch. + /// + /// The type of session. Always `transcription` for transcription sessions. /// /// /// Unique identifier for the session that looks like `sess_1234567890abcdef`. /// + /// + /// The object type. Always `realtime.transcription_session`. + /// + /// + /// Expiration timestamp for the session, in seconds since epoch. + /// /// /// Additional fields to include in server outputs.
/// - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. /// - /// - /// The object type. Always `realtime.transcription_session`. - /// - /// - /// The type of session. Always `transcription` for transcription sessions. + /// + /// Configuration for input audio for the session. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -82,17 +82,17 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGA public RealtimeTranscriptionSessionCreateResponseGA( string id, string @object, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? audio, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType type, int? expiresAt, global::System.Collections.Generic.IList? include, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAType type) + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudio? audio) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Object = @object ?? throw new global::System.ArgumentNullException(nameof(@object)); - this.Audio = audio; + this.Type = type; this.ExpiresAt = expiresAt; this.Include = include; - this.Type = type; + this.Audio = audio; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInput.g.cs index 2b2033a9..c57f5e80 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInput.g.cs @@ -16,16 +16,16 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp public global::tryAGI.OpenAI.RealtimeAudioFormats? Format { get; set; } /// - /// Configuration for input audio noise reduction. + /// Configuration of the transcription model. /// - [global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? NoiseReduction { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] + public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } /// - /// + /// Configuration for input audio noise reduction. /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcription")] - public global::tryAGI.OpenAI.AudioTranscription? Transcription { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("noise_reduction")] + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? NoiseReduction { get; set; } /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
@@ -45,10 +45,12 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp /// Initializes a new instance of the class. ///
/// + /// + /// Configuration of the transcription model. + /// /// /// Configuration for input audio noise reduction. /// - /// /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
@@ -59,13 +61,13 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp #endif public RealtimeTranscriptionSessionCreateResponseGAAudioInput( global::tryAGI.OpenAI.RealtimeAudioFormats? format, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.AudioTranscription? transcription, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputNoiseReduction? noiseReduction, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection? turnDetection) { this.Format = format; - this.NoiseReduction = noiseReduction; this.Transcription = transcription; + this.NoiseReduction = noiseReduction; this.TurnDetection = turnDetection; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection.g.cs index 6b773d51..5efdd2f0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI ///
public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection { + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -25,20 +39,6 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] public int? SilenceDurationMs { get; set; } - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } - - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,6 +48,14 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp /// /// Initializes a new instance of the class. /// + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -57,27 +65,19 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseGAAudioInp /// to 500ms. With shorter values the model will respond more quickly,
/// but may jump in on short pauses from the user. /// - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - /// - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateResponseGAAudioInputTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + string? type, double? threshold, - string? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseTurnDetection.g.cs index 0ef0eed8..71b3fa7d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseTurnDetection.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTranscriptionSessionCreateResponseTurnDetection.g.cs @@ -10,6 +10,20 @@ namespace tryAGI.OpenAI /// public sealed partial class RealtimeTranscriptionSessionCreateResponseTurnDetection { + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -25,20 +39,6 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseTurnDetect [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] public int? SilenceDurationMs { get; set; } - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] - public double? Threshold { get; set; } - - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -48,6 +48,14 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseTurnDetect /// /// Initializes a new instance of the class. /// + /// + /// Type of turn detection, only `server_vad` is currently supported. + /// + /// + /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds). Defaults to 300ms. @@ -57,27 +65,19 @@ public sealed partial class RealtimeTranscriptionSessionCreateResponseTurnDetect /// to 500ms. With shorter values the model will respond more quickly,
/// but may jump in on short pauses from the user. /// - /// - /// Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
- /// higher threshold will require louder audio to activate the model, and
- /// thus might perform better in noisy environments. - /// - /// - /// Type of turn detection, only `server_vad` is currently supported. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTranscriptionSessionCreateResponseTurnDetection( - int? prefixPaddingMs, - int? silenceDurationMs, + string? type, double? threshold, - string? type) + int? prefixPaddingMs, + int? silenceDurationMs) { + this.Type = type; + this.Threshold = threshold; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; - this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncation.g.cs index fa657216..d1f9305f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncation.g.cs @@ -5,8 +5,10 @@ namespace tryAGI.OpenAI { /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. ///
public readonly partial struct RealtimeTruncation : global::System.IEquatable { @@ -27,6 +29,22 @@ namespace tryAGI.OpenAI #endif public bool IsValue1 => Value1 != null; + /// + /// Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeTruncationEnum2? RetentionRatioTruncation { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeTruncationEnum2? RetentionRatioTruncation { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RetentionRatioTruncation))] +#endif + public bool IsRetentionRatioTruncation => RetentionRatioTruncation != null; /// /// /// @@ -45,23 +63,6 @@ public RealtimeTruncation(global::tryAGI.OpenAI.RealtimeTruncationEnum? value) Value1 = value; } - /// - /// Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeTruncationEnum2? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeTruncationEnum2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - /// /// /// @@ -70,14 +71,14 @@ public RealtimeTruncation(global::tryAGI.OpenAI.RealtimeTruncationEnum? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeTruncationEnum2?(RealtimeTruncation @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.RealtimeTruncationEnum2?(RealtimeTruncation @this) => @this.RetentionRatioTruncation; /// /// /// public RealtimeTruncation(global::tryAGI.OpenAI.RealtimeTruncationEnum2? value) { - Value2 = value; + RetentionRatioTruncation = value; } /// @@ -85,18 +86,18 @@ public RealtimeTruncation(global::tryAGI.OpenAI.RealtimeTruncationEnum2? value) /// public RealtimeTruncation( global::tryAGI.OpenAI.RealtimeTruncationEnum? value1, - global::tryAGI.OpenAI.RealtimeTruncationEnum2? value2 + global::tryAGI.OpenAI.RealtimeTruncationEnum2? retentionRatioTruncation ) { Value1 = value1; - Value2 = value2; + RetentionRatioTruncation = retentionRatioTruncation; } /// /// /// public object? Object => - Value2 as object ?? + RetentionRatioTruncation as object ?? Value1 as object ; @@ -105,7 +106,7 @@ Value1 as object ///
public override string? ToString() => Value1?.ToValueString() ?? - Value2?.ToString() + RetentionRatioTruncation?.ToString() ; /// @@ -113,7 +114,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2; + return IsValue1 && !IsRetentionRatioTruncation || !IsValue1 && IsRetentionRatioTruncation; } /// @@ -121,7 +122,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? retentionRatioTruncation = null, bool validate = true) { if (validate) @@ -133,9 +134,9 @@ public bool Validate() { return value1(Value1!); } - else if (IsValue2 && value2 != null) + else if (IsRetentionRatioTruncation && retentionRatioTruncation != null) { - return value2(Value2!); + return retentionRatioTruncation(RetentionRatioTruncation!); } return default(TResult); @@ -146,7 +147,7 @@ public bool Validate() ///
public void Match( global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? retentionRatioTruncation = null, bool validate = true) { if (validate) @@ -158,9 +159,9 @@ public void Match( { value1?.Invoke(Value1!); } - else if (IsValue2) + else if (IsRetentionRatioTruncation) { - value2?.Invoke(Value2!); + retentionRatioTruncation?.Invoke(RetentionRatioTruncation!); } } @@ -173,7 +174,7 @@ public override int GetHashCode() { Value1, typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum), - Value2, + RetentionRatioTruncation, typeof(global::tryAGI.OpenAI.RealtimeTruncationEnum2), }; const int offset = unchecked((int)2166136261); @@ -192,7 +193,7 @@ public bool Equals(RealtimeTruncation 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(RetentionRatioTruncation, other.RetentionRatioTruncation) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnum2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnum2.g.cs index f8f6d175..1982cee7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnum2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnum2.g.cs @@ -9,18 +9,24 @@ namespace tryAGI.OpenAI public sealed partial class RealtimeTruncationEnum2 { /// - /// Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit. + /// Use retention ratio truncation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumTypeJsonConverter))] + public global::tryAGI.OpenAI.RealtimeTruncationEnumType Type { get; set; } + + /// + /// Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates. /// [global::System.Text.Json.Serialization.JsonPropertyName("retention_ratio")] [global::System.Text.Json.Serialization.JsonRequired] public required double RetentionRatio { get; set; } /// - /// Use retention ratio truncation. + /// Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTruncationEnumTypeJsonConverter))] - public global::tryAGI.OpenAI.RealtimeTruncationEnumType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("token_limits")] + public global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits? TokenLimits { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +37,26 @@ public sealed partial class RealtimeTruncationEnum2 /// /// Initializes a new instance of the class. /// - /// - /// Fraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit. - /// /// /// Use retention ratio truncation. /// + /// + /// Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates. + /// + /// + /// Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RealtimeTruncationEnum2( double retentionRatio, - global::tryAGI.OpenAI.RealtimeTruncationEnumType type) + global::tryAGI.OpenAI.RealtimeTruncationEnumType type, + global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits? tokenLimits) { this.RetentionRatio = retentionRatio; this.Type = type; + this.TokenLimits = tokenLimits; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.Json.g.cs new file mode 100644 index 00000000..6b55967f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTruncationEnumTokenLimits + { + /// + /// 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::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTruncationEnumTokenLimits; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.g.cs new file mode 100644 index 00000000..f8b585bf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTruncationEnumTokenLimits.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used. + /// + public sealed partial class RealtimeTruncationEnumTokenLimits + { + /// + /// Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("post_instructions")] + public int? PostInstructions { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeTruncationEnumTokenLimits( + int? postInstructions) + { + this.PostInstructions = postInstructions; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeTruncationEnumTokenLimits() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.Json.g.cs new file mode 100644 index 00000000..549016e5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTurnDetection + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetection? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetection), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetection; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetection? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetection), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetection; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.g.cs new file mode 100644 index 00000000..71b24ef4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetection.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeTurnDetection + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.Json.g.cs new file mode 100644 index 00000000..abb27052 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct RealtimeTurnDetectionRealtimeTurnDetection1 + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1?; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs new file mode 100644 index 00000000..7ac602da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1.g.cs @@ -0,0 +1,223 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.
+ /// Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
+ /// Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency. + ///
+ public readonly partial struct RealtimeTurnDetectionRealtimeTurnDetection1 : global::System.IEquatable + { + /// + /// Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? ServerVad { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? ServerVad { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ServerVad))] +#endif + public bool IsServerVad => ServerVad != null; + + /// + /// Server-side semantic turn detection which uses a model to determine when the user has finished speaking. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? SemanticVad { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? SemanticVad { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SemanticVad))] +#endif + public bool IsSemanticVad => SemanticVad != null; + /// + /// + /// + public static implicit operator RealtimeTurnDetectionRealtimeTurnDetection1(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad value) => new RealtimeTurnDetectionRealtimeTurnDetection1((global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad?(RealtimeTurnDetectionRealtimeTurnDetection1 @this) => @this.ServerVad; + + /// + /// + /// + public RealtimeTurnDetectionRealtimeTurnDetection1(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? value) + { + ServerVad = value; + } + + /// + /// + /// + public static implicit operator RealtimeTurnDetectionRealtimeTurnDetection1(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad value) => new RealtimeTurnDetectionRealtimeTurnDetection1((global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad?(RealtimeTurnDetectionRealtimeTurnDetection1 @this) => @this.SemanticVad; + + /// + /// + /// + public RealtimeTurnDetectionRealtimeTurnDetection1(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? value) + { + SemanticVad = value; + } + + /// + /// + /// + public RealtimeTurnDetectionRealtimeTurnDetection1( + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? serverVad, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? semanticVad + ) + { + ServerVad = serverVad; + SemanticVad = semanticVad; + } + + /// + /// + /// + public object? Object => + SemanticVad as object ?? + ServerVad as object + ; + + /// + /// + /// + public override string? ToString() => + ServerVad?.ToString() ?? + SemanticVad?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsServerVad && !IsSemanticVad || !IsServerVad && IsSemanticVad; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? serverVad = null, + global::System.Func? semanticVad = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsServerVad && serverVad != null) + { + return serverVad(ServerVad!); + } + else if (IsSemanticVad && semanticVad != null) + { + return semanticVad(SemanticVad!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? serverVad = null, + global::System.Action? semanticVad = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsServerVad) + { + serverVad?.Invoke(ServerVad!); + } + else if (IsSemanticVad) + { + semanticVad?.Invoke(SemanticVad!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ServerVad, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), + SemanticVad, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(RealtimeTurnDetectionRealtimeTurnDetection1 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ServerVad, other.ServerVad) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SemanticVad, other.SemanticVad) + ; + } + + /// + /// + /// + public static bool operator ==(RealtimeTurnDetectionRealtimeTurnDetection1 obj1, RealtimeTurnDetectionRealtimeTurnDetection1 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(RealtimeTurnDetectionRealtimeTurnDetection1 obj1, RealtimeTurnDetectionRealtimeTurnDetection1 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is RealtimeTurnDetectionRealtimeTurnDetection1 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.Json.g.cs new file mode 100644 index 00000000..8af0cf4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1Discriminator + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.g.cs new file mode 100644 index 00000000..0e10c9c1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1Discriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1Discriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeTurnDetectionRealtimeTurnDetection1Discriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeTurnDetectionRealtimeTurnDetection1Discriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.Json.g.cs new file mode 100644 index 00000000..c28b67a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.g.cs new file mode 100644 index 00000000..6a5c8f96 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Server-side semantic turn detection which uses a model to determine when the user has finished speaking. + /// + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad + { + /// + /// Type of turn detection, `semantic_vad` to turn on Semantic VAD. + /// + /// "semantic_vad" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "semantic_vad"; + + /// + /// Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.
+ /// Default Value: auto + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("eagerness")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessJsonConverter))] + public global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? Eagerness { get; set; } + + /// + /// Whether or not to automatically generate a response when a VAD stop event occurs.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("create_response")] + public bool? CreateResponse { get; set; } + + /// + /// Whether or not to automatically interrupt any ongoing response with output to the default
+ /// conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("interrupt_response")] + public bool? InterruptResponse { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type of turn detection, `semantic_vad` to turn on Semantic VAD. + /// + /// + /// Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.
+ /// Default Value: auto + /// + /// + /// Whether or not to automatically generate a response when a VAD stop event occurs.
+ /// Default Value: true + /// + /// + /// Whether or not to automatically interrupt any ongoing response with output to the default
+ /// conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.
+ /// Default Value: true + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad( + string type, + global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? eagerness, + bool? createResponse, + bool? interruptResponse) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Eagerness = eagerness; + this.CreateResponse = createResponse; + this.InterruptResponse = interruptResponse; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeTurnDetectionRealtimeTurnDetection1SemanticVad() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs new file mode 100644 index 00000000..aba2648f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.
+ /// Default Value: auto + ///
+ public enum RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness + { + /// + /// + /// + Low, + /// + /// + /// + Medium, + /// + /// + /// + High, + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagernessExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness value) + { + return value switch + { + RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Low => "low", + RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Medium => "medium", + RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.High => "high", + RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness? ToEnum(string value) + { + return value switch + { + "low" => RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Low, + "medium" => RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Medium, + "high" => RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.High, + "auto" => RealtimeTurnDetectionRealtimeTurnDetection1SemanticVadEagerness.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.Json.g.cs new file mode 100644 index 00000000..568ade8f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1ServerVad + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.g.cs new file mode 100644 index 00000000..681d0754 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVad.g.cs @@ -0,0 +1,133 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence. + /// + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1ServerVad + { + /// + /// Type of turn detection, `server_vad` to turn on simple Server VAD.
+ /// Default Value: server_vad + ///
+ /// "server_vad" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "server_vad"; + + /// + /// Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + public double? Threshold { get; set; } + + /// + /// Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in
+ /// milliseconds). Defaults to 300ms. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prefix_padding_ms")] + public int? PrefixPaddingMs { get; set; } + + /// + /// Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults
+ /// to 500ms. With shorter values the model will respond more quickly,
+ /// but may jump in on short pauses from the user. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("silence_duration_ms")] + public int? SilenceDurationMs { get; set; } + + /// + /// Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.
+ /// If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("create_response")] + public bool? CreateResponse { get; set; } + + /// + /// Whether or not to automatically interrupt (cancel) any ongoing response with output to the default
+ /// conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.
+ /// If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("interrupt_response")] + public bool? InterruptResponse { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_ms")] + public int? IdleTimeoutMs { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type of turn detection, `server_vad` to turn on simple Server VAD.
+ /// Default Value: server_vad + /// + /// + /// Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A
+ /// higher threshold will require louder audio to activate the model, and
+ /// thus might perform better in noisy environments. + /// + /// + /// Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in
+ /// milliseconds). Defaults to 300ms. + /// + /// + /// Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults
+ /// to 500ms. With shorter values the model will respond more quickly,
+ /// but may jump in on short pauses from the user. + /// + /// + /// Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.
+ /// If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.
+ /// Default Value: true + /// + /// + /// Whether or not to automatically interrupt (cancel) any ongoing response with output to the default
+ /// conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.
+ /// If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.
+ /// Default Value: true + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RealtimeTurnDetectionRealtimeTurnDetection1ServerVad( + string type, + double? threshold, + int? prefixPaddingMs, + int? silenceDurationMs, + bool? createResponse, + bool? interruptResponse, + int? idleTimeoutMs) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Threshold = threshold; + this.PrefixPaddingMs = prefixPaddingMs; + this.SilenceDurationMs = silenceDurationMs; + this.CreateResponse = createResponse; + this.InterruptResponse = interruptResponse; + this.IdleTimeoutMs = idleTimeoutMs; + } + + /// + /// Initializes a new instance of the class. + /// + public RealtimeTurnDetectionRealtimeTurnDetection1ServerVad() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.Json.g.cs new file mode 100644 index 00000000..a308eb9f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs + { + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs), + jsonSerializerContext) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs; + } + + /// + /// 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::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.g.cs new file mode 100644 index 00000000..f603d635 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RealtimeTurnDetectionRealtimeTurnDetection1ServerVadIdleTimeoutMs + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Reasoning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Reasoning.g.cs index 717563cf..7f18294c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Reasoning.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Reasoning.g.cs @@ -11,36 +11,22 @@ namespace tryAGI.OpenAI public sealed partial class Reasoning { /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("effort")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningEffortJsonConverter))] - public global::tryAGI.OpenAI.ReasoningEffort? Effort { get; set; } + public global::tryAGI.OpenAI.ReasoningEffortEnum? Effort { get; set; } /// - /// **Deprecated:** use `summary` instead.
- /// A summary of the reasoning performed by the model. This can be
- /// useful for debugging and understanding the model's reasoning process.
- /// One of `auto`, `concise`, or `detailed`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("generate_summary")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningGenerateSummaryJsonConverter))] - [global::System.Obsolete("This property marked as deprecated.")] - public global::tryAGI.OpenAI.ReasoningGenerateSummary? GenerateSummary { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + public global::tryAGI.OpenAI.ReasoningSummary2? Summary { get; set; } /// - /// A summary of the reasoning performed by the model. This can be
- /// useful for debugging and understanding the model's reasoning process.
- /// One of `auto`, `concise`, or `detailed`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("summary")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningSummaryJsonConverter))] - public global::tryAGI.OpenAI.ReasoningSummary? Summary { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("generate_summary")] + public global::tryAGI.OpenAI.ReasoningGenerateSummary2? GenerateSummary { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -51,28 +37,20 @@ public sealed partial class Reasoning /// /// Initializes a new instance of the class. /// - /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium - /// - /// - /// A summary of the reasoning performed by the model. This can be
- /// useful for debugging and understanding the model's reasoning process.
- /// One of `auto`, `concise`, or `detailed`. - /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Reasoning( - global::tryAGI.OpenAI.ReasoningEffort? effort, - global::tryAGI.OpenAI.ReasoningSummary? summary) + global::tryAGI.OpenAI.ReasoningEffortEnum? effort, + global::tryAGI.OpenAI.ReasoningSummary2? summary, + global::tryAGI.OpenAI.ReasoningGenerateSummary2? generateSummary) { this.Effort = effort; this.Summary = summary; + this.GenerateSummary = generateSummary; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.Json.g.cs new file mode 100644 index 00000000..a367f471 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ReasoningEffort + { + /// + /// 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::tryAGI.OpenAI.ReasoningEffort? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ReasoningEffort), + jsonSerializerContext) as global::tryAGI.OpenAI.ReasoningEffort; + } + + /// + /// 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::tryAGI.OpenAI.ReasoningEffort? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ReasoningEffort), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ReasoningEffort; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.g.cs index be0161d2..85d22bf8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffort.g.cs @@ -4,65 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Constrains effort on reasoning for
- /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
- /// Currently supported values are `minimal`, `low`, `medium`, and `high`. Reducing
- /// reasoning effort can result in faster responses and fewer tokens used
- /// on reasoning in a response.
- /// Default Value: medium + /// ///
- public enum ReasoningEffort + public sealed partial class ReasoningEffort { - /// - /// - /// - Minimal, - /// - /// - /// - Low, - /// - /// - /// - Medium, - /// - /// - /// - High, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ReasoningEffortExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ReasoningEffort value) - { - return value switch - { - ReasoningEffort.Minimal => "minimal", - ReasoningEffort.Low => "low", - ReasoningEffort.Medium => "medium", - ReasoningEffort.High => "high", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ReasoningEffort? ToEnum(string value) - { - return value switch - { - "minimal" => ReasoningEffort.Minimal, - "low" => ReasoningEffort.Low, - "medium" => ReasoningEffort.Medium, - "high" => ReasoningEffort.High, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffortEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffortEnum.g.cs new file mode 100644 index 00000000..ea21b147 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningEffortEnum.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Constrains effort on reasoning for
+ /// [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ /// Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
+ /// reasoning effort can result in faster responses and fewer tokens used
+ /// on reasoning in a response.
+ /// - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
+ /// - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
+ /// - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
+ /// - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
+ /// Default Value: medium + ///
+ public enum ReasoningEffortEnum + { + /// + /// + /// + None, + /// + /// + /// + Minimal, + /// + /// + /// + Low, + /// + /// + /// + Medium, + /// + /// + /// + High, + /// + /// + /// + Xhigh, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ReasoningEffortEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ReasoningEffortEnum value) + { + return value switch + { + ReasoningEffortEnum.None => "none", + ReasoningEffortEnum.Minimal => "minimal", + ReasoningEffortEnum.Low => "low", + ReasoningEffortEnum.Medium => "medium", + ReasoningEffortEnum.High => "high", + ReasoningEffortEnum.Xhigh => "xhigh", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ReasoningEffortEnum? ToEnum(string value) + { + return value switch + { + "none" => ReasoningEffortEnum.None, + "minimal" => ReasoningEffortEnum.Minimal, + "low" => ReasoningEffortEnum.Low, + "medium" => ReasoningEffortEnum.Medium, + "high" => ReasoningEffortEnum.High, + "xhigh" => ReasoningEffortEnum.Xhigh, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.Json.g.cs new file mode 100644 index 00000000..3813f9c8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ReasoningGenerateSummary + { + /// + /// 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::tryAGI.OpenAI.ReasoningGenerateSummary? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ReasoningGenerateSummary), + jsonSerializerContext) as global::tryAGI.OpenAI.ReasoningGenerateSummary; + } + + /// + /// 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::tryAGI.OpenAI.ReasoningGenerateSummary? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ReasoningGenerateSummary), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ReasoningGenerateSummary; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.g.cs index 73ca56a0..d70dc167 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary.g.cs @@ -4,57 +4,15 @@ namespace tryAGI.OpenAI { /// - /// **Deprecated:** use `summary` instead.
- /// A summary of the reasoning performed by the model. This can be
- /// useful for debugging and understanding the model's reasoning process.
- /// One of `auto`, `concise`, or `detailed`. + /// ///
- public enum ReasoningGenerateSummary + public sealed partial class ReasoningGenerateSummary { - /// - /// - /// - Auto, - /// - /// - /// - Concise, - /// - /// - /// - Detailed, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ReasoningGenerateSummaryExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ReasoningGenerateSummary value) - { - return value switch - { - ReasoningGenerateSummary.Auto => "auto", - ReasoningGenerateSummary.Concise => "concise", - ReasoningGenerateSummary.Detailed => "detailed", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ReasoningGenerateSummary? ToEnum(string value) - { - return value switch - { - "auto" => ReasoningGenerateSummary.Auto, - "concise" => ReasoningGenerateSummary.Concise, - "detailed" => ReasoningGenerateSummary.Detailed, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary2.g.cs new file mode 100644 index 00000000..028ee59f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningGenerateSummary2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// **Deprecated:** use `summary` instead.
+ /// A summary of the reasoning performed by the model. This can be
+ /// useful for debugging and understanding the model's reasoning process.
+ /// One of `auto`, `concise`, or `detailed`. + ///
+ public enum ReasoningGenerateSummary2 + { + /// + /// + /// + Auto, + /// + /// + /// + Concise, + /// + /// + /// + Detailed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ReasoningGenerateSummary2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ReasoningGenerateSummary2 value) + { + return value switch + { + ReasoningGenerateSummary2.Auto => "auto", + ReasoningGenerateSummary2.Concise => "concise", + ReasoningGenerateSummary2.Detailed => "detailed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ReasoningGenerateSummary2? ToEnum(string value) + { + return value switch + { + "auto" => ReasoningGenerateSummary2.Auto, + "concise" => ReasoningGenerateSummary2.Concise, + "detailed" => ReasoningGenerateSummary2.Detailed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItem.g.cs index 9b8f6577..e9a6192a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItem.g.cs @@ -7,22 +7,16 @@ namespace tryAGI.OpenAI /// A description of the chain of thought used by a reasoning model while generating
/// a response. Be sure to include these items in your `input` to the Responses API
/// for subsequent turns of a conversation if you are manually
- /// [managing context](https://platform.openai.com/docs/guides/conversation-state). + /// [managing context](/docs/guides/conversation-state). ///
public sealed partial class ReasoningItem { /// - /// Reasoning text content. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public global::System.Collections.Generic.IList? Content { get; set; } - - /// - /// The encrypted content of the reasoning item - populated when a response is
- /// generated with `reasoning.encrypted_content` in the `include` parameter. + /// The type of the object. Always `reasoning`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("encrypted_content")] - public string? EncryptedContent { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemTypeJsonConverter))] + public global::tryAGI.OpenAI.ReasoningItemType Type { get; set; } /// /// The unique identifier of the reasoning content. @@ -32,26 +26,31 @@ public sealed partial class ReasoningItem public required string Id { get; set; } /// - /// The status of the item. One of `in_progress`, `completed`, or
- /// `incomplete`. Populated when items are returned via API. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusJsonConverter))] - public global::tryAGI.OpenAI.ReasoningItemStatus? Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("encrypted_content")] + public string? EncryptedContent { get; set; } /// /// Reasoning summary content. /// [global::System.Text.Json.Serialization.JsonPropertyName("summary")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Summary { get; set; } + public required global::System.Collections.Generic.IList Summary { get; set; } /// - /// The type of the object. Always `reasoning`. + /// Reasoning text content. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemTypeJsonConverter))] - public global::tryAGI.OpenAI.ReasoningItemType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::System.Collections.Generic.IList? Content { get; set; } + + /// + /// The status of the item. One of `in_progress`, `completed`, or
+ /// `incomplete`. Populated when items are returned via API. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningItemStatusJsonConverter))] + public global::tryAGI.OpenAI.ReasoningItemStatus? Status { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -62,43 +61,40 @@ public sealed partial class ReasoningItem /// /// Initializes a new instance of the class. /// - /// - /// Reasoning text content. - /// - /// - /// The encrypted content of the reasoning item - populated when a response is
- /// generated with `reasoning.encrypted_content` in the `include` parameter. + /// + /// The type of the object. Always `reasoning`. /// /// /// The unique identifier of the reasoning content. /// - /// - /// The status of the item. One of `in_progress`, `completed`, or
- /// `incomplete`. Populated when items are returned via API. - /// + /// /// /// Reasoning summary content. /// - /// - /// The type of the object. Always `reasoning`. + /// + /// Reasoning text content. + /// + /// + /// The status of the item. One of `in_progress`, `completed`, or
+ /// `incomplete`. Populated when items are returned via API. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ReasoningItem( string id, - global::System.Collections.Generic.IList summary, - global::System.Collections.Generic.IList? content, + global::System.Collections.Generic.IList summary, + global::tryAGI.OpenAI.ReasoningItemType type, string? encryptedContent, - global::tryAGI.OpenAI.ReasoningItemStatus? status, - global::tryAGI.OpenAI.ReasoningItemType type) + global::System.Collections.Generic.IList? content, + global::tryAGI.OpenAI.ReasoningItemStatus? status) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Summary = summary ?? throw new global::System.ArgumentNullException(nameof(summary)); - this.Content = content; + this.Type = type; this.EncryptedContent = encryptedContent; + this.Content = content; this.Status = status; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.Json.g.cs new file mode 100644 index 00000000..69473ce4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ReasoningItemEncryptedContent + { + /// + /// 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::tryAGI.OpenAI.ReasoningItemEncryptedContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ReasoningItemEncryptedContent), + jsonSerializerContext) as global::tryAGI.OpenAI.ReasoningItemEncryptedContent; + } + + /// + /// 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::tryAGI.OpenAI.ReasoningItemEncryptedContent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ReasoningItemEncryptedContent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ReasoningItemEncryptedContent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.g.cs new file mode 100644 index 00000000..fb58e0c4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningItemEncryptedContent.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ReasoningItemEncryptedContent + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.Json.g.cs new file mode 100644 index 00000000..cbd2c140 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ReasoningSummary + { + /// + /// 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::tryAGI.OpenAI.ReasoningSummary? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ReasoningSummary), + jsonSerializerContext) as global::tryAGI.OpenAI.ReasoningSummary; + } + + /// + /// 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::tryAGI.OpenAI.ReasoningSummary? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ReasoningSummary), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ReasoningSummary; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.g.cs index 57d6152b..4a464359 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary.g.cs @@ -4,56 +4,15 @@ namespace tryAGI.OpenAI { /// - /// A summary of the reasoning performed by the model. This can be
- /// useful for debugging and understanding the model's reasoning process.
- /// One of `auto`, `concise`, or `detailed`. + /// ///
- public enum ReasoningSummary + public sealed partial class ReasoningSummary { - /// - /// - /// - Auto, - /// - /// - /// - Concise, - /// - /// - /// - Detailed, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ReasoningSummaryExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ReasoningSummary value) - { - return value switch - { - ReasoningSummary.Auto => "auto", - ReasoningSummary.Concise => "concise", - ReasoningSummary.Detailed => "detailed", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ReasoningSummary? ToEnum(string value) - { - return value switch - { - "auto" => ReasoningSummary.Auto, - "concise" => ReasoningSummary.Concise, - "detailed" => ReasoningSummary.Detailed, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary2.g.cs new file mode 100644 index 00000000..0c1d3917 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningSummary2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A summary of the reasoning performed by the model. This can be
+ /// useful for debugging and understanding the model's reasoning process.
+ /// One of `auto`, `concise`, or `detailed`.
+ /// `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. + ///
+ public enum ReasoningSummary2 + { + /// + /// + /// + Auto, + /// + /// + /// + Concise, + /// + /// + /// + Detailed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ReasoningSummary2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ReasoningSummary2 value) + { + return value switch + { + ReasoningSummary2.Auto => "auto", + ReasoningSummary2.Concise => "concise", + ReasoningSummary2.Detailed => "detailed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ReasoningSummary2? ToEnum(string value) + { + return value switch + { + "auto" => ReasoningSummary2.Auto, + "concise" => ReasoningSummary2.Concise, + "detailed" => ReasoningSummary2.Detailed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningTextContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningTextContent.g.cs index 4d233801..03402056 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningTextContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ReasoningTextContent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class ReasoningTextContent { - /// - /// The reasoning text from the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the reasoning text. Always `reasoning_text`.
/// Default Value: reasoning_text @@ -24,6 +17,13 @@ public sealed partial class ReasoningTextContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ReasoningTextContentTypeJsonConverter))] public global::tryAGI.OpenAI.ReasoningTextContentType Type { get; set; } = global::tryAGI.OpenAI.ReasoningTextContentType.ReasoningText; + /// + /// The reasoning text from the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class ReasoningTextContent /// /// Initializes a new instance of the class. /// - /// - /// The reasoning text from the model. - /// /// /// The type of the reasoning text. Always `reasoning_text`.
/// Default Value: reasoning_text /// + /// + /// The reasoning text from the model. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent.g.cs index b62e38c2..b6e3dc21 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RefusalContent { - /// - /// The refusal explanation from the model. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Refusal { get; set; } - /// /// The type of the refusal. Always `refusal`.
/// Default Value: refusal @@ -24,6 +17,13 @@ public sealed partial class RefusalContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RefusalContentTypeJsonConverter))] public global::tryAGI.OpenAI.RefusalContentType Type { get; set; } = global::tryAGI.OpenAI.RefusalContentType.Refusal; + /// + /// The refusal explanation from the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refusal")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Refusal { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class RefusalContent /// /// Initializes a new instance of the class. /// - /// - /// The refusal explanation from the model. - /// /// /// The type of the refusal. Always `refusal`.
/// Default Value: refusal /// + /// + /// The refusal explanation from the model. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Response.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Response.g.cs index c2fda01a..a5c34084 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Response.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Response.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// - /// + /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} /// public readonly partial struct Response : global::System.IEquatable { @@ -29,72 +29,71 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator Response(global::tryAGI.OpenAI.ModelResponseProperties value) => new Response((global::tryAGI.OpenAI.ModelResponseProperties?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ModelResponseProperties?(Response @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; } +#endif /// /// /// - public Response(global::tryAGI.OpenAI.ModelResponseProperties? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; init; } + public global::tryAGI.OpenAI.ResponseVariant3? Value3 { get; init; } #else - public global::tryAGI.OpenAI.ResponseProperties? Value2 { get; } + public global::tryAGI.OpenAI.ResponseVariant3? Value3 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsValue3 => Value3 != null; /// /// /// - public static implicit operator Response(global::tryAGI.OpenAI.ResponseProperties value) => new Response((global::tryAGI.OpenAI.ResponseProperties?)value); + public static implicit operator Response(global::tryAGI.OpenAI.ModelResponseProperties value) => new Response((global::tryAGI.OpenAI.ModelResponseProperties?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseProperties?(Response @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ModelResponseProperties?(Response @this) => @this.Value1; /// /// /// - public Response(global::tryAGI.OpenAI.ResponseProperties? value) + public Response(global::tryAGI.OpenAI.ModelResponseProperties? value) { - Value2 = value; + Value1 = value; } /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseVariant3? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.ResponseVariant3? Value3 { get; } -#endif + public static implicit operator Response(global::tryAGI.OpenAI.ResponseProperties value) => new Response((global::tryAGI.OpenAI.ResponseProperties?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.ResponseProperties?(Response @this) => @this.Value2; + + /// + /// + /// + public Response(global::tryAGI.OpenAI.ResponseProperties? value) + { + Value2 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDeltaEvent.g.cs index 9d151125..596ca4bd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDeltaEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseAudioDeltaEvent { /// - /// A chunk of Base64 encoded response audio bytes. + /// The type of the event. Always `response.audio.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseAudioDeltaEventType Type { get; set; } /// /// A sequence number for this chunk of the stream response. @@ -23,11 +23,11 @@ public sealed partial class ResponseAudioDeltaEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.audio.delta`. + /// A chunk of Base64 encoded response audio bytes. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseAudioDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,25 +38,25 @@ public sealed partial class ResponseAudioDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// A chunk of Base64 encoded response audio bytes. + /// + /// The type of the event. Always `response.audio.delta`. /// /// /// A sequence number for this chunk of the stream response. /// - /// - /// The type of the event. Always `response.audio.delta`. + /// + /// A chunk of Base64 encoded response audio bytes. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseAudioDeltaEvent( - string delta, int sequenceNumber, + string delta, global::tryAGI.OpenAI.ResponseAudioDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDoneEvent.g.cs index f80c6214..b1b4b86d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioDoneEvent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseAudioDoneEvent { - /// - /// The sequence number of the delta. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } - /// /// The type of the event. Always `response.audio.done`. /// @@ -22,6 +15,13 @@ public sealed partial class ResponseAudioDoneEvent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioDoneEventTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseAudioDoneEventType Type { get; set; } + /// + /// The sequence number of the delta. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ResponseAudioDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The sequence number of the delta. - /// /// /// The type of the event. Always `response.audio.done`. /// + /// + /// The sequence number of the delta. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDeltaEvent.g.cs index a641d358..be97e269 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDeltaEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseAudioTranscriptDeltaEvent { + /// + /// The type of the event. Always `response.audio.transcript.delta`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioTranscriptDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEventType Type { get; set; } + /// /// The partial transcript of the audio response. /// @@ -22,13 +29,6 @@ public sealed partial class ResponseAudioTranscriptDeltaEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.audio.transcript.delta`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioTranscriptDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,15 +38,15 @@ public sealed partial class ResponseAudioTranscriptDeltaEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `response.audio.transcript.delta`. + /// /// /// The partial transcript of the audio response. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.audio.transcript.delta`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDoneEvent.g.cs index b6426066..79f83745 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseAudioTranscriptDoneEvent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseAudioTranscriptDoneEvent { - /// - /// The sequence number of this event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } - /// /// The type of the event. Always `response.audio.transcript.done`. /// @@ -22,6 +15,13 @@ public sealed partial class ResponseAudioTranscriptDoneEvent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseAudioTranscriptDoneEventTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEventType Type { get; set; } + /// + /// The sequence number of this event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ResponseAudioTranscriptDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The sequence number of this event. - /// /// /// The type of the event. Always `response.audio.transcript.done`. /// + /// + /// The sequence number of this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDeltaEvent.g.cs index 2a118f34..717d294c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDeltaEvent.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCodeInterpreterCallCodeDeltaEvent { /// - /// The partial code snippet being streamed by the code interpreter. + /// The type of the event. Always `response.code_interpreter_call_code.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCodeDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEventType Type { get; set; } + + /// + /// The index of the output item in the response for which the code is being streamed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + public required int OutputIndex { get; set; } /// /// The unique identifier of the code interpreter tool call item. @@ -23,11 +30,11 @@ public sealed partial class ResponseCodeInterpreterCallCodeDeltaEvent public required string ItemId { get; set; } /// - /// The index of the output item in the response for which the code is being streamed. + /// The partial code snippet being streamed by the code interpreter. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required string Delta { get; set; } /// /// The sequence number of this event, used to order streaming events. @@ -36,13 +43,6 @@ public sealed partial class ResponseCodeInterpreterCallCodeDeltaEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.code_interpreter_call_code.delta`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCodeDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ResponseCodeInterpreterCallCodeDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The partial code snippet being streamed by the code interpreter. + /// + /// The type of the event. Always `response.code_interpreter_call_code.delta`. + /// + /// + /// The index of the output item in the response for which the code is being streamed. /// /// /// The unique identifier of the code interpreter tool call item. /// - /// - /// The index of the output item in the response for which the code is being streamed. + /// + /// The partial code snippet being streamed by the code interpreter. /// /// /// The sequence number of this event, used to order streaming events. /// - /// - /// The type of the event. Always `response.code_interpreter_call_code.delta`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCodeInterpreterCallCodeDeltaEvent( - string delta, - string itemId, int outputIndex, + string itemId, + string delta, int sequenceNumber, global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDoneEvent.g.cs index 494df86c..4256f693 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCodeDoneEvent.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCodeInterpreterCallCodeDoneEvent { /// - /// The final code snippet output by the code interpreter. + /// The type of the event. Always `response.code_interpreter_call_code.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCodeDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEventType Type { get; set; } + + /// + /// The index of the output item in the response for which the code is finalized. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Code { get; set; } + public required int OutputIndex { get; set; } /// /// The unique identifier of the code interpreter tool call item. @@ -23,11 +30,11 @@ public sealed partial class ResponseCodeInterpreterCallCodeDoneEvent public required string ItemId { get; set; } /// - /// The index of the output item in the response for which the code is finalized. + /// The final code snippet output by the code interpreter. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("code")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required string Code { get; set; } /// /// The sequence number of this event, used to order streaming events. @@ -36,13 +43,6 @@ public sealed partial class ResponseCodeInterpreterCallCodeDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.code_interpreter_call_code.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCodeDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ResponseCodeInterpreterCallCodeDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The final code snippet output by the code interpreter. + /// + /// The type of the event. Always `response.code_interpreter_call_code.done`. + /// + /// + /// The index of the output item in the response for which the code is finalized. /// /// /// The unique identifier of the code interpreter tool call item. /// - /// - /// The index of the output item in the response for which the code is finalized. + /// + /// The final code snippet output by the code interpreter. /// /// /// The sequence number of this event, used to order streaming events. /// - /// - /// The type of the event. Always `response.code_interpreter_call_code.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCodeInterpreterCallCodeDoneEvent( - string code, - string itemId, int outputIndex, + string itemId, + string code, int sequenceNumber, global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEventType type) { - this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCompletedEvent.g.cs index 70d3e476..0545488f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallCompletedEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCodeInterpreterCallCompletedEvent { /// - /// The unique identifier of the code interpreter tool call item. + /// The type of the event. Always `response.code_interpreter_call.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEventType Type { get; set; } /// /// The index of the output item in the response for which the code interpreter call is completed. @@ -23,18 +23,18 @@ public sealed partial class ResponseCodeInterpreterCallCompletedEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event, used to order streaming events. + /// The unique identifier of the code interpreter tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.code_interpreter_call.completed`. + /// The sequence number of this event, used to order streaming events. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseCodeInterpreterCallCompletedEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the code interpreter tool call item. + /// + /// The type of the event. Always `response.code_interpreter_call.completed`. /// /// /// The index of the output item in the response for which the code interpreter call is completed. /// + /// + /// The unique identifier of the code interpreter tool call item. + /// /// /// The sequence number of this event, used to order streaming events. /// - /// - /// The type of the event. Always `response.code_interpreter_call.completed`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCodeInterpreterCallCompletedEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInProgressEvent.g.cs index dd4b4b7b..952301fb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInProgressEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCodeInterpreterCallInProgressEvent { /// - /// The unique identifier of the code interpreter tool call item. + /// The type of the event. Always `response.code_interpreter_call.in_progress`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEventType Type { get; set; } /// /// The index of the output item in the response for which the code interpreter call is in progress. @@ -23,18 +23,18 @@ public sealed partial class ResponseCodeInterpreterCallInProgressEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event, used to order streaming events. + /// The unique identifier of the code interpreter tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.code_interpreter_call.in_progress`. + /// The sequence number of this event, used to order streaming events. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseCodeInterpreterCallInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the code interpreter tool call item. + /// + /// The type of the event. Always `response.code_interpreter_call.in_progress`. /// /// /// The index of the output item in the response for which the code interpreter call is in progress. /// + /// + /// The unique identifier of the code interpreter tool call item. + /// /// /// The sequence number of this event, used to order streaming events. /// - /// - /// The type of the event. Always `response.code_interpreter_call.in_progress`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCodeInterpreterCallInProgressEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInterpretingEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInterpretingEvent.g.cs index eaf9a554..d697ce1c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInterpretingEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCodeInterpreterCallInterpretingEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCodeInterpreterCallInterpretingEvent { /// - /// The unique identifier of the code interpreter tool call item. + /// The type of the event. Always `response.code_interpreter_call.interpreting`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallInterpretingEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEventType Type { get; set; } /// /// The index of the output item in the response for which the code interpreter is interpreting code. @@ -23,18 +23,18 @@ public sealed partial class ResponseCodeInterpreterCallInterpretingEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event, used to order streaming events. + /// The unique identifier of the code interpreter tool call item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.code_interpreter_call.interpreting`. + /// The sequence number of this event, used to order streaming events. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCodeInterpreterCallInterpretingEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseCodeInterpreterCallInterpretingEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the code interpreter tool call item. + /// + /// The type of the event. Always `response.code_interpreter_call.interpreting`. /// /// /// The index of the output item in the response for which the code interpreter is interpreting code. /// + /// + /// The unique identifier of the code interpreter tool call item. + /// /// /// The sequence number of this event, used to order streaming events. /// - /// - /// The type of the event. Always `response.code_interpreter_call.interpreting`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCodeInterpreterCallInterpretingEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCompletedEvent.g.cs index 0a31a608..f74c9d3e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCompletedEvent.g.cs @@ -9,8 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCompletedEvent { /// - /// + /// The type of the event. Always `response.completed`. /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCompletedEventType Type { get; set; } + + /// + /// Properties of the completed response.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + ///
+ /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} [global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,13 +32,6 @@ public sealed partial class ResponseCompletedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.completed`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCompletedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,13 +41,16 @@ public sealed partial class ResponseCompletedEvent /// /// Initializes a new instance of the class. /// - /// - /// - /// The sequence number for this event. - /// /// /// The type of the event. Always `response.completed`. /// + /// + /// Properties of the completed response.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + /// + /// + /// The sequence number for this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartAddedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartAddedEvent.g.cs index ec60f9ab..31f636aa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartAddedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartAddedEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseContentPartAddedEvent { /// - /// The index of the content part that was added. + /// The type of the event. Always `response.content_part.added`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseContentPartAddedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseContentPartAddedEventType Type { get; set; } /// /// The ID of the output item that the content part was added to. @@ -30,7 +30,14 @@ public sealed partial class ResponseContentPartAddedEvent public required int OutputIndex { get; set; } /// - /// + /// The index of the content part that was added. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } + + /// + /// The content part that was added. /// [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputContentJsonConverter))] @@ -44,13 +51,6 @@ public sealed partial class ResponseContentPartAddedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.content_part.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseContentPartAddedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseContentPartAddedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -60,8 +60,8 @@ public sealed partial class ResponseContentPartAddedEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that was added. + /// + /// The type of the event. Always `response.content_part.added`. /// /// /// The ID of the output item that the content part was added to. @@ -69,27 +69,29 @@ public sealed partial class ResponseContentPartAddedEvent /// /// The index of the output item that the content part was added to. /// - /// + /// + /// The index of the content part that was added. + /// + /// + /// The content part that was added. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.content_part.added`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseContentPartAddedEvent( - int contentIndex, string itemId, int outputIndex, + int contentIndex, global::tryAGI.OpenAI.OutputContent part, int sequenceNumber, global::tryAGI.OpenAI.ResponseContentPartAddedEventType type) { - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Part = part; this.SequenceNumber = sequenceNumber; this.Type = type; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartDoneEvent.g.cs index fd78fafe..7c270e9e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseContentPartDoneEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseContentPartDoneEvent { /// - /// The index of the content part that is done. + /// The type of the event. Always `response.content_part.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseContentPartDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseContentPartDoneEventType Type { get; set; } /// /// The ID of the output item that the content part was added to. @@ -30,12 +30,11 @@ public sealed partial class ResponseContentPartDoneEvent public required int OutputIndex { get; set; } /// - /// + /// The index of the content part that is done. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputContentJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.OutputContent Part { get; set; } + public required int ContentIndex { get; set; } /// /// The sequence number of this event. @@ -45,11 +44,12 @@ public sealed partial class ResponseContentPartDoneEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.content_part.done`. + /// The content part that is done. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseContentPartDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseContentPartDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputContentJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OutputContent Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -60,8 +60,8 @@ public sealed partial class ResponseContentPartDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that is done. + /// + /// The type of the event. Always `response.content_part.done`. /// /// /// The ID of the output item that the content part was added to. @@ -69,29 +69,31 @@ public sealed partial class ResponseContentPartDoneEvent /// /// The index of the output item that the content part was added to. /// - /// + /// + /// The index of the content part that is done. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.content_part.done`. + /// + /// The content part that is done. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseContentPartDoneEvent( - int contentIndex, string itemId, int outputIndex, - global::tryAGI.OpenAI.OutputContent part, + int contentIndex, int sequenceNumber, + global::tryAGI.OpenAI.OutputContent part, global::tryAGI.OpenAI.ResponseContentPartDoneEventType type) { - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.Part = part; + this.ContentIndex = contentIndex; this.SequenceNumber = sequenceNumber; + this.Part = part; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCreatedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCreatedEvent.g.cs index 7f2fcef5..f5a0e925 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCreatedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCreatedEvent.g.cs @@ -9,8 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCreatedEvent { /// - /// + /// The type of the event. Always `response.created`. /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCreatedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCreatedEventType Type { get; set; } + + /// + /// The response that was created.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + ///
+ /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} [global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,13 +32,6 @@ public sealed partial class ResponseCreatedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.created`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCreatedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCreatedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,13 +41,16 @@ public sealed partial class ResponseCreatedEvent /// /// Initializes a new instance of the class. /// - /// - /// - /// The sequence number for this event. - /// /// /// The type of the event. Always `response.created`. /// + /// + /// The response that was created.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + /// + /// + /// The sequence number for this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDeltaEvent.g.cs index 5c22e9aa..2a458ea8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDeltaEvent.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCustomToolCallInputDeltaEvent { /// - /// The incremental input data (delta) for the custom tool call. + /// The event type identifier. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCustomToolCallInputDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEventType Type { get; set; } /// - /// Unique identifier for the API item associated with this event. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int SequenceNumber { get; set; } /// /// The index of the output this delta applies to. @@ -30,18 +30,18 @@ public sealed partial class ResponseCustomToolCallInputDeltaEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// Unique identifier for the API item associated with this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The event type identifier. + /// The incremental input data (delta) for the custom tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCustomToolCallInputDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,35 +52,35 @@ public sealed partial class ResponseCustomToolCallInputDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The incremental input data (delta) for the custom tool call. + /// + /// The event type identifier. /// - /// - /// Unique identifier for the API item associated with this event. + /// + /// The sequence number of this event. /// /// /// The index of the output this delta applies to. /// - /// - /// The sequence number of this event. + /// + /// Unique identifier for the API item associated with this event. /// - /// - /// The event type identifier. + /// + /// The incremental input data (delta) for the custom tool call. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCustomToolCallInputDeltaEvent( - string delta, - string itemId, - int outputIndex, int sequenceNumber, + int outputIndex, + string itemId, + string delta, global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDoneEvent.g.cs index 05600d81..4b58d7dc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseCustomToolCallInputDoneEvent.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseCustomToolCallInputDoneEvent { /// - /// The complete input data for the custom tool call. + /// The event type identifier. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCustomToolCallInputDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEventType Type { get; set; } /// - /// Unique identifier for the API item associated with this event. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int SequenceNumber { get; set; } /// /// The index of the output this event applies to. @@ -30,18 +30,18 @@ public sealed partial class ResponseCustomToolCallInputDoneEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// Unique identifier for the API item associated with this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The event type identifier. + /// The complete input data for the custom tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseCustomToolCallInputDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Input { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,35 +52,35 @@ public sealed partial class ResponseCustomToolCallInputDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The complete input data for the custom tool call. + /// + /// The event type identifier. /// - /// - /// Unique identifier for the API item associated with this event. + /// + /// The sequence number of this event. /// /// /// The index of the output this event applies to. /// - /// - /// The sequence number of this event. + /// + /// Unique identifier for the API item associated with this event. /// - /// - /// The event type identifier. + /// + /// The complete input data for the custom tool call. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseCustomToolCallInputDoneEvent( - string input, - string itemId, - int outputIndex, int sequenceNumber, + int outputIndex, + string itemId, + string input, global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEventType type) { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseError.g.cs index 5d0a50f9..28019b28 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseError.g.cs @@ -4,56 +4,15 @@ namespace tryAGI.OpenAI { /// - /// An error object returned when the model fails to generate a Response. + /// /// public sealed partial class ResponseError { - /// - /// The error code for the response. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseErrorCode Code { get; set; } - - /// - /// A human-readable description of the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The error code for the response. - /// - /// - /// A human-readable description of the error. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ResponseError( - global::tryAGI.OpenAI.ResponseErrorCode code, - string message) - { - this.Code = code; - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - } - - /// - /// Initializes a new instance of the class. - /// - public ResponseError() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEvent.g.cs index 09365fba..f1ac8d13 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEvent.g.cs @@ -9,7 +9,14 @@ namespace tryAGI.OpenAI public sealed partial class ResponseErrorEvent { /// - /// The error code. + /// The type of the event. Always `error`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseErrorEventType Type { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("code")] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,7 +30,7 @@ public sealed partial class ResponseErrorEvent public required string Message { get; set; } /// - /// The error parameter. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("param")] [global::System.Text.Json.Serialization.JsonRequired] @@ -36,13 +43,6 @@ public sealed partial class ResponseErrorEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `error`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseErrorEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,21 +52,17 @@ public sealed partial class ResponseErrorEvent /// /// Initializes a new instance of the class. /// - /// - /// The error code. + /// + /// The type of the event. Always `error`. /// + /// /// /// The error message. /// - /// - /// The error parameter. - /// + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `error`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.Json.g.cs new file mode 100644 index 00000000..5a076f10 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseErrorEventCode + { + /// + /// 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::tryAGI.OpenAI.ResponseErrorEventCode? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseErrorEventCode), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseErrorEventCode; + } + + /// + /// 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::tryAGI.OpenAI.ResponseErrorEventCode? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseErrorEventCode), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseErrorEventCode; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.g.cs new file mode 100644 index 00000000..15d99a60 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventCode.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseErrorEventCode + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.Json.g.cs new file mode 100644 index 00000000..6ea951a9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseErrorEventParam + { + /// + /// 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::tryAGI.OpenAI.ResponseErrorEventParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseErrorEventParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseErrorEventParam; + } + + /// + /// 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::tryAGI.OpenAI.ResponseErrorEventParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseErrorEventParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseErrorEventParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.g.cs new file mode 100644 index 00000000..24970df7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorEventParam.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseErrorEventParam + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.Json.g.cs new file mode 100644 index 00000000..b37e994f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseErrorVariant1 + { + /// + /// 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::tryAGI.OpenAI.ResponseErrorVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseErrorVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseErrorVariant1; + } + + /// + /// 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::tryAGI.OpenAI.ResponseErrorVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseErrorVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseErrorVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.g.cs new file mode 100644 index 00000000..83c9b250 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseErrorVariant1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An error object returned when the model fails to generate a Response. + /// + public sealed partial class ResponseErrorVariant1 + { + /// + /// The error code for the response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseErrorCodeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ResponseErrorCode Code { get; set; } + + /// + /// A human-readable description of the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The error code for the response. + /// + /// + /// A human-readable description of the error. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseErrorVariant1( + global::tryAGI.OpenAI.ResponseErrorCode code, + string message) + { + this.Code = code; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseErrorVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFailedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFailedEvent.g.cs index edef048c..bd6e9292 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFailedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFailedEvent.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFailedEvent { /// - /// + /// The type of the event. Always `response.failed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.Response Response { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFailedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFailedEventType Type { get; set; } /// /// The sequence number of this event. @@ -24,11 +23,14 @@ public sealed partial class ResponseFailedEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.failed`. + /// The response that failed.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFailedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFailedEventType Type { get; set; } + /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Response Response { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,23 +41,26 @@ public sealed partial class ResponseFailedEvent /// /// Initializes a new instance of the class. /// - /// + /// + /// The type of the event. Always `response.failed`. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.failed`. + /// + /// The response that failed.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFailedEvent( - global::tryAGI.OpenAI.Response response, int sequenceNumber, + global::tryAGI.OpenAI.Response response, global::tryAGI.OpenAI.ResponseFailedEventType type) { - this.Response = response; this.SequenceNumber = sequenceNumber; + this.Response = response; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallCompletedEvent.g.cs index ab33e818..39900fd9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallCompletedEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFileSearchCallCompletedEvent { /// - /// The ID of the output item that the file search call is initiated. + /// The type of the event. Always `response.file_search_call.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEventType Type { get; set; } /// /// The index of the output item that the file search call is initiated. @@ -23,18 +23,18 @@ public sealed partial class ResponseFileSearchCallCompletedEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The ID of the output item that the file search call is initiated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.file_search_call.completed`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseFileSearchCallCompletedEvent /// /// Initializes a new instance of the class. /// - /// - /// The ID of the output item that the file search call is initiated. + /// + /// The type of the event. Always `response.file_search_call.completed`. /// /// /// The index of the output item that the file search call is initiated. /// + /// + /// The ID of the output item that the file search call is initiated. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.file_search_call.completed`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFileSearchCallCompletedEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallInProgressEvent.g.cs index 1b0f1870..abed28c6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallInProgressEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFileSearchCallInProgressEvent { /// - /// The ID of the output item that the file search call is initiated. + /// The type of the event. Always `response.file_search_call.in_progress`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEventType Type { get; set; } /// /// The index of the output item that the file search call is initiated. @@ -23,18 +23,18 @@ public sealed partial class ResponseFileSearchCallInProgressEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The ID of the output item that the file search call is initiated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.file_search_call.in_progress`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseFileSearchCallInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// The ID of the output item that the file search call is initiated. + /// + /// The type of the event. Always `response.file_search_call.in_progress`. /// /// /// The index of the output item that the file search call is initiated. /// + /// + /// The ID of the output item that the file search call is initiated. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.file_search_call.in_progress`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFileSearchCallInProgressEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallSearchingEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallSearchingEvent.g.cs index 31da1a91..0a6db89a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallSearchingEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFileSearchCallSearchingEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFileSearchCallSearchingEvent { /// - /// The ID of the output item that the file search call is initiated. + /// The type of the event. Always `response.file_search_call.searching`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallSearchingEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEventType Type { get; set; } /// /// The index of the output item that the file search call is searching. @@ -23,18 +23,18 @@ public sealed partial class ResponseFileSearchCallSearchingEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The ID of the output item that the file search call is initiated. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.file_search_call.searching`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFileSearchCallSearchingEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseFileSearchCallSearchingEvent /// /// Initializes a new instance of the class. /// - /// - /// The ID of the output item that the file search call is initiated. + /// + /// The type of the event. Always `response.file_search_call.searching`. /// /// /// The index of the output item that the file search call is searching. /// + /// + /// The ID of the output item that the file search call is initiated. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.file_search_call.searching`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFileSearchCallSearchingEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.Json.g.cs new file mode 100644 index 00000000..88adf2f4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ResponseFormat + { + /// + /// 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::tryAGI.OpenAI.ResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseFormat), + jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ResponseFormat? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseFormat?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.g.cs new file mode 100644 index 00000000..41e61956 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormat.g.cs @@ -0,0 +1,284 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An object specifying the format that the model must output.
+ /// 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 the older JSON mode, which
+ /// ensures the message the model generates is valid JSON. Using `json_schema`
+ /// is preferred for models that support it. + ///
+ public readonly partial struct ResponseFormat : global::System.IEquatable + { + /// + /// Default response format. Used to generate text responses. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// JSON Schema response format. Used to generate structured JSON responses.
+ /// Learn more about [Structured Outputs](/docs/guides/structured-outputs). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFormatJsonSchema? JsonSchema { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFormatJsonSchema? JsonSchema { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonSchema))] +#endif + public bool IsJsonSchema => JsonSchema != null; + + /// + /// JSON object response format. An older method of generating JSON responses.
+ /// Using `json_schema` is recommended for models that support it. Note that the
+ /// model will not generate JSON without a system or user message instructing it
+ /// to do so. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFormatJsonObject? JsonObject { get; init; } +#else + public global::tryAGI.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::tryAGI.OpenAI.ResponseFormatText value) => new ResponseFormat((global::tryAGI.OpenAI.ResponseFormatText?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseFormatText?(ResponseFormat @this) => @this.Text; + + /// + /// + /// + public ResponseFormat(global::tryAGI.OpenAI.ResponseFormatText? value) + { + Text = value; + } + + /// + /// + /// + public static implicit operator ResponseFormat(global::tryAGI.OpenAI.ResponseFormatJsonSchema value) => new ResponseFormat((global::tryAGI.OpenAI.ResponseFormatJsonSchema?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonSchema?(ResponseFormat @this) => @this.JsonSchema; + + /// + /// + /// + public ResponseFormat(global::tryAGI.OpenAI.ResponseFormatJsonSchema? value) + { + JsonSchema = value; + } + + /// + /// + /// + public static implicit operator ResponseFormat(global::tryAGI.OpenAI.ResponseFormatJsonObject value) => new ResponseFormat((global::tryAGI.OpenAI.ResponseFormatJsonObject?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonObject?(ResponseFormat @this) => @this.JsonObject; + + /// + /// + /// + public ResponseFormat(global::tryAGI.OpenAI.ResponseFormatJsonObject? value) + { + JsonObject = value; + } + + /// + /// + /// + public ResponseFormat( + global::tryAGI.OpenAI.ResponseFormatText? text, + global::tryAGI.OpenAI.ResponseFormatJsonSchema? jsonSchema, + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject + ) + { + Text = text; + JsonSchema = jsonSchema; + JsonObject = jsonObject; + } + + /// + /// + /// + public object? Object => + JsonObject as object ?? + JsonSchema as object ?? + Text as object + ; + + /// + /// + /// + public override string? ToString() => + Text?.ToString() ?? + JsonSchema?.ToString() ?? + JsonObject?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsText && !IsJsonSchema && !IsJsonObject || !IsText && IsJsonSchema && !IsJsonObject || !IsText && !IsJsonSchema && IsJsonObject; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? text = null, + global::System.Func? jsonSchema = null, + global::System.Func? jsonObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsText && text != null) + { + return text(Text!); + } + else if (IsJsonSchema && jsonSchema != null) + { + return jsonSchema(JsonSchema!); + } + else if (IsJsonObject && jsonObject != null) + { + return jsonObject(JsonObject!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? text = null, + global::System.Action? jsonSchema = null, + global::System.Action? jsonObject = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsText) + { + text?.Invoke(Text!); + } + else if (IsJsonSchema) + { + jsonSchema?.Invoke(JsonSchema!); + } + else if (IsJsonObject) + { + jsonObject?.Invoke(JsonObject!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::tryAGI.OpenAI.ResponseFormatText), + JsonSchema, + typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), + JsonObject, + typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, 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(JsonSchema, other.JsonSchema) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) + ; + } + + /// + /// + /// + 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); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchema.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchema.g.cs index 618ccf1f..0aedb29c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchema.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchema.g.cs @@ -5,17 +5,10 @@ namespace tryAGI.OpenAI { /// /// JSON Schema response format. Used to generate structured JSON responses.
- /// Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + /// Learn more about [Structured Outputs](/docs/guides/structured-outputs). ///
public sealed partial class ResponseFormatJsonSchema { - /// - /// Structured Outputs configuration options, including a JSON Schema. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("json_schema")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } - /// /// The type of response format being defined. Always `json_schema`. /// @@ -23,6 +16,13 @@ public sealed partial class ResponseFormatJsonSchema [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatJsonSchemaTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseFormatJsonSchemaType Type { get; set; } + /// + /// Structured Outputs configuration options, including a JSON Schema. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("json_schema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchema JsonSchema { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,12 +32,12 @@ public sealed partial class ResponseFormatJsonSchema /// /// Initializes a new instance of the class. /// - /// - /// Structured Outputs configuration options, including a JSON Schema. - /// /// /// The type of response format being defined. Always `json_schema`. /// + /// + /// Structured Outputs configuration options, including a JSON Schema. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchema.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchema.g.cs index a04327a7..778268ea 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchema.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchema.g.cs @@ -31,12 +31,7 @@ public sealed partial class ResponseFormatJsonSchemaJsonSchema public object? Schema { get; set; } /// - /// Whether to enable strict schema adherence when generating the output.
- /// If set to true, the model will always follow the exact schema defined
- /// in the `schema` field. Only a subset of JSON Schema is supported when
- /// `strict` is `true`. To learn more, read the [Structured Outputs
- /// guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// Default Value: false + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("strict")] public bool? Strict { get; set; } @@ -62,14 +57,7 @@ public sealed partial class ResponseFormatJsonSchemaJsonSchema /// The schema for the response format, described as a JSON Schema object.
/// Learn how to build JSON schemas [here](https://json-schema.org/). /// - /// - /// Whether to enable strict schema adherence when generating the output.
- /// If set to true, the model will always follow the exact schema defined
- /// in the `schema` field. Only a subset of JSON Schema is supported when
- /// `strict` is `true`. To learn more, read the [Structured Outputs
- /// guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// Default Value: false - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.Json.g.cs new file mode 100644 index 00000000..de2058ea --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseFormatJsonSchemaJsonSchemaStrict + { + /// + /// 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::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict; + } + + /// + /// 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::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseFormatJsonSchemaJsonSchemaStrict; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.g.cs new file mode 100644 index 00000000..ea040664 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatJsonSchemaJsonSchemaStrict.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseFormatJsonSchemaJsonSchemaStrict + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextGrammar.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextGrammar.g.cs index 4da145b8..ec59cc91 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextGrammar.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextGrammar.g.cs @@ -5,17 +5,10 @@ namespace tryAGI.OpenAI { /// /// A custom grammar for the model to follow when generating text.
- /// Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars). + /// Learn more in the [custom grammars guide](/docs/guides/custom-grammars). ///
public sealed partial class ResponseFormatTextGrammar { - /// - /// The custom grammar for the model to follow. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("grammar")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Grammar { get; set; } - /// /// The type of response format being defined. Always `grammar`. /// @@ -23,6 +16,13 @@ public sealed partial class ResponseFormatTextGrammar [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFormatTextGrammarTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseFormatTextGrammarType Type { get; set; } + /// + /// The custom grammar for the model to follow. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("grammar")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Grammar { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,12 +32,12 @@ public sealed partial class ResponseFormatTextGrammar /// /// Initializes a new instance of the class. /// - /// - /// The custom grammar for the model to follow. - /// /// /// The type of response format being defined. Always `grammar`. /// + /// + /// The custom grammar for the model to follow. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextPython.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextPython.g.cs index a759438a..bb7a1a85 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextPython.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFormatTextPython.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// /// Configure the model to generate valid Python code. See the
- /// [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details. + /// [custom grammars guide](/docs/guides/custom-grammars) for more details. ///
public sealed partial class ResponseFormatTextPython { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDeltaEvent.g.cs index 6c73d698..a46b67e6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDeltaEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFunctionCallArgumentsDeltaEvent { /// - /// The function-call arguments delta that is added. + /// The type of the event. Always `response.function_call_arguments.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFunctionCallArgumentsDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEventType Type { get; set; } /// /// The ID of the output item that the function-call arguments delta is added to. @@ -37,11 +37,11 @@ public sealed partial class ResponseFunctionCallArgumentsDeltaEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.function_call_arguments.delta`. + /// The function-call arguments delta that is added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFunctionCallArgumentsDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,8 +52,8 @@ public sealed partial class ResponseFunctionCallArgumentsDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The function-call arguments delta that is added. + /// + /// The type of the event. Always `response.function_call_arguments.delta`. /// /// /// The ID of the output item that the function-call arguments delta is added to. @@ -64,23 +64,23 @@ public sealed partial class ResponseFunctionCallArgumentsDeltaEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.function_call_arguments.delta`. + /// + /// The function-call arguments delta that is added. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFunctionCallArgumentsDeltaEvent( - string delta, string itemId, int outputIndex, int sequenceNumber, + string delta, global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDoneEvent.g.cs index e6b49434..f039d8be 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseFunctionCallArgumentsDoneEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseFunctionCallArgumentsDoneEvent { /// - /// The function-call arguments. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFunctionCallArgumentsDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEventType Type { get; set; } /// /// The ID of the item. @@ -22,6 +22,13 @@ public sealed partial class ResponseFunctionCallArgumentsDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } + /// + /// The name of the function that was called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + /// /// The index of the output item. /// @@ -37,11 +44,11 @@ public sealed partial class ResponseFunctionCallArgumentsDoneEvent public required int SequenceNumber { get; set; } /// - /// + /// The function-call arguments. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseFunctionCallArgumentsDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,33 +59,38 @@ public sealed partial class ResponseFunctionCallArgumentsDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The function-call arguments. - /// + /// /// /// The ID of the item. /// + /// + /// The name of the function that was called. + /// /// /// The index of the output item. /// /// /// The sequence number of this event. /// - /// + /// + /// The function-call arguments. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseFunctionCallArgumentsDoneEvent( - string arguments, string itemId, + string name, int outputIndex, int sequenceNumber, + string arguments, global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEventType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallCompletedEvent.g.cs index 876f3a97..91e6431e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallCompletedEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseImageGenCallCompletedEvent { /// - /// The unique identifier of the image generation item being processed. + /// The type of the event. Always 'response.image_generation_call.completed'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEventType Type { get; set; } /// /// The index of the output item in the response's output array. @@ -30,11 +30,11 @@ public sealed partial class ResponseImageGenCallCompletedEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always 'response.image_generation_call.completed'. + /// The unique identifier of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,8 +45,8 @@ public sealed partial class ResponseImageGenCallCompletedEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the image generation item being processed. + /// + /// The type of the event. Always 'response.image_generation_call.completed'. /// /// /// The index of the output item in the response's output array. @@ -54,21 +54,21 @@ public sealed partial class ResponseImageGenCallCompletedEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.image_generation_call.completed'. + /// + /// The unique identifier of the image generation item being processed. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseImageGenCallCompletedEvent( - string itemId, int outputIndex, int sequenceNumber, + string itemId, global::tryAGI.OpenAI.ResponseImageGenCallCompletedEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallGeneratingEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallGeneratingEvent.g.cs index 7a87ead0..96f1dbfc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallGeneratingEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallGeneratingEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseImageGenCallGeneratingEvent { /// - /// The unique identifier of the image generation item being processed. + /// The type of the event. Always 'response.image_generation_call.generating'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallGeneratingEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEventType Type { get; set; } /// /// The index of the output item in the response's output array. @@ -23,18 +23,18 @@ public sealed partial class ResponseImageGenCallGeneratingEvent public required int OutputIndex { get; set; } /// - /// The sequence number of the image generation item being processed. + /// The unique identifier of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always 'response.image_generation_call.generating'. + /// The sequence number of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallGeneratingEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseImageGenCallGeneratingEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the image generation item being processed. + /// + /// The type of the event. Always 'response.image_generation_call.generating'. /// /// /// The index of the output item in the response's output array. /// + /// + /// The unique identifier of the image generation item being processed. + /// /// /// The sequence number of the image generation item being processed. /// - /// - /// The type of the event. Always 'response.image_generation_call.generating'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseImageGenCallGeneratingEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallInProgressEvent.g.cs index a21d5983..17b2e047 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallInProgressEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseImageGenCallInProgressEvent { /// - /// The unique identifier of the image generation item being processed. + /// The type of the event. Always 'response.image_generation_call.in_progress'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEventType Type { get; set; } /// /// The index of the output item in the response's output array. @@ -23,18 +23,18 @@ public sealed partial class ResponseImageGenCallInProgressEvent public required int OutputIndex { get; set; } /// - /// The sequence number of the image generation item being processed. + /// The unique identifier of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always 'response.image_generation_call.in_progress'. + /// The sequence number of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseImageGenCallInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the image generation item being processed. + /// + /// The type of the event. Always 'response.image_generation_call.in_progress'. /// /// /// The index of the output item in the response's output array. /// + /// + /// The unique identifier of the image generation item being processed. + /// /// /// The sequence number of the image generation item being processed. /// - /// - /// The type of the event. Always 'response.image_generation_call.in_progress'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseImageGenCallInProgressEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseImageGenCallInProgressEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallPartialImageEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallPartialImageEvent.g.cs index c5288b0e..ca463673 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallPartialImageEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseImageGenCallPartialImageEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseImageGenCallPartialImageEvent { /// - /// The unique identifier of the image generation item being processed. + /// The type of the event. Always 'response.image_generation_call.partial_image'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallPartialImageEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEventType Type { get; set; } /// /// The index of the output item in the response's output array. @@ -23,32 +23,32 @@ public sealed partial class ResponseImageGenCallPartialImageEvent public required int OutputIndex { get; set; } /// - /// Base64-encoded partial image data, suitable for rendering as an image. + /// The unique identifier of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_b64")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string PartialImageB64 { get; set; } + public required string ItemId { get; set; } /// - /// 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). + /// The sequence number of the image generation item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] [global::System.Text.Json.Serialization.JsonRequired] - public required int PartialImageIndex { get; set; } + public required int SequenceNumber { get; set; } /// - /// The sequence number of the image generation item being processed. + /// 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int PartialImageIndex { get; set; } /// - /// The type of the event. Always 'response.image_generation_call.partial_image'. + /// Base64-encoded partial image data, suitable for rendering as an image. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseImageGenCallPartialImageEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("partial_image_b64")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string PartialImageB64 { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,40 +59,40 @@ public sealed partial class ResponseImageGenCallPartialImageEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the image generation item being processed. + /// + /// The type of the event. Always 'response.image_generation_call.partial_image'. /// /// /// The index of the output item in the response's output array. /// - /// - /// Base64-encoded partial image data, suitable for rendering as an image. - /// - /// - /// 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). + /// + /// The unique identifier of the image generation item being processed. /// /// /// The sequence number of the image generation item being processed. /// - /// - /// The type of the event. Always 'response.image_generation_call.partial_image'. + /// + /// 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). + /// + /// + /// Base64-encoded partial image data, suitable for rendering as an image. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseImageGenCallPartialImageEvent( - string itemId, int outputIndex, - string partialImageB64, - int partialImageIndex, + string itemId, int sequenceNumber, + int partialImageIndex, + string partialImageB64, global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.PartialImageB64 = partialImageB64 ?? throw new global::System.ArgumentNullException(nameof(partialImageB64)); - this.PartialImageIndex = partialImageIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; + this.PartialImageIndex = partialImageIndex; + this.PartialImageB64 = partialImageB64 ?? throw new global::System.ArgumentNullException(nameof(partialImageB64)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseInProgressEvent.g.cs index 482af8da..5cef71c9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseInProgressEvent.g.cs @@ -9,8 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ResponseInProgressEvent { /// - /// + /// The type of the event. Always `response.in_progress`. /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseInProgressEventType Type { get; set; } + + /// + /// The response that is in progress.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + ///
+ /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} [global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,13 +32,6 @@ public sealed partial class ResponseInProgressEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.in_progress`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseInProgressEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,13 +41,16 @@ public sealed partial class ResponseInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// - /// The sequence number of this event. - /// /// /// The type of the event. Always `response.in_progress`. /// + /// + /// The response that is in progress.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + /// + /// + /// The sequence number of this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseIncompleteEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseIncompleteEvent.g.cs index f56f7d8b..400772cd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseIncompleteEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseIncompleteEvent.g.cs @@ -9,8 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ResponseIncompleteEvent { /// - /// + /// The type of the event. Always `response.incomplete`. /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseIncompleteEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseIncompleteEventType Type { get; set; } + + /// + /// The response that was incomplete.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + ///
+ /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} [global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,13 +32,6 @@ public sealed partial class ResponseIncompleteEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.incomplete`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseIncompleteEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseIncompleteEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,13 +41,16 @@ public sealed partial class ResponseIncompleteEvent /// /// Initializes a new instance of the class. /// - /// - /// - /// The sequence number of this event. - /// /// /// The type of the event. Always `response.incomplete`. /// + /// + /// The response that was incomplete.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + /// + /// + /// The sequence number of this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseItemList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseItemList.g.cs index fa064626..93595145 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseItemList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseItemList.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class ResponseItemList { + /// + /// The type of object returned, must be `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseItemListObjectJsonConverter))] + public global::tryAGI.OpenAI.ResponseItemListObject Object { get; set; } + /// /// A list of items used to generate this response. /// @@ -16,18 +23,18 @@ public sealed partial class ResponseItemList public required global::System.Collections.Generic.IList Data { get; set; } /// - /// The ID of the first item in the list. + /// Whether there are more items available. /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required bool HasMore { get; set; } /// - /// Whether there are more items available. + /// The ID of the first item in the list. /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// The ID of the last item in the list. @@ -36,13 +43,6 @@ public sealed partial class ResponseItemList [global::System.Text.Json.Serialization.JsonRequired] public required string LastId { get; set; } - /// - /// The type of object returned, must be `list`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseItemListObjectJsonConverter))] - public global::tryAGI.OpenAI.ResponseItemListObject Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ResponseItemList /// /// Initializes a new instance of the class. /// + /// + /// The type of object returned, must be `list`. + /// /// /// A list of items used to generate this response. /// - /// - /// The ID of the first item in the list. - /// /// /// Whether there are more items available. /// + /// + /// The ID of the first item in the list. + /// /// /// The ID of the last item in the list. /// - /// - /// The type of object returned, must be `list`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseItemList( global::System.Collections.Generic.IList data, - string firstId, bool hasMore, + string firstId, string lastId, global::tryAGI.OpenAI.ResponseItemListObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); - this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); this.HasMore = hasMore; + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs index b9f27e40..94a4f7fb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProb.g.cs @@ -11,18 +11,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseLogProb { /// - /// The log probability of this token. + /// A possible text token. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required double Logprob { get; set; } + public required string Token { get; set; } /// - /// A possible text token. + /// The log probability of this token. /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required double Logprob { get; set; } /// /// The log probability of the top 20 most likely tokens. @@ -39,12 +39,12 @@ public sealed partial class ResponseLogProb /// /// Initializes a new instance of the class. /// - /// - /// The log probability of this token. - /// /// /// A possible text token. /// + /// + /// The log probability of this token. + /// /// /// The log probability of the top 20 most likely tokens. /// @@ -52,12 +52,12 @@ public sealed partial class ResponseLogProb [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseLogProb( - double logprob, string token, + double logprob, global::System.Collections.Generic.IList? topLogprobs) { - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; this.TopLogprobs = topLogprobs; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProbTopLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProbTopLogprob.g.cs index d2f4c3fb..f85189fc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProbTopLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseLogProbTopLogprob.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseLogProbTopLogprob { - /// - /// The log probability of this token. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] - public double? Logprob { get; set; } - /// /// A possible text token. /// [global::System.Text.Json.Serialization.JsonPropertyName("token")] public string? Token { get; set; } + /// + /// The log probability of this token. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] + public double? Logprob { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class ResponseLogProbTopLogprob /// /// Initializes a new instance of the class. /// - /// - /// The log probability of this token. - /// /// /// A possible text token. /// + /// + /// The log probability of this token. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseLogProbTopLogprob( - double? logprob, - string? token) + string? token, + double? logprob) { - this.Logprob = logprob; this.Token = token; + this.Logprob = logprob; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDeltaEvent.g.cs index f781893f..9d4a9958 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDeltaEvent.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseMCPCallArgumentsDeltaEvent { /// - /// A JSON string containing the partial update to the arguments for the MCP tool call. + /// The type of the event. Always 'response.mcp_call_arguments.delta'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEventType Type { get; set; } + + /// + /// The index of the output item in the response's output array. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + public required int OutputIndex { get; set; } /// /// The unique identifier of the MCP tool call item being processed. @@ -23,11 +30,11 @@ public sealed partial class ResponseMCPCallArgumentsDeltaEvent public required string ItemId { get; set; } /// - /// The index of the output item in the response's output array. + /// A JSON string containing the partial update to the arguments for the MCP tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required string Delta { get; set; } /// /// The sequence number of this event. @@ -36,13 +43,6 @@ public sealed partial class ResponseMCPCallArgumentsDeltaEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_call_arguments.delta'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ResponseMCPCallArgumentsDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// A JSON string containing the partial update to the arguments for the MCP tool call. + /// + /// The type of the event. Always 'response.mcp_call_arguments.delta'. + /// + /// + /// The index of the output item in the response's output array. /// /// /// The unique identifier of the MCP tool call item being processed. /// - /// - /// The index of the output item in the response's output array. + /// + /// A JSON string containing the partial update to the arguments for the MCP tool call. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_call_arguments.delta'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseMCPCallArgumentsDeltaEvent( - string delta, - string itemId, int outputIndex, + string itemId, + string delta, int sequenceNumber, global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDoneEvent.g.cs index 0187b978..986cfa21 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallArgumentsDoneEvent.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseMCPCallArgumentsDoneEvent { /// - /// A JSON string containing the finalized arguments for the MCP tool call. + /// The type of the event. Always 'response.mcp_call_arguments.done'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEventType Type { get; set; } + + /// + /// The index of the output item in the response's output array. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required int OutputIndex { get; set; } /// /// The unique identifier of the MCP tool call item being processed. @@ -23,11 +30,11 @@ public sealed partial class ResponseMCPCallArgumentsDoneEvent public required string ItemId { get; set; } /// - /// The index of the output item in the response's output array. + /// A JSON string containing the finalized arguments for the MCP tool call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required string Arguments { get; set; } /// /// The sequence number of this event. @@ -36,13 +43,6 @@ public sealed partial class ResponseMCPCallArgumentsDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_call_arguments.done'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,34 +52,34 @@ public sealed partial class ResponseMCPCallArgumentsDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// A JSON string containing the finalized arguments for the MCP tool call. + /// + /// The type of the event. Always 'response.mcp_call_arguments.done'. + /// + /// + /// The index of the output item in the response's output array. /// /// /// The unique identifier of the MCP tool call item being processed. /// - /// - /// The index of the output item in the response's output array. + /// + /// A JSON string containing the finalized arguments for the MCP tool call. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_call_arguments.done'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseMCPCallArgumentsDoneEvent( - string arguments, - string itemId, int outputIndex, + string itemId, + string arguments, int sequenceNumber, global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEventType type) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallCompletedEvent.g.cs index 16e764ea..2da49510 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallCompletedEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseMCPCallCompletedEvent { + /// + /// The type of the event. Always 'response.mcp_call.completed'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPCallCompletedEventType Type { get; set; } + /// /// The ID of the MCP tool call item that completed. /// @@ -29,13 +36,6 @@ public sealed partial class ResponseMCPCallCompletedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_call.completed'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPCallCompletedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class ResponseMCPCallCompletedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always 'response.mcp_call.completed'. + /// /// /// The ID of the MCP tool call item that completed. /// @@ -54,9 +57,6 @@ public sealed partial class ResponseMCPCallCompletedEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_call.completed'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallFailedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallFailedEvent.g.cs index dbbd65be..ff220ef3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallFailedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallFailedEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseMCPCallFailedEvent { + /// + /// The type of the event. Always 'response.mcp_call.failed'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallFailedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPCallFailedEventType Type { get; set; } + /// /// The ID of the MCP tool call item that failed. /// @@ -29,13 +36,6 @@ public sealed partial class ResponseMCPCallFailedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_call.failed'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallFailedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPCallFailedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class ResponseMCPCallFailedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always 'response.mcp_call.failed'. + /// /// /// The ID of the MCP tool call item that failed. /// @@ -54,9 +57,6 @@ public sealed partial class ResponseMCPCallFailedEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_call.failed'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallInProgressEvent.g.cs index fe8a62f7..16689be1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPCallInProgressEvent.g.cs @@ -9,11 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class ResponseMCPCallInProgressEvent { /// - /// The unique identifier of the MCP tool call item being processed. + /// The type of the event. Always 'response.mcp_call.in_progress'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPCallInProgressEventType Type { get; set; } + + /// + /// The sequence number of this event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int SequenceNumber { get; set; } /// /// The index of the output item in the response's output array. @@ -23,18 +30,11 @@ public sealed partial class ResponseMCPCallInProgressEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The unique identifier of the MCP tool call item being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } - - /// - /// The type of the event. Always 'response.mcp_call.in_progress'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPCallInProgressEventType Type { get; set; } + public required string ItemId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,30 +45,30 @@ public sealed partial class ResponseMCPCallInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// The unique identifier of the MCP tool call item being processed. - /// - /// - /// The index of the output item in the response's output array. + /// + /// The type of the event. Always 'response.mcp_call.in_progress'. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_call.in_progress'. + /// + /// The index of the output item in the response's output array. + /// + /// + /// The unique identifier of the MCP tool call item being processed. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseMCPCallInProgressEvent( - string itemId, - int outputIndex, int sequenceNumber, + int outputIndex, + string itemId, global::tryAGI.OpenAI.ResponseMCPCallInProgressEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsCompletedEvent.g.cs index c4a694f1..c79ef497 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsCompletedEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseMCPListToolsCompletedEvent { + /// + /// The type of the event. Always 'response.mcp_list_tools.completed'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEventType Type { get; set; } + /// /// The ID of the MCP tool call item that produced this output. /// @@ -29,13 +36,6 @@ public sealed partial class ResponseMCPListToolsCompletedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_list_tools.completed'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class ResponseMCPListToolsCompletedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always 'response.mcp_list_tools.completed'. + /// /// /// The ID of the MCP tool call item that produced this output. /// @@ -54,9 +57,6 @@ public sealed partial class ResponseMCPListToolsCompletedEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_list_tools.completed'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsFailedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsFailedEvent.g.cs index 18670023..959f57bc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsFailedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsFailedEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseMCPListToolsFailedEvent { + /// + /// The type of the event. Always 'response.mcp_list_tools.failed'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsFailedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEventType Type { get; set; } + /// /// The ID of the MCP tool call item that failed. /// @@ -29,13 +36,6 @@ public sealed partial class ResponseMCPListToolsFailedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_list_tools.failed'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsFailedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class ResponseMCPListToolsFailedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always 'response.mcp_list_tools.failed'. + /// /// /// The ID of the MCP tool call item that failed. /// @@ -54,9 +57,6 @@ public sealed partial class ResponseMCPListToolsFailedEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_list_tools.failed'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsInProgressEvent.g.cs index fe766494..a663762b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseMCPListToolsInProgressEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseMCPListToolsInProgressEvent { + /// + /// The type of the event. Always 'response.mcp_list_tools.in_progress'. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEventType Type { get; set; } + /// /// The ID of the MCP tool call item that is being processed. /// @@ -29,13 +36,6 @@ public sealed partial class ResponseMCPListToolsInProgressEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.mcp_list_tools.in_progress'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPListToolsInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,6 +45,9 @@ public sealed partial class ResponseMCPListToolsInProgressEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always 'response.mcp_list_tools.in_progress'. + /// /// /// The ID of the MCP tool call item that is being processed. /// @@ -54,9 +57,6 @@ public sealed partial class ResponseMCPListToolsInProgressEvent /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.mcp_list_tools.in_progress'. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitie.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitie.g.cs deleted file mode 100644 index 5d0e82b4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitie.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public enum ResponseModalitie - { - /// - /// - /// - Text, - /// - /// - /// - Audio, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ResponseModalitieExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ResponseModalitie value) - { - return value switch - { - ResponseModalitie.Text => "text", - ResponseModalitie.Audio => "audio", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ResponseModalitie? ToEnum(string value) - { - return value switch - { - "text" => ResponseModalitie.Text, - "audio" => ResponseModalitie.Audio, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.Json.g.cs new file mode 100644 index 00000000..aee72c56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseModalities + { + /// + /// 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::tryAGI.OpenAI.ResponseModalities? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseModalities), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseModalities; + } + + /// + /// 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::tryAGI.OpenAI.ResponseModalities? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseModalities), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseModalities; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.g.cs new file mode 100644 index 00000000..e2c42d77 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalities.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseModalities + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitiesVariant1Item.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitiesVariant1Item.g.cs new file mode 100644 index 00000000..690cd9fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseModalitiesVariant1Item.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ResponseModalitiesVariant1Item + { + /// + /// + /// + Text, + /// + /// + /// + Audio, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseModalitiesVariant1ItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseModalitiesVariant1Item value) + { + return value switch + { + ResponseModalitiesVariant1Item.Text => "text", + ResponseModalitiesVariant1Item.Audio => "audio", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseModalitiesVariant1Item? ToEnum(string value) + { + return value switch + { + "text" => ResponseModalitiesVariant1Item.Text, + "audio" => ResponseModalitiesVariant1Item.Audio, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemAddedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemAddedEvent.g.cs index c9a53a27..870d2f31 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemAddedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemAddedEvent.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseOutputItemAddedEvent { /// - /// + /// The type of the event. Always `response.output_item.added`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputItemJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.OutputItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputItemAddedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseOutputItemAddedEventType Type { get; set; } /// /// The index of the output item that was added. @@ -31,11 +30,12 @@ public sealed partial class ResponseOutputItemAddedEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.output_item.added`. + /// The output item that was added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputItemAddedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseOutputItemAddedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputItemJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OutputItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -46,28 +46,30 @@ public sealed partial class ResponseOutputItemAddedEvent /// /// Initializes a new instance of the class. /// - /// + /// + /// The type of the event. Always `response.output_item.added`. + /// /// /// The index of the output item that was added. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.output_item.added`. + /// + /// The output item that was added. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseOutputItemAddedEvent( - global::tryAGI.OpenAI.OutputItem item, int outputIndex, int sequenceNumber, + global::tryAGI.OpenAI.OutputItem item, global::tryAGI.OpenAI.ResponseOutputItemAddedEventType type) { - this.Item = item; this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.Item = item; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemDoneEvent.g.cs index b805c87a..7a4082d1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputItemDoneEvent.g.cs @@ -9,12 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseOutputItemDoneEvent { /// - /// + /// The type of the event. Always `response.output_item.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputItemJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.OutputItem Item { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputItemDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseOutputItemDoneEventType Type { get; set; } /// /// The index of the output item that was marked done. @@ -31,11 +30,12 @@ public sealed partial class ResponseOutputItemDoneEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.output_item.done`. + /// The output item that was marked done. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputItemDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseOutputItemDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OutputItemJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OutputItem Item { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -46,28 +46,30 @@ public sealed partial class ResponseOutputItemDoneEvent /// /// Initializes a new instance of the class. /// - /// + /// + /// The type of the event. Always `response.output_item.done`. + /// /// /// The index of the output item that was marked done. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.output_item.done`. + /// + /// The output item that was marked done. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseOutputItemDoneEvent( - global::tryAGI.OpenAI.OutputItem item, int outputIndex, int sequenceNumber, + global::tryAGI.OpenAI.OutputItem item, global::tryAGI.OpenAI.ResponseOutputItemDoneEventType type) { - this.Item = item; this.OutputIndex = outputIndex; this.SequenceNumber = sequenceNumber; + this.Item = item; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.Json.g.cs new file mode 100644 index 00000000..ed2d4765 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseOutputText + { + /// + /// 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::tryAGI.OpenAI.ResponseOutputText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseOutputText), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseOutputText; + } + + /// + /// 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::tryAGI.OpenAI.ResponseOutputText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseOutputText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseOutputText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.g.cs new file mode 100644 index 00000000..17cea753 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputText.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Assistant response text accompanied by optional annotations. + /// + public sealed partial class ResponseOutputText + { + /// + /// Type discriminator that is always `output_text`.
+ /// Default Value: output_text + ///
+ /// global::tryAGI.OpenAI.ResponseOutputTextType.OutputText + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseOutputTextType Type { get; set; } = global::tryAGI.OpenAI.ResponseOutputTextType.OutputText; + + /// + /// Assistant generated text. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Ordered list of annotations attached to the response text. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("annotations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Annotations { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `output_text`.
+ /// Default Value: output_text + /// + /// + /// Assistant generated text. + /// + /// + /// Ordered list of annotations attached to the response text. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseOutputText( + string text, + global::System.Collections.Generic.IList annotations, + global::tryAGI.OpenAI.ResponseOutputTextType type = global::tryAGI.OpenAI.ResponseOutputTextType.OutputText) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Annotations = annotations ?? throw new global::System.ArgumentNullException(nameof(annotations)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseOutputText() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationAddedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationAddedEvent.g.cs index 7210d421..d243190d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationAddedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationAddedEvent.g.cs @@ -9,39 +9,39 @@ namespace tryAGI.OpenAI public sealed partial class ResponseOutputTextAnnotationAddedEvent { /// - /// The annotation object being added. (See annotation schema for details.) + /// The type of the event. Always 'response.output_text.annotation.added'. /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotation")] - [global::System.Text.Json.Serialization.JsonRequired] - public required object Annotation { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextAnnotationAddedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEventType Type { get; set; } /// - /// The index of the annotation within the content part. + /// The unique identifier of the item to which the annotation is being added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("annotation_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int AnnotationIndex { get; set; } + public required string ItemId { get; set; } /// - /// The index of the content part within the output item. + /// The index of the output item in the response's output array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + public required int OutputIndex { get; set; } /// - /// The unique identifier of the item to which the annotation is being added. + /// The index of the content part within the output item. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int ContentIndex { get; set; } /// - /// The index of the output item in the response's output array. + /// The index of the annotation within the content part. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("annotation_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required int AnnotationIndex { get; set; } /// /// The sequence number of this event. @@ -51,11 +51,11 @@ public sealed partial class ResponseOutputTextAnnotationAddedEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always 'response.output_text.annotation.added'. + /// The annotation object being added. (See annotation schema for details.) /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextAnnotationAddedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("annotation")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Annotation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,14 +66,8 @@ public sealed partial class ResponseOutputTextAnnotationAddedEvent /// /// Initializes a new instance of the class. /// - /// - /// The annotation object being added. (See annotation schema for details.) - /// - /// - /// The index of the annotation within the content part. - /// - /// - /// The index of the content part within the output item. + /// + /// The type of the event. Always 'response.output_text.annotation.added'. /// /// /// The unique identifier of the item to which the annotation is being added. @@ -81,30 +75,36 @@ public sealed partial class ResponseOutputTextAnnotationAddedEvent /// /// The index of the output item in the response's output array. /// + /// + /// The index of the content part within the output item. + /// + /// + /// The index of the annotation within the content part. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always 'response.output_text.annotation.added'. + /// + /// The annotation object being added. (See annotation schema for details.) /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseOutputTextAnnotationAddedEvent( - object annotation, - int annotationIndex, - int contentIndex, string itemId, int outputIndex, + int contentIndex, + int annotationIndex, int sequenceNumber, + object annotation, global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEventType type) { - this.Annotation = annotation ?? throw new global::System.ArgumentNullException(nameof(annotation)); - this.AnnotationIndex = annotationIndex; - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; + this.AnnotationIndex = annotationIndex; this.SequenceNumber = sequenceNumber; + this.Annotation = annotation ?? throw new global::System.ArgumentNullException(nameof(annotation)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.Json.g.cs new file mode 100644 index 00000000..edcaa7b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseOutputTextAnnotationDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseOutputTextAnnotationDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.g.cs new file mode 100644 index 00000000..6bcbd0b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextAnnotationDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseOutputTextAnnotationDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseOutputTextAnnotationDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseOutputTextAnnotationDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextType.g.cs new file mode 100644 index 00000000..ed8f9fd2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseOutputTextType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `output_text`.
+ /// Default Value: output_text + ///
+ public enum ResponseOutputTextType + { + /// + /// + /// + OutputText, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseOutputTextTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseOutputTextType value) + { + return value switch + { + ResponseOutputTextType.OutputText => "output_text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseOutputTextType? ToEnum(string value) + { + return value switch + { + "output_text" => ResponseOutputTextType.OutputText, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariables.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariables.g.cs index 16c5774c..59373dd3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariables.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariables.g.cs @@ -4,9 +4,7 @@ namespace tryAGI.OpenAI { /// - /// Optional map of values to substitute in for variables in your
- /// prompt. The substitution values can either be strings, or other
- /// Response input types like images or files. + /// ///
public sealed partial class ResponsePromptVariables { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.Json.g.cs new file mode 100644 index 00000000..088b663e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePromptVariablesPromptVariables + { + /// + /// 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::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePromptVariablesPromptVariables; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.g.cs new file mode 100644 index 00000000..9caba8da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePromptVariablesPromptVariables.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional map of values to substitute in for variables in your
+ /// prompt. The substitution values can either be strings, or other
+ /// Response input types like images or files. + ///
+ public sealed partial class ResponsePromptVariablesPromptVariables + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseProperties.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseProperties.g.cs index eaf16cb1..e3e5bd46 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseProperties.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseProperties.g.cs @@ -9,104 +9,96 @@ namespace tryAGI.OpenAI public sealed partial class ResponseProperties { /// - /// Whether to run the model response in the background.
- /// [Learn more](https://platform.openai.com/docs/guides/background).
- /// Default Value: false - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("background")] - public bool? Background { get; set; } - - /// - /// An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] - public int? MaxOutputTokens { get; set; } - - /// - /// The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_tool_calls")] - public int? MaxToolCalls { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("previous_response_id")] + public string? PreviousResponseId { get; set; } /// - /// Example: gpt-4o + /// Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model guide](/docs/models)
+ /// to browse and compare available models.
+ /// Example: gpt-5.1 ///
- /// gpt-4o + /// gpt-5.1 [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ModelIdsResponsesJsonConverter))] public global::tryAGI.OpenAI.ModelIdsResponses? Model { get; set; } /// - /// The unique ID of the previous response to the model. Use this to
- /// create multi-turn conversations. Learn more about
- /// [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("previous_response_id")] - public string? PreviousResponseId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning")] + public global::tryAGI.OpenAI.Reasoning? Reasoning { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("background")] + public bool? Background { get; set; } /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public global::tryAGI.OpenAI.Prompt2? Prompt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_output_tokens")] + public int? MaxOutputTokens { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("reasoning")] - public object? Reasoning { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("max_tool_calls")] + public int? MaxToolCalls { get; set; } /// /// Configuration options for a text response from the model. Can be plain
/// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) + /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) ///
[global::System.Text.Json.Serialization.JsonPropertyName("text")] - public global::tryAGI.OpenAI.ResponsePropertiesText? Text { get; set; } - - /// - /// How the model should select which tool (or tools) to use when generating
- /// a response. See the `tools` parameter to see how to specify which tools
- /// the model can call. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoice5JsonConverter))] - public global::tryAGI.OpenAI.ToolChoice5? ToolChoice { get; set; } + public global::tryAGI.OpenAI.ResponseTextParam? Text { get; set; } /// /// An array of tools the model may call while generating a response. You
/// can specify which tool to use by setting the `tool_choice` parameter.
/// We support the following categories of tools:
/// - **Built-in tools**: Tools that are provided by OpenAI that extend the
- /// model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// model's capabilities, like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search). Learn more about
+ /// [built-in tools](/docs/guides/tools).
/// - **MCP Tools**: Integrations with third-party systems via custom MCP servers
/// or predefined connectors such as Google Drive and SharePoint. Learn more about
- /// [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
+ /// [MCP Tools](/docs/guides/tools-connectors-mcp).
/// - **Function calls (custom tools)**: Functions that are defined by you,
/// enabling the model to call your own code with strongly typed arguments
/// and outputs. Learn more about
- /// [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
+ /// [function calling](/docs/guides/function-calling). You can also use
/// custom tools to call your own code. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tools")] public global::System.Collections.Generic.IList? Tools { get; set; } /// - /// The truncation strategy to use for the model response.
- /// - `auto`: If the input to this Response exceeds
- /// the model's context window size, the model will truncate the
- /// response to fit the context window by dropping items from the beginning of the conversation.
- /// - `disabled` (default): If the input size will exceed the context window
- /// size for a model, the request will fail with a 400 error.
- /// Default Value: disabled + /// How the model should select which tool (or tools) to use when generating
+ /// a response. See the `tools` parameter to see how to specify which tools
+ /// the model can call. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceParamJsonConverter))] + public global::tryAGI.OpenAI.ToolChoiceParam? ToolChoice { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public global::tryAGI.OpenAI.PromptVariant1? Prompt { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("truncation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponsePropertiesTruncationJsonConverter))] - public global::tryAGI.OpenAI.ResponsePropertiesTruncation? Truncation { get; set; } + public global::tryAGI.OpenAI.ResponsePropertiesTruncation2? Truncation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -117,93 +109,74 @@ public sealed partial class ResponseProperties /// /// Initializes a new instance of the class. /// - /// - /// Whether to run the model response in the background.
- /// [Learn more](https://platform.openai.com/docs/guides/background).
- /// Default Value: false - /// - /// - /// An upper bound for the number of tokens that can be generated for a response, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). - /// - /// - /// The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored. - /// + /// /// - /// Example: gpt-4o - /// - /// - /// The unique ID of the previous response to the model. Use this to
- /// create multi-turn conversations. Learn more about
- /// [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
+ /// offers a wide range of models with different capabilities, performance
+ /// characteristics, and price points. Refer to the [model guide](/docs/models)
+ /// to browse and compare available models.
+ /// Example: gpt-5.1 /// /// + /// + /// + /// /// /// Configuration options for a text response from the model. Can be plain
/// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) - /// - /// - /// How the model should select which tool (or tools) to use when generating
- /// a response. See the `tools` parameter to see how to specify which tools
- /// the model can call. + /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) /// /// /// An array of tools the model may call while generating a response. You
/// can specify which tool to use by setting the `tool_choice` parameter.
/// We support the following categories of tools:
/// - **Built-in tools**: Tools that are provided by OpenAI that extend the
- /// model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// model's capabilities, like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search). Learn more about
+ /// [built-in tools](/docs/guides/tools).
/// - **MCP Tools**: Integrations with third-party systems via custom MCP servers
/// or predefined connectors such as Google Drive and SharePoint. Learn more about
- /// [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
+ /// [MCP Tools](/docs/guides/tools-connectors-mcp).
/// - **Function calls (custom tools)**: Functions that are defined by you,
/// enabling the model to call your own code with strongly typed arguments
/// and outputs. Learn more about
- /// [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
+ /// [function calling](/docs/guides/function-calling). You can also use
/// custom tools to call your own code. /// - /// - /// The truncation strategy to use for the model response.
- /// - `auto`: If the input to this Response exceeds
- /// the model's context window size, the model will truncate the
- /// response to fit the context window by dropping items from the beginning of the conversation.
- /// - `disabled` (default): If the input size will exceed the context window
- /// size for a model, the request will fail with a 400 error.
- /// Default Value: disabled + /// + /// How the model should select which tool (or tools) to use when generating
+ /// a response. See the `tools` parameter to see how to specify which tools
+ /// the model can call. /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseProperties( + string? previousResponseId, + global::tryAGI.OpenAI.ModelIdsResponses? model, + global::tryAGI.OpenAI.Reasoning? reasoning, bool? background, int? maxOutputTokens, int? maxToolCalls, - global::tryAGI.OpenAI.ModelIdsResponses? model, - string? previousResponseId, - global::tryAGI.OpenAI.Prompt2? prompt, - object? reasoning, - global::tryAGI.OpenAI.ResponsePropertiesText? text, - global::tryAGI.OpenAI.ToolChoice5? toolChoice, + global::tryAGI.OpenAI.ResponseTextParam? text, global::System.Collections.Generic.IList? tools, - global::tryAGI.OpenAI.ResponsePropertiesTruncation? truncation) + global::tryAGI.OpenAI.ToolChoiceParam? toolChoice, + global::tryAGI.OpenAI.PromptVariant1? prompt, + global::tryAGI.OpenAI.ResponsePropertiesTruncation2? truncation) { + this.PreviousResponseId = previousResponseId; + this.Model = model; + this.Reasoning = reasoning; this.Background = background; this.MaxOutputTokens = maxOutputTokens; this.MaxToolCalls = maxToolCalls; - this.Model = model; - this.PreviousResponseId = previousResponseId; - this.Prompt = prompt; - this.Reasoning = reasoning; this.Text = text; - this.ToolChoice = toolChoice; this.Tools = tools; + this.ToolChoice = toolChoice; + this.Prompt = prompt; this.Truncation = truncation; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.Json.g.cs new file mode 100644 index 00000000..d58fe3bb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesBackground + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesBackground? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesBackground), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesBackground; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesBackground? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesBackground), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesBackground; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.g.cs new file mode 100644 index 00000000..fad0ba61 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesBackground.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsePropertiesBackground + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.Json.g.cs new file mode 100644 index 00000000..8140202b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesMaxOutputTokens + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesMaxOutputTokens; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.g.cs new file mode 100644 index 00000000..41bee89d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxOutputTokens.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsePropertiesMaxOutputTokens + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.Json.g.cs new file mode 100644 index 00000000..eb2eb6de --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesMaxToolCalls + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesMaxToolCalls; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.g.cs new file mode 100644 index 00000000..8a888aed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesMaxToolCalls.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsePropertiesMaxToolCalls + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.Json.g.cs new file mode 100644 index 00000000..bfa7c8dc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesPreviousResponseId + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesPreviousResponseId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.g.cs new file mode 100644 index 00000000..908ac4f0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesPreviousResponseId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsePropertiesPreviousResponseId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.Json.g.cs new file mode 100644 index 00000000..ffe0b443 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesReasoning + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesReasoning? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesReasoning), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesReasoning; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesReasoning? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesReasoning), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesReasoning; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.g.cs new file mode 100644 index 00000000..f66b1c84 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesReasoning.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsePropertiesReasoning + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.Json.g.cs deleted file mode 100644 index 776580c9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ResponsePropertiesText - { - /// - /// 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::tryAGI.OpenAI.ResponsePropertiesText? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ResponsePropertiesText), - jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesText; - } - - /// - /// 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::tryAGI.OpenAI.ResponsePropertiesText? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ResponsePropertiesText), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesText; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.g.cs deleted file mode 100644 index 44230848..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesText.g.cs +++ /dev/null @@ -1,83 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Configuration options for a text response from the model. Can be plain
- /// text or structured JSON data. Learn more:
- /// - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- /// - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs) - ///
- public sealed partial class ResponsePropertiesText - { - /// - /// An object specifying the format that the model must output.
- /// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
- /// which ensures the model will match your supplied JSON schema. Learn more in the
- /// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// The default format is `{ "type": "text" }` with no additional options.
- /// **Not recommended for gpt-4o and newer models:**
- /// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
- /// ensures the message the model generates is valid JSON. Using `json_schema`
- /// is preferred for models that support it. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatConfigurationJsonConverter))] - public global::tryAGI.OpenAI.TextResponseFormatConfiguration? Format { get; set; } - - /// - /// Constrains the verbosity of the model's response. Lower values will result in
- /// more concise responses, while higher values will result in more verbose responses.
- /// Currently supported values are `low`, `medium`, and `high`.
- /// Default Value: medium - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("verbosity")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VerbosityJsonConverter))] - public global::tryAGI.OpenAI.Verbosity? Verbosity { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An object specifying the format that the model must output.
- /// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
- /// which ensures the model will match your supplied JSON schema. Learn more in the
- /// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// The default format is `{ "type": "text" }` with no additional options.
- /// **Not recommended for gpt-4o and newer models:**
- /// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
- /// ensures the message the model generates is valid JSON. Using `json_schema`
- /// is preferred for models that support it. - /// - /// - /// Constrains the verbosity of the model's response. Lower values will result in
- /// more concise responses, while higher values will result in more verbose responses.
- /// Currently supported values are `low`, `medium`, and `high`.
- /// Default Value: medium - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ResponsePropertiesText( - global::tryAGI.OpenAI.TextResponseFormatConfiguration? format, - global::tryAGI.OpenAI.Verbosity? verbosity) - { - this.Format = format; - this.Verbosity = verbosity; - } - - /// - /// Initializes a new instance of the class. - /// - public ResponsePropertiesText() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.Json.g.cs deleted file mode 100644 index f6efa6db..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ResponsePropertiesToolChoiceDiscriminator - { - /// - /// 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::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesToolChoiceDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.g.cs deleted file mode 100644 index 2b350a4f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesToolChoiceDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class ResponsePropertiesToolChoiceDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ResponsePropertiesToolChoiceDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public ResponsePropertiesToolChoiceDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.Json.g.cs new file mode 100644 index 00000000..f933dfef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsePropertiesTruncation + { + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesTruncation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsePropertiesTruncation), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsePropertiesTruncation; + } + + /// + /// 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::tryAGI.OpenAI.ResponsePropertiesTruncation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsePropertiesTruncation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsePropertiesTruncation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.g.cs index b48f1afd..2b0a5a95 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation.g.cs @@ -4,54 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The truncation strategy to use for the model response.
- /// - `auto`: If the input to this Response exceeds
- /// the model's context window size, the model will truncate the
- /// response to fit the context window by dropping items from the beginning of the conversation.
- /// - `disabled` (default): If the input size will exceed the context window
- /// size for a model, the request will fail with a 400 error.
- /// Default Value: disabled + /// ///
- public enum ResponsePropertiesTruncation + public sealed partial class ResponsePropertiesTruncation { - /// - /// If the input to this Response exceeds - /// - Auto, - /// - /// If the input size will exceed the context window - /// - Disabled, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ResponsePropertiesTruncationExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ResponsePropertiesTruncation value) - { - return value switch - { - ResponsePropertiesTruncation.Auto => "auto", - ResponsePropertiesTruncation.Disabled => "disabled", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ResponsePropertiesTruncation? ToEnum(string value) - { - return value switch - { - "auto" => ResponsePropertiesTruncation.Auto, - "disabled" => ResponsePropertiesTruncation.Disabled, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation2.g.cs new file mode 100644 index 00000000..92ad7cc0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsePropertiesTruncation2.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The truncation strategy to use for the model response.
+ /// - `auto`: If the input to this Response exceeds
+ /// the model's context window size, the model will truncate the
+ /// response to fit the context window by dropping items from the beginning of the conversation.
+ /// - `disabled` (default): If the input size will exceed the context window
+ /// size for a model, the request will fail with a 400 error.
+ /// Default Value: disabled + ///
+ public enum ResponsePropertiesTruncation2 + { + /// + /// If the input to this Response exceeds + /// + Auto, + /// + /// If the input size will exceed the context window + /// + Disabled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponsePropertiesTruncation2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponsePropertiesTruncation2 value) + { + return value switch + { + ResponsePropertiesTruncation2.Auto => "auto", + ResponsePropertiesTruncation2.Disabled => "disabled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponsePropertiesTruncation2? ToEnum(string value) + { + return value switch + { + "auto" => ResponsePropertiesTruncation2.Auto, + "disabled" => ResponsePropertiesTruncation2.Disabled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseQueuedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseQueuedEvent.g.cs index f9284dfc..6e5935fc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseQueuedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseQueuedEvent.g.cs @@ -9,8 +9,17 @@ namespace tryAGI.OpenAI public sealed partial class ResponseQueuedEvent { /// - /// + /// The type of the event. Always 'response.queued'. /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseQueuedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseQueuedEventType Type { get; set; } + + /// + /// The full response object that is queued.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + ///
+ /// {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} [global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] @@ -23,13 +32,6 @@ public sealed partial class ResponseQueuedEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always 'response.queued'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseQueuedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseQueuedEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -39,13 +41,16 @@ public sealed partial class ResponseQueuedEvent /// /// Initializes a new instance of the class. /// - /// - /// - /// The sequence number for this event. - /// /// /// The type of the event. Always 'response.queued'. /// + /// + /// The full response object that is queued.
+ /// Example: {"id":"resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41","object":"response","created_at":1741476777,"status":"completed","completed_at":1741476778,"error":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","incomplete_details":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","instructions":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","max_output_tokens":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","model":"gpt-4o-2024-08-06","output":[{"type":"message","id":"msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41","status":"completed","role":"assistant","content":[{"type":"output_text","text":"The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","reasoning":{"effort":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","summary":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464"},"store":true,"temperature":1,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":328,"input_tokens_details":{"cached_tokens":0},"output_tokens":52,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":380},"user":"openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464","metadata":{}} + /// + /// + /// The sequence number for this event. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEvent.g.cs index 2dd6075a..1ba38db9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class ResponseReasoningSummaryPartAddedEvent { + /// + /// The type of the event. Always `response.reasoning_summary_part.added`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventType Type { get; set; } + /// /// The ID of the item this summary part is associated with. /// @@ -23,11 +30,11 @@ public sealed partial class ResponseReasoningSummaryPartAddedEvent public required int OutputIndex { get; set; } /// - /// The summary part that was added. + /// The index of the summary part within the reasoning summary. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart Part { get; set; } + public required int SummaryIndex { get; set; } /// /// The sequence number of this event. @@ -37,18 +44,11 @@ public sealed partial class ResponseReasoningSummaryPartAddedEvent public required int SequenceNumber { get; set; } /// - /// The index of the summary part within the reasoning summary. + /// The summary part that was added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SummaryIndex { get; set; } - - /// - /// The type of the event. Always `response.reasoning_summary_part.added`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventType Type { get; set; } + public required global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,23 +59,23 @@ public sealed partial class ResponseReasoningSummaryPartAddedEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `response.reasoning_summary_part.added`. + /// /// /// The ID of the item this summary part is associated with. /// /// /// The index of the output item this summary part is associated with. /// - /// - /// The summary part that was added. + /// + /// The index of the summary part within the reasoning summary. /// /// /// The sequence number of this event. /// - /// - /// The index of the summary part within the reasoning summary. - /// - /// - /// The type of the event. Always `response.reasoning_summary_part.added`. + /// + /// The summary part that was added. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public sealed partial class ResponseReasoningSummaryPartAddedEvent public ResponseReasoningSummaryPartAddedEvent( string itemId, int outputIndex, - global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart part, - int sequenceNumber, int summaryIndex, + int sequenceNumber, + global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPart part, global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventType type) { this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.SequenceNumber = sequenceNumber; this.SummaryIndex = summaryIndex; + this.SequenceNumber = sequenceNumber; + this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEventPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEventPart.g.cs index 0382ad06..f9cb2537 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEventPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartAddedEventPart.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseReasoningSummaryPartAddedEventPart { - /// - /// The text of the summary part. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the summary part. Always `summary_text`. /// @@ -22,6 +15,13 @@ public sealed partial class ResponseReasoningSummaryPartAddedEventPart [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartAddedEventPartTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEventPartType Type { get; set; } + /// + /// The text of the summary part. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ResponseReasoningSummaryPartAddedEventPart /// /// Initializes a new instance of the class. /// - /// - /// The text of the summary part. - /// /// /// The type of the summary part. Always `summary_text`. /// + /// + /// The text of the summary part. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEvent.g.cs index 79e791a8..976a2fcc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseReasoningSummaryPartDoneEvent { + /// + /// The type of the event. Always `response.reasoning_summary_part.done`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventType Type { get; set; } + /// /// The ID of the item this summary part is associated with. /// @@ -23,11 +30,11 @@ public sealed partial class ResponseReasoningSummaryPartDoneEvent public required int OutputIndex { get; set; } /// - /// The completed summary part. + /// The index of the summary part within the reasoning summary. /// - [global::System.Text.Json.Serialization.JsonPropertyName("part")] + [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart Part { get; set; } + public required int SummaryIndex { get; set; } /// /// The sequence number of this event. @@ -37,18 +44,11 @@ public sealed partial class ResponseReasoningSummaryPartDoneEvent public required int SequenceNumber { get; set; } /// - /// The index of the summary part within the reasoning summary. + /// The completed summary part. /// - [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("part")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SummaryIndex { get; set; } - - /// - /// The type of the event. Always `response.reasoning_summary_part.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventType Type { get; set; } + public required global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart Part { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,23 +59,23 @@ public sealed partial class ResponseReasoningSummaryPartDoneEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `response.reasoning_summary_part.done`. + /// /// /// The ID of the item this summary part is associated with. /// /// /// The index of the output item this summary part is associated with. /// - /// - /// The completed summary part. + /// + /// The index of the summary part within the reasoning summary. /// /// /// The sequence number of this event. /// - /// - /// The index of the summary part within the reasoning summary. - /// - /// - /// The type of the event. Always `response.reasoning_summary_part.done`. + /// + /// The completed summary part. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public sealed partial class ResponseReasoningSummaryPartDoneEvent public ResponseReasoningSummaryPartDoneEvent( string itemId, int outputIndex, - global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart part, - int sequenceNumber, int summaryIndex, + int sequenceNumber, + global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPart part, global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventType type) { this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); - this.SequenceNumber = sequenceNumber; this.SummaryIndex = summaryIndex; + this.SequenceNumber = sequenceNumber; + this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEventPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEventPart.g.cs index 3d4c32de..a2d4dc7c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEventPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryPartDoneEventPart.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseReasoningSummaryPartDoneEventPart { - /// - /// The text of the summary part. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the summary part. Always `summary_text`. /// @@ -22,6 +15,13 @@ public sealed partial class ResponseReasoningSummaryPartDoneEventPart [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryPartDoneEventPartTypeJsonConverter))] public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEventPartType Type { get; set; } + /// + /// The text of the summary part. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ResponseReasoningSummaryPartDoneEventPart /// /// Initializes a new instance of the class. /// - /// - /// The text of the summary part. - /// /// /// The type of the summary part. Always `summary_text`. /// + /// + /// The text of the summary part. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDeltaEvent.g.cs index 5f95ccdc..85108d01 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDeltaEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseReasoningSummaryTextDeltaEvent { /// - /// The text delta that was added to the summary. + /// The type of the event. Always `response.reasoning_summary_text.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEventType Type { get; set; } /// /// The ID of the item this summary text delta is associated with. @@ -30,25 +30,25 @@ public sealed partial class ResponseReasoningSummaryTextDeltaEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The index of the summary part within the reasoning summary. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int SummaryIndex { get; set; } /// - /// The index of the summary part within the reasoning summary. + /// The text delta that was added to the summary. /// - [global::System.Text.Json.Serialization.JsonPropertyName("summary_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SummaryIndex { get; set; } + public required string Delta { get; set; } /// - /// The type of the event. Always `response.reasoning_summary_text.delta`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,8 +59,8 @@ public sealed partial class ResponseReasoningSummaryTextDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The text delta that was added to the summary. + /// + /// The type of the event. Always `response.reasoning_summary_text.delta`. /// /// /// The ID of the item this summary text delta is associated with. @@ -68,31 +68,31 @@ public sealed partial class ResponseReasoningSummaryTextDeltaEvent /// /// The index of the output item this summary text delta is associated with. /// - /// - /// The sequence number of this event. - /// /// /// The index of the summary part within the reasoning summary. /// - /// - /// The type of the event. Always `response.reasoning_summary_text.delta`. + /// + /// The text delta that was added to the summary. + /// + /// + /// The sequence number of this event. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseReasoningSummaryTextDeltaEvent( - string delta, string itemId, int outputIndex, - int sequenceNumber, int summaryIndex, + string delta, + int sequenceNumber, global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEventType type) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.SequenceNumber = sequenceNumber; this.SummaryIndex = summaryIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); + this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDoneEvent.g.cs index a888ce2a..3cef59c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningSummaryTextDoneEvent.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class ResponseReasoningSummaryTextDoneEvent { + /// + /// The type of the event. Always `response.reasoning_summary_text.done`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEventType Type { get; set; } + /// /// The ID of the item this summary text is associated with. /// @@ -22,13 +29,6 @@ public sealed partial class ResponseReasoningSummaryTextDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required int OutputIndex { get; set; } - /// - /// The sequence number of this event. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } - /// /// The index of the summary part within the reasoning summary. /// @@ -44,11 +44,11 @@ public sealed partial class ResponseReasoningSummaryTextDoneEvent public required string Text { get; set; } /// - /// The type of the event. Always `response.reasoning_summary_text.done`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningSummaryTextDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,23 +59,23 @@ public sealed partial class ResponseReasoningSummaryTextDoneEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `response.reasoning_summary_text.done`. + /// /// /// The ID of the item this summary text is associated with. /// /// /// The index of the output item this summary text is associated with. /// - /// - /// The sequence number of this event. - /// /// /// The index of the summary part within the reasoning summary. /// /// /// The full text of the completed reasoning summary. /// - /// - /// The type of the event. Always `response.reasoning_summary_text.done`. + /// + /// The sequence number of this event. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -83,16 +83,16 @@ public sealed partial class ResponseReasoningSummaryTextDoneEvent public ResponseReasoningSummaryTextDoneEvent( string itemId, int outputIndex, - int sequenceNumber, int summaryIndex, string text, + int sequenceNumber, global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEventType type) { this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.SequenceNumber = sequenceNumber; this.SummaryIndex = summaryIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDeltaEvent.g.cs index 9361fd08..ec116338 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDeltaEvent.g.cs @@ -9,18 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseReasoningTextDeltaEvent { /// - /// The index of the reasoning content part this delta is associated with. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - - /// - /// The text delta that was added to the reasoning content. + /// The type of the event. Always `response.reasoning_text.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningTextDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEventType Type { get; set; } /// /// The ID of the item this reasoning text delta is associated with. @@ -37,18 +30,25 @@ public sealed partial class ResponseReasoningTextDeltaEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The index of the reasoning content part this delta is associated with. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int ContentIndex { get; set; } /// - /// The type of the event. Always `response.reasoning_text.delta`. + /// The text delta that was added to the reasoning content. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningTextDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } + + /// + /// The sequence number of this event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,11 +59,8 @@ public sealed partial class ResponseReasoningTextDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the reasoning content part this delta is associated with. - /// - /// - /// The text delta that was added to the reasoning content. + /// + /// The type of the event. Always `response.reasoning_text.delta`. /// /// /// The ID of the item this reasoning text delta is associated with. @@ -71,27 +68,30 @@ public sealed partial class ResponseReasoningTextDeltaEvent /// /// The index of the output item this reasoning text delta is associated with. /// + /// + /// The index of the reasoning content part this delta is associated with. + /// + /// + /// The text delta that was added to the reasoning content. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.reasoning_text.delta`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseReasoningTextDeltaEvent( - int contentIndex, - string delta, string itemId, int outputIndex, + int contentIndex, + string delta, int sequenceNumber, global::tryAGI.OpenAI.ResponseReasoningTextDeltaEventType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDoneEvent.g.cs index 4c4d8b05..cbf8a4ea 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseReasoningTextDoneEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseReasoningTextDoneEvent { /// - /// The index of the reasoning content part. + /// The type of the event. Always `response.reasoning_text.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningTextDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseReasoningTextDoneEventType Type { get; set; } /// /// The ID of the item this reasoning text is associated with. @@ -30,11 +30,11 @@ public sealed partial class ResponseReasoningTextDoneEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The index of the reasoning content part. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int ContentIndex { get; set; } /// /// The full text of the completed reasoning content. @@ -44,11 +44,11 @@ public sealed partial class ResponseReasoningTextDoneEvent public required string Text { get; set; } /// - /// The type of the event. Always `response.reasoning_text.done`. + /// The sequence number of this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseReasoningTextDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseReasoningTextDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,8 +59,8 @@ public sealed partial class ResponseReasoningTextDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the reasoning content part. + /// + /// The type of the event. Always `response.reasoning_text.done`. /// /// /// The ID of the item this reasoning text is associated with. @@ -68,31 +68,31 @@ public sealed partial class ResponseReasoningTextDoneEvent /// /// The index of the output item this reasoning text is associated with. /// - /// - /// The sequence number of this event. + /// + /// The index of the reasoning content part. /// /// /// The full text of the completed reasoning content. /// - /// - /// The type of the event. Always `response.reasoning_text.done`. + /// + /// The sequence number of this event. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseReasoningTextDoneEvent( - int contentIndex, string itemId, int outputIndex, - int sequenceNumber, + int contentIndex, string text, + int sequenceNumber, global::tryAGI.OpenAI.ResponseReasoningTextDoneEventType type) { - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; - this.SequenceNumber = sequenceNumber; + this.ContentIndex = contentIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDeltaEvent.g.cs index 68386a5e..09b09780 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDeltaEvent.g.cs @@ -9,18 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseRefusalDeltaEvent { /// - /// The index of the content part that the refusal text is added to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } - - /// - /// The refusal text that is added. + /// The type of the event. Always `response.refusal.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseRefusalDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseRefusalDeltaEventType Type { get; set; } /// /// The ID of the output item that the refusal text is added to. @@ -37,18 +30,25 @@ public sealed partial class ResponseRefusalDeltaEvent public required int OutputIndex { get; set; } /// - /// The sequence number of this event. + /// The index of the content part that the refusal text is added to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int ContentIndex { get; set; } /// - /// The type of the event. Always `response.refusal.delta`. + /// The refusal text that is added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseRefusalDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseRefusalDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Delta { get; set; } + + /// + /// The sequence number of this event. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -59,11 +59,8 @@ public sealed partial class ResponseRefusalDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that the refusal text is added to. - /// - /// - /// The refusal text that is added. + /// + /// The type of the event. Always `response.refusal.delta`. /// /// /// The ID of the output item that the refusal text is added to. @@ -71,27 +68,30 @@ public sealed partial class ResponseRefusalDeltaEvent /// /// The index of the output item that the refusal text is added to. /// + /// + /// The index of the content part that the refusal text is added to. + /// + /// + /// The refusal text that is added. + /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.refusal.delta`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseRefusalDeltaEvent( - int contentIndex, - string delta, string itemId, int outputIndex, + int contentIndex, + string delta, int sequenceNumber, global::tryAGI.OpenAI.ResponseRefusalDeltaEventType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDoneEvent.g.cs index 87723478..a3ca6c7a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseRefusalDoneEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseRefusalDoneEvent { /// - /// The index of the content part that the refusal text is finalized. + /// The type of the event. Always `response.refusal.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseRefusalDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseRefusalDoneEventType Type { get; set; } /// /// The ID of the output item that the refusal text is finalized. @@ -29,6 +29,13 @@ public sealed partial class ResponseRefusalDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required int OutputIndex { get; set; } + /// + /// The index of the content part that the refusal text is finalized. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ContentIndex { get; set; } + /// /// The refusal text that is finalized. /// @@ -43,13 +50,6 @@ public sealed partial class ResponseRefusalDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required int SequenceNumber { get; set; } - /// - /// The type of the event. Always `response.refusal.done`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseRefusalDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseRefusalDoneEventType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,8 +59,8 @@ public sealed partial class ResponseRefusalDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that the refusal text is finalized. + /// + /// The type of the event. Always `response.refusal.done`. /// /// /// The ID of the output item that the refusal text is finalized. @@ -68,29 +68,29 @@ public sealed partial class ResponseRefusalDoneEvent /// /// The index of the output item that the refusal text is finalized. /// + /// + /// The index of the content part that the refusal text is finalized. + /// /// /// The refusal text that is finalized. /// /// /// The sequence number of this event. /// - /// - /// The type of the event. Always `response.refusal.done`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseRefusalDoneEvent( - int contentIndex, string itemId, int outputIndex, + int contentIndex, string refusal, int sequenceNumber, global::tryAGI.OpenAI.ResponseRefusalDoneEventType type) { - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; this.Refusal = refusal ?? throw new global::System.ArgumentNullException(nameof(refusal)); this.SequenceNumber = sequenceNumber; this.Type = type; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamEvent.g.cs index 176be388..c67c1a10 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamEvent.g.cs @@ -13,1278 +13,1549 @@ namespace tryAGI.OpenAI /// Emitted when there is a partial audio response. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? AudioDelta { get; init; } + public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? ResponseAudioDelta { get; init; } #else - public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? AudioDelta { get; } + public global::tryAGI.OpenAI.ResponseAudioDeltaEvent? ResponseAudioDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioDelta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDelta))] #endif - public bool IsAudioDelta => AudioDelta != null; + public bool IsResponseAudioDelta => ResponseAudioDelta != null; /// - /// + /// Emitted when the audio response is complete. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioDeltaEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseAudioDoneEvent? ResponseAudioDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseAudioDoneEvent? ResponseAudioDone { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseAudioDeltaEvent?(ResponseStreamEvent @this) => @this.AudioDelta; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioDone))] +#endif + public bool IsResponseAudioDone => ResponseAudioDone != null; + + /// + /// Emitted when there is a partial transcript of audio. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? ResponseAudioTranscriptDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? ResponseAudioTranscriptDelta { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDeltaEvent? value) - { - AudioDelta = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDelta))] +#endif + public bool IsResponseAudioTranscriptDelta => ResponseAudioTranscriptDelta != null; /// - /// Emitted when the audio response is complete. + /// Emitted when the full audio transcript is completed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseAudioDoneEvent? AudioDone { get; init; } + public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? ResponseAudioTranscriptDone { get; init; } #else - public global::tryAGI.OpenAI.ResponseAudioDoneEvent? AudioDone { get; } + public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? ResponseAudioTranscriptDone { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioDone))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseAudioTranscriptDone))] #endif - public bool IsAudioDone => AudioDone != null; + public bool IsResponseAudioTranscriptDone => ResponseAudioTranscriptDone != null; /// - /// + /// Emitted when a partial code snippet is streamed by the code interpreter. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioDoneEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? ResponseCodeInterpreterCallCodeDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? ResponseCodeInterpreterCallCodeDelta { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseAudioDoneEvent?(ResponseStreamEvent @this) => @this.AudioDone; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCodeInterpreterCallCodeDelta))] +#endif + public bool IsResponseCodeInterpreterCallCodeDelta => ResponseCodeInterpreterCallCodeDelta != null; + + /// + /// Emitted when the code snippet is finalized by the code interpreter. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? ResponseCodeInterpreterCallCodeDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? ResponseCodeInterpreterCallCodeDone { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDoneEvent? value) - { - AudioDone = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCodeInterpreterCallCodeDone))] +#endif + public bool IsResponseCodeInterpreterCallCodeDone => ResponseCodeInterpreterCallCodeDone != null; /// - /// Emitted when there is a partial transcript of audio. + /// Emitted when the code interpreter call is completed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? AudioTranscriptDelta { get; init; } + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? ResponseCodeInterpreterCallCompleted { get; init; } #else - public global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? AudioTranscriptDelta { get; } + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? ResponseCodeInterpreterCallCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioTranscriptDelta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCodeInterpreterCallCompleted))] #endif - public bool IsAudioTranscriptDelta => AudioTranscriptDelta != null; + public bool IsResponseCodeInterpreterCallCompleted => ResponseCodeInterpreterCallCompleted != null; /// - /// + /// Emitted when a code interpreter call is in progress. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? ResponseCodeInterpreterCallInProgress { get; init; } +#else + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? ResponseCodeInterpreterCallInProgress { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent?(ResponseStreamEvent @this) => @this.AudioTranscriptDelta; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCodeInterpreterCallInProgress))] +#endif + public bool IsResponseCodeInterpreterCallInProgress => ResponseCodeInterpreterCallInProgress != null; + + /// + /// Emitted when the code interpreter is actively interpreting the code snippet. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? ResponseCodeInterpreterCallInterpreting { get; init; } +#else + public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? ResponseCodeInterpreterCallInterpreting { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? value) - { - AudioTranscriptDelta = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCodeInterpreterCallInterpreting))] +#endif + public bool IsResponseCodeInterpreterCallInterpreting => ResponseCodeInterpreterCallInterpreting != null; /// - /// Emitted when the full audio transcript is completed. + /// Emitted when the model response is complete. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? AudioTranscriptDone { get; init; } + public global::tryAGI.OpenAI.ResponseCompletedEvent? ResponseCompleted { get; init; } #else - public global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? AudioTranscriptDone { get; } + public global::tryAGI.OpenAI.ResponseCompletedEvent? ResponseCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioTranscriptDone))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCompleted))] #endif - public bool IsAudioTranscriptDone => AudioTranscriptDone != null; + public bool IsResponseCompleted => ResponseCompleted != null; /// - /// + /// Emitted when a new content part is added. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? ResponseContentPartAdded { get; init; } +#else + public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? ResponseContentPartAdded { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent?(ResponseStreamEvent @this) => @this.AudioTranscriptDone; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartAdded))] +#endif + public bool IsResponseContentPartAdded => ResponseContentPartAdded != null; + + /// + /// Emitted when a content part is done. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? ResponseContentPartDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? ResponseContentPartDone { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? value) - { - AudioTranscriptDone = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseContentPartDone))] +#endif + public bool IsResponseContentPartDone => ResponseContentPartDone != null; /// - /// Emitted when a partial code snippet is streamed by the code interpreter. + /// An event that is emitted when a response is created. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? CodeInterpreterCallDelta { get; init; } + public global::tryAGI.OpenAI.ResponseCreatedEvent? ResponseCreated { get; init; } #else - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? CodeInterpreterCallDelta { get; } + public global::tryAGI.OpenAI.ResponseCreatedEvent? ResponseCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCallDelta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCreated))] #endif - public bool IsCodeInterpreterCallDelta => CodeInterpreterCallDelta != null; + public bool IsResponseCreated => ResponseCreated != null; /// - /// + /// Emitted when an error occurs. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseErrorEvent? Error { get; init; } +#else + public global::tryAGI.OpenAI.ResponseErrorEvent? Error { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent?(ResponseStreamEvent @this) => @this.CodeInterpreterCallDelta; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] +#endif + public bool IsError => Error != null; + + /// + /// Emitted when a file search call is completed (results found). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? ResponseFileSearchCallCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? ResponseFileSearchCallCompleted { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? value) - { - CodeInterpreterCallDelta = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFileSearchCallCompleted))] +#endif + public bool IsResponseFileSearchCallCompleted => ResponseFileSearchCallCompleted != null; /// - /// Emitted when the code snippet is finalized by the code interpreter. + /// Emitted when a file search call is initiated. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? CodeInterpreterCallDone { get; init; } + public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? ResponseFileSearchCallInProgress { get; init; } #else - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? CodeInterpreterCallDone { get; } + public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? ResponseFileSearchCallInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCallDone))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFileSearchCallInProgress))] #endif - public bool IsCodeInterpreterCallDone => CodeInterpreterCallDone != null; + public bool IsResponseFileSearchCallInProgress => ResponseFileSearchCallInProgress != null; /// - /// + /// Emitted when a file search is currently searching. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? ResponseFileSearchCallSearching { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? ResponseFileSearchCallSearching { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent?(ResponseStreamEvent @this) => @this.CodeInterpreterCallDone; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFileSearchCallSearching))] +#endif + public bool IsResponseFileSearchCallSearching => ResponseFileSearchCallSearching != null; + + /// + /// Emitted when there is a partial function-call arguments delta. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? ResponseFunctionCallArgumentsDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? ResponseFunctionCallArgumentsDelta { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? value) - { - CodeInterpreterCallDone = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDelta))] +#endif + public bool IsResponseFunctionCallArgumentsDelta => ResponseFunctionCallArgumentsDelta != null; /// - /// Emitted when the code interpreter call is completed. + /// Emitted when function-call arguments are finalized. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? CodeInterpreterCallCompleted { get; init; } + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? ResponseFunctionCallArgumentsDone { get; init; } #else - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? CodeInterpreterCallCompleted { get; } + public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? ResponseFunctionCallArgumentsDone { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCallCompleted))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFunctionCallArgumentsDone))] #endif - public bool IsCodeInterpreterCallCompleted => CodeInterpreterCallCompleted != null; + public bool IsResponseFunctionCallArgumentsDone => ResponseFunctionCallArgumentsDone != null; /// - /// + /// Emitted when the response is in progress. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseInProgressEvent? ResponseInProgress { get; init; } +#else + public global::tryAGI.OpenAI.ResponseInProgressEvent? ResponseInProgress { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent?(ResponseStreamEvent @this) => @this.CodeInterpreterCallCompleted; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseInProgress))] +#endif + public bool IsResponseInProgress => ResponseInProgress != null; + + /// + /// An event that is emitted when a response fails. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseFailedEvent? ResponseFailed { get; init; } +#else + public global::tryAGI.OpenAI.ResponseFailedEvent? ResponseFailed { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? value) - { - CodeInterpreterCallCompleted = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseFailed))] +#endif + public bool IsResponseFailed => ResponseFailed != null; /// - /// Emitted when a code interpreter call is in progress. + /// An event that is emitted when a response finishes as incomplete. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? CodeInterpreterCallInProgress { get; init; } + public global::tryAGI.OpenAI.ResponseIncompleteEvent? ResponseIncomplete { get; init; } #else - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? CodeInterpreterCallInProgress { get; } + public global::tryAGI.OpenAI.ResponseIncompleteEvent? ResponseIncomplete { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCallInProgress))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseIncomplete))] #endif - public bool IsCodeInterpreterCallInProgress => CodeInterpreterCallInProgress != null; + public bool IsResponseIncomplete => ResponseIncomplete != null; /// - /// + /// Emitted when a new output item is added. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? ResponseOutputItemAdded { get; init; } +#else + public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? ResponseOutputItemAdded { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent?(ResponseStreamEvent @this) => @this.CodeInterpreterCallInProgress; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemAdded))] +#endif + public bool IsResponseOutputItemAdded => ResponseOutputItemAdded != null; + + /// + /// Emitted when an output item is marked done. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? ResponseOutputItemDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? ResponseOutputItemDone { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? value) - { - CodeInterpreterCallInProgress = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputItemDone))] +#endif + public bool IsResponseOutputItemDone => ResponseOutputItemDone != null; /// - /// Emitted when the code interpreter is actively interpreting the code snippet. + /// Emitted when a new reasoning summary part is added. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? CodeInterpreterCallInterpreting { get; init; } + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? ResponseReasoningSummaryPartAdded { get; init; } #else - public global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? CodeInterpreterCallInterpreting { get; } + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? ResponseReasoningSummaryPartAdded { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreterCallInterpreting))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningSummaryPartAdded))] #endif - public bool IsCodeInterpreterCallInterpreting => CodeInterpreterCallInterpreting != null; + public bool IsResponseReasoningSummaryPartAdded => ResponseReasoningSummaryPartAdded != null; /// - /// + /// Emitted when a reasoning summary part is completed. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? ResponseReasoningSummaryPartDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? ResponseReasoningSummaryPartDone { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent?(ResponseStreamEvent @this) => @this.CodeInterpreterCallInterpreting; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningSummaryPartDone))] +#endif + public bool IsResponseReasoningSummaryPartDone => ResponseReasoningSummaryPartDone != null; + + /// + /// Emitted when a delta is added to a reasoning summary text. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? ResponseReasoningSummaryTextDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? ResponseReasoningSummaryTextDelta { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? value) - { - CodeInterpreterCallInterpreting = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningSummaryTextDelta))] +#endif + public bool IsResponseReasoningSummaryTextDelta => ResponseReasoningSummaryTextDelta != null; /// - /// Emitted when the model response is complete. + /// Emitted when a reasoning summary text is completed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCompletedEvent? Completed { get; init; } + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? ResponseReasoningSummaryTextDone { get; init; } #else - public global::tryAGI.OpenAI.ResponseCompletedEvent? Completed { get; } + public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? ResponseReasoningSummaryTextDone { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Completed))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningSummaryTextDone))] #endif - public bool IsCompleted => Completed != null; + public bool IsResponseReasoningSummaryTextDone => ResponseReasoningSummaryTextDone != null; /// - /// + /// Emitted when a delta is added to a reasoning text. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCompletedEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? ResponseReasoningTextDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? ResponseReasoningTextDelta { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCompletedEvent?(ResponseStreamEvent @this) => @this.Completed; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningTextDelta))] +#endif + public bool IsResponseReasoningTextDelta => ResponseReasoningTextDelta != null; + + /// + /// Emitted when a reasoning text is completed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? ResponseReasoningTextDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? ResponseReasoningTextDone { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCompletedEvent? value) - { - Completed = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseReasoningTextDone))] +#endif + public bool IsResponseReasoningTextDone => ResponseReasoningTextDone != null; /// - /// Emitted when a new content part is added. + /// Emitted when there is a partial refusal text. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? ContentPartAdded { get; init; } + public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? ResponseRefusalDelta { get; init; } #else - public global::tryAGI.OpenAI.ResponseContentPartAddedEvent? ContentPartAdded { get; } + public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? ResponseRefusalDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentPartAdded))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseRefusalDelta))] #endif - public bool IsContentPartAdded => ContentPartAdded != null; + public bool IsResponseRefusalDelta => ResponseRefusalDelta != null; /// - /// + /// Emitted when refusal text is finalized. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseContentPartAddedEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? ResponseRefusalDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? ResponseRefusalDone { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseContentPartAddedEvent?(ResponseStreamEvent @this) => @this.ContentPartAdded; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseRefusalDone))] +#endif + public bool IsResponseRefusalDone => ResponseRefusalDone != null; + + /// + /// Emitted when there is an additional text delta. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseTextDeltaEvent? ResponseOutputTextDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseTextDeltaEvent? ResponseOutputTextDelta { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartAddedEvent? value) - { - ContentPartAdded = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputTextDelta))] +#endif + public bool IsResponseOutputTextDelta => ResponseOutputTextDelta != null; /// - /// Emitted when a content part is done. + /// Emitted when text content is finalized. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? ContentPartDone { get; init; } + public global::tryAGI.OpenAI.ResponseTextDoneEvent? ResponseOutputTextDone { get; init; } #else - public global::tryAGI.OpenAI.ResponseContentPartDoneEvent? ContentPartDone { get; } + public global::tryAGI.OpenAI.ResponseTextDoneEvent? ResponseOutputTextDone { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentPartDone))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputTextDone))] #endif - public bool IsContentPartDone => ContentPartDone != null; + public bool IsResponseOutputTextDone => ResponseOutputTextDone != null; /// - /// + /// Emitted when a web search call is completed. /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseContentPartDoneEvent?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? ResponseWebSearchCallCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? ResponseWebSearchCallCompleted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseContentPartDoneEvent?(ResponseStreamEvent @this) => @this.ContentPartDone; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseWebSearchCallCompleted))] +#endif + public bool IsResponseWebSearchCallCompleted => ResponseWebSearchCallCompleted != null; + + /// + /// Emitted when a web search call is initiated. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? ResponseWebSearchCallInProgress { get; init; } +#else + public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? ResponseWebSearchCallInProgress { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartDoneEvent? value) - { - ContentPartDone = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseWebSearchCallInProgress))] +#endif + public bool IsResponseWebSearchCallInProgress => ResponseWebSearchCallInProgress != null; /// - /// An event that is emitted when a response is created. + /// Emitted when a web search call is executing. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCreatedEvent? Created { get; init; } + public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? ResponseWebSearchCallSearching { get; init; } #else - public global::tryAGI.OpenAI.ResponseCreatedEvent? Created { get; } + public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? ResponseWebSearchCallSearching { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Created))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseWebSearchCallSearching))] +#endif + public bool IsResponseWebSearchCallSearching => ResponseWebSearchCallSearching != null; + + /// + /// Emitted when an image generation tool call has completed and the final image is available. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? ResponseImageGenerationCallCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? ResponseImageGenerationCallCompleted { get; } #endif - public bool IsCreated => Created != null; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCreatedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCreatedEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseImageGenerationCallCompleted))] +#endif + public bool IsResponseImageGenerationCallCompleted => ResponseImageGenerationCallCompleted != null; + + /// + /// Emitted when an image generation tool call is actively generating an image (intermediate state). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? ResponseImageGenerationCallGenerating { get; init; } +#else + public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? ResponseImageGenerationCallGenerating { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCreatedEvent?(ResponseStreamEvent @this) => @this.Created; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseImageGenerationCallGenerating))] +#endif + public bool IsResponseImageGenerationCallGenerating => ResponseImageGenerationCallGenerating != null; + + /// + /// Emitted when an image generation tool call is in progress. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? ResponseImageGenerationCallInProgress { get; init; } +#else + public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? ResponseImageGenerationCallInProgress { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCreatedEvent? value) - { - Created = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseImageGenerationCallInProgress))] +#endif + public bool IsResponseImageGenerationCallInProgress => ResponseImageGenerationCallInProgress != null; /// - /// Emitted when an error occurs. + /// Emitted when a partial image is available during image generation streaming. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseErrorEvent? Error { get; init; } + public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? ResponseImageGenerationCallPartialImage { get; init; } #else - public global::tryAGI.OpenAI.ResponseErrorEvent? Error { get; } + public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? ResponseImageGenerationCallPartialImage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseImageGenerationCallPartialImage))] +#endif + public bool IsResponseImageGenerationCallPartialImage => ResponseImageGenerationCallPartialImage != null; + + /// + /// Emitted when there is a delta (partial update) to the arguments of an MCP tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? ResponseMcpCallArgumentsDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? ResponseMcpCallArgumentsDelta { get; } #endif - public bool IsError => Error != null; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseErrorEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseErrorEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpCallArgumentsDelta))] +#endif + public bool IsResponseMcpCallArgumentsDelta => ResponseMcpCallArgumentsDelta != null; + + /// + /// Emitted when the arguments for an MCP tool call are finalized. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? ResponseMcpCallArgumentsDone { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? ResponseMcpCallArgumentsDone { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseErrorEvent?(ResponseStreamEvent @this) => @this.Error; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpCallArgumentsDone))] +#endif + public bool IsResponseMcpCallArgumentsDone => ResponseMcpCallArgumentsDone != null; + + /// + /// Emitted when an MCP tool call has completed successfully. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? ResponseMcpCallCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? ResponseMcpCallCompleted { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseErrorEvent? value) - { - Error = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpCallCompleted))] +#endif + public bool IsResponseMcpCallCompleted => ResponseMcpCallCompleted != null; /// - /// Emitted when a file search call is completed (results found). + /// Emitted when an MCP tool call has failed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? FileSearchCallCompleted { get; init; } + public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? ResponseMcpCallFailed { get; init; } #else - public global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? FileSearchCallCompleted { get; } + public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? ResponseMcpCallFailed { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCallCompleted))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpCallFailed))] +#endif + public bool IsResponseMcpCallFailed => ResponseMcpCallFailed != null; + + /// + /// Emitted when an MCP tool call is in progress. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? ResponseMcpCallInProgress { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? ResponseMcpCallInProgress { get; } #endif - public bool IsFileSearchCallCompleted => FileSearchCallCompleted != null; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpCallInProgress))] +#endif + public bool IsResponseMcpCallInProgress => ResponseMcpCallInProgress != null; + + /// + /// Emitted when the list of available MCP tools has been successfully retrieved. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? ResponseMcpListToolsCompleted { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? ResponseMcpListToolsCompleted { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent?(ResponseStreamEvent @this) => @this.FileSearchCallCompleted; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpListToolsCompleted))] +#endif + public bool IsResponseMcpListToolsCompleted => ResponseMcpListToolsCompleted != null; + + /// + /// Emitted when the attempt to list available MCP tools has failed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? ResponseMcpListToolsFailed { get; init; } +#else + public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? ResponseMcpListToolsFailed { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? value) - { - FileSearchCallCompleted = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpListToolsFailed))] +#endif + public bool IsResponseMcpListToolsFailed => ResponseMcpListToolsFailed != null; /// - /// Emitted when a file search call is initiated. + /// Emitted when the system is in the process of retrieving the list of available MCP tools. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? FileSearchCallInProgress { get; init; } + public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? ResponseMcpListToolsInProgress { get; init; } #else - public global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? FileSearchCallInProgress { get; } + public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? ResponseMcpListToolsInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCallInProgress))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseMcpListToolsInProgress))] +#endif + public bool IsResponseMcpListToolsInProgress => ResponseMcpListToolsInProgress != null; + + /// + /// Emitted when an annotation is added to output text content. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? ResponseOutputTextAnnotationAdded { get; init; } +#else + public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? ResponseOutputTextAnnotationAdded { get; } #endif - public bool IsFileSearchCallInProgress => FileSearchCallInProgress != null; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseOutputTextAnnotationAdded))] +#endif + public bool IsResponseOutputTextAnnotationAdded => ResponseOutputTextAnnotationAdded != null; + + /// + /// Emitted when a response is queued and waiting to be processed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseQueuedEvent? ResponseQueued { get; init; } +#else + public global::tryAGI.OpenAI.ResponseQueuedEvent? ResponseQueued { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent?(ResponseStreamEvent @this) => @this.FileSearchCallInProgress; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseQueued))] +#endif + public bool IsResponseQueued => ResponseQueued != null; + + /// + /// Event representing a delta (partial update) to the input of a custom tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? ResponseCustomToolCallInputDelta { get; init; } +#else + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? ResponseCustomToolCallInputDelta { get; } +#endif /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? value) - { - FileSearchCallInProgress = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCustomToolCallInputDelta))] +#endif + public bool IsResponseCustomToolCallInputDelta => ResponseCustomToolCallInputDelta != null; /// - /// Emitted when a file search is currently searching. + /// Event indicating that input for a custom tool call is complete. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? FileSearchCallSearching { get; init; } + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? ResponseCustomToolCallInputDone { get; init; } #else - public global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? FileSearchCallSearching { get; } + public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? ResponseCustomToolCallInputDone { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchCallSearching))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCustomToolCallInputDone))] #endif - public bool IsFileSearchCallSearching => FileSearchCallSearching != null; + public bool IsResponseCustomToolCallInputDone => ResponseCustomToolCallInputDone != null; + /// + /// + /// + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioDeltaEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseAudioDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseAudioDelta; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent?(ResponseStreamEvent @this) => @this.FileSearchCallSearching; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDeltaEvent? value) + { + ResponseAudioDelta = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? value) + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioDoneEvent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseAudioDoneEvent?(ResponseStreamEvent @this) => @this.ResponseAudioDone; + + /// + /// + /// + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioDoneEvent? value) { - FileSearchCallSearching = value; + ResponseAudioDone = value; } /// - /// Emitted when there is a partial function-call arguments delta. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? FunctionCallArgumentsDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? FunctionCallArgumentsDelta { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCallArgumentsDelta))] -#endif - public bool IsFunctionCallArgumentsDelta => FunctionCallArgumentsDelta != null; + public static implicit operator global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseAudioTranscriptDelta; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? value) + { + ResponseAudioTranscriptDelta = value; + } + + /// + /// + /// + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent?(ResponseStreamEvent @this) => @this.FunctionCallArgumentsDelta; + public static implicit operator global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent?(ResponseStreamEvent @this) => @this.ResponseAudioTranscriptDone; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? value) { - FunctionCallArgumentsDelta = value; + ResponseAudioTranscriptDone = value; } /// - /// Emitted when function-call arguments are finalized. + /// + /// + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseCodeInterpreterCallCodeDelta; + + /// + /// + /// + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? value) + { + ResponseCodeInterpreterCallCodeDelta = value; + } + + /// + /// + /// + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent?)value); + + /// + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? FunctionCallArgumentsDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? FunctionCallArgumentsDone { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent?(ResponseStreamEvent @this) => @this.ResponseCodeInterpreterCallCodeDone; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionCallArgumentsDone))] -#endif - public bool IsFunctionCallArgumentsDone => FunctionCallArgumentsDone != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? value) + { + ResponseCodeInterpreterCallCodeDone = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent?(ResponseStreamEvent @this) => @this.FunctionCallArgumentsDone; + public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseCodeInterpreterCallCompleted; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? value) { - FunctionCallArgumentsDone = value; + ResponseCodeInterpreterCallCompleted = value; } /// - /// Emitted when the response is in progress. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseInProgressEvent? InProgress { get; init; } -#else - public global::tryAGI.OpenAI.ResponseInProgressEvent? InProgress { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InProgress))] -#endif - public bool IsInProgress => InProgress != null; + public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseCodeInterpreterCallInProgress; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseInProgressEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? value) + { + ResponseCodeInterpreterCallInProgress = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseInProgressEvent?(ResponseStreamEvent @this) => @this.InProgress; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseInProgressEvent? value) - { - InProgress = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent?(ResponseStreamEvent @this) => @this.ResponseCodeInterpreterCallInterpreting; /// - /// An event that is emitted when a response fails. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFailedEvent? Failed { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFailedEvent? Failed { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? value) + { + ResponseCodeInterpreterCallInterpreting = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Failed))] -#endif - public bool IsFailed => Failed != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCompletedEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFailedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFailedEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseCompleted; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFailedEvent?(ResponseStreamEvent @this) => @this.Failed; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCompletedEvent? value) + { + ResponseCompleted = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFailedEvent? value) - { - Failed = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseContentPartAddedEvent?)value); /// - /// An event that is emitted when a response finishes as incomplete. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseIncompleteEvent? Incomplete { get; init; } -#else - public global::tryAGI.OpenAI.ResponseIncompleteEvent? Incomplete { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseContentPartAddedEvent?(ResponseStreamEvent @this) => @this.ResponseContentPartAdded; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Incomplete))] -#endif - public bool IsIncomplete => Incomplete != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartAddedEvent? value) + { + ResponseContentPartAdded = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseIncompleteEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseIncompleteEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseContentPartDoneEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseIncompleteEvent?(ResponseStreamEvent @this) => @this.Incomplete; + public static implicit operator global::tryAGI.OpenAI.ResponseContentPartDoneEvent?(ResponseStreamEvent @this) => @this.ResponseContentPartDone; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseIncompleteEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseContentPartDoneEvent? value) { - Incomplete = value; + ResponseContentPartDone = value; } /// - /// Emitted when a new output item is added. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? OutputItemAdded { get; init; } -#else - public global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? OutputItemAdded { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCreatedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseCreatedEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputItemAdded))] -#endif - public bool IsOutputItemAdded => OutputItemAdded != null; + public static implicit operator global::tryAGI.OpenAI.ResponseCreatedEvent?(ResponseStreamEvent @this) => @this.ResponseCreated; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseOutputItemAddedEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCreatedEvent? value) + { + ResponseCreated = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseOutputItemAddedEvent?(ResponseStreamEvent @this) => @this.OutputItemAdded; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseErrorEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseErrorEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? value) - { - OutputItemAdded = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseErrorEvent?(ResponseStreamEvent @this) => @this.Error; /// - /// Emitted when an output item is marked done. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? OutputItemDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? OutputItemDone { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseErrorEvent? value) + { + Error = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputItemDone))] -#endif - public bool IsOutputItemDone => OutputItemDone != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseOutputItemDoneEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseFileSearchCallCompleted; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseOutputItemDoneEvent?(ResponseStreamEvent @this) => @this.OutputItemDone; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? value) + { + ResponseFileSearchCallCompleted = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? value) - { - OutputItemDone = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent?)value); /// - /// Emitted when a new reasoning summary part is added. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? ReasoningSummaryPartAdded { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? ReasoningSummaryPartAdded { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseFileSearchCallInProgress; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningSummaryPartAdded))] -#endif - public bool IsReasoningSummaryPartAdded => ReasoningSummaryPartAdded != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? value) + { + ResponseFileSearchCallInProgress = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent?(ResponseStreamEvent @this) => @this.ReasoningSummaryPartAdded; + public static implicit operator global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent?(ResponseStreamEvent @this) => @this.ResponseFileSearchCallSearching; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? value) { - ReasoningSummaryPartAdded = value; + ResponseFileSearchCallSearching = value; } /// - /// Emitted when a reasoning summary part is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? ReasoningSummaryPartDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? ReasoningSummaryPartDone { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningSummaryPartDone))] -#endif - public bool IsReasoningSummaryPartDone => ReasoningSummaryPartDone != null; + public static implicit operator global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseFunctionCallArgumentsDelta; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? value) + { + ResponseFunctionCallArgumentsDelta = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent?(ResponseStreamEvent @this) => @this.ReasoningSummaryPartDone; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? value) - { - ReasoningSummaryPartDone = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent?(ResponseStreamEvent @this) => @this.ResponseFunctionCallArgumentsDone; /// - /// Emitted when a delta is added to a reasoning summary text. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? ReasoningSummaryTextDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? ReasoningSummaryTextDelta { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? value) + { + ResponseFunctionCallArgumentsDone = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningSummaryTextDelta))] -#endif - public bool IsReasoningSummaryTextDelta => ReasoningSummaryTextDelta != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseInProgressEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseInProgress; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent?(ResponseStreamEvent @this) => @this.ReasoningSummaryTextDelta; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseInProgressEvent? value) + { + ResponseInProgress = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? value) - { - ReasoningSummaryTextDelta = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFailedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseFailedEvent?)value); /// - /// Emitted when a reasoning summary text is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? ReasoningSummaryTextDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? ReasoningSummaryTextDone { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseFailedEvent?(ResponseStreamEvent @this) => @this.ResponseFailed; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningSummaryTextDone))] -#endif - public bool IsReasoningSummaryTextDone => ReasoningSummaryTextDone != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseFailedEvent? value) + { + ResponseFailed = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseIncompleteEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseIncompleteEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent?(ResponseStreamEvent @this) => @this.ReasoningSummaryTextDone; + public static implicit operator global::tryAGI.OpenAI.ResponseIncompleteEvent?(ResponseStreamEvent @this) => @this.ResponseIncomplete; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseIncompleteEvent? value) { - ReasoningSummaryTextDone = value; + ResponseIncomplete = value; } /// - /// Emitted when a delta is added to a reasoning text. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? ReasoningTextDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? ReasoningTextDelta { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseOutputItemAddedEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningTextDelta))] -#endif - public bool IsReasoningTextDelta => ReasoningTextDelta != null; + public static implicit operator global::tryAGI.OpenAI.ResponseOutputItemAddedEvent?(ResponseStreamEvent @this) => @this.ResponseOutputItemAdded; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? value) + { + ResponseOutputItemAdded = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent?(ResponseStreamEvent @this) => @this.ReasoningTextDelta; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseOutputItemDoneEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? value) - { - ReasoningTextDelta = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseOutputItemDoneEvent?(ResponseStreamEvent @this) => @this.ResponseOutputItemDone; /// - /// Emitted when a reasoning text is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? ReasoningTextDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? ReasoningTextDone { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? value) + { + ResponseOutputItemDone = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ReasoningTextDone))] -#endif - public bool IsReasoningTextDone => ReasoningTextDone != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningSummaryPartAdded; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent?(ResponseStreamEvent @this) => @this.ReasoningTextDone; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? value) + { + ResponseReasoningSummaryPartAdded = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? value) - { - ReasoningTextDone = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent?)value); /// - /// Emitted when there is a partial refusal text. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? RefusalDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? RefusalDelta { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningSummaryPartDone; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RefusalDelta))] -#endif - public bool IsRefusalDelta => RefusalDelta != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? value) + { + ResponseReasoningSummaryPartDone = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseRefusalDeltaEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseRefusalDeltaEvent?(ResponseStreamEvent @this) => @this.RefusalDelta; + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningSummaryTextDelta; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? value) { - RefusalDelta = value; + ResponseReasoningSummaryTextDelta = value; } /// - /// Emitted when refusal text is finalized. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? RefusalDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseRefusalDoneEvent? RefusalDone { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RefusalDone))] -#endif - public bool IsRefusalDone => RefusalDone != null; + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningSummaryTextDone; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseRefusalDoneEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? value) + { + ResponseReasoningSummaryTextDone = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseRefusalDoneEvent?(ResponseStreamEvent @this) => @this.RefusalDone; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDoneEvent? value) - { - RefusalDone = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningTextDelta; /// - /// Emitted when there is an additional text delta. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseTextDeltaEvent? TextDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseTextDeltaEvent? TextDelta { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? value) + { + ResponseReasoningTextDelta = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextDelta))] -#endif - public bool IsTextDelta => TextDelta != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseTextDeltaEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent?(ResponseStreamEvent @this) => @this.ResponseReasoningTextDone; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseTextDeltaEvent?(ResponseStreamEvent @this) => @this.TextDelta; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? value) + { + ResponseReasoningTextDone = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDeltaEvent? value) - { - TextDelta = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseRefusalDeltaEvent?)value); /// - /// Emitted when text content is finalized. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseTextDoneEvent? TextDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseTextDoneEvent? TextDone { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseRefusalDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseRefusalDelta; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextDone))] -#endif - public bool IsTextDone => TextDone != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? value) + { + ResponseRefusalDelta = value; + } /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseTextDoneEvent?)value); + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseRefusalDoneEvent?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseTextDoneEvent?(ResponseStreamEvent @this) => @this.TextDone; + public static implicit operator global::tryAGI.OpenAI.ResponseRefusalDoneEvent?(ResponseStreamEvent @this) => @this.ResponseRefusalDone; /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDoneEvent? value) + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseRefusalDoneEvent? value) { - TextDone = value; + ResponseRefusalDone = value; } /// - /// Emitted when a web search call is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? WebSearchCallCompleted { get; init; } -#else - public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? WebSearchCallCompleted { get; } -#endif + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDeltaEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseTextDeltaEvent?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCallCompleted))] -#endif - public bool IsWebSearchCallCompleted => WebSearchCallCompleted != null; + public static implicit operator global::tryAGI.OpenAI.ResponseTextDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseOutputTextDelta; /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent?)value); + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDeltaEvent? value) + { + ResponseOutputTextDelta = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent?(ResponseStreamEvent @this) => @this.WebSearchCallCompleted; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDoneEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseTextDoneEvent?)value); /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? value) - { - WebSearchCallCompleted = value; - } + public static implicit operator global::tryAGI.OpenAI.ResponseTextDoneEvent?(ResponseStreamEvent @this) => @this.ResponseOutputTextDone; /// - /// Emitted when a web search call is initiated. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? WebSearchCallInProgress { get; init; } -#else - public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? WebSearchCallInProgress { get; } -#endif + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseTextDoneEvent? value) + { + ResponseOutputTextDone = value; + } /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCallInProgress))] -#endif - public bool IsWebSearchCallInProgress => WebSearchCallInProgress != null; + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent?)value); /// /// /// - public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent?)value); + public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseWebSearchCallCompleted; /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent?(ResponseStreamEvent @this) => @this.WebSearchCallInProgress; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? value) + { + ResponseWebSearchCallCompleted = value; + } /// /// /// - public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? value) - { - WebSearchCallInProgress = value; - } + public static implicit operator ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent value) => new ResponseStreamEvent((global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent?)value); /// - /// Emitted when a web search call is executing. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? WebSearchCallSearching { get; init; } -#else - public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? WebSearchCallSearching { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseWebSearchCallInProgress; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchCallSearching))] -#endif - public bool IsWebSearchCallSearching => WebSearchCallSearching != null; + public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? value) + { + ResponseWebSearchCallInProgress = value; + } /// /// @@ -1294,33 +1565,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallInProgress /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent?(ResponseStreamEvent @this) => @this.WebSearchCallSearching; + public static implicit operator global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent?(ResponseStreamEvent @this) => @this.ResponseWebSearchCallSearching; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? value) { - WebSearchCallSearching = value; + ResponseWebSearchCallSearching = value; } - /// - /// Emitted when an image generation tool call has completed and the final image is available. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? ImageGenCallCompleted { get; init; } -#else - public global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? ImageGenCallCompleted { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenCallCompleted))] -#endif - public bool IsImageGenCallCompleted => ImageGenCallCompleted != null; - /// /// /// @@ -1329,33 +1583,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingE /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent?(ResponseStreamEvent @this) => @this.ImageGenCallCompleted; + public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseImageGenerationCallCompleted; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? value) { - ImageGenCallCompleted = value; + ResponseImageGenerationCallCompleted = value; } - /// - /// Emitted when an image generation tool call is actively generating an image (intermediate state). - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? ImageGenCallGenerating { get; init; } -#else - public global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? ImageGenCallGenerating { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenCallGenerating))] -#endif - public bool IsImageGenCallGenerating => ImageGenCallGenerating != null; - /// /// /// @@ -1364,33 +1601,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEv /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent?(ResponseStreamEvent @this) => @this.ImageGenCallGenerating; + public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent?(ResponseStreamEvent @this) => @this.ResponseImageGenerationCallGenerating; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? value) { - ImageGenCallGenerating = value; + ResponseImageGenerationCallGenerating = value; } - /// - /// Emitted when an image generation tool call is in progress. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? ImageGenCallInProgress { get; init; } -#else - public global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? ImageGenCallInProgress { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenCallInProgress))] -#endif - public bool IsImageGenCallInProgress => ImageGenCallInProgress != null; - /// /// /// @@ -1399,33 +1619,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingE /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent?(ResponseStreamEvent @this) => @this.ImageGenCallInProgress; + public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseImageGenerationCallInProgress; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? value) { - ImageGenCallInProgress = value; + ResponseImageGenerationCallInProgress = value; } - /// - /// Emitted when a partial image is available during image generation streaming. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? ImageGenCallPartial { get; init; } -#else - public global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? ImageGenCallPartial { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGenCallPartial))] -#endif - public bool IsImageGenCallPartial => ImageGenCallPartial != null; - /// /// /// @@ -1434,33 +1637,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallInProgressE /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent?(ResponseStreamEvent @this) => @this.ImageGenCallPartial; + public static implicit operator global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent?(ResponseStreamEvent @this) => @this.ResponseImageGenerationCallPartialImage; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? value) { - ImageGenCallPartial = value; + ResponseImageGenerationCallPartialImage = value; } - /// - /// Emitted when there is a delta (partial update) to the arguments of an MCP tool call. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? MCPCallArgumentsDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? MCPCallArgumentsDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPCallArgumentsDelta))] -#endif - public bool IsMCPCallArgumentsDelta => MCPCallArgumentsDelta != null; - /// /// /// @@ -1469,33 +1655,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseImageGenCallPartialImag /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent?(ResponseStreamEvent @this) => @this.MCPCallArgumentsDelta; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseMcpCallArgumentsDelta; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? value) { - MCPCallArgumentsDelta = value; + ResponseMcpCallArgumentsDelta = value; } - /// - /// Emitted when the arguments for an MCP tool call are finalized. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? MCPCallArgumentsDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? MCPCallArgumentsDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPCallArgumentsDone))] -#endif - public bool IsMCPCallArgumentsDone => MCPCallArgumentsDone != null; - /// /// /// @@ -1504,33 +1673,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEv /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent?(ResponseStreamEvent @this) => @this.MCPCallArgumentsDone; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent?(ResponseStreamEvent @this) => @this.ResponseMcpCallArgumentsDone; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? value) { - MCPCallArgumentsDone = value; + ResponseMcpCallArgumentsDone = value; } - /// - /// Emitted when an MCP tool call has completed successfully. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? MCPCallCompleted { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? MCPCallCompleted { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPCallCompleted))] -#endif - public bool IsMCPCallCompleted => MCPCallCompleted != null; - /// /// /// @@ -1539,33 +1691,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEve /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent?(ResponseStreamEvent @this) => @this.MCPCallCompleted; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseMcpCallCompleted; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? value) { - MCPCallCompleted = value; + ResponseMcpCallCompleted = value; } - /// - /// Emitted when an MCP tool call has failed. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? MCPCallFailed { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? MCPCallFailed { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPCallFailed))] -#endif - public bool IsMCPCallFailed => MCPCallFailed != null; - /// /// /// @@ -1574,33 +1709,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallFailedEvent?(ResponseStreamEvent @this) => @this.MCPCallFailed; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallFailedEvent?(ResponseStreamEvent @this) => @this.ResponseMcpCallFailed; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? value) { - MCPCallFailed = value; + ResponseMcpCallFailed = value; } - /// - /// Emitted when an MCP tool call is in progress. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? MCPCallInProgress { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? MCPCallInProgress { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPCallInProgress))] -#endif - public bool IsMCPCallInProgress => MCPCallInProgress != null; - /// /// /// @@ -1609,33 +1727,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? val /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent?(ResponseStreamEvent @this) => @this.MCPCallInProgress; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseMcpCallInProgress; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? value) { - MCPCallInProgress = value; + ResponseMcpCallInProgress = value; } - /// - /// Emitted when the list of available MCP tools has been successfully retrieved. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? MCPListToolsCompleted { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? MCPListToolsCompleted { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListToolsCompleted))] -#endif - public bool IsMCPListToolsCompleted => MCPListToolsCompleted != null; - /// /// /// @@ -1644,33 +1745,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent?(ResponseStreamEvent @this) => @this.MCPListToolsCompleted; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent?(ResponseStreamEvent @this) => @this.ResponseMcpListToolsCompleted; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? value) { - MCPListToolsCompleted = value; + ResponseMcpListToolsCompleted = value; } - /// - /// Emitted when the attempt to list available MCP tools has failed. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? MCPListToolsFailed { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? MCPListToolsFailed { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListToolsFailed))] -#endif - public bool IsMCPListToolsFailed => MCPListToolsFailed != null; - /// /// /// @@ -1679,33 +1763,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEv /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent?(ResponseStreamEvent @this) => @this.MCPListToolsFailed; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent?(ResponseStreamEvent @this) => @this.ResponseMcpListToolsFailed; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? value) { - MCPListToolsFailed = value; + ResponseMcpListToolsFailed = value; } - /// - /// Emitted when the system is in the process of retrieving the list of available MCP tools. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? MCPListToolsInProgress { get; init; } -#else - public global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? MCPListToolsInProgress { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPListToolsInProgress))] -#endif - public bool IsMCPListToolsInProgress => MCPListToolsInProgress != null; - /// /// /// @@ -1714,33 +1781,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent?(ResponseStreamEvent @this) => @this.MCPListToolsInProgress; + public static implicit operator global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent?(ResponseStreamEvent @this) => @this.ResponseMcpListToolsInProgress; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? value) { - MCPListToolsInProgress = value; + ResponseMcpListToolsInProgress = value; } - /// - /// Emitted when an annotation is added to output text content. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? OutputTextAnnotationAdded { get; init; } -#else - public global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? OutputTextAnnotationAdded { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OutputTextAnnotationAdded))] -#endif - public bool IsOutputTextAnnotationAdded => OutputTextAnnotationAdded != null; - /// /// /// @@ -1749,33 +1799,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressE /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent?(ResponseStreamEvent @this) => @this.OutputTextAnnotationAdded; + public static implicit operator global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent?(ResponseStreamEvent @this) => @this.ResponseOutputTextAnnotationAdded; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? value) { - OutputTextAnnotationAdded = value; + ResponseOutputTextAnnotationAdded = value; } - /// - /// Emitted when a response is queued and waiting to be processed. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseQueuedEvent? Queued { get; init; } -#else - public global::tryAGI.OpenAI.ResponseQueuedEvent? Queued { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Queued))] -#endif - public bool IsQueued => Queued != null; - /// /// /// @@ -1784,33 +1817,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAdd /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseQueuedEvent?(ResponseStreamEvent @this) => @this.Queued; + public static implicit operator global::tryAGI.OpenAI.ResponseQueuedEvent?(ResponseStreamEvent @this) => @this.ResponseQueued; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseQueuedEvent? value) { - Queued = value; + ResponseQueued = value; } - /// - /// Event representing a delta (partial update) to the input of a custom tool call. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? CustomToolCallInputDelta { get; init; } -#else - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? CustomToolCallInputDelta { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallInputDelta))] -#endif - public bool IsCustomToolCallInputDelta => CustomToolCallInputDelta != null; - /// /// /// @@ -1819,33 +1835,16 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseQueuedEvent? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent?(ResponseStreamEvent @this) => @this.CustomToolCallInputDelta; + public static implicit operator global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent?(ResponseStreamEvent @this) => @this.ResponseCustomToolCallInputDelta; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? value) { - CustomToolCallInputDelta = value; + ResponseCustomToolCallInputDelta = value; } - /// - /// Event indicating that input for a custom tool call is complete. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? CustomToolCallInputDone { get; init; } -#else - public global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? CustomToolCallInputDone { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolCallInputDone))] -#endif - public bool IsCustomToolCallInputDone => CustomToolCallInputDone != null; - /// /// /// @@ -1854,246 +1853,246 @@ public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCustomToolCallInputDelt /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent?(ResponseStreamEvent @this) => @this.CustomToolCallInputDone; + public static implicit operator global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent?(ResponseStreamEvent @this) => @this.ResponseCustomToolCallInputDone; /// /// /// public ResponseStreamEvent(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? value) { - CustomToolCallInputDone = value; + ResponseCustomToolCallInputDone = value; } /// /// /// public ResponseStreamEvent( - global::tryAGI.OpenAI.ResponseAudioDeltaEvent? audioDelta, - global::tryAGI.OpenAI.ResponseAudioDoneEvent? audioDone, - global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? audioTranscriptDelta, - global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? audioTranscriptDone, - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? codeInterpreterCallDelta, - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? codeInterpreterCallDone, - global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? codeInterpreterCallCompleted, - global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? codeInterpreterCallInProgress, - global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? codeInterpreterCallInterpreting, - global::tryAGI.OpenAI.ResponseCompletedEvent? completed, - global::tryAGI.OpenAI.ResponseContentPartAddedEvent? contentPartAdded, - global::tryAGI.OpenAI.ResponseContentPartDoneEvent? contentPartDone, - global::tryAGI.OpenAI.ResponseCreatedEvent? created, + global::tryAGI.OpenAI.ResponseAudioDeltaEvent? responseAudioDelta, + global::tryAGI.OpenAI.ResponseAudioDoneEvent? responseAudioDone, + global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent? responseAudioTranscriptDelta, + global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent? responseAudioTranscriptDone, + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent? responseCodeInterpreterCallCodeDelta, + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent? responseCodeInterpreterCallCodeDone, + global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent? responseCodeInterpreterCallCompleted, + global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent? responseCodeInterpreterCallInProgress, + global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent? responseCodeInterpreterCallInterpreting, + global::tryAGI.OpenAI.ResponseCompletedEvent? responseCompleted, + global::tryAGI.OpenAI.ResponseContentPartAddedEvent? responseContentPartAdded, + global::tryAGI.OpenAI.ResponseContentPartDoneEvent? responseContentPartDone, + global::tryAGI.OpenAI.ResponseCreatedEvent? responseCreated, global::tryAGI.OpenAI.ResponseErrorEvent? error, - global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? fileSearchCallCompleted, - global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? fileSearchCallInProgress, - global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? fileSearchCallSearching, - global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? functionCallArgumentsDelta, - global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? functionCallArgumentsDone, - global::tryAGI.OpenAI.ResponseInProgressEvent? inProgress, - global::tryAGI.OpenAI.ResponseFailedEvent? failed, - global::tryAGI.OpenAI.ResponseIncompleteEvent? incomplete, - global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? outputItemAdded, - global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? outputItemDone, - global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? reasoningSummaryPartAdded, - global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? reasoningSummaryPartDone, - global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? reasoningSummaryTextDelta, - global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? reasoningSummaryTextDone, - global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? reasoningTextDelta, - global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? reasoningTextDone, - global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? refusalDelta, - global::tryAGI.OpenAI.ResponseRefusalDoneEvent? refusalDone, - global::tryAGI.OpenAI.ResponseTextDeltaEvent? textDelta, - global::tryAGI.OpenAI.ResponseTextDoneEvent? textDone, - global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? webSearchCallCompleted, - global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? webSearchCallInProgress, - global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? webSearchCallSearching, - global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? imageGenCallCompleted, - global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? imageGenCallGenerating, - global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? imageGenCallInProgress, - global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? imageGenCallPartial, - global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? mCPCallArgumentsDelta, - global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? mCPCallArgumentsDone, - global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? mCPCallCompleted, - global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? mCPCallFailed, - global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? mCPCallInProgress, - global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? mCPListToolsCompleted, - global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? mCPListToolsFailed, - global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? mCPListToolsInProgress, - global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? outputTextAnnotationAdded, - global::tryAGI.OpenAI.ResponseQueuedEvent? queued, - global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? customToolCallInputDelta, - global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? customToolCallInputDone + global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent? responseFileSearchCallCompleted, + global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent? responseFileSearchCallInProgress, + global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent? responseFileSearchCallSearching, + global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent? responseFunctionCallArgumentsDelta, + global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent? responseFunctionCallArgumentsDone, + global::tryAGI.OpenAI.ResponseInProgressEvent? responseInProgress, + global::tryAGI.OpenAI.ResponseFailedEvent? responseFailed, + global::tryAGI.OpenAI.ResponseIncompleteEvent? responseIncomplete, + global::tryAGI.OpenAI.ResponseOutputItemAddedEvent? responseOutputItemAdded, + global::tryAGI.OpenAI.ResponseOutputItemDoneEvent? responseOutputItemDone, + global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent? responseReasoningSummaryPartAdded, + global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent? responseReasoningSummaryPartDone, + global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent? responseReasoningSummaryTextDelta, + global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent? responseReasoningSummaryTextDone, + global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent? responseReasoningTextDelta, + global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent? responseReasoningTextDone, + global::tryAGI.OpenAI.ResponseRefusalDeltaEvent? responseRefusalDelta, + global::tryAGI.OpenAI.ResponseRefusalDoneEvent? responseRefusalDone, + global::tryAGI.OpenAI.ResponseTextDeltaEvent? responseOutputTextDelta, + global::tryAGI.OpenAI.ResponseTextDoneEvent? responseOutputTextDone, + global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent? responseWebSearchCallCompleted, + global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent? responseWebSearchCallInProgress, + global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent? responseWebSearchCallSearching, + global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent? responseImageGenerationCallCompleted, + global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent? responseImageGenerationCallGenerating, + global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent? responseImageGenerationCallInProgress, + global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent? responseImageGenerationCallPartialImage, + global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent? responseMcpCallArgumentsDelta, + global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent? responseMcpCallArgumentsDone, + global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent? responseMcpCallCompleted, + global::tryAGI.OpenAI.ResponseMCPCallFailedEvent? responseMcpCallFailed, + global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent? responseMcpCallInProgress, + global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent? responseMcpListToolsCompleted, + global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent? responseMcpListToolsFailed, + global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent? responseMcpListToolsInProgress, + global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent? responseOutputTextAnnotationAdded, + global::tryAGI.OpenAI.ResponseQueuedEvent? responseQueued, + global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent? responseCustomToolCallInputDelta, + global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent? responseCustomToolCallInputDone ) { - AudioDelta = audioDelta; - AudioDone = audioDone; - AudioTranscriptDelta = audioTranscriptDelta; - AudioTranscriptDone = audioTranscriptDone; - CodeInterpreterCallDelta = codeInterpreterCallDelta; - CodeInterpreterCallDone = codeInterpreterCallDone; - CodeInterpreterCallCompleted = codeInterpreterCallCompleted; - CodeInterpreterCallInProgress = codeInterpreterCallInProgress; - CodeInterpreterCallInterpreting = codeInterpreterCallInterpreting; - Completed = completed; - ContentPartAdded = contentPartAdded; - ContentPartDone = contentPartDone; - Created = created; + ResponseAudioDelta = responseAudioDelta; + ResponseAudioDone = responseAudioDone; + ResponseAudioTranscriptDelta = responseAudioTranscriptDelta; + ResponseAudioTranscriptDone = responseAudioTranscriptDone; + ResponseCodeInterpreterCallCodeDelta = responseCodeInterpreterCallCodeDelta; + ResponseCodeInterpreterCallCodeDone = responseCodeInterpreterCallCodeDone; + ResponseCodeInterpreterCallCompleted = responseCodeInterpreterCallCompleted; + ResponseCodeInterpreterCallInProgress = responseCodeInterpreterCallInProgress; + ResponseCodeInterpreterCallInterpreting = responseCodeInterpreterCallInterpreting; + ResponseCompleted = responseCompleted; + ResponseContentPartAdded = responseContentPartAdded; + ResponseContentPartDone = responseContentPartDone; + ResponseCreated = responseCreated; Error = error; - FileSearchCallCompleted = fileSearchCallCompleted; - FileSearchCallInProgress = fileSearchCallInProgress; - FileSearchCallSearching = fileSearchCallSearching; - FunctionCallArgumentsDelta = functionCallArgumentsDelta; - FunctionCallArgumentsDone = functionCallArgumentsDone; - InProgress = inProgress; - Failed = failed; - Incomplete = incomplete; - OutputItemAdded = outputItemAdded; - OutputItemDone = outputItemDone; - ReasoningSummaryPartAdded = reasoningSummaryPartAdded; - ReasoningSummaryPartDone = reasoningSummaryPartDone; - ReasoningSummaryTextDelta = reasoningSummaryTextDelta; - ReasoningSummaryTextDone = reasoningSummaryTextDone; - ReasoningTextDelta = reasoningTextDelta; - ReasoningTextDone = reasoningTextDone; - RefusalDelta = refusalDelta; - RefusalDone = refusalDone; - TextDelta = textDelta; - TextDone = textDone; - WebSearchCallCompleted = webSearchCallCompleted; - WebSearchCallInProgress = webSearchCallInProgress; - WebSearchCallSearching = webSearchCallSearching; - ImageGenCallCompleted = imageGenCallCompleted; - ImageGenCallGenerating = imageGenCallGenerating; - ImageGenCallInProgress = imageGenCallInProgress; - ImageGenCallPartial = imageGenCallPartial; - MCPCallArgumentsDelta = mCPCallArgumentsDelta; - MCPCallArgumentsDone = mCPCallArgumentsDone; - MCPCallCompleted = mCPCallCompleted; - MCPCallFailed = mCPCallFailed; - MCPCallInProgress = mCPCallInProgress; - MCPListToolsCompleted = mCPListToolsCompleted; - MCPListToolsFailed = mCPListToolsFailed; - MCPListToolsInProgress = mCPListToolsInProgress; - OutputTextAnnotationAdded = outputTextAnnotationAdded; - Queued = queued; - CustomToolCallInputDelta = customToolCallInputDelta; - CustomToolCallInputDone = customToolCallInputDone; + ResponseFileSearchCallCompleted = responseFileSearchCallCompleted; + ResponseFileSearchCallInProgress = responseFileSearchCallInProgress; + ResponseFileSearchCallSearching = responseFileSearchCallSearching; + ResponseFunctionCallArgumentsDelta = responseFunctionCallArgumentsDelta; + ResponseFunctionCallArgumentsDone = responseFunctionCallArgumentsDone; + ResponseInProgress = responseInProgress; + ResponseFailed = responseFailed; + ResponseIncomplete = responseIncomplete; + ResponseOutputItemAdded = responseOutputItemAdded; + ResponseOutputItemDone = responseOutputItemDone; + ResponseReasoningSummaryPartAdded = responseReasoningSummaryPartAdded; + ResponseReasoningSummaryPartDone = responseReasoningSummaryPartDone; + ResponseReasoningSummaryTextDelta = responseReasoningSummaryTextDelta; + ResponseReasoningSummaryTextDone = responseReasoningSummaryTextDone; + ResponseReasoningTextDelta = responseReasoningTextDelta; + ResponseReasoningTextDone = responseReasoningTextDone; + ResponseRefusalDelta = responseRefusalDelta; + ResponseRefusalDone = responseRefusalDone; + ResponseOutputTextDelta = responseOutputTextDelta; + ResponseOutputTextDone = responseOutputTextDone; + ResponseWebSearchCallCompleted = responseWebSearchCallCompleted; + ResponseWebSearchCallInProgress = responseWebSearchCallInProgress; + ResponseWebSearchCallSearching = responseWebSearchCallSearching; + ResponseImageGenerationCallCompleted = responseImageGenerationCallCompleted; + ResponseImageGenerationCallGenerating = responseImageGenerationCallGenerating; + ResponseImageGenerationCallInProgress = responseImageGenerationCallInProgress; + ResponseImageGenerationCallPartialImage = responseImageGenerationCallPartialImage; + ResponseMcpCallArgumentsDelta = responseMcpCallArgumentsDelta; + ResponseMcpCallArgumentsDone = responseMcpCallArgumentsDone; + ResponseMcpCallCompleted = responseMcpCallCompleted; + ResponseMcpCallFailed = responseMcpCallFailed; + ResponseMcpCallInProgress = responseMcpCallInProgress; + ResponseMcpListToolsCompleted = responseMcpListToolsCompleted; + ResponseMcpListToolsFailed = responseMcpListToolsFailed; + ResponseMcpListToolsInProgress = responseMcpListToolsInProgress; + ResponseOutputTextAnnotationAdded = responseOutputTextAnnotationAdded; + ResponseQueued = responseQueued; + ResponseCustomToolCallInputDelta = responseCustomToolCallInputDelta; + ResponseCustomToolCallInputDone = responseCustomToolCallInputDone; } /// /// /// public object? Object => - CustomToolCallInputDone as object ?? - CustomToolCallInputDelta as object ?? - Queued as object ?? - OutputTextAnnotationAdded as object ?? - MCPListToolsInProgress as object ?? - MCPListToolsFailed as object ?? - MCPListToolsCompleted as object ?? - MCPCallInProgress as object ?? - MCPCallFailed as object ?? - MCPCallCompleted as object ?? - MCPCallArgumentsDone as object ?? - MCPCallArgumentsDelta as object ?? - ImageGenCallPartial as object ?? - ImageGenCallInProgress as object ?? - ImageGenCallGenerating as object ?? - ImageGenCallCompleted as object ?? - WebSearchCallSearching as object ?? - WebSearchCallInProgress as object ?? - WebSearchCallCompleted as object ?? - TextDone as object ?? - TextDelta as object ?? - RefusalDone as object ?? - RefusalDelta as object ?? - ReasoningTextDone as object ?? - ReasoningTextDelta as object ?? - ReasoningSummaryTextDone as object ?? - ReasoningSummaryTextDelta as object ?? - ReasoningSummaryPartDone as object ?? - ReasoningSummaryPartAdded as object ?? - OutputItemDone as object ?? - OutputItemAdded as object ?? - Incomplete as object ?? - Failed as object ?? - InProgress as object ?? - FunctionCallArgumentsDone as object ?? - FunctionCallArgumentsDelta as object ?? - FileSearchCallSearching as object ?? - FileSearchCallInProgress as object ?? - FileSearchCallCompleted as object ?? + ResponseCustomToolCallInputDone as object ?? + ResponseCustomToolCallInputDelta as object ?? + ResponseQueued as object ?? + ResponseOutputTextAnnotationAdded as object ?? + ResponseMcpListToolsInProgress as object ?? + ResponseMcpListToolsFailed as object ?? + ResponseMcpListToolsCompleted as object ?? + ResponseMcpCallInProgress as object ?? + ResponseMcpCallFailed as object ?? + ResponseMcpCallCompleted as object ?? + ResponseMcpCallArgumentsDone as object ?? + ResponseMcpCallArgumentsDelta as object ?? + ResponseImageGenerationCallPartialImage as object ?? + ResponseImageGenerationCallInProgress as object ?? + ResponseImageGenerationCallGenerating as object ?? + ResponseImageGenerationCallCompleted as object ?? + ResponseWebSearchCallSearching as object ?? + ResponseWebSearchCallInProgress as object ?? + ResponseWebSearchCallCompleted as object ?? + ResponseOutputTextDone as object ?? + ResponseOutputTextDelta as object ?? + ResponseRefusalDone as object ?? + ResponseRefusalDelta as object ?? + ResponseReasoningTextDone as object ?? + ResponseReasoningTextDelta as object ?? + ResponseReasoningSummaryTextDone as object ?? + ResponseReasoningSummaryTextDelta as object ?? + ResponseReasoningSummaryPartDone as object ?? + ResponseReasoningSummaryPartAdded as object ?? + ResponseOutputItemDone as object ?? + ResponseOutputItemAdded as object ?? + ResponseIncomplete as object ?? + ResponseFailed as object ?? + ResponseInProgress as object ?? + ResponseFunctionCallArgumentsDone as object ?? + ResponseFunctionCallArgumentsDelta as object ?? + ResponseFileSearchCallSearching as object ?? + ResponseFileSearchCallInProgress as object ?? + ResponseFileSearchCallCompleted as object ?? Error as object ?? - Created as object ?? - ContentPartDone as object ?? - ContentPartAdded as object ?? - Completed as object ?? - CodeInterpreterCallInterpreting as object ?? - CodeInterpreterCallInProgress as object ?? - CodeInterpreterCallCompleted as object ?? - CodeInterpreterCallDone as object ?? - CodeInterpreterCallDelta as object ?? - AudioTranscriptDone as object ?? - AudioTranscriptDelta as object ?? - AudioDone as object ?? - AudioDelta as object + ResponseCreated as object ?? + ResponseContentPartDone as object ?? + ResponseContentPartAdded as object ?? + ResponseCompleted as object ?? + ResponseCodeInterpreterCallInterpreting as object ?? + ResponseCodeInterpreterCallInProgress as object ?? + ResponseCodeInterpreterCallCompleted as object ?? + ResponseCodeInterpreterCallCodeDone as object ?? + ResponseCodeInterpreterCallCodeDelta as object ?? + ResponseAudioTranscriptDone as object ?? + ResponseAudioTranscriptDelta as object ?? + ResponseAudioDone as object ?? + ResponseAudioDelta as object ; /// /// /// public override string? ToString() => - AudioDelta?.ToString() ?? - AudioDone?.ToString() ?? - AudioTranscriptDelta?.ToString() ?? - AudioTranscriptDone?.ToString() ?? - CodeInterpreterCallDelta?.ToString() ?? - CodeInterpreterCallDone?.ToString() ?? - CodeInterpreterCallCompleted?.ToString() ?? - CodeInterpreterCallInProgress?.ToString() ?? - CodeInterpreterCallInterpreting?.ToString() ?? - Completed?.ToString() ?? - ContentPartAdded?.ToString() ?? - ContentPartDone?.ToString() ?? - Created?.ToString() ?? + ResponseAudioDelta?.ToString() ?? + ResponseAudioDone?.ToString() ?? + ResponseAudioTranscriptDelta?.ToString() ?? + ResponseAudioTranscriptDone?.ToString() ?? + ResponseCodeInterpreterCallCodeDelta?.ToString() ?? + ResponseCodeInterpreterCallCodeDone?.ToString() ?? + ResponseCodeInterpreterCallCompleted?.ToString() ?? + ResponseCodeInterpreterCallInProgress?.ToString() ?? + ResponseCodeInterpreterCallInterpreting?.ToString() ?? + ResponseCompleted?.ToString() ?? + ResponseContentPartAdded?.ToString() ?? + ResponseContentPartDone?.ToString() ?? + ResponseCreated?.ToString() ?? Error?.ToString() ?? - FileSearchCallCompleted?.ToString() ?? - FileSearchCallInProgress?.ToString() ?? - FileSearchCallSearching?.ToString() ?? - FunctionCallArgumentsDelta?.ToString() ?? - FunctionCallArgumentsDone?.ToString() ?? - InProgress?.ToString() ?? - Failed?.ToString() ?? - Incomplete?.ToString() ?? - OutputItemAdded?.ToString() ?? - OutputItemDone?.ToString() ?? - ReasoningSummaryPartAdded?.ToString() ?? - ReasoningSummaryPartDone?.ToString() ?? - ReasoningSummaryTextDelta?.ToString() ?? - ReasoningSummaryTextDone?.ToString() ?? - ReasoningTextDelta?.ToString() ?? - ReasoningTextDone?.ToString() ?? - RefusalDelta?.ToString() ?? - RefusalDone?.ToString() ?? - TextDelta?.ToString() ?? - TextDone?.ToString() ?? - WebSearchCallCompleted?.ToString() ?? - WebSearchCallInProgress?.ToString() ?? - WebSearchCallSearching?.ToString() ?? - ImageGenCallCompleted?.ToString() ?? - ImageGenCallGenerating?.ToString() ?? - ImageGenCallInProgress?.ToString() ?? - ImageGenCallPartial?.ToString() ?? - MCPCallArgumentsDelta?.ToString() ?? - MCPCallArgumentsDone?.ToString() ?? - MCPCallCompleted?.ToString() ?? - MCPCallFailed?.ToString() ?? - MCPCallInProgress?.ToString() ?? - MCPListToolsCompleted?.ToString() ?? - MCPListToolsFailed?.ToString() ?? - MCPListToolsInProgress?.ToString() ?? - OutputTextAnnotationAdded?.ToString() ?? - Queued?.ToString() ?? - CustomToolCallInputDelta?.ToString() ?? - CustomToolCallInputDone?.ToString() + ResponseFileSearchCallCompleted?.ToString() ?? + ResponseFileSearchCallInProgress?.ToString() ?? + ResponseFileSearchCallSearching?.ToString() ?? + ResponseFunctionCallArgumentsDelta?.ToString() ?? + ResponseFunctionCallArgumentsDone?.ToString() ?? + ResponseInProgress?.ToString() ?? + ResponseFailed?.ToString() ?? + ResponseIncomplete?.ToString() ?? + ResponseOutputItemAdded?.ToString() ?? + ResponseOutputItemDone?.ToString() ?? + ResponseReasoningSummaryPartAdded?.ToString() ?? + ResponseReasoningSummaryPartDone?.ToString() ?? + ResponseReasoningSummaryTextDelta?.ToString() ?? + ResponseReasoningSummaryTextDone?.ToString() ?? + ResponseReasoningTextDelta?.ToString() ?? + ResponseReasoningTextDone?.ToString() ?? + ResponseRefusalDelta?.ToString() ?? + ResponseRefusalDone?.ToString() ?? + ResponseOutputTextDelta?.ToString() ?? + ResponseOutputTextDone?.ToString() ?? + ResponseWebSearchCallCompleted?.ToString() ?? + ResponseWebSearchCallInProgress?.ToString() ?? + ResponseWebSearchCallSearching?.ToString() ?? + ResponseImageGenerationCallCompleted?.ToString() ?? + ResponseImageGenerationCallGenerating?.ToString() ?? + ResponseImageGenerationCallInProgress?.ToString() ?? + ResponseImageGenerationCallPartialImage?.ToString() ?? + ResponseMcpCallArgumentsDelta?.ToString() ?? + ResponseMcpCallArgumentsDone?.ToString() ?? + ResponseMcpCallCompleted?.ToString() ?? + ResponseMcpCallFailed?.ToString() ?? + ResponseMcpCallInProgress?.ToString() ?? + ResponseMcpListToolsCompleted?.ToString() ?? + ResponseMcpListToolsFailed?.ToString() ?? + ResponseMcpListToolsInProgress?.ToString() ?? + ResponseOutputTextAnnotationAdded?.ToString() ?? + ResponseQueued?.ToString() ?? + ResponseCustomToolCallInputDelta?.ToString() ?? + ResponseCustomToolCallInputDone?.ToString() ; /// @@ -2101,66 +2100,66 @@ AudioDelta as object /// public bool Validate() { - return IsAudioDelta || IsAudioDone || IsAudioTranscriptDelta || IsAudioTranscriptDone || IsCodeInterpreterCallDelta || IsCodeInterpreterCallDone || IsCodeInterpreterCallCompleted || IsCodeInterpreterCallInProgress || IsCodeInterpreterCallInterpreting || IsCompleted || IsContentPartAdded || IsContentPartDone || IsCreated || IsError || IsFileSearchCallCompleted || IsFileSearchCallInProgress || IsFileSearchCallSearching || IsFunctionCallArgumentsDelta || IsFunctionCallArgumentsDone || IsInProgress || IsFailed || IsIncomplete || IsOutputItemAdded || IsOutputItemDone || IsReasoningSummaryPartAdded || IsReasoningSummaryPartDone || IsReasoningSummaryTextDelta || IsReasoningSummaryTextDone || IsReasoningTextDelta || IsReasoningTextDone || IsRefusalDelta || IsRefusalDone || IsTextDelta || IsTextDone || IsWebSearchCallCompleted || IsWebSearchCallInProgress || IsWebSearchCallSearching || IsImageGenCallCompleted || IsImageGenCallGenerating || IsImageGenCallInProgress || IsImageGenCallPartial || IsMCPCallArgumentsDelta || IsMCPCallArgumentsDone || IsMCPCallCompleted || IsMCPCallFailed || IsMCPCallInProgress || IsMCPListToolsCompleted || IsMCPListToolsFailed || IsMCPListToolsInProgress || IsOutputTextAnnotationAdded || IsQueued || IsCustomToolCallInputDelta || IsCustomToolCallInputDone; + return IsResponseAudioDelta || IsResponseAudioDone || IsResponseAudioTranscriptDelta || IsResponseAudioTranscriptDone || IsResponseCodeInterpreterCallCodeDelta || IsResponseCodeInterpreterCallCodeDone || IsResponseCodeInterpreterCallCompleted || IsResponseCodeInterpreterCallInProgress || IsResponseCodeInterpreterCallInterpreting || IsResponseCompleted || IsResponseContentPartAdded || IsResponseContentPartDone || IsResponseCreated || IsError || IsResponseFileSearchCallCompleted || IsResponseFileSearchCallInProgress || IsResponseFileSearchCallSearching || IsResponseFunctionCallArgumentsDelta || IsResponseFunctionCallArgumentsDone || IsResponseInProgress || IsResponseFailed || IsResponseIncomplete || IsResponseOutputItemAdded || IsResponseOutputItemDone || IsResponseReasoningSummaryPartAdded || IsResponseReasoningSummaryPartDone || IsResponseReasoningSummaryTextDelta || IsResponseReasoningSummaryTextDone || IsResponseReasoningTextDelta || IsResponseReasoningTextDone || IsResponseRefusalDelta || IsResponseRefusalDone || IsResponseOutputTextDelta || IsResponseOutputTextDone || IsResponseWebSearchCallCompleted || IsResponseWebSearchCallInProgress || IsResponseWebSearchCallSearching || IsResponseImageGenerationCallCompleted || IsResponseImageGenerationCallGenerating || IsResponseImageGenerationCallInProgress || IsResponseImageGenerationCallPartialImage || IsResponseMcpCallArgumentsDelta || IsResponseMcpCallArgumentsDone || IsResponseMcpCallCompleted || IsResponseMcpCallFailed || IsResponseMcpCallInProgress || IsResponseMcpListToolsCompleted || IsResponseMcpListToolsFailed || IsResponseMcpListToolsInProgress || IsResponseOutputTextAnnotationAdded || IsResponseQueued || IsResponseCustomToolCallInputDelta || IsResponseCustomToolCallInputDone; } /// /// /// public TResult? Match( - global::System.Func? audioDelta = null, - global::System.Func? audioDone = null, - global::System.Func? audioTranscriptDelta = null, - global::System.Func? audioTranscriptDone = null, - global::System.Func? codeInterpreterCallDelta = null, - global::System.Func? codeInterpreterCallDone = null, - global::System.Func? codeInterpreterCallCompleted = null, - global::System.Func? codeInterpreterCallInProgress = null, - global::System.Func? codeInterpreterCallInterpreting = null, - global::System.Func? completed = null, - global::System.Func? contentPartAdded = null, - global::System.Func? contentPartDone = null, - global::System.Func? created = null, + global::System.Func? responseAudioDelta = null, + global::System.Func? responseAudioDone = null, + global::System.Func? responseAudioTranscriptDelta = null, + global::System.Func? responseAudioTranscriptDone = null, + global::System.Func? responseCodeInterpreterCallCodeDelta = null, + global::System.Func? responseCodeInterpreterCallCodeDone = null, + global::System.Func? responseCodeInterpreterCallCompleted = null, + global::System.Func? responseCodeInterpreterCallInProgress = null, + global::System.Func? responseCodeInterpreterCallInterpreting = null, + global::System.Func? responseCompleted = null, + global::System.Func? responseContentPartAdded = null, + global::System.Func? responseContentPartDone = null, + global::System.Func? responseCreated = null, global::System.Func? error = null, - global::System.Func? fileSearchCallCompleted = null, - global::System.Func? fileSearchCallInProgress = null, - global::System.Func? fileSearchCallSearching = null, - global::System.Func? functionCallArgumentsDelta = null, - global::System.Func? functionCallArgumentsDone = null, - global::System.Func? inProgress = null, - global::System.Func? failed = null, - global::System.Func? incomplete = null, - global::System.Func? outputItemAdded = null, - global::System.Func? outputItemDone = null, - global::System.Func? reasoningSummaryPartAdded = null, - global::System.Func? reasoningSummaryPartDone = null, - global::System.Func? reasoningSummaryTextDelta = null, - global::System.Func? reasoningSummaryTextDone = null, - global::System.Func? reasoningTextDelta = null, - global::System.Func? reasoningTextDone = null, - global::System.Func? refusalDelta = null, - global::System.Func? refusalDone = null, - global::System.Func? textDelta = null, - global::System.Func? textDone = null, - global::System.Func? webSearchCallCompleted = null, - global::System.Func? webSearchCallInProgress = null, - global::System.Func? webSearchCallSearching = null, - global::System.Func? imageGenCallCompleted = null, - global::System.Func? imageGenCallGenerating = null, - global::System.Func? imageGenCallInProgress = null, - global::System.Func? imageGenCallPartial = null, - global::System.Func? mCPCallArgumentsDelta = null, - global::System.Func? mCPCallArgumentsDone = null, - global::System.Func? mCPCallCompleted = null, - global::System.Func? mCPCallFailed = null, - global::System.Func? mCPCallInProgress = null, - global::System.Func? mCPListToolsCompleted = null, - global::System.Func? mCPListToolsFailed = null, - global::System.Func? mCPListToolsInProgress = null, - global::System.Func? outputTextAnnotationAdded = null, - global::System.Func? queued = null, - global::System.Func? customToolCallInputDelta = null, - global::System.Func? customToolCallInputDone = null, + global::System.Func? responseFileSearchCallCompleted = null, + global::System.Func? responseFileSearchCallInProgress = null, + global::System.Func? responseFileSearchCallSearching = null, + global::System.Func? responseFunctionCallArgumentsDelta = null, + global::System.Func? responseFunctionCallArgumentsDone = null, + global::System.Func? responseInProgress = null, + global::System.Func? responseFailed = null, + global::System.Func? responseIncomplete = null, + global::System.Func? responseOutputItemAdded = null, + global::System.Func? responseOutputItemDone = null, + global::System.Func? responseReasoningSummaryPartAdded = null, + global::System.Func? responseReasoningSummaryPartDone = null, + global::System.Func? responseReasoningSummaryTextDelta = null, + global::System.Func? responseReasoningSummaryTextDone = null, + global::System.Func? responseReasoningTextDelta = null, + global::System.Func? responseReasoningTextDone = null, + global::System.Func? responseRefusalDelta = null, + global::System.Func? responseRefusalDone = null, + global::System.Func? responseOutputTextDelta = null, + global::System.Func? responseOutputTextDone = null, + global::System.Func? responseWebSearchCallCompleted = null, + global::System.Func? responseWebSearchCallInProgress = null, + global::System.Func? responseWebSearchCallSearching = null, + global::System.Func? responseImageGenerationCallCompleted = null, + global::System.Func? responseImageGenerationCallGenerating = null, + global::System.Func? responseImageGenerationCallInProgress = null, + global::System.Func? responseImageGenerationCallPartialImage = null, + global::System.Func? responseMcpCallArgumentsDelta = null, + global::System.Func? responseMcpCallArgumentsDone = null, + global::System.Func? responseMcpCallCompleted = null, + global::System.Func? responseMcpCallFailed = null, + global::System.Func? responseMcpCallInProgress = null, + global::System.Func? responseMcpListToolsCompleted = null, + global::System.Func? responseMcpListToolsFailed = null, + global::System.Func? responseMcpListToolsInProgress = null, + global::System.Func? responseOutputTextAnnotationAdded = null, + global::System.Func? responseQueued = null, + global::System.Func? responseCustomToolCallInputDelta = null, + global::System.Func? responseCustomToolCallInputDone = null, bool validate = true) { if (validate) @@ -2168,217 +2167,217 @@ public bool Validate() Validate(); } - if (IsAudioDelta && audioDelta != null) + if (IsResponseAudioDelta && responseAudioDelta != null) { - return audioDelta(AudioDelta!); + return responseAudioDelta(ResponseAudioDelta!); } - else if (IsAudioDone && audioDone != null) + else if (IsResponseAudioDone && responseAudioDone != null) { - return audioDone(AudioDone!); + return responseAudioDone(ResponseAudioDone!); } - else if (IsAudioTranscriptDelta && audioTranscriptDelta != null) + else if (IsResponseAudioTranscriptDelta && responseAudioTranscriptDelta != null) { - return audioTranscriptDelta(AudioTranscriptDelta!); + return responseAudioTranscriptDelta(ResponseAudioTranscriptDelta!); } - else if (IsAudioTranscriptDone && audioTranscriptDone != null) + else if (IsResponseAudioTranscriptDone && responseAudioTranscriptDone != null) { - return audioTranscriptDone(AudioTranscriptDone!); + return responseAudioTranscriptDone(ResponseAudioTranscriptDone!); } - else if (IsCodeInterpreterCallDelta && codeInterpreterCallDelta != null) + else if (IsResponseCodeInterpreterCallCodeDelta && responseCodeInterpreterCallCodeDelta != null) { - return codeInterpreterCallDelta(CodeInterpreterCallDelta!); + return responseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDelta!); } - else if (IsCodeInterpreterCallDone && codeInterpreterCallDone != null) + else if (IsResponseCodeInterpreterCallCodeDone && responseCodeInterpreterCallCodeDone != null) { - return codeInterpreterCallDone(CodeInterpreterCallDone!); + return responseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDone!); } - else if (IsCodeInterpreterCallCompleted && codeInterpreterCallCompleted != null) + else if (IsResponseCodeInterpreterCallCompleted && responseCodeInterpreterCallCompleted != null) { - return codeInterpreterCallCompleted(CodeInterpreterCallCompleted!); + return responseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompleted!); } - else if (IsCodeInterpreterCallInProgress && codeInterpreterCallInProgress != null) + else if (IsResponseCodeInterpreterCallInProgress && responseCodeInterpreterCallInProgress != null) { - return codeInterpreterCallInProgress(CodeInterpreterCallInProgress!); + return responseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgress!); } - else if (IsCodeInterpreterCallInterpreting && codeInterpreterCallInterpreting != null) + else if (IsResponseCodeInterpreterCallInterpreting && responseCodeInterpreterCallInterpreting != null) { - return codeInterpreterCallInterpreting(CodeInterpreterCallInterpreting!); + return responseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpreting!); } - else if (IsCompleted && completed != null) + else if (IsResponseCompleted && responseCompleted != null) { - return completed(Completed!); + return responseCompleted(ResponseCompleted!); } - else if (IsContentPartAdded && contentPartAdded != null) + else if (IsResponseContentPartAdded && responseContentPartAdded != null) { - return contentPartAdded(ContentPartAdded!); + return responseContentPartAdded(ResponseContentPartAdded!); } - else if (IsContentPartDone && contentPartDone != null) + else if (IsResponseContentPartDone && responseContentPartDone != null) { - return contentPartDone(ContentPartDone!); + return responseContentPartDone(ResponseContentPartDone!); } - else if (IsCreated && created != null) + else if (IsResponseCreated && responseCreated != null) { - return created(Created!); + return responseCreated(ResponseCreated!); } else if (IsError && error != null) { return error(Error!); } - else if (IsFileSearchCallCompleted && fileSearchCallCompleted != null) + else if (IsResponseFileSearchCallCompleted && responseFileSearchCallCompleted != null) { - return fileSearchCallCompleted(FileSearchCallCompleted!); + return responseFileSearchCallCompleted(ResponseFileSearchCallCompleted!); } - else if (IsFileSearchCallInProgress && fileSearchCallInProgress != null) + else if (IsResponseFileSearchCallInProgress && responseFileSearchCallInProgress != null) { - return fileSearchCallInProgress(FileSearchCallInProgress!); + return responseFileSearchCallInProgress(ResponseFileSearchCallInProgress!); } - else if (IsFileSearchCallSearching && fileSearchCallSearching != null) + else if (IsResponseFileSearchCallSearching && responseFileSearchCallSearching != null) { - return fileSearchCallSearching(FileSearchCallSearching!); + return responseFileSearchCallSearching(ResponseFileSearchCallSearching!); } - else if (IsFunctionCallArgumentsDelta && functionCallArgumentsDelta != null) + else if (IsResponseFunctionCallArgumentsDelta && responseFunctionCallArgumentsDelta != null) { - return functionCallArgumentsDelta(FunctionCallArgumentsDelta!); + return responseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDelta!); } - else if (IsFunctionCallArgumentsDone && functionCallArgumentsDone != null) + else if (IsResponseFunctionCallArgumentsDone && responseFunctionCallArgumentsDone != null) { - return functionCallArgumentsDone(FunctionCallArgumentsDone!); + return responseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDone!); } - else if (IsInProgress && inProgress != null) + else if (IsResponseInProgress && responseInProgress != null) { - return inProgress(InProgress!); + return responseInProgress(ResponseInProgress!); } - else if (IsFailed && failed != null) + else if (IsResponseFailed && responseFailed != null) { - return failed(Failed!); + return responseFailed(ResponseFailed!); } - else if (IsIncomplete && incomplete != null) + else if (IsResponseIncomplete && responseIncomplete != null) { - return incomplete(Incomplete!); + return responseIncomplete(ResponseIncomplete!); } - else if (IsOutputItemAdded && outputItemAdded != null) + else if (IsResponseOutputItemAdded && responseOutputItemAdded != null) { - return outputItemAdded(OutputItemAdded!); + return responseOutputItemAdded(ResponseOutputItemAdded!); } - else if (IsOutputItemDone && outputItemDone != null) + else if (IsResponseOutputItemDone && responseOutputItemDone != null) { - return outputItemDone(OutputItemDone!); + return responseOutputItemDone(ResponseOutputItemDone!); } - else if (IsReasoningSummaryPartAdded && reasoningSummaryPartAdded != null) + else if (IsResponseReasoningSummaryPartAdded && responseReasoningSummaryPartAdded != null) { - return reasoningSummaryPartAdded(ReasoningSummaryPartAdded!); + return responseReasoningSummaryPartAdded(ResponseReasoningSummaryPartAdded!); } - else if (IsReasoningSummaryPartDone && reasoningSummaryPartDone != null) + else if (IsResponseReasoningSummaryPartDone && responseReasoningSummaryPartDone != null) { - return reasoningSummaryPartDone(ReasoningSummaryPartDone!); + return responseReasoningSummaryPartDone(ResponseReasoningSummaryPartDone!); } - else if (IsReasoningSummaryTextDelta && reasoningSummaryTextDelta != null) + else if (IsResponseReasoningSummaryTextDelta && responseReasoningSummaryTextDelta != null) { - return reasoningSummaryTextDelta(ReasoningSummaryTextDelta!); + return responseReasoningSummaryTextDelta(ResponseReasoningSummaryTextDelta!); } - else if (IsReasoningSummaryTextDone && reasoningSummaryTextDone != null) + else if (IsResponseReasoningSummaryTextDone && responseReasoningSummaryTextDone != null) { - return reasoningSummaryTextDone(ReasoningSummaryTextDone!); + return responseReasoningSummaryTextDone(ResponseReasoningSummaryTextDone!); } - else if (IsReasoningTextDelta && reasoningTextDelta != null) + else if (IsResponseReasoningTextDelta && responseReasoningTextDelta != null) { - return reasoningTextDelta(ReasoningTextDelta!); + return responseReasoningTextDelta(ResponseReasoningTextDelta!); } - else if (IsReasoningTextDone && reasoningTextDone != null) + else if (IsResponseReasoningTextDone && responseReasoningTextDone != null) { - return reasoningTextDone(ReasoningTextDone!); + return responseReasoningTextDone(ResponseReasoningTextDone!); } - else if (IsRefusalDelta && refusalDelta != null) + else if (IsResponseRefusalDelta && responseRefusalDelta != null) { - return refusalDelta(RefusalDelta!); + return responseRefusalDelta(ResponseRefusalDelta!); } - else if (IsRefusalDone && refusalDone != null) + else if (IsResponseRefusalDone && responseRefusalDone != null) { - return refusalDone(RefusalDone!); + return responseRefusalDone(ResponseRefusalDone!); } - else if (IsTextDelta && textDelta != null) + else if (IsResponseOutputTextDelta && responseOutputTextDelta != null) { - return textDelta(TextDelta!); + return responseOutputTextDelta(ResponseOutputTextDelta!); } - else if (IsTextDone && textDone != null) + else if (IsResponseOutputTextDone && responseOutputTextDone != null) { - return textDone(TextDone!); + return responseOutputTextDone(ResponseOutputTextDone!); } - else if (IsWebSearchCallCompleted && webSearchCallCompleted != null) + else if (IsResponseWebSearchCallCompleted && responseWebSearchCallCompleted != null) { - return webSearchCallCompleted(WebSearchCallCompleted!); + return responseWebSearchCallCompleted(ResponseWebSearchCallCompleted!); } - else if (IsWebSearchCallInProgress && webSearchCallInProgress != null) + else if (IsResponseWebSearchCallInProgress && responseWebSearchCallInProgress != null) { - return webSearchCallInProgress(WebSearchCallInProgress!); + return responseWebSearchCallInProgress(ResponseWebSearchCallInProgress!); } - else if (IsWebSearchCallSearching && webSearchCallSearching != null) + else if (IsResponseWebSearchCallSearching && responseWebSearchCallSearching != null) { - return webSearchCallSearching(WebSearchCallSearching!); + return responseWebSearchCallSearching(ResponseWebSearchCallSearching!); } - else if (IsImageGenCallCompleted && imageGenCallCompleted != null) + else if (IsResponseImageGenerationCallCompleted && responseImageGenerationCallCompleted != null) { - return imageGenCallCompleted(ImageGenCallCompleted!); + return responseImageGenerationCallCompleted(ResponseImageGenerationCallCompleted!); } - else if (IsImageGenCallGenerating && imageGenCallGenerating != null) + else if (IsResponseImageGenerationCallGenerating && responseImageGenerationCallGenerating != null) { - return imageGenCallGenerating(ImageGenCallGenerating!); + return responseImageGenerationCallGenerating(ResponseImageGenerationCallGenerating!); } - else if (IsImageGenCallInProgress && imageGenCallInProgress != null) + else if (IsResponseImageGenerationCallInProgress && responseImageGenerationCallInProgress != null) { - return imageGenCallInProgress(ImageGenCallInProgress!); + return responseImageGenerationCallInProgress(ResponseImageGenerationCallInProgress!); } - else if (IsImageGenCallPartial && imageGenCallPartial != null) + else if (IsResponseImageGenerationCallPartialImage && responseImageGenerationCallPartialImage != null) { - return imageGenCallPartial(ImageGenCallPartial!); + return responseImageGenerationCallPartialImage(ResponseImageGenerationCallPartialImage!); } - else if (IsMCPCallArgumentsDelta && mCPCallArgumentsDelta != null) + else if (IsResponseMcpCallArgumentsDelta && responseMcpCallArgumentsDelta != null) { - return mCPCallArgumentsDelta(MCPCallArgumentsDelta!); + return responseMcpCallArgumentsDelta(ResponseMcpCallArgumentsDelta!); } - else if (IsMCPCallArgumentsDone && mCPCallArgumentsDone != null) + else if (IsResponseMcpCallArgumentsDone && responseMcpCallArgumentsDone != null) { - return mCPCallArgumentsDone(MCPCallArgumentsDone!); + return responseMcpCallArgumentsDone(ResponseMcpCallArgumentsDone!); } - else if (IsMCPCallCompleted && mCPCallCompleted != null) + else if (IsResponseMcpCallCompleted && responseMcpCallCompleted != null) { - return mCPCallCompleted(MCPCallCompleted!); + return responseMcpCallCompleted(ResponseMcpCallCompleted!); } - else if (IsMCPCallFailed && mCPCallFailed != null) + else if (IsResponseMcpCallFailed && responseMcpCallFailed != null) { - return mCPCallFailed(MCPCallFailed!); + return responseMcpCallFailed(ResponseMcpCallFailed!); } - else if (IsMCPCallInProgress && mCPCallInProgress != null) + else if (IsResponseMcpCallInProgress && responseMcpCallInProgress != null) { - return mCPCallInProgress(MCPCallInProgress!); + return responseMcpCallInProgress(ResponseMcpCallInProgress!); } - else if (IsMCPListToolsCompleted && mCPListToolsCompleted != null) + else if (IsResponseMcpListToolsCompleted && responseMcpListToolsCompleted != null) { - return mCPListToolsCompleted(MCPListToolsCompleted!); + return responseMcpListToolsCompleted(ResponseMcpListToolsCompleted!); } - else if (IsMCPListToolsFailed && mCPListToolsFailed != null) + else if (IsResponseMcpListToolsFailed && responseMcpListToolsFailed != null) { - return mCPListToolsFailed(MCPListToolsFailed!); + return responseMcpListToolsFailed(ResponseMcpListToolsFailed!); } - else if (IsMCPListToolsInProgress && mCPListToolsInProgress != null) + else if (IsResponseMcpListToolsInProgress && responseMcpListToolsInProgress != null) { - return mCPListToolsInProgress(MCPListToolsInProgress!); + return responseMcpListToolsInProgress(ResponseMcpListToolsInProgress!); } - else if (IsOutputTextAnnotationAdded && outputTextAnnotationAdded != null) + else if (IsResponseOutputTextAnnotationAdded && responseOutputTextAnnotationAdded != null) { - return outputTextAnnotationAdded(OutputTextAnnotationAdded!); + return responseOutputTextAnnotationAdded(ResponseOutputTextAnnotationAdded!); } - else if (IsQueued && queued != null) + else if (IsResponseQueued && responseQueued != null) { - return queued(Queued!); + return responseQueued(ResponseQueued!); } - else if (IsCustomToolCallInputDelta && customToolCallInputDelta != null) + else if (IsResponseCustomToolCallInputDelta && responseCustomToolCallInputDelta != null) { - return customToolCallInputDelta(CustomToolCallInputDelta!); + return responseCustomToolCallInputDelta(ResponseCustomToolCallInputDelta!); } - else if (IsCustomToolCallInputDone && customToolCallInputDone != null) + else if (IsResponseCustomToolCallInputDone && responseCustomToolCallInputDone != null) { - return customToolCallInputDone(CustomToolCallInputDone!); + return responseCustomToolCallInputDone(ResponseCustomToolCallInputDone!); } return default(TResult); @@ -2388,59 +2387,59 @@ public bool Validate() /// /// public void Match( - global::System.Action? audioDelta = null, - global::System.Action? audioDone = null, - global::System.Action? audioTranscriptDelta = null, - global::System.Action? audioTranscriptDone = null, - global::System.Action? codeInterpreterCallDelta = null, - global::System.Action? codeInterpreterCallDone = null, - global::System.Action? codeInterpreterCallCompleted = null, - global::System.Action? codeInterpreterCallInProgress = null, - global::System.Action? codeInterpreterCallInterpreting = null, - global::System.Action? completed = null, - global::System.Action? contentPartAdded = null, - global::System.Action? contentPartDone = null, - global::System.Action? created = null, + global::System.Action? responseAudioDelta = null, + global::System.Action? responseAudioDone = null, + global::System.Action? responseAudioTranscriptDelta = null, + global::System.Action? responseAudioTranscriptDone = null, + global::System.Action? responseCodeInterpreterCallCodeDelta = null, + global::System.Action? responseCodeInterpreterCallCodeDone = null, + global::System.Action? responseCodeInterpreterCallCompleted = null, + global::System.Action? responseCodeInterpreterCallInProgress = null, + global::System.Action? responseCodeInterpreterCallInterpreting = null, + global::System.Action? responseCompleted = null, + global::System.Action? responseContentPartAdded = null, + global::System.Action? responseContentPartDone = null, + global::System.Action? responseCreated = null, global::System.Action? error = null, - global::System.Action? fileSearchCallCompleted = null, - global::System.Action? fileSearchCallInProgress = null, - global::System.Action? fileSearchCallSearching = null, - global::System.Action? functionCallArgumentsDelta = null, - global::System.Action? functionCallArgumentsDone = null, - global::System.Action? inProgress = null, - global::System.Action? failed = null, - global::System.Action? incomplete = null, - global::System.Action? outputItemAdded = null, - global::System.Action? outputItemDone = null, - global::System.Action? reasoningSummaryPartAdded = null, - global::System.Action? reasoningSummaryPartDone = null, - global::System.Action? reasoningSummaryTextDelta = null, - global::System.Action? reasoningSummaryTextDone = null, - global::System.Action? reasoningTextDelta = null, - global::System.Action? reasoningTextDone = null, - global::System.Action? refusalDelta = null, - global::System.Action? refusalDone = null, - global::System.Action? textDelta = null, - global::System.Action? textDone = null, - global::System.Action? webSearchCallCompleted = null, - global::System.Action? webSearchCallInProgress = null, - global::System.Action? webSearchCallSearching = null, - global::System.Action? imageGenCallCompleted = null, - global::System.Action? imageGenCallGenerating = null, - global::System.Action? imageGenCallInProgress = null, - global::System.Action? imageGenCallPartial = null, - global::System.Action? mCPCallArgumentsDelta = null, - global::System.Action? mCPCallArgumentsDone = null, - global::System.Action? mCPCallCompleted = null, - global::System.Action? mCPCallFailed = null, - global::System.Action? mCPCallInProgress = null, - global::System.Action? mCPListToolsCompleted = null, - global::System.Action? mCPListToolsFailed = null, - global::System.Action? mCPListToolsInProgress = null, - global::System.Action? outputTextAnnotationAdded = null, - global::System.Action? queued = null, - global::System.Action? customToolCallInputDelta = null, - global::System.Action? customToolCallInputDone = null, + global::System.Action? responseFileSearchCallCompleted = null, + global::System.Action? responseFileSearchCallInProgress = null, + global::System.Action? responseFileSearchCallSearching = null, + global::System.Action? responseFunctionCallArgumentsDelta = null, + global::System.Action? responseFunctionCallArgumentsDone = null, + global::System.Action? responseInProgress = null, + global::System.Action? responseFailed = null, + global::System.Action? responseIncomplete = null, + global::System.Action? responseOutputItemAdded = null, + global::System.Action? responseOutputItemDone = null, + global::System.Action? responseReasoningSummaryPartAdded = null, + global::System.Action? responseReasoningSummaryPartDone = null, + global::System.Action? responseReasoningSummaryTextDelta = null, + global::System.Action? responseReasoningSummaryTextDone = null, + global::System.Action? responseReasoningTextDelta = null, + global::System.Action? responseReasoningTextDone = null, + global::System.Action? responseRefusalDelta = null, + global::System.Action? responseRefusalDone = null, + global::System.Action? responseOutputTextDelta = null, + global::System.Action? responseOutputTextDone = null, + global::System.Action? responseWebSearchCallCompleted = null, + global::System.Action? responseWebSearchCallInProgress = null, + global::System.Action? responseWebSearchCallSearching = null, + global::System.Action? responseImageGenerationCallCompleted = null, + global::System.Action? responseImageGenerationCallGenerating = null, + global::System.Action? responseImageGenerationCallInProgress = null, + global::System.Action? responseImageGenerationCallPartialImage = null, + global::System.Action? responseMcpCallArgumentsDelta = null, + global::System.Action? responseMcpCallArgumentsDone = null, + global::System.Action? responseMcpCallCompleted = null, + global::System.Action? responseMcpCallFailed = null, + global::System.Action? responseMcpCallInProgress = null, + global::System.Action? responseMcpListToolsCompleted = null, + global::System.Action? responseMcpListToolsFailed = null, + global::System.Action? responseMcpListToolsInProgress = null, + global::System.Action? responseOutputTextAnnotationAdded = null, + global::System.Action? responseQueued = null, + global::System.Action? responseCustomToolCallInputDelta = null, + global::System.Action? responseCustomToolCallInputDone = null, bool validate = true) { if (validate) @@ -2448,217 +2447,217 @@ public void Match( Validate(); } - if (IsAudioDelta) + if (IsResponseAudioDelta) { - audioDelta?.Invoke(AudioDelta!); + responseAudioDelta?.Invoke(ResponseAudioDelta!); } - else if (IsAudioDone) + else if (IsResponseAudioDone) { - audioDone?.Invoke(AudioDone!); + responseAudioDone?.Invoke(ResponseAudioDone!); } - else if (IsAudioTranscriptDelta) + else if (IsResponseAudioTranscriptDelta) { - audioTranscriptDelta?.Invoke(AudioTranscriptDelta!); + responseAudioTranscriptDelta?.Invoke(ResponseAudioTranscriptDelta!); } - else if (IsAudioTranscriptDone) + else if (IsResponseAudioTranscriptDone) { - audioTranscriptDone?.Invoke(AudioTranscriptDone!); + responseAudioTranscriptDone?.Invoke(ResponseAudioTranscriptDone!); } - else if (IsCodeInterpreterCallDelta) + else if (IsResponseCodeInterpreterCallCodeDelta) { - codeInterpreterCallDelta?.Invoke(CodeInterpreterCallDelta!); + responseCodeInterpreterCallCodeDelta?.Invoke(ResponseCodeInterpreterCallCodeDelta!); } - else if (IsCodeInterpreterCallDone) + else if (IsResponseCodeInterpreterCallCodeDone) { - codeInterpreterCallDone?.Invoke(CodeInterpreterCallDone!); + responseCodeInterpreterCallCodeDone?.Invoke(ResponseCodeInterpreterCallCodeDone!); } - else if (IsCodeInterpreterCallCompleted) + else if (IsResponseCodeInterpreterCallCompleted) { - codeInterpreterCallCompleted?.Invoke(CodeInterpreterCallCompleted!); + responseCodeInterpreterCallCompleted?.Invoke(ResponseCodeInterpreterCallCompleted!); } - else if (IsCodeInterpreterCallInProgress) + else if (IsResponseCodeInterpreterCallInProgress) { - codeInterpreterCallInProgress?.Invoke(CodeInterpreterCallInProgress!); + responseCodeInterpreterCallInProgress?.Invoke(ResponseCodeInterpreterCallInProgress!); } - else if (IsCodeInterpreterCallInterpreting) + else if (IsResponseCodeInterpreterCallInterpreting) { - codeInterpreterCallInterpreting?.Invoke(CodeInterpreterCallInterpreting!); + responseCodeInterpreterCallInterpreting?.Invoke(ResponseCodeInterpreterCallInterpreting!); } - else if (IsCompleted) + else if (IsResponseCompleted) { - completed?.Invoke(Completed!); + responseCompleted?.Invoke(ResponseCompleted!); } - else if (IsContentPartAdded) + else if (IsResponseContentPartAdded) { - contentPartAdded?.Invoke(ContentPartAdded!); + responseContentPartAdded?.Invoke(ResponseContentPartAdded!); } - else if (IsContentPartDone) + else if (IsResponseContentPartDone) { - contentPartDone?.Invoke(ContentPartDone!); + responseContentPartDone?.Invoke(ResponseContentPartDone!); } - else if (IsCreated) + else if (IsResponseCreated) { - created?.Invoke(Created!); + responseCreated?.Invoke(ResponseCreated!); } else if (IsError) { error?.Invoke(Error!); } - else if (IsFileSearchCallCompleted) + else if (IsResponseFileSearchCallCompleted) { - fileSearchCallCompleted?.Invoke(FileSearchCallCompleted!); + responseFileSearchCallCompleted?.Invoke(ResponseFileSearchCallCompleted!); } - else if (IsFileSearchCallInProgress) + else if (IsResponseFileSearchCallInProgress) { - fileSearchCallInProgress?.Invoke(FileSearchCallInProgress!); + responseFileSearchCallInProgress?.Invoke(ResponseFileSearchCallInProgress!); } - else if (IsFileSearchCallSearching) + else if (IsResponseFileSearchCallSearching) { - fileSearchCallSearching?.Invoke(FileSearchCallSearching!); + responseFileSearchCallSearching?.Invoke(ResponseFileSearchCallSearching!); } - else if (IsFunctionCallArgumentsDelta) + else if (IsResponseFunctionCallArgumentsDelta) { - functionCallArgumentsDelta?.Invoke(FunctionCallArgumentsDelta!); + responseFunctionCallArgumentsDelta?.Invoke(ResponseFunctionCallArgumentsDelta!); } - else if (IsFunctionCallArgumentsDone) + else if (IsResponseFunctionCallArgumentsDone) { - functionCallArgumentsDone?.Invoke(FunctionCallArgumentsDone!); + responseFunctionCallArgumentsDone?.Invoke(ResponseFunctionCallArgumentsDone!); } - else if (IsInProgress) + else if (IsResponseInProgress) { - inProgress?.Invoke(InProgress!); + responseInProgress?.Invoke(ResponseInProgress!); } - else if (IsFailed) + else if (IsResponseFailed) { - failed?.Invoke(Failed!); + responseFailed?.Invoke(ResponseFailed!); } - else if (IsIncomplete) + else if (IsResponseIncomplete) { - incomplete?.Invoke(Incomplete!); + responseIncomplete?.Invoke(ResponseIncomplete!); } - else if (IsOutputItemAdded) + else if (IsResponseOutputItemAdded) { - outputItemAdded?.Invoke(OutputItemAdded!); + responseOutputItemAdded?.Invoke(ResponseOutputItemAdded!); } - else if (IsOutputItemDone) + else if (IsResponseOutputItemDone) { - outputItemDone?.Invoke(OutputItemDone!); + responseOutputItemDone?.Invoke(ResponseOutputItemDone!); } - else if (IsReasoningSummaryPartAdded) + else if (IsResponseReasoningSummaryPartAdded) { - reasoningSummaryPartAdded?.Invoke(ReasoningSummaryPartAdded!); + responseReasoningSummaryPartAdded?.Invoke(ResponseReasoningSummaryPartAdded!); } - else if (IsReasoningSummaryPartDone) + else if (IsResponseReasoningSummaryPartDone) { - reasoningSummaryPartDone?.Invoke(ReasoningSummaryPartDone!); + responseReasoningSummaryPartDone?.Invoke(ResponseReasoningSummaryPartDone!); } - else if (IsReasoningSummaryTextDelta) + else if (IsResponseReasoningSummaryTextDelta) { - reasoningSummaryTextDelta?.Invoke(ReasoningSummaryTextDelta!); + responseReasoningSummaryTextDelta?.Invoke(ResponseReasoningSummaryTextDelta!); } - else if (IsReasoningSummaryTextDone) + else if (IsResponseReasoningSummaryTextDone) { - reasoningSummaryTextDone?.Invoke(ReasoningSummaryTextDone!); + responseReasoningSummaryTextDone?.Invoke(ResponseReasoningSummaryTextDone!); } - else if (IsReasoningTextDelta) + else if (IsResponseReasoningTextDelta) { - reasoningTextDelta?.Invoke(ReasoningTextDelta!); + responseReasoningTextDelta?.Invoke(ResponseReasoningTextDelta!); } - else if (IsReasoningTextDone) + else if (IsResponseReasoningTextDone) { - reasoningTextDone?.Invoke(ReasoningTextDone!); + responseReasoningTextDone?.Invoke(ResponseReasoningTextDone!); } - else if (IsRefusalDelta) + else if (IsResponseRefusalDelta) { - refusalDelta?.Invoke(RefusalDelta!); + responseRefusalDelta?.Invoke(ResponseRefusalDelta!); } - else if (IsRefusalDone) + else if (IsResponseRefusalDone) { - refusalDone?.Invoke(RefusalDone!); + responseRefusalDone?.Invoke(ResponseRefusalDone!); } - else if (IsTextDelta) + else if (IsResponseOutputTextDelta) { - textDelta?.Invoke(TextDelta!); + responseOutputTextDelta?.Invoke(ResponseOutputTextDelta!); } - else if (IsTextDone) + else if (IsResponseOutputTextDone) { - textDone?.Invoke(TextDone!); + responseOutputTextDone?.Invoke(ResponseOutputTextDone!); } - else if (IsWebSearchCallCompleted) + else if (IsResponseWebSearchCallCompleted) { - webSearchCallCompleted?.Invoke(WebSearchCallCompleted!); + responseWebSearchCallCompleted?.Invoke(ResponseWebSearchCallCompleted!); } - else if (IsWebSearchCallInProgress) + else if (IsResponseWebSearchCallInProgress) { - webSearchCallInProgress?.Invoke(WebSearchCallInProgress!); + responseWebSearchCallInProgress?.Invoke(ResponseWebSearchCallInProgress!); } - else if (IsWebSearchCallSearching) + else if (IsResponseWebSearchCallSearching) { - webSearchCallSearching?.Invoke(WebSearchCallSearching!); + responseWebSearchCallSearching?.Invoke(ResponseWebSearchCallSearching!); } - else if (IsImageGenCallCompleted) + else if (IsResponseImageGenerationCallCompleted) { - imageGenCallCompleted?.Invoke(ImageGenCallCompleted!); + responseImageGenerationCallCompleted?.Invoke(ResponseImageGenerationCallCompleted!); } - else if (IsImageGenCallGenerating) + else if (IsResponseImageGenerationCallGenerating) { - imageGenCallGenerating?.Invoke(ImageGenCallGenerating!); + responseImageGenerationCallGenerating?.Invoke(ResponseImageGenerationCallGenerating!); } - else if (IsImageGenCallInProgress) + else if (IsResponseImageGenerationCallInProgress) { - imageGenCallInProgress?.Invoke(ImageGenCallInProgress!); + responseImageGenerationCallInProgress?.Invoke(ResponseImageGenerationCallInProgress!); } - else if (IsImageGenCallPartial) + else if (IsResponseImageGenerationCallPartialImage) { - imageGenCallPartial?.Invoke(ImageGenCallPartial!); + responseImageGenerationCallPartialImage?.Invoke(ResponseImageGenerationCallPartialImage!); } - else if (IsMCPCallArgumentsDelta) + else if (IsResponseMcpCallArgumentsDelta) { - mCPCallArgumentsDelta?.Invoke(MCPCallArgumentsDelta!); + responseMcpCallArgumentsDelta?.Invoke(ResponseMcpCallArgumentsDelta!); } - else if (IsMCPCallArgumentsDone) + else if (IsResponseMcpCallArgumentsDone) { - mCPCallArgumentsDone?.Invoke(MCPCallArgumentsDone!); + responseMcpCallArgumentsDone?.Invoke(ResponseMcpCallArgumentsDone!); } - else if (IsMCPCallCompleted) + else if (IsResponseMcpCallCompleted) { - mCPCallCompleted?.Invoke(MCPCallCompleted!); + responseMcpCallCompleted?.Invoke(ResponseMcpCallCompleted!); } - else if (IsMCPCallFailed) + else if (IsResponseMcpCallFailed) { - mCPCallFailed?.Invoke(MCPCallFailed!); + responseMcpCallFailed?.Invoke(ResponseMcpCallFailed!); } - else if (IsMCPCallInProgress) + else if (IsResponseMcpCallInProgress) { - mCPCallInProgress?.Invoke(MCPCallInProgress!); + responseMcpCallInProgress?.Invoke(ResponseMcpCallInProgress!); } - else if (IsMCPListToolsCompleted) + else if (IsResponseMcpListToolsCompleted) { - mCPListToolsCompleted?.Invoke(MCPListToolsCompleted!); + responseMcpListToolsCompleted?.Invoke(ResponseMcpListToolsCompleted!); } - else if (IsMCPListToolsFailed) + else if (IsResponseMcpListToolsFailed) { - mCPListToolsFailed?.Invoke(MCPListToolsFailed!); + responseMcpListToolsFailed?.Invoke(ResponseMcpListToolsFailed!); } - else if (IsMCPListToolsInProgress) + else if (IsResponseMcpListToolsInProgress) { - mCPListToolsInProgress?.Invoke(MCPListToolsInProgress!); + responseMcpListToolsInProgress?.Invoke(ResponseMcpListToolsInProgress!); } - else if (IsOutputTextAnnotationAdded) + else if (IsResponseOutputTextAnnotationAdded) { - outputTextAnnotationAdded?.Invoke(OutputTextAnnotationAdded!); + responseOutputTextAnnotationAdded?.Invoke(ResponseOutputTextAnnotationAdded!); } - else if (IsQueued) + else if (IsResponseQueued) { - queued?.Invoke(Queued!); + responseQueued?.Invoke(ResponseQueued!); } - else if (IsCustomToolCallInputDelta) + else if (IsResponseCustomToolCallInputDelta) { - customToolCallInputDelta?.Invoke(CustomToolCallInputDelta!); + responseCustomToolCallInputDelta?.Invoke(ResponseCustomToolCallInputDelta!); } - else if (IsCustomToolCallInputDone) + else if (IsResponseCustomToolCallInputDone) { - customToolCallInputDone?.Invoke(CustomToolCallInputDone!); + responseCustomToolCallInputDone?.Invoke(ResponseCustomToolCallInputDone!); } } @@ -2669,111 +2668,111 @@ public override int GetHashCode() { var fields = new object?[] { - AudioDelta, + ResponseAudioDelta, typeof(global::tryAGI.OpenAI.ResponseAudioDeltaEvent), - AudioDone, + ResponseAudioDone, typeof(global::tryAGI.OpenAI.ResponseAudioDoneEvent), - AudioTranscriptDelta, + ResponseAudioTranscriptDelta, typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDeltaEvent), - AudioTranscriptDone, + ResponseAudioTranscriptDone, typeof(global::tryAGI.OpenAI.ResponseAudioTranscriptDoneEvent), - CodeInterpreterCallDelta, + ResponseCodeInterpreterCallCodeDelta, typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent), - CodeInterpreterCallDone, + ResponseCodeInterpreterCallCodeDone, typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCodeDoneEvent), - CodeInterpreterCallCompleted, + ResponseCodeInterpreterCallCompleted, typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallCompletedEvent), - CodeInterpreterCallInProgress, + ResponseCodeInterpreterCallInProgress, typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInProgressEvent), - CodeInterpreterCallInterpreting, + ResponseCodeInterpreterCallInterpreting, typeof(global::tryAGI.OpenAI.ResponseCodeInterpreterCallInterpretingEvent), - Completed, + ResponseCompleted, typeof(global::tryAGI.OpenAI.ResponseCompletedEvent), - ContentPartAdded, + ResponseContentPartAdded, typeof(global::tryAGI.OpenAI.ResponseContentPartAddedEvent), - ContentPartDone, + ResponseContentPartDone, typeof(global::tryAGI.OpenAI.ResponseContentPartDoneEvent), - Created, + ResponseCreated, typeof(global::tryAGI.OpenAI.ResponseCreatedEvent), Error, typeof(global::tryAGI.OpenAI.ResponseErrorEvent), - FileSearchCallCompleted, + ResponseFileSearchCallCompleted, typeof(global::tryAGI.OpenAI.ResponseFileSearchCallCompletedEvent), - FileSearchCallInProgress, + ResponseFileSearchCallInProgress, typeof(global::tryAGI.OpenAI.ResponseFileSearchCallInProgressEvent), - FileSearchCallSearching, + ResponseFileSearchCallSearching, typeof(global::tryAGI.OpenAI.ResponseFileSearchCallSearchingEvent), - FunctionCallArgumentsDelta, + ResponseFunctionCallArgumentsDelta, typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDeltaEvent), - FunctionCallArgumentsDone, + ResponseFunctionCallArgumentsDone, typeof(global::tryAGI.OpenAI.ResponseFunctionCallArgumentsDoneEvent), - InProgress, + ResponseInProgress, typeof(global::tryAGI.OpenAI.ResponseInProgressEvent), - Failed, + ResponseFailed, typeof(global::tryAGI.OpenAI.ResponseFailedEvent), - Incomplete, + ResponseIncomplete, typeof(global::tryAGI.OpenAI.ResponseIncompleteEvent), - OutputItemAdded, + ResponseOutputItemAdded, typeof(global::tryAGI.OpenAI.ResponseOutputItemAddedEvent), - OutputItemDone, + ResponseOutputItemDone, typeof(global::tryAGI.OpenAI.ResponseOutputItemDoneEvent), - ReasoningSummaryPartAdded, + ResponseReasoningSummaryPartAdded, typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartAddedEvent), - ReasoningSummaryPartDone, + ResponseReasoningSummaryPartDone, typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryPartDoneEvent), - ReasoningSummaryTextDelta, + ResponseReasoningSummaryTextDelta, typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDeltaEvent), - ReasoningSummaryTextDone, + ResponseReasoningSummaryTextDone, typeof(global::tryAGI.OpenAI.ResponseReasoningSummaryTextDoneEvent), - ReasoningTextDelta, + ResponseReasoningTextDelta, typeof(global::tryAGI.OpenAI.ResponseReasoningTextDeltaEvent), - ReasoningTextDone, + ResponseReasoningTextDone, typeof(global::tryAGI.OpenAI.ResponseReasoningTextDoneEvent), - RefusalDelta, + ResponseRefusalDelta, typeof(global::tryAGI.OpenAI.ResponseRefusalDeltaEvent), - RefusalDone, + ResponseRefusalDone, typeof(global::tryAGI.OpenAI.ResponseRefusalDoneEvent), - TextDelta, + ResponseOutputTextDelta, typeof(global::tryAGI.OpenAI.ResponseTextDeltaEvent), - TextDone, + ResponseOutputTextDone, typeof(global::tryAGI.OpenAI.ResponseTextDoneEvent), - WebSearchCallCompleted, + ResponseWebSearchCallCompleted, typeof(global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEvent), - WebSearchCallInProgress, + ResponseWebSearchCallInProgress, typeof(global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEvent), - WebSearchCallSearching, + ResponseWebSearchCallSearching, typeof(global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEvent), - ImageGenCallCompleted, + ResponseImageGenerationCallCompleted, typeof(global::tryAGI.OpenAI.ResponseImageGenCallCompletedEvent), - ImageGenCallGenerating, + ResponseImageGenerationCallGenerating, typeof(global::tryAGI.OpenAI.ResponseImageGenCallGeneratingEvent), - ImageGenCallInProgress, + ResponseImageGenerationCallInProgress, typeof(global::tryAGI.OpenAI.ResponseImageGenCallInProgressEvent), - ImageGenCallPartial, + ResponseImageGenerationCallPartialImage, typeof(global::tryAGI.OpenAI.ResponseImageGenCallPartialImageEvent), - MCPCallArgumentsDelta, + ResponseMcpCallArgumentsDelta, typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDeltaEvent), - MCPCallArgumentsDone, + ResponseMcpCallArgumentsDone, typeof(global::tryAGI.OpenAI.ResponseMCPCallArgumentsDoneEvent), - MCPCallCompleted, + ResponseMcpCallCompleted, typeof(global::tryAGI.OpenAI.ResponseMCPCallCompletedEvent), - MCPCallFailed, + ResponseMcpCallFailed, typeof(global::tryAGI.OpenAI.ResponseMCPCallFailedEvent), - MCPCallInProgress, + ResponseMcpCallInProgress, typeof(global::tryAGI.OpenAI.ResponseMCPCallInProgressEvent), - MCPListToolsCompleted, + ResponseMcpListToolsCompleted, typeof(global::tryAGI.OpenAI.ResponseMCPListToolsCompletedEvent), - MCPListToolsFailed, + ResponseMcpListToolsFailed, typeof(global::tryAGI.OpenAI.ResponseMCPListToolsFailedEvent), - MCPListToolsInProgress, + ResponseMcpListToolsInProgress, typeof(global::tryAGI.OpenAI.ResponseMCPListToolsInProgressEvent), - OutputTextAnnotationAdded, + ResponseOutputTextAnnotationAdded, typeof(global::tryAGI.OpenAI.ResponseOutputTextAnnotationAddedEvent), - Queued, + ResponseQueued, typeof(global::tryAGI.OpenAI.ResponseQueuedEvent), - CustomToolCallInputDelta, + ResponseCustomToolCallInputDelta, typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDeltaEvent), - CustomToolCallInputDone, + ResponseCustomToolCallInputDone, typeof(global::tryAGI.OpenAI.ResponseCustomToolCallInputDoneEvent), }; const int offset = unchecked((int)2166136261); @@ -2791,59 +2790,59 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ResponseStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioDelta, other.AudioDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioDone, other.AudioDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioTranscriptDelta, other.AudioTranscriptDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioTranscriptDone, other.AudioTranscriptDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCallDelta, other.CodeInterpreterCallDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCallDone, other.CodeInterpreterCallDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCallCompleted, other.CodeInterpreterCallCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCallInProgress, other.CodeInterpreterCallInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreterCallInterpreting, other.CodeInterpreterCallInterpreting) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Completed, other.Completed) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentPartAdded, other.ContentPartAdded) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentPartDone, other.ContentPartDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Created, other.Created) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseAudioDelta, other.ResponseAudioDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseAudioDone, other.ResponseAudioDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseAudioTranscriptDelta, other.ResponseAudioTranscriptDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseAudioTranscriptDone, other.ResponseAudioTranscriptDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCodeInterpreterCallCodeDelta, other.ResponseCodeInterpreterCallCodeDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCodeInterpreterCallCodeDone, other.ResponseCodeInterpreterCallCodeDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCodeInterpreterCallCompleted, other.ResponseCodeInterpreterCallCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCodeInterpreterCallInProgress, other.ResponseCodeInterpreterCallInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCodeInterpreterCallInterpreting, other.ResponseCodeInterpreterCallInterpreting) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCompleted, other.ResponseCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseContentPartAdded, other.ResponseContentPartAdded) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseContentPartDone, other.ResponseContentPartDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCreated, other.ResponseCreated) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCallCompleted, other.FileSearchCallCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCallInProgress, other.FileSearchCallInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearchCallSearching, other.FileSearchCallSearching) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCallArgumentsDelta, other.FunctionCallArgumentsDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionCallArgumentsDone, other.FunctionCallArgumentsDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(InProgress, other.InProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Failed, other.Failed) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Incomplete, other.Incomplete) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputItemAdded, other.OutputItemAdded) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputItemDone, other.OutputItemDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningSummaryPartAdded, other.ReasoningSummaryPartAdded) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningSummaryPartDone, other.ReasoningSummaryPartDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningSummaryTextDelta, other.ReasoningSummaryTextDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningSummaryTextDone, other.ReasoningSummaryTextDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningTextDelta, other.ReasoningTextDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ReasoningTextDone, other.ReasoningTextDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RefusalDelta, other.RefusalDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RefusalDone, other.RefusalDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TextDelta, other.TextDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TextDone, other.TextDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCallCompleted, other.WebSearchCallCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCallInProgress, other.WebSearchCallInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchCallSearching, other.WebSearchCallSearching) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenCallCompleted, other.ImageGenCallCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenCallGenerating, other.ImageGenCallGenerating) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenCallInProgress, other.ImageGenCallInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGenCallPartial, other.ImageGenCallPartial) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPCallArgumentsDelta, other.MCPCallArgumentsDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPCallArgumentsDone, other.MCPCallArgumentsDone) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPCallCompleted, other.MCPCallCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPCallFailed, other.MCPCallFailed) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPCallInProgress, other.MCPCallInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListToolsCompleted, other.MCPListToolsCompleted) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListToolsFailed, other.MCPListToolsFailed) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPListToolsInProgress, other.MCPListToolsInProgress) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OutputTextAnnotationAdded, other.OutputTextAnnotationAdded) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Queued, other.Queued) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCallInputDelta, other.CustomToolCallInputDelta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolCallInputDone, other.CustomToolCallInputDone) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFileSearchCallCompleted, other.ResponseFileSearchCallCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFileSearchCallInProgress, other.ResponseFileSearchCallInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFileSearchCallSearching, other.ResponseFileSearchCallSearching) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFunctionCallArgumentsDelta, other.ResponseFunctionCallArgumentsDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFunctionCallArgumentsDone, other.ResponseFunctionCallArgumentsDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseInProgress, other.ResponseInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseFailed, other.ResponseFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseIncomplete, other.ResponseIncomplete) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseOutputItemAdded, other.ResponseOutputItemAdded) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseOutputItemDone, other.ResponseOutputItemDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningSummaryPartAdded, other.ResponseReasoningSummaryPartAdded) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningSummaryPartDone, other.ResponseReasoningSummaryPartDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningSummaryTextDelta, other.ResponseReasoningSummaryTextDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningSummaryTextDone, other.ResponseReasoningSummaryTextDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningTextDelta, other.ResponseReasoningTextDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseReasoningTextDone, other.ResponseReasoningTextDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseRefusalDelta, other.ResponseRefusalDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseRefusalDone, other.ResponseRefusalDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseOutputTextDelta, other.ResponseOutputTextDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseOutputTextDone, other.ResponseOutputTextDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseWebSearchCallCompleted, other.ResponseWebSearchCallCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseWebSearchCallInProgress, other.ResponseWebSearchCallInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseWebSearchCallSearching, other.ResponseWebSearchCallSearching) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseImageGenerationCallCompleted, other.ResponseImageGenerationCallCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseImageGenerationCallGenerating, other.ResponseImageGenerationCallGenerating) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseImageGenerationCallInProgress, other.ResponseImageGenerationCallInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseImageGenerationCallPartialImage, other.ResponseImageGenerationCallPartialImage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpCallArgumentsDelta, other.ResponseMcpCallArgumentsDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpCallArgumentsDone, other.ResponseMcpCallArgumentsDone) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpCallCompleted, other.ResponseMcpCallCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpCallFailed, other.ResponseMcpCallFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpCallInProgress, other.ResponseMcpCallInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpListToolsCompleted, other.ResponseMcpListToolsCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpListToolsFailed, other.ResponseMcpListToolsFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseMcpListToolsInProgress, other.ResponseMcpListToolsInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseOutputTextAnnotationAdded, other.ResponseOutputTextAnnotationAdded) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseQueued, other.ResponseQueued) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCustomToolCallInputDelta, other.ResponseCustomToolCallInputDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCustomToolCallInputDone, other.ResponseCustomToolCallInputDone) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptions.g.cs index 060c5c20..a2b88c48 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptions.g.cs @@ -4,54 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Options for streaming responses. Only set this when you set `stream: true`. + /// /// public sealed partial class ResponseStreamOptions { - /// - /// When true, stream obfuscation will be enabled. Stream obfuscation adds
- /// random characters to an `obfuscation` field on streaming delta events to
- /// normalize payload sizes as a mitigation to certain side-channel attacks.
- /// These obfuscation fields are included by default, but add a small amount
- /// of overhead to the data stream. You can set `include_obfuscation` to
- /// false to optimize for bandwidth if you trust the network links between
- /// your application and the OpenAI API. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("include_obfuscation")] - public bool? IncludeObfuscation { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// When true, stream obfuscation will be enabled. Stream obfuscation adds
- /// random characters to an `obfuscation` field on streaming delta events to
- /// normalize payload sizes as a mitigation to certain side-channel attacks.
- /// These obfuscation fields are included by default, but add a small amount
- /// of overhead to the data stream. You can set `include_obfuscation` to
- /// false to optimize for bandwidth if you trust the network links between
- /// your application and the OpenAI API. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ResponseStreamOptions( - bool? includeObfuscation) - { - this.IncludeObfuscation = includeObfuscation; - } - - /// - /// Initializes a new instance of the class. - /// - public ResponseStreamOptions() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.Json.g.cs new file mode 100644 index 00000000..70a37f23 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseStreamOptionsVariant1 + { + /// + /// 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::tryAGI.OpenAI.ResponseStreamOptionsVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseStreamOptionsVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseStreamOptionsVariant1; + } + + /// + /// 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::tryAGI.OpenAI.ResponseStreamOptionsVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseStreamOptionsVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseStreamOptionsVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.g.cs new file mode 100644 index 00000000..4675978f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseStreamOptionsVariant1.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Options for streaming responses. Only set this when you set `stream: true`.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class ResponseStreamOptionsVariant1 + { + /// + /// When true, stream obfuscation will be enabled. Stream obfuscation adds
+ /// random characters to an `obfuscation` field on streaming delta events to
+ /// normalize payload sizes as a mitigation to certain side-channel attacks.
+ /// These obfuscation fields are included by default, but add a small amount
+ /// of overhead to the data stream. You can set `include_obfuscation` to
+ /// false to optimize for bandwidth if you trust the network links between
+ /// your application and the OpenAI API. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("include_obfuscation")] + public bool? IncludeObfuscation { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// When true, stream obfuscation will be enabled. Stream obfuscation adds
+ /// random characters to an `obfuscation` field on streaming delta events to
+ /// normalize payload sizes as a mitigation to certain side-channel attacks.
+ /// These obfuscation fields are included by default, but add a small amount
+ /// of overhead to the data stream. You can set `include_obfuscation` to
+ /// false to optimize for bandwidth if you trust the network links between
+ /// your application and the OpenAI API. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseStreamOptionsVariant1( + bool? includeObfuscation) + { + this.IncludeObfuscation = includeObfuscation; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseStreamOptionsVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDeltaEvent.g.cs index 227dcda0..64a9629e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDeltaEvent.g.cs @@ -9,39 +9,39 @@ namespace tryAGI.OpenAI public sealed partial class ResponseTextDeltaEvent { /// - /// The index of the content part that the text delta was added to. + /// The type of the event. Always `response.output_text.delta`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseTextDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseTextDeltaEventType Type { get; set; } /// - /// The text delta that was added. + /// The ID of the output item that the text delta was added to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Delta { get; set; } + public required string ItemId { get; set; } /// - /// The ID of the output item that the text delta was added to. + /// The index of the output item that the text delta was added to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + public required int OutputIndex { get; set; } /// - /// The log probabilities of the tokens in the delta. + /// The index of the content part that the text delta was added to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Logprobs { get; set; } + public required int ContentIndex { get; set; } /// - /// The index of the output item that the text delta was added to. + /// The text delta that was added. /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_index")] + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputIndex { get; set; } + public required string Delta { get; set; } /// /// The sequence number for this event. @@ -51,11 +51,11 @@ public sealed partial class ResponseTextDeltaEvent public required int SequenceNumber { get; set; } /// - /// The type of the event. Always `response.output_text.delta`. + /// The log probabilities of the tokens in the delta. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseTextDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseTextDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Logprobs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class ResponseTextDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that the text delta was added to. - /// - /// - /// The text delta that was added. + /// + /// The type of the event. Always `response.output_text.delta`. /// /// /// The ID of the output item that the text delta was added to. /// - /// - /// The log probabilities of the tokens in the delta. - /// /// /// The index of the output item that the text delta was added to. /// + /// + /// The index of the content part that the text delta was added to. + /// + /// + /// The text delta that was added. + /// /// /// The sequence number for this event. /// - /// - /// The type of the event. Always `response.output_text.delta`. + /// + /// The log probabilities of the tokens in the delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseTextDeltaEvent( - int contentIndex, - string delta, string itemId, - global::System.Collections.Generic.IList logprobs, int outputIndex, + int contentIndex, + string delta, int sequenceNumber, + global::System.Collections.Generic.IList logprobs, global::tryAGI.OpenAI.ResponseTextDeltaEventType type) { - this.ContentIndex = contentIndex; - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.Logprobs = logprobs ?? throw new global::System.ArgumentNullException(nameof(logprobs)); this.OutputIndex = outputIndex; + this.ContentIndex = contentIndex; + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.SequenceNumber = sequenceNumber; + this.Logprobs = logprobs ?? throw new global::System.ArgumentNullException(nameof(logprobs)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDoneEvent.g.cs index 86c2a766..9e6c0918 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextDoneEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseTextDoneEvent { /// - /// The index of the content part that the text content is finalized. + /// The type of the event. Always `response.output_text.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ContentIndex { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseTextDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseTextDoneEventType Type { get; set; } /// /// The ID of the output item that the text content is finalized. @@ -22,13 +22,6 @@ public sealed partial class ResponseTextDoneEvent [global::System.Text.Json.Serialization.JsonRequired] public required string ItemId { get; set; } - /// - /// The log probabilities of the tokens in the delta. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Logprobs { get; set; } - /// /// The index of the output item that the text content is finalized. /// @@ -37,11 +30,11 @@ public sealed partial class ResponseTextDoneEvent public required int OutputIndex { get; set; } /// - /// The sequence number for this event. + /// The index of the content part that the text content is finalized. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("content_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required int ContentIndex { get; set; } /// /// The text content that is finalized. @@ -51,11 +44,18 @@ public sealed partial class ResponseTextDoneEvent public required string Text { get; set; } /// - /// The type of the event. Always `response.output_text.done`. + /// The sequence number for this event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseTextDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseTextDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } + + /// + /// The log probabilities of the tokens in the delta. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Logprobs { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,45 +66,45 @@ public sealed partial class ResponseTextDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The index of the content part that the text content is finalized. + /// + /// The type of the event. Always `response.output_text.done`. /// /// /// The ID of the output item that the text content is finalized. /// - /// - /// The log probabilities of the tokens in the delta. - /// /// /// The index of the output item that the text content is finalized. /// - /// - /// The sequence number for this event. + /// + /// The index of the content part that the text content is finalized. /// /// /// The text content that is finalized. /// - /// - /// The type of the event. Always `response.output_text.done`. + /// + /// The sequence number for this event. + /// + /// + /// The log probabilities of the tokens in the delta. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseTextDoneEvent( - int contentIndex, string itemId, - global::System.Collections.Generic.IList logprobs, int outputIndex, - int sequenceNumber, + int contentIndex, string text, + int sequenceNumber, + global::System.Collections.Generic.IList logprobs, global::tryAGI.OpenAI.ResponseTextDoneEventType type) { - this.ContentIndex = contentIndex; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); - this.Logprobs = logprobs ?? throw new global::System.ArgumentNullException(nameof(logprobs)); this.OutputIndex = outputIndex; - this.SequenceNumber = sequenceNumber; + this.ContentIndex = contentIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.SequenceNumber = sequenceNumber; + this.Logprobs = logprobs ?? throw new global::System.ArgumentNullException(nameof(logprobs)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.Json.g.cs new file mode 100644 index 00000000..b8ef3799 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseTextParam + { + /// + /// 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::tryAGI.OpenAI.ResponseTextParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseTextParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseTextParam; + } + + /// + /// 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::tryAGI.OpenAI.ResponseTextParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseTextParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseTextParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.g.cs new file mode 100644 index 00000000..96161df1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseTextParam.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Configuration options for a text response from the model. Can be plain
+ /// text or structured JSON data. Learn more:
+ /// - [Text inputs and outputs](/docs/guides/text)
+ /// - [Structured Outputs](/docs/guides/structured-outputs) + ///
+ public sealed partial class ResponseTextParam + { + /// + /// An object specifying the format that the model must output.
+ /// Configuring `{ "type": "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).
+ /// The default format is `{ "type": "text" }` with no additional options.
+ /// **Not recommended for gpt-4o and newer models:**
+ /// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
+ /// ensures the message the model generates is valid JSON. Using `json_schema`
+ /// is preferred for models that support it. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatConfigurationJsonConverter))] + public global::tryAGI.OpenAI.TextResponseFormatConfiguration? Format { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("verbosity")] + public global::tryAGI.OpenAI.VerbosityEnum? Verbosity { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// An object specifying the format that the model must output.
+ /// Configuring `{ "type": "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).
+ /// The default format is `{ "type": "text" }` with no additional options.
+ /// **Not recommended for gpt-4o and newer models:**
+ /// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
+ /// ensures the message the model generates is valid JSON. Using `json_schema`
+ /// is preferred for models that support it. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseTextParam( + global::tryAGI.OpenAI.TextResponseFormatConfiguration? format, + global::tryAGI.OpenAI.VerbosityEnum? verbosity) + { + this.Format = format; + this.Verbosity = verbosity; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseTextParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseUsageInputTokensDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseUsageInputTokensDetails.g.cs index 77c2c162..54d252af 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseUsageInputTokensDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseUsageInputTokensDetails.g.cs @@ -10,7 +10,7 @@ public sealed partial class ResponseUsageInputTokensDetails { /// /// The number of tokens that were retrieved from the cache.
- /// [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + /// [More on prompt caching](/docs/guides/prompt-caching). ///
[global::System.Text.Json.Serialization.JsonPropertyName("cached_tokens")] [global::System.Text.Json.Serialization.JsonRequired] @@ -27,7 +27,7 @@ public sealed partial class ResponseUsageInputTokensDetails ///
/// /// The number of tokens that were retrieved from the cache.
- /// [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + /// [More on prompt caching](/docs/guides/prompt-caching). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3.g.cs index 980957b6..f1297330 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,52 +11,53 @@ namespace tryAGI.OpenAI public sealed partial class ResponseVariant3 { /// - /// + /// Unique identifier for this Response. /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - public object? Conversation { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } /// - /// Unix timestamp (in seconds) of when this Response was created. + /// The object type of this resource - always set to `response`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double CreatedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3ObjectJsonConverter))] + public global::tryAGI.OpenAI.ResponseVariant3Object Object { get; set; } /// - /// An error object returned when the model fails to generate a Response. + /// The status of the response generation. One of `completed`, `failed`,
+ /// `in_progress`, `cancelled`, `queued`, or `incomplete`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseError? Error { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3StatusJsonConverter))] + public global::tryAGI.OpenAI.ResponseVariant3Status? Status { get; set; } /// - /// Unique identifier for this Response. + /// Unix timestamp (in seconds) of when this Response was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required double CreatedAt { get; set; } /// - /// Details about why the response is incomplete. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_details")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails? IncompleteDetails { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + public double? CompletedAt { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("error")] [global::System.Text.Json.Serialization.JsonRequired] - public required object? Instructions { get; set; } + public required global::tryAGI.OpenAI.ResponseErrorVariant1? Error { get; set; } /// - /// The object type of this resource - always set to `response`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3ObjectJsonConverter))] - public global::tryAGI.OpenAI.ResponseVariant3Object Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2? IncompleteDetails { get; set; } /// /// An array of content items generated by the model.
@@ -70,36 +73,38 @@ public sealed partial class ResponseVariant3 public required global::System.Collections.Generic.IList Output { get; set; } /// - /// SDK-only convenience property that contains the aggregated text output
- /// from all `output_text` items in the `output` array, if any are present.
- /// Supported in the Python and JavaScript SDKs. + /// + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf>? Instructions { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("output_text")] public string? OutputText { get; set; } + /// + /// Represents token usage details including input tokens, output tokens,
+ /// a breakdown of output tokens, and the total tokens used. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::tryAGI.OpenAI.ResponseUsage? Usage { get; set; } + /// /// Whether to allow the model to run tool calls in parallel.
/// Default Value: true ///
- /// true [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool ParallelToolCalls { get; set; } = true; + public required bool ParallelToolCalls { get; set; } /// - /// The status of the response generation. One of `completed`, `failed`,
- /// `in_progress`, `cancelled`, `queued`, or `incomplete`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3StatusJsonConverter))] - public global::tryAGI.OpenAI.ResponseVariant3Status? Status { get; set; } - - /// - /// Represents token usage details including input tokens, output tokens,
- /// a breakdown of output tokens, and the total tokens used. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("usage")] - public global::tryAGI.OpenAI.ResponseUsage? Usage { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + public global::tryAGI.OpenAI.Conversation22? Conversation { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -110,23 +115,22 @@ public sealed partial class ResponseVariant3 /// /// Initializes a new instance of the class. /// - /// - /// - /// Unix timestamp (in seconds) of when this Response was created. - /// - /// - /// An error object returned when the model fails to generate a Response. - /// /// /// Unique identifier for this Response. /// - /// - /// Details about why the response is incomplete. - /// - /// /// /// The object type of this resource - always set to `response`. /// + /// + /// The status of the response generation. One of `completed`, `failed`,
+ /// `in_progress`, `cancelled`, `queued`, or `incomplete`. + /// + /// + /// Unix timestamp (in seconds) of when this Response was created. + /// + /// + /// + /// /// /// An array of content items generated by the model.
/// - The length and order of items in the `output` array is dependent
@@ -136,52 +140,48 @@ public sealed partial class ResponseVariant3 /// the model, you might consider using the `output_text` property where
/// supported in SDKs. /// - /// - /// SDK-only convenience property that contains the aggregated text output
- /// from all `output_text` items in the `output` array, if any are present.
- /// Supported in the Python and JavaScript SDKs. + /// + /// + /// + /// Represents token usage details including input tokens, output tokens,
+ /// a breakdown of output tokens, and the total tokens used. /// /// /// Whether to allow the model to run tool calls in parallel.
/// Default Value: true /// - /// - /// The status of the response generation. One of `completed`, `failed`,
- /// `in_progress`, `cancelled`, `queued`, or `incomplete`. - /// - /// - /// Represents token usage details including input tokens, output tokens,
- /// a breakdown of output tokens, and the total tokens used. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseVariant3( - double createdAt, - global::tryAGI.OpenAI.ResponseError? error, string id, - global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails? incompleteDetails, - object? instructions, + double createdAt, + global::tryAGI.OpenAI.ResponseErrorVariant1? error, + global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2? incompleteDetails, global::System.Collections.Generic.IList output, + global::tryAGI.OpenAI.OneOf>? instructions, bool parallelToolCalls, - object? conversation, global::tryAGI.OpenAI.ResponseVariant3Object @object, - string? outputText, global::tryAGI.OpenAI.ResponseVariant3Status? status, - global::tryAGI.OpenAI.ResponseUsage? usage) + double? completedAt, + string? outputText, + global::tryAGI.OpenAI.ResponseUsage? usage, + global::tryAGI.OpenAI.Conversation22? conversation) { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.IncompleteDetails = incompleteDetails ?? throw new global::System.ArgumentNullException(nameof(incompleteDetails)); - this.Instructions = instructions ?? throw new global::System.ArgumentNullException(nameof(instructions)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); + this.Instructions = instructions ?? throw new global::System.ArgumentNullException(nameof(instructions)); this.ParallelToolCalls = parallelToolCalls; - this.Conversation = conversation; this.Object = @object; - this.OutputText = outputText; this.Status = status; + this.CompletedAt = completedAt; + this.OutputText = outputText; this.Usage = usage; + this.Conversation = conversation; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.Json.g.cs new file mode 100644 index 00000000..b7823356 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseVariant3CompletedAt + { + /// + /// 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::tryAGI.OpenAI.ResponseVariant3CompletedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseVariant3CompletedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseVariant3CompletedAt; + } + + /// + /// 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::tryAGI.OpenAI.ResponseVariant3CompletedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseVariant3CompletedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseVariant3CompletedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.g.cs new file mode 100644 index 00000000..8893b945 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3CompletedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseVariant3CompletedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.Json.g.cs new file mode 100644 index 00000000..e30d4313 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseVariant3Conversation + { + /// + /// 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::tryAGI.OpenAI.ResponseVariant3Conversation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseVariant3Conversation), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseVariant3Conversation; + } + + /// + /// 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::tryAGI.OpenAI.ResponseVariant3Conversation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseVariant3Conversation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseVariant3Conversation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.g.cs new file mode 100644 index 00000000..8368c3cc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Conversation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseVariant3Conversation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails.g.cs index ae9f4bf3..46865f5b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails.g.cs @@ -4,43 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Details about why the response is incomplete. + /// /// public sealed partial class ResponseVariant3IncompleteDetails { - /// - /// The reason why the response is incomplete. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("reason")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonJsonConverter))] - public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? Reason { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The reason why the response is incomplete. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ResponseVariant3IncompleteDetails( - global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? reason) - { - this.Reason = reason; - } - - /// - /// Initializes a new instance of the class. - /// - public ResponseVariant3IncompleteDetails() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.Json.g.cs new file mode 100644 index 00000000..a360a598 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseVariant3IncompleteDetails2 + { + /// + /// 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::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2; + } + + /// + /// 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::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseVariant3IncompleteDetails2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.g.cs new file mode 100644 index 00000000..c4c3c598 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3IncompleteDetails2.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Details about why the response is incomplete. + /// + public sealed partial class ResponseVariant3IncompleteDetails2 + { + /// + /// The reason why the response is incomplete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseVariant3IncompleteDetailsReasonJsonConverter))] + public global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? Reason { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The reason why the response is incomplete. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseVariant3IncompleteDetails2( + global::tryAGI.OpenAI.ResponseVariant3IncompleteDetailsReason? reason) + { + this.Reason = reason; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseVariant3IncompleteDetails2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.Json.g.cs new file mode 100644 index 00000000..574892a7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseVariant3Instructions + { + /// + /// 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::tryAGI.OpenAI.ResponseVariant3Instructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseVariant3Instructions), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseVariant3Instructions; + } + + /// + /// 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::tryAGI.OpenAI.ResponseVariant3Instructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseVariant3Instructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseVariant3Instructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.g.cs new file mode 100644 index 00000000..5999ebcb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3Instructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseVariant3Instructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.Json.g.cs new file mode 100644 index 00000000..7664c1c5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponseVariant3OutputText + { + /// + /// 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::tryAGI.OpenAI.ResponseVariant3OutputText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponseVariant3OutputText), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponseVariant3OutputText; + } + + /// + /// 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::tryAGI.OpenAI.ResponseVariant3OutputText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponseVariant3OutputText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponseVariant3OutputText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.g.cs new file mode 100644 index 00000000..12739658 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseVariant3OutputText.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponseVariant3OutputText + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallCompletedEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallCompletedEvent.g.cs index 3665595c..8348961b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallCompletedEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallCompletedEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseWebSearchCallCompletedEvent { /// - /// Unique ID for the output item associated with the web search call. + /// The type of the event. Always `response.web_search_call.completed`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallCompletedEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEventType Type { get; set; } /// /// The index of the output item that the web search call is associated with. @@ -23,18 +23,18 @@ public sealed partial class ResponseWebSearchCallCompletedEvent public required int OutputIndex { get; set; } /// - /// The sequence number of the web search call being processed. + /// Unique ID for the output item associated with the web search call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.web_search_call.completed`. + /// The sequence number of the web search call being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallCompletedEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseWebSearchCallCompletedEvent /// /// Initializes a new instance of the class. /// - /// - /// Unique ID for the output item associated with the web search call. + /// + /// The type of the event. Always `response.web_search_call.completed`. /// /// /// The index of the output item that the web search call is associated with. /// + /// + /// Unique ID for the output item associated with the web search call. + /// /// /// The sequence number of the web search call being processed. /// - /// - /// The type of the event. Always `response.web_search_call.completed`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseWebSearchCallCompletedEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseWebSearchCallCompletedEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallInProgressEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallInProgressEvent.g.cs index f6459774..763d9818 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallInProgressEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallInProgressEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseWebSearchCallInProgressEvent { /// - /// Unique ID for the output item associated with the web search call. + /// The type of the event. Always `response.web_search_call.in_progress`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallInProgressEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEventType Type { get; set; } /// /// The index of the output item that the web search call is associated with. @@ -23,18 +23,18 @@ public sealed partial class ResponseWebSearchCallInProgressEvent public required int OutputIndex { get; set; } /// - /// The sequence number of the web search call being processed. + /// Unique ID for the output item associated with the web search call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.web_search_call.in_progress`. + /// The sequence number of the web search call being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallInProgressEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseWebSearchCallInProgressEvent /// /// Initializes a new instance of the class. /// - /// - /// Unique ID for the output item associated with the web search call. + /// + /// The type of the event. Always `response.web_search_call.in_progress`. /// /// /// The index of the output item that the web search call is associated with. /// + /// + /// Unique ID for the output item associated with the web search call. + /// /// /// The sequence number of the web search call being processed. /// - /// - /// The type of the event. Always `response.web_search_call.in_progress`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseWebSearchCallInProgressEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseWebSearchCallInProgressEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallSearchingEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallSearchingEvent.g.cs index 42079797..f5eeafbc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallSearchingEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponseWebSearchCallSearchingEvent.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ResponseWebSearchCallSearchingEvent { /// - /// Unique ID for the output item associated with the web search call. + /// The type of the event. Always `response.web_search_call.searching`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ItemId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallSearchingEventTypeJsonConverter))] + public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEventType Type { get; set; } /// /// The index of the output item that the web search call is associated with. @@ -23,18 +23,18 @@ public sealed partial class ResponseWebSearchCallSearchingEvent public required int OutputIndex { get; set; } /// - /// The sequence number of the web search call being processed. + /// Unique ID for the output item associated with the web search call. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int SequenceNumber { get; set; } + public required string ItemId { get; set; } /// - /// The type of the event. Always `response.web_search_call.searching`. + /// The sequence number of the web search call being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseWebSearchCallSearchingEventTypeJsonConverter))] - public global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sequence_number")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SequenceNumber { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,29 +45,29 @@ public sealed partial class ResponseWebSearchCallSearchingEvent /// /// Initializes a new instance of the class. /// - /// - /// Unique ID for the output item associated with the web search call. + /// + /// The type of the event. Always `response.web_search_call.searching`. /// /// /// The index of the output item that the web search call is associated with. /// + /// + /// Unique ID for the output item associated with the web search call. + /// /// /// The sequence number of the web search call being processed. /// - /// - /// The type of the event. Always `response.web_search_call.searching`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ResponseWebSearchCallSearchingEvent( - string itemId, int outputIndex, + string itemId, int sequenceNumber, global::tryAGI.OpenAI.ResponseWebSearchCallSearchingEventType type) { - this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; + this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.SequenceNumber = sequenceNumber; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.Json.g.cs new file mode 100644 index 00000000..d81876b8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ResponsesClientEvent + { + /// + /// 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::tryAGI.OpenAI.ResponsesClientEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesClientEvent), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesClientEvent?; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesClientEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesClientEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesClientEvent?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.g.cs new file mode 100644 index 00000000..b941e5e6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEvent.g.cs @@ -0,0 +1,163 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Client events accepted by the Responses WebSocket server. + /// + public readonly partial struct ResponsesClientEvent : global::System.IEquatable + { + /// + /// Client event for creating a response over a persistent WebSocket connection.
+ /// This payload uses the same top-level fields as `POST /v1/responses`.
+ /// Notes:
+ /// - `stream` is implicit over WebSocket and should not be sent.
+ /// - `background` is not supported over WebSocket. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreate? ResponseCreate { get; init; } +#else + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreate? ResponseCreate { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseCreate))] +#endif + public bool IsResponseCreate => ResponseCreate != null; + /// + /// + /// + public static implicit operator ResponsesClientEvent(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate value) => new ResponsesClientEvent((global::tryAGI.OpenAI.ResponsesClientEventResponseCreate?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponsesClientEventResponseCreate?(ResponsesClientEvent @this) => @this.ResponseCreate; + + /// + /// + /// + public ResponsesClientEvent(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate? value) + { + ResponseCreate = value; + } + + /// + /// + /// + public object? Object => + ResponseCreate as object + ; + + /// + /// + /// + public override string? ToString() => + ResponseCreate?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsResponseCreate; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? responseCreate = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsResponseCreate && responseCreate != null) + { + return responseCreate(ResponseCreate!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? responseCreate = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsResponseCreate) + { + responseCreate?.Invoke(ResponseCreate!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ResponseCreate, + typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponsesClientEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseCreate, other.ResponseCreate) + ; + } + + /// + /// + /// + public static bool operator ==(ResponsesClientEvent obj1, ResponsesClientEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponsesClientEvent obj1, ResponsesClientEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponsesClientEvent o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.Json.g.cs new file mode 100644 index 00000000..95589f5c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsesClientEventDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesClientEventDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesClientEventDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesClientEventDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesClientEventDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.g.cs new file mode 100644 index 00000000..9f1997b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsesClientEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponsesClientEventDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponsesClientEventDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.Json.g.cs new file mode 100644 index 00000000..1e62b96c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ResponsesClientEventResponseCreate + { + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventResponseCreate? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesClientEventResponseCreate?; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventResponseCreate? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreate), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesClientEventResponseCreate?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.g.cs new file mode 100644 index 00000000..d93406c7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreate.g.cs @@ -0,0 +1,225 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Client event for creating a response over a persistent WebSocket connection.
+ /// This payload uses the same top-level fields as `POST /v1/responses`.
+ /// Notes:
+ /// - `stream` is implicit over WebSocket and should not be sent.
+ /// - `background` is not supported over WebSocket. + ///
+ public readonly partial struct ResponsesClientEventResponseCreate : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? Value1 { get; init; } +#else + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CreateResponse? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.CreateResponse? 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 ResponsesClientEventResponseCreate(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1 value) => new ResponsesClientEventResponseCreate((global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1?(ResponsesClientEventResponseCreate @this) => @this.Value1; + + /// + /// + /// + public ResponsesClientEventResponseCreate(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator ResponsesClientEventResponseCreate(global::tryAGI.OpenAI.CreateResponse value) => new ResponsesClientEventResponseCreate((global::tryAGI.OpenAI.CreateResponse?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CreateResponse?(ResponsesClientEventResponseCreate @this) => @this.Value2; + + /// + /// + /// + public ResponsesClientEventResponseCreate(global::tryAGI.OpenAI.CreateResponse? value) + { + Value2 = value; + } + + /// + /// + /// + public ResponsesClientEventResponseCreate( + global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? value1, + global::tryAGI.OpenAI.CreateResponse? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), + Value2, + typeof(global::tryAGI.OpenAI.CreateResponse), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponsesClientEventResponseCreate 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 ==(ResponsesClientEventResponseCreate obj1, ResponsesClientEventResponseCreate obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponsesClientEventResponseCreate obj1, ResponsesClientEventResponseCreate obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponsesClientEventResponseCreate o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.Json.g.cs new file mode 100644 index 00000000..b4e91cc2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsesClientEventResponseCreateVariant1 + { + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.g.cs new file mode 100644 index 00000000..ab4388e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsesClientEventResponseCreateVariant1 + { + /// + /// The type of the client event. Always `response.create`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponsesClientEventResponseCreateVariant1TypeJsonConverter))] + public global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the client event. Always `response.create`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponsesClientEventResponseCreateVariant1( + global::tryAGI.OpenAI.ResponsesClientEventResponseCreateVariant1Type type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponsesClientEventResponseCreateVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1Type.g.cs new file mode 100644 index 00000000..1f643f4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesClientEventResponseCreateVariant1Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the client event. Always `response.create`. + /// + public enum ResponsesClientEventResponseCreateVariant1Type + { + /// + /// + /// + ResponseCreate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponsesClientEventResponseCreateVariant1TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponsesClientEventResponseCreateVariant1Type value) + { + return value switch + { + ResponsesClientEventResponseCreateVariant1Type.ResponseCreate => "response.create", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponsesClientEventResponseCreateVariant1Type? ToEnum(string value) + { + return value switch + { + "response.create" => ResponsesClientEventResponseCreateVariant1Type.ResponseCreate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.Json.g.cs new file mode 100644 index 00000000..0234101c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ResponsesServerEvent + { + /// + /// 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::tryAGI.OpenAI.ResponsesServerEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesServerEvent), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesServerEvent?; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesServerEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesServerEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesServerEvent?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.g.cs new file mode 100644 index 00000000..9e6a987c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEvent.g.cs @@ -0,0 +1,159 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Server events emitted by the Responses WebSocket server. + /// + public readonly partial struct ResponsesServerEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ResponseStreamEvent? ResponseStream { get; init; } +#else + public global::tryAGI.OpenAI.ResponseStreamEvent? ResponseStream { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ResponseStream))] +#endif + public bool IsResponseStream => ResponseStream != null; + /// + /// + /// + public static implicit operator ResponsesServerEvent(global::tryAGI.OpenAI.ResponseStreamEvent value) => new ResponsesServerEvent((global::tryAGI.OpenAI.ResponseStreamEvent?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ResponseStreamEvent?(ResponsesServerEvent @this) => @this.ResponseStream; + + /// + /// + /// + public ResponsesServerEvent(global::tryAGI.OpenAI.ResponseStreamEvent? value) + { + ResponseStream = value; + } + + /// + /// + /// + public object? Object => + ResponseStream as object + ; + + /// + /// + /// + public override string? ToString() => + ResponseStream?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsResponseStream; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? responseStream = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsResponseStream && responseStream != null) + { + return responseStream(ResponseStream!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? responseStream = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsResponseStream) + { + responseStream?.Invoke(ResponseStream!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ResponseStream, + typeof(global::tryAGI.OpenAI.ResponseStreamEvent), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponsesServerEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ResponseStream, other.ResponseStream) + ; + } + + /// + /// + /// + public static bool operator ==(ResponsesServerEvent obj1, ResponsesServerEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponsesServerEvent obj1, ResponsesServerEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponsesServerEvent o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.Json.g.cs new file mode 100644 index 00000000..e65f1ed9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ResponsesServerEventDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ResponsesServerEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ResponsesServerEventDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ResponsesServerEventDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ResponsesServerEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ResponsesServerEventDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResponsesServerEventDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.g.cs new file mode 100644 index 00000000..1dfd9347 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResponsesServerEventDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ResponsesServerEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponsesServerEventDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponsesServerEventDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.Json.g.cs deleted file mode 100644 index f6ff1aa4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ResultItem - { - /// - /// 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::tryAGI.OpenAI.ResultItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ResultItem), - jsonSerializerContext) as global::tryAGI.OpenAI.ResultItem?; - } - - /// - /// 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::tryAGI.OpenAI.ResultItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ResultItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ResultItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.g.cs deleted file mode 100644 index c0b0ef94..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ResultItem.g.cs +++ /dev/null @@ -1,586 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ResultItem : global::System.IEquatable - { - /// - /// The aggregated completions usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageCompletionsResult? UsageCompletions { get; init; } -#else - public global::tryAGI.OpenAI.UsageCompletionsResult? UsageCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageCompletions))] -#endif - public bool IsUsageCompletions => UsageCompletions != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageCompletionsResult value) => new ResultItem((global::tryAGI.OpenAI.UsageCompletionsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageCompletionsResult?(ResultItem @this) => @this.UsageCompletions; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageCompletionsResult? value) - { - UsageCompletions = value; - } - - /// - /// The aggregated embeddings usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageEmbeddingsResult? UsageEmbeddings { get; init; } -#else - public global::tryAGI.OpenAI.UsageEmbeddingsResult? UsageEmbeddings { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageEmbeddings))] -#endif - public bool IsUsageEmbeddings => UsageEmbeddings != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageEmbeddingsResult value) => new ResultItem((global::tryAGI.OpenAI.UsageEmbeddingsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageEmbeddingsResult?(ResultItem @this) => @this.UsageEmbeddings; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageEmbeddingsResult? value) - { - UsageEmbeddings = value; - } - - /// - /// The aggregated moderations usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageModerationsResult? UsageModerations { get; init; } -#else - public global::tryAGI.OpenAI.UsageModerationsResult? UsageModerations { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageModerations))] -#endif - public bool IsUsageModerations => UsageModerations != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageModerationsResult value) => new ResultItem((global::tryAGI.OpenAI.UsageModerationsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageModerationsResult?(ResultItem @this) => @this.UsageModerations; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageModerationsResult? value) - { - UsageModerations = value; - } - - /// - /// The aggregated images usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageImagesResult? UsageImages { get; init; } -#else - public global::tryAGI.OpenAI.UsageImagesResult? UsageImages { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageImages))] -#endif - public bool IsUsageImages => UsageImages != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageImagesResult value) => new ResultItem((global::tryAGI.OpenAI.UsageImagesResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageImagesResult?(ResultItem @this) => @this.UsageImages; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageImagesResult? value) - { - UsageImages = value; - } - - /// - /// The aggregated audio speeches usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageAudioSpeechesResult? UsageAudioSpeeches { get; init; } -#else - public global::tryAGI.OpenAI.UsageAudioSpeechesResult? UsageAudioSpeeches { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageAudioSpeeches))] -#endif - public bool IsUsageAudioSpeeches => UsageAudioSpeeches != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageAudioSpeechesResult value) => new ResultItem((global::tryAGI.OpenAI.UsageAudioSpeechesResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageAudioSpeechesResult?(ResultItem @this) => @this.UsageAudioSpeeches; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageAudioSpeechesResult? value) - { - UsageAudioSpeeches = value; - } - - /// - /// The aggregated audio transcriptions usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? UsageAudioTranscriptions { get; init; } -#else - public global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? UsageAudioTranscriptions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageAudioTranscriptions))] -#endif - public bool IsUsageAudioTranscriptions => UsageAudioTranscriptions != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult value) => new ResultItem((global::tryAGI.OpenAI.UsageAudioTranscriptionsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageAudioTranscriptionsResult?(ResultItem @this) => @this.UsageAudioTranscriptions; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? value) - { - UsageAudioTranscriptions = value; - } - - /// - /// The aggregated vector stores usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageVectorStoresResult? UsageVectorStores { get; init; } -#else - public global::tryAGI.OpenAI.UsageVectorStoresResult? UsageVectorStores { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageVectorStores))] -#endif - public bool IsUsageVectorStores => UsageVectorStores != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageVectorStoresResult value) => new ResultItem((global::tryAGI.OpenAI.UsageVectorStoresResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageVectorStoresResult?(ResultItem @this) => @this.UsageVectorStores; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageVectorStoresResult? value) - { - UsageVectorStores = value; - } - - /// - /// The aggregated code interpreter sessions usage details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? UsageCodeInterpreterSessions { get; init; } -#else - public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? UsageCodeInterpreterSessions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UsageCodeInterpreterSessions))] -#endif - public bool IsUsageCodeInterpreterSessions => UsageCodeInterpreterSessions != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult value) => new ResultItem((global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult?(ResultItem @this) => @this.UsageCodeInterpreterSessions; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? value) - { - UsageCodeInterpreterSessions = value; - } - - /// - /// The aggregated costs details of the specific time bucket. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CostsResult? Costs { get; init; } -#else - public global::tryAGI.OpenAI.CostsResult? Costs { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Costs))] -#endif - public bool IsCosts => Costs != null; - - /// - /// - /// - public static implicit operator ResultItem(global::tryAGI.OpenAI.CostsResult value) => new ResultItem((global::tryAGI.OpenAI.CostsResult?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CostsResult?(ResultItem @this) => @this.Costs; - - /// - /// - /// - public ResultItem(global::tryAGI.OpenAI.CostsResult? value) - { - Costs = value; - } - - /// - /// - /// - public ResultItem( - global::tryAGI.OpenAI.UsageCompletionsResult? usageCompletions, - global::tryAGI.OpenAI.UsageEmbeddingsResult? usageEmbeddings, - global::tryAGI.OpenAI.UsageModerationsResult? usageModerations, - global::tryAGI.OpenAI.UsageImagesResult? usageImages, - global::tryAGI.OpenAI.UsageAudioSpeechesResult? usageAudioSpeeches, - global::tryAGI.OpenAI.UsageAudioTranscriptionsResult? usageAudioTranscriptions, - global::tryAGI.OpenAI.UsageVectorStoresResult? usageVectorStores, - global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult? usageCodeInterpreterSessions, - global::tryAGI.OpenAI.CostsResult? costs - ) - { - UsageCompletions = usageCompletions; - UsageEmbeddings = usageEmbeddings; - UsageModerations = usageModerations; - UsageImages = usageImages; - UsageAudioSpeeches = usageAudioSpeeches; - UsageAudioTranscriptions = usageAudioTranscriptions; - UsageVectorStores = usageVectorStores; - UsageCodeInterpreterSessions = usageCodeInterpreterSessions; - Costs = costs; - } - - /// - /// - /// - public object? Object => - Costs as object ?? - UsageCodeInterpreterSessions as object ?? - UsageVectorStores as object ?? - UsageAudioTranscriptions as object ?? - UsageAudioSpeeches as object ?? - UsageImages as object ?? - UsageModerations as object ?? - UsageEmbeddings as object ?? - UsageCompletions as object - ; - - /// - /// - /// - public override string? ToString() => - UsageCompletions?.ToString() ?? - UsageEmbeddings?.ToString() ?? - UsageModerations?.ToString() ?? - UsageImages?.ToString() ?? - UsageAudioSpeeches?.ToString() ?? - UsageAudioTranscriptions?.ToString() ?? - UsageVectorStores?.ToString() ?? - UsageCodeInterpreterSessions?.ToString() ?? - Costs?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsUsageCompletions || IsUsageEmbeddings || IsUsageModerations || IsUsageImages || IsUsageAudioSpeeches || IsUsageAudioTranscriptions || IsUsageVectorStores || IsUsageCodeInterpreterSessions || IsCosts; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? usageCompletions = null, - global::System.Func? usageEmbeddings = null, - global::System.Func? usageModerations = null, - global::System.Func? usageImages = null, - global::System.Func? usageAudioSpeeches = null, - global::System.Func? usageAudioTranscriptions = null, - global::System.Func? usageVectorStores = null, - global::System.Func? usageCodeInterpreterSessions = null, - global::System.Func? costs = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsUsageCompletions && usageCompletions != null) - { - return usageCompletions(UsageCompletions!); - } - else if (IsUsageEmbeddings && usageEmbeddings != null) - { - return usageEmbeddings(UsageEmbeddings!); - } - else if (IsUsageModerations && usageModerations != null) - { - return usageModerations(UsageModerations!); - } - else if (IsUsageImages && usageImages != null) - { - return usageImages(UsageImages!); - } - else if (IsUsageAudioSpeeches && usageAudioSpeeches != null) - { - return usageAudioSpeeches(UsageAudioSpeeches!); - } - else if (IsUsageAudioTranscriptions && usageAudioTranscriptions != null) - { - return usageAudioTranscriptions(UsageAudioTranscriptions!); - } - else if (IsUsageVectorStores && usageVectorStores != null) - { - return usageVectorStores(UsageVectorStores!); - } - else if (IsUsageCodeInterpreterSessions && usageCodeInterpreterSessions != null) - { - return usageCodeInterpreterSessions(UsageCodeInterpreterSessions!); - } - else if (IsCosts && costs != null) - { - return costs(Costs!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? usageCompletions = null, - global::System.Action? usageEmbeddings = null, - global::System.Action? usageModerations = null, - global::System.Action? usageImages = null, - global::System.Action? usageAudioSpeeches = null, - global::System.Action? usageAudioTranscriptions = null, - global::System.Action? usageVectorStores = null, - global::System.Action? usageCodeInterpreterSessions = null, - global::System.Action? costs = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsUsageCompletions) - { - usageCompletions?.Invoke(UsageCompletions!); - } - else if (IsUsageEmbeddings) - { - usageEmbeddings?.Invoke(UsageEmbeddings!); - } - else if (IsUsageModerations) - { - usageModerations?.Invoke(UsageModerations!); - } - else if (IsUsageImages) - { - usageImages?.Invoke(UsageImages!); - } - else if (IsUsageAudioSpeeches) - { - usageAudioSpeeches?.Invoke(UsageAudioSpeeches!); - } - else if (IsUsageAudioTranscriptions) - { - usageAudioTranscriptions?.Invoke(UsageAudioTranscriptions!); - } - else if (IsUsageVectorStores) - { - usageVectorStores?.Invoke(UsageVectorStores!); - } - else if (IsUsageCodeInterpreterSessions) - { - usageCodeInterpreterSessions?.Invoke(UsageCodeInterpreterSessions!); - } - else if (IsCosts) - { - costs?.Invoke(Costs!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - UsageCompletions, - typeof(global::tryAGI.OpenAI.UsageCompletionsResult), - UsageEmbeddings, - typeof(global::tryAGI.OpenAI.UsageEmbeddingsResult), - UsageModerations, - typeof(global::tryAGI.OpenAI.UsageModerationsResult), - UsageImages, - typeof(global::tryAGI.OpenAI.UsageImagesResult), - UsageAudioSpeeches, - typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResult), - UsageAudioTranscriptions, - typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResult), - UsageVectorStores, - typeof(global::tryAGI.OpenAI.UsageVectorStoresResult), - UsageCodeInterpreterSessions, - typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResult), - Costs, - typeof(global::tryAGI.OpenAI.CostsResult), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ResultItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageCompletions, other.UsageCompletions) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageEmbeddings, other.UsageEmbeddings) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageModerations, other.UsageModerations) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageImages, other.UsageImages) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageAudioSpeeches, other.UsageAudioSpeeches) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageAudioTranscriptions, other.UsageAudioTranscriptions) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageVectorStores, other.UsageVectorStores) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UsageCodeInterpreterSessions, other.UsageCodeInterpreterSessions) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Costs, other.Costs) - ; - } - - /// - /// - /// - public static bool operator ==(ResultItem obj1, ResultItem obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(ResultItem obj1, ResultItem obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is ResultItem o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.Json.g.cs new file mode 100644 index 00000000..0b20228c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Role + { + /// + /// 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::tryAGI.OpenAI.Role? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Role), + jsonSerializerContext) as global::tryAGI.OpenAI.Role; + } + + /// + /// 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::tryAGI.OpenAI.Role? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Role), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Role; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.g.cs new file mode 100644 index 00000000..2f9f90d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Role.g.cs @@ -0,0 +1,118 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Details about a role that can be assigned through the public Roles API. + /// + public sealed partial class Role + { + /// + /// Always `role`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RoleObjectJsonConverter))] + public global::tryAGI.OpenAI.RoleObject Object { get; set; } + + /// + /// Identifier for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Unique name for the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Optional description of the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Description { get; set; } + + /// + /// Permissions granted by the role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("permissions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Permissions { get; set; } + + /// + /// Resource type the role is bound to (for example `api.organization` or `api.project`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResourceType { get; set; } + + /// + /// Whether the role is predefined and managed by OpenAI. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("predefined_role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool PredefinedRole { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `role`. + /// + /// + /// Identifier for the role. + /// + /// + /// Unique name for the role. + /// + /// + /// Optional description of the role. + /// + /// + /// Permissions granted by the role. + /// + /// + /// Resource type the role is bound to (for example `api.organization` or `api.project`). + /// + /// + /// Whether the role is predefined and managed by OpenAI. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Role( + string id, + string name, + string? description, + global::System.Collections.Generic.IList permissions, + string resourceType, + bool predefinedRole, + global::tryAGI.OpenAI.RoleObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Permissions = permissions ?? throw new global::System.ArgumentNullException(nameof(permissions)); + this.ResourceType = resourceType ?? throw new global::System.ArgumentNullException(nameof(resourceType)); + this.PredefinedRole = predefinedRole; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public Role() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.Json.g.cs new file mode 100644 index 00000000..eae6cf1f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RoleDeletedResource + { + /// + /// 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::tryAGI.OpenAI.RoleDeletedResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RoleDeletedResource), + jsonSerializerContext) as global::tryAGI.OpenAI.RoleDeletedResource; + } + + /// + /// 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::tryAGI.OpenAI.RoleDeletedResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RoleDeletedResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RoleDeletedResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.g.cs new file mode 100644 index 00000000..681a2937 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResource.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Confirmation payload returned after deleting a role. + /// + public sealed partial class RoleDeletedResource + { + /// + /// Always `role.deleted`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RoleDeletedResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.RoleDeletedResourceObject Object { get; set; } + + /// + /// Identifier of the deleted role. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Whether the role was deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `role.deleted`. + /// + /// + /// Identifier of the deleted role. + /// + /// + /// Whether the role was deleted. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RoleDeletedResource( + string id, + bool deleted, + global::tryAGI.OpenAI.RoleDeletedResourceObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public RoleDeletedResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResourceObject.g.cs new file mode 100644 index 00000000..387af7f6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDeletedResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `role.deleted`. + /// + public enum RoleDeletedResourceObject + { + /// + /// + /// + RoleDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RoleDeletedResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RoleDeletedResourceObject value) + { + return value switch + { + RoleDeletedResourceObject.RoleDeleted => "role.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RoleDeletedResourceObject? ToEnum(string value) + { + return value switch + { + "role.deleted" => RoleDeletedResourceObject.RoleDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.Json.g.cs new file mode 100644 index 00000000..2450e74a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RoleDescription + { + /// + /// 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::tryAGI.OpenAI.RoleDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RoleDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.RoleDescription; + } + + /// + /// 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::tryAGI.OpenAI.RoleDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RoleDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RoleDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.g.cs new file mode 100644 index 00000000..75dfcaad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Optional description of the role. + /// + public sealed partial class RoleDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.Json.g.cs new file mode 100644 index 00000000..d762cfa5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RoleListResource + { + /// + /// 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::tryAGI.OpenAI.RoleListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RoleListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.RoleListResource; + } + + /// + /// 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::tryAGI.OpenAI.RoleListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RoleListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RoleListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.g.cs new file mode 100644 index 00000000..f3c4c64e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Paginated list of roles assigned to a principal. + /// + public sealed partial class RoleListResource + { + /// + /// Always `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RoleListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.RoleListResourceObject Object { get; set; } + + /// + /// Role assignments returned in the current page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// Whether additional assignments are available when paginating. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Cursor to fetch the next page of results, or `null` when there are no more assignments. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Next { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `list`. + /// + /// + /// Role assignments returned in the current page. + /// + /// + /// Whether additional assignments are available when paginating. + /// + /// + /// Cursor to fetch the next page of results, or `null` when there are no more assignments. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RoleListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + string? next, + global::tryAGI.OpenAI.RoleListResourceObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Next = next ?? throw new global::System.ArgumentNullException(nameof(next)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public RoleListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.Json.g.cs new file mode 100644 index 00000000..960b9105 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RoleListResourceNext + { + /// + /// 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::tryAGI.OpenAI.RoleListResourceNext? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RoleListResourceNext), + jsonSerializerContext) as global::tryAGI.OpenAI.RoleListResourceNext; + } + + /// + /// 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::tryAGI.OpenAI.RoleListResourceNext? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RoleListResourceNext), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RoleListResourceNext; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.g.cs new file mode 100644 index 00000000..07335777 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceNext.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Cursor to fetch the next page of results, or `null` when there are no more assignments. + /// + public sealed partial class RoleListResourceNext + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceObject.g.cs new file mode 100644 index 00000000..a3dc40a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `list`. + /// + public enum RoleListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RoleListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RoleListResourceObject value) + { + return value switch + { + RoleListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RoleListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => RoleListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleObject.g.cs new file mode 100644 index 00000000..7ea465d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RoleObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `role`. + /// + public enum RoleObject + { + /// + /// + /// + Role, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RoleObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RoleObject value) + { + return value switch + { + RoleObject.Role => "role", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RoleObject? ToEnum(string value) + { + return value switch + { + "role" => RoleObject.Role, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsage.g.cs index 3ae9dd4a..03ee165b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsage.g.cs @@ -4,67 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + /// /// public sealed partial class RunCompletionUsage { - /// - /// Number of completion tokens used over the course of the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CompletionTokens { get; set; } - - /// - /// Number of prompt tokens used over the course of the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int PromptTokens { get; set; } - - /// - /// Total number of tokens used (prompt + completion). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Number of completion tokens used over the course of the run. - /// - /// - /// Number of prompt tokens used over the course of the run. - /// - /// - /// Total number of tokens used (prompt + completion). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunCompletionUsage( - int completionTokens, - int promptTokens, - int totalTokens) - { - this.CompletionTokens = completionTokens; - this.PromptTokens = promptTokens; - this.TotalTokens = totalTokens; - } - - /// - /// Initializes a new instance of the class. - /// - public RunCompletionUsage() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.Json.g.cs new file mode 100644 index 00000000..b0fc7fdc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunCompletionUsageVariant1 + { + /// + /// 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::tryAGI.OpenAI.RunCompletionUsageVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunCompletionUsageVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.RunCompletionUsageVariant1; + } + + /// + /// 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::tryAGI.OpenAI.RunCompletionUsageVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunCompletionUsageVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunCompletionUsageVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.g.cs new file mode 100644 index 00000000..37ae030a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunCompletionUsageVariant1.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + /// + public sealed partial class RunCompletionUsageVariant1 + { + /// + /// Number of completion tokens used over the course of the run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CompletionTokens { get; set; } + + /// + /// Number of prompt tokens used over the course of the run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int PromptTokens { get; set; } + + /// + /// Total number of tokens used (prompt + completion). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TotalTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Number of completion tokens used over the course of the run. + /// + /// + /// Number of prompt tokens used over the course of the run. + /// + /// + /// Total number of tokens used (prompt + completion). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RunCompletionUsageVariant1( + int completionTokens, + int promptTokens, + int totalTokens) + { + this.CompletionTokens = completionTokens; + this.PromptTokens = promptTokens; + this.TotalTokens = totalTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public RunCompletionUsageVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequest.g.cs index 4c08f8b5..15431fd6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequest.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -12,20 +14,20 @@ public sealed partial class RunGraderRequest /// The grader used for the fine-tuning job. ///
[global::System.Text.Json.Serialization.JsonPropertyName("grader")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunGraderRequestGraderJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunGraderRequestGrader Grader { get; set; } + public required global::tryAGI.OpenAI.OneOf Grader { get; set; } /// /// The dataset item provided to the grader. This will be used to populate
- /// the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. + /// the `item` namespace. See [the guide](/docs/guides/graders) for more details. ///
[global::System.Text.Json.Serialization.JsonPropertyName("item")] public object? Item { get; set; } /// /// The model sample to be evaluated. This value will be used to populate
- /// the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.
+ /// the `sample` namespace. See [the guide](/docs/guides/graders) for more details.
/// The `output_json` variable will be populated if the model sample is a
/// valid JSON string.
/// @@ -48,11 +50,11 @@ public sealed partial class RunGraderRequest /// /// /// The dataset item provided to the grader. This will be used to populate
- /// the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. + /// the `item` namespace. See [the guide](/docs/guides/graders) for more details. /// /// /// The model sample to be evaluated. This value will be used to populate
- /// the `sample` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details.
+ /// the `sample` namespace. See [the guide](/docs/guides/graders) for more details.
/// The `output_json` variable will be populated if the model sample is a
/// valid JSON string.
/// @@ -61,7 +63,7 @@ public sealed partial class RunGraderRequest [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunGraderRequest( - global::tryAGI.OpenAI.RunGraderRequestGrader grader, + global::tryAGI.OpenAI.OneOf grader, string modelSample, object? item) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.Json.g.cs deleted file mode 100644 index 2091f5e2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunGraderRequestGrader - { - /// - /// 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::tryAGI.OpenAI.RunGraderRequestGrader? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunGraderRequestGrader), - jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderRequestGrader?; - } - - /// - /// 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::tryAGI.OpenAI.RunGraderRequestGrader? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunGraderRequestGrader), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderRequestGrader?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.g.cs deleted file mode 100644 index 93552320..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGrader.g.cs +++ /dev/null @@ -1,378 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The grader used for the fine-tuning job. - /// - public readonly partial struct RunGraderRequestGrader : global::System.IEquatable - { - /// - /// A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderStringCheck? StringCheck { get; init; } -#else - public global::tryAGI.OpenAI.GraderStringCheck? StringCheck { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StringCheck))] -#endif - public bool IsStringCheck => StringCheck != null; - - /// - /// - /// - public static implicit operator RunGraderRequestGrader(global::tryAGI.OpenAI.GraderStringCheck value) => new RunGraderRequestGrader((global::tryAGI.OpenAI.GraderStringCheck?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.GraderStringCheck?(RunGraderRequestGrader @this) => @this.StringCheck; - - /// - /// - /// - public RunGraderRequestGrader(global::tryAGI.OpenAI.GraderStringCheck? value) - { - StringCheck = value; - } - - /// - /// A TextSimilarityGrader object which grades text based on similarity metrics. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderTextSimilarity? TextSimilarity { get; init; } -#else - public global::tryAGI.OpenAI.GraderTextSimilarity? TextSimilarity { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextSimilarity))] -#endif - public bool IsTextSimilarity => TextSimilarity != null; - - /// - /// - /// - public static implicit operator RunGraderRequestGrader(global::tryAGI.OpenAI.GraderTextSimilarity value) => new RunGraderRequestGrader((global::tryAGI.OpenAI.GraderTextSimilarity?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.GraderTextSimilarity?(RunGraderRequestGrader @this) => @this.TextSimilarity; - - /// - /// - /// - public RunGraderRequestGrader(global::tryAGI.OpenAI.GraderTextSimilarity? value) - { - TextSimilarity = value; - } - - /// - /// A PythonGrader object that runs a python script on the input. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderPython? Python { get; init; } -#else - public global::tryAGI.OpenAI.GraderPython? Python { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Python))] -#endif - public bool IsPython => Python != null; - - /// - /// - /// - public static implicit operator RunGraderRequestGrader(global::tryAGI.OpenAI.GraderPython value) => new RunGraderRequestGrader((global::tryAGI.OpenAI.GraderPython?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.GraderPython?(RunGraderRequestGrader @this) => @this.Python; - - /// - /// - /// - public RunGraderRequestGrader(global::tryAGI.OpenAI.GraderPython? value) - { - Python = value; - } - - /// - /// A ScoreModelGrader object that uses a model to assign a score to the input. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderScoreModel? ScoreModel { get; init; } -#else - public global::tryAGI.OpenAI.GraderScoreModel? ScoreModel { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScoreModel))] -#endif - public bool IsScoreModel => ScoreModel != null; - - /// - /// - /// - public static implicit operator RunGraderRequestGrader(global::tryAGI.OpenAI.GraderScoreModel value) => new RunGraderRequestGrader((global::tryAGI.OpenAI.GraderScoreModel?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.GraderScoreModel?(RunGraderRequestGrader @this) => @this.ScoreModel; - - /// - /// - /// - public RunGraderRequestGrader(global::tryAGI.OpenAI.GraderScoreModel? value) - { - ScoreModel = value; - } - - /// - /// A MultiGrader object combines the output of multiple graders to produce a single score. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.GraderMulti? Multi { get; init; } -#else - public global::tryAGI.OpenAI.GraderMulti? Multi { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Multi))] -#endif - public bool IsMulti => Multi != null; - - /// - /// - /// - public static implicit operator RunGraderRequestGrader(global::tryAGI.OpenAI.GraderMulti value) => new RunGraderRequestGrader((global::tryAGI.OpenAI.GraderMulti?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.GraderMulti?(RunGraderRequestGrader @this) => @this.Multi; - - /// - /// - /// - public RunGraderRequestGrader(global::tryAGI.OpenAI.GraderMulti? value) - { - Multi = value; - } - - /// - /// - /// - public RunGraderRequestGrader( - global::tryAGI.OpenAI.GraderStringCheck? stringCheck, - global::tryAGI.OpenAI.GraderTextSimilarity? textSimilarity, - global::tryAGI.OpenAI.GraderPython? python, - global::tryAGI.OpenAI.GraderScoreModel? scoreModel, - global::tryAGI.OpenAI.GraderMulti? multi - ) - { - StringCheck = stringCheck; - TextSimilarity = textSimilarity; - Python = python; - ScoreModel = scoreModel; - Multi = multi; - } - - /// - /// - /// - public object? Object => - Multi as object ?? - ScoreModel as object ?? - Python as object ?? - TextSimilarity as object ?? - StringCheck as object - ; - - /// - /// - /// - public override string? ToString() => - StringCheck?.ToString() ?? - TextSimilarity?.ToString() ?? - Python?.ToString() ?? - ScoreModel?.ToString() ?? - Multi?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsStringCheck || IsTextSimilarity || IsPython || IsScoreModel || IsMulti; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? stringCheck = null, - global::System.Func? textSimilarity = null, - global::System.Func? python = null, - global::System.Func? scoreModel = null, - global::System.Func? multi = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsStringCheck && stringCheck != null) - { - return stringCheck(StringCheck!); - } - else if (IsTextSimilarity && textSimilarity != null) - { - return textSimilarity(TextSimilarity!); - } - else if (IsPython && python != null) - { - return python(Python!); - } - else if (IsScoreModel && scoreModel != null) - { - return scoreModel(ScoreModel!); - } - else if (IsMulti && multi != null) - { - return multi(Multi!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? stringCheck = null, - global::System.Action? textSimilarity = null, - global::System.Action? python = null, - global::System.Action? scoreModel = null, - global::System.Action? multi = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsStringCheck) - { - stringCheck?.Invoke(StringCheck!); - } - else if (IsTextSimilarity) - { - textSimilarity?.Invoke(TextSimilarity!); - } - else if (IsPython) - { - python?.Invoke(Python!); - } - else if (IsScoreModel) - { - scoreModel?.Invoke(ScoreModel!); - } - else if (IsMulti) - { - multi?.Invoke(Multi!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - StringCheck, - typeof(global::tryAGI.OpenAI.GraderStringCheck), - TextSimilarity, - typeof(global::tryAGI.OpenAI.GraderTextSimilarity), - Python, - typeof(global::tryAGI.OpenAI.GraderPython), - ScoreModel, - typeof(global::tryAGI.OpenAI.GraderScoreModel), - Multi, - typeof(global::tryAGI.OpenAI.GraderMulti), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(RunGraderRequestGrader other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StringCheck, other.StringCheck) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TextSimilarity, other.TextSimilarity) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Python, other.Python) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ScoreModel, other.ScoreModel) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Multi, other.Multi) - ; - } - - /// - /// - /// - public static bool operator ==(RunGraderRequestGrader obj1, RunGraderRequestGrader obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(RunGraderRequestGrader obj1, RunGraderRequestGrader obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is RunGraderRequestGrader o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.Json.g.cs deleted file mode 100644 index 0953d356..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunGraderRequestGraderDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderRequestGraderDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.g.cs deleted file mode 100644 index 7c390461..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestGraderDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunGraderRequestGraderDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunGraderRequestGraderDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunGraderRequestGraderDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestItem.g.cs index 5133eb83..498c7672 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderRequestItem.g.cs @@ -5,7 +5,7 @@ namespace tryAGI.OpenAI { /// /// The dataset item provided to the grader. This will be used to populate
- /// the `item` namespace. See [the guide](https://platform.openai.com/docs/guides/graders) for more details. + /// the `item` namespace. See [the guide](/docs/guides/graders) for more details. ///
public sealed partial class RunGraderRequestItem { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponse.g.cs index 0c29a696..1a2ce0f7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponse.g.cs @@ -11,30 +11,30 @@ public sealed partial class RunGraderResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonPropertyName("reward")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunGraderResponseMetadata Metadata { get; set; } + public required double Reward { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_token_usage_per_model")] + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] - public required object ModelGraderTokenUsagePerModel { get; set; } + public required global::tryAGI.OpenAI.RunGraderResponseMetadata Metadata { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("reward")] + [global::System.Text.Json.Serialization.JsonPropertyName("sub_rewards")] [global::System.Text.Json.Serialization.JsonRequired] - public required double Reward { get; set; } + public required object SubRewards { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("sub_rewards")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_token_usage_per_model")] [global::System.Text.Json.Serialization.JsonRequired] - public required object SubRewards { get; set; } + public required object ModelGraderTokenUsagePerModel { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,23 +45,23 @@ public sealed partial class RunGraderResponse /// /// Initializes a new instance of the class. /// - /// - /// /// + /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunGraderResponse( - global::tryAGI.OpenAI.RunGraderResponseMetadata metadata, - object modelGraderTokenUsagePerModel, double reward, - object subRewards) + global::tryAGI.OpenAI.RunGraderResponseMetadata metadata, + object subRewards, + object modelGraderTokenUsagePerModel) { - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); - this.ModelGraderTokenUsagePerModel = modelGraderTokenUsagePerModel ?? throw new global::System.ArgumentNullException(nameof(modelGraderTokenUsagePerModel)); this.Reward = reward; + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.SubRewards = subRewards ?? throw new global::System.ArgumentNullException(nameof(subRewards)); + this.ModelGraderTokenUsagePerModel = modelGraderTokenUsagePerModel ?? throw new global::System.ArgumentNullException(nameof(modelGraderTokenUsagePerModel)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadata.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadata.g.cs index da51e584..697ee057 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadata.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadata.g.cs @@ -11,30 +11,30 @@ public sealed partial class RunGraderResponseMetadata /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("errors")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunGraderResponseMetadataErrors Errors { get; set; } + public required string Name { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("execution_time")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonRequired] - public required double ExecutionTime { get; set; } + public required string Type { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("errors")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required global::tryAGI.OpenAI.RunGraderResponseMetadataErrors Errors { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("sampled_model_name")] + [global::System.Text.Json.Serialization.JsonPropertyName("execution_time")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? SampledModelName { get; set; } + public required double ExecutionTime { get; set; } /// /// @@ -53,9 +53,9 @@ public sealed partial class RunGraderResponseMetadata /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonPropertyName("sampled_model_name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + public required string? SampledModelName { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -66,32 +66,32 @@ public sealed partial class RunGraderResponseMetadata /// /// Initializes a new instance of the class. /// + /// + /// /// /// - /// - /// /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunGraderResponseMetadata( + string name, + string type, global::tryAGI.OpenAI.RunGraderResponseMetadataErrors errors, double executionTime, - string name, - string? sampledModelName, object scores, int? tokenUsage, - string type) + string? sampledModelName) { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Errors = errors ?? throw new global::System.ArgumentNullException(nameof(errors)); this.ExecutionTime = executionTime; - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.SampledModelName = sampledModelName ?? throw new global::System.ArgumentNullException(nameof(sampledModelName)); this.Scores = scores ?? throw new global::System.ArgumentNullException(nameof(scores)); - this.TokenUsage = tokenUsage; - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.TokenUsage = tokenUsage ?? throw new global::System.ArgumentNullException(nameof(tokenUsage)); + this.SampledModelName = sampledModelName ?? throw new global::System.ArgumentNullException(nameof(sampledModelName)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrors.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrors.g.cs index ad3b5009..7840591d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrors.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrors.g.cs @@ -18,93 +18,93 @@ public sealed partial class RunGraderResponseMetadataErrors /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("invalid_variable_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("sample_parse_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool InvalidVariableError { get; set; } + public required bool SampleParseError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_parse_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("truncated_observation_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool ModelGraderParseError { get; set; } + public required bool TruncatedObservationError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_refusal_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("unresponsive_reward_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool ModelGraderRefusalError { get; set; } + public required bool UnresponsiveRewardError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_server_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("invalid_variable_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool ModelGraderServerError { get; set; } + public required bool InvalidVariableError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_server_error_details")] + [global::System.Text.Json.Serialization.JsonPropertyName("other_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? ModelGraderServerErrorDetails { get; set; } + public required bool OtherError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("other_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_server_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool OtherError { get; set; } + public required bool PythonGraderServerError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_runtime_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_server_error_type")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool PythonGraderRuntimeError { get; set; } + public required string? PythonGraderServerErrorType { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_runtime_error_details")] + [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_runtime_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? PythonGraderRuntimeErrorDetails { get; set; } + public required bool PythonGraderRuntimeError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_server_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_runtime_error_details")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool PythonGraderServerError { get; set; } + public required string? PythonGraderRuntimeErrorDetails { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("python_grader_server_error_type")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_server_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string? PythonGraderServerErrorType { get; set; } + public required bool ModelGraderServerError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("sample_parse_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_refusal_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool SampleParseError { get; set; } + public required bool ModelGraderRefusalError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("truncated_observation_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_parse_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool TruncatedObservationError { get; set; } + public required bool ModelGraderParseError { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("unresponsive_reward_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("model_grader_server_error_details")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool UnresponsiveRewardError { get; set; } + public required string? ModelGraderServerErrorDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -116,52 +116,52 @@ public sealed partial class RunGraderResponseMetadataErrors /// Initializes a new instance of the class. /// /// + /// + /// + /// /// - /// - /// - /// - /// /// - /// - /// /// /// - /// - /// - /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunGraderResponseMetadataErrors( bool formulaParseError, + bool sampleParseError, + bool truncatedObservationError, + bool unresponsiveRewardError, bool invalidVariableError, - bool modelGraderParseError, - bool modelGraderRefusalError, - bool modelGraderServerError, - string? modelGraderServerErrorDetails, bool otherError, - bool pythonGraderRuntimeError, - string? pythonGraderRuntimeErrorDetails, bool pythonGraderServerError, string? pythonGraderServerErrorType, - bool sampleParseError, - bool truncatedObservationError, - bool unresponsiveRewardError) + bool pythonGraderRuntimeError, + string? pythonGraderRuntimeErrorDetails, + bool modelGraderServerError, + bool modelGraderRefusalError, + bool modelGraderParseError, + string? modelGraderServerErrorDetails) { this.FormulaParseError = formulaParseError; + this.SampleParseError = sampleParseError; + this.TruncatedObservationError = truncatedObservationError; + this.UnresponsiveRewardError = unresponsiveRewardError; this.InvalidVariableError = invalidVariableError; - this.ModelGraderParseError = modelGraderParseError; - this.ModelGraderRefusalError = modelGraderRefusalError; - this.ModelGraderServerError = modelGraderServerError; - this.ModelGraderServerErrorDetails = modelGraderServerErrorDetails ?? throw new global::System.ArgumentNullException(nameof(modelGraderServerErrorDetails)); this.OtherError = otherError; - this.PythonGraderRuntimeError = pythonGraderRuntimeError; - this.PythonGraderRuntimeErrorDetails = pythonGraderRuntimeErrorDetails ?? throw new global::System.ArgumentNullException(nameof(pythonGraderRuntimeErrorDetails)); this.PythonGraderServerError = pythonGraderServerError; this.PythonGraderServerErrorType = pythonGraderServerErrorType ?? throw new global::System.ArgumentNullException(nameof(pythonGraderServerErrorType)); - this.SampleParseError = sampleParseError; - this.TruncatedObservationError = truncatedObservationError; - this.UnresponsiveRewardError = unresponsiveRewardError; + this.PythonGraderRuntimeError = pythonGraderRuntimeError; + this.PythonGraderRuntimeErrorDetails = pythonGraderRuntimeErrorDetails ?? throw new global::System.ArgumentNullException(nameof(pythonGraderRuntimeErrorDetails)); + this.ModelGraderServerError = modelGraderServerError; + this.ModelGraderRefusalError = modelGraderRefusalError; + this.ModelGraderParseError = modelGraderParseError; + this.ModelGraderServerErrorDetails = modelGraderServerErrorDetails ?? throw new global::System.ArgumentNullException(nameof(modelGraderServerErrorDetails)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.Json.g.cs new file mode 100644 index 00000000..2514623f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunGraderResponseMetadataErrorsModelGraderServerErrorDetails + { + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails; + } + + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.g.cs new file mode 100644 index 00000000..60ec5862 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsModelGraderServerErrorDetails.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunGraderResponseMetadataErrorsModelGraderServerErrorDetails + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.Json.g.cs new file mode 100644 index 00000000..07191ac7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails + { + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails), + jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails; + } + + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.g.cs new file mode 100644 index 00000000..bccd881a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunGraderResponseMetadataErrorsPythonGraderRuntimeErrorDetails + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.Json.g.cs new file mode 100644 index 00000000..1753180d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunGraderResponseMetadataErrorsPythonGraderServerErrorType + { + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType), + jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType; + } + + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderResponseMetadataErrorsPythonGraderServerErrorType; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.g.cs new file mode 100644 index 00000000..0a9e7027 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataErrorsPythonGraderServerErrorType.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunGraderResponseMetadataErrorsPythonGraderServerErrorType + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.Json.g.cs new file mode 100644 index 00000000..f0eae74b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunGraderResponseMetadataSampledModelName + { + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName), + jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName; + } + + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderResponseMetadataSampledModelName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.g.cs new file mode 100644 index 00000000..be906694 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataSampledModelName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunGraderResponseMetadataSampledModelName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.Json.g.cs new file mode 100644 index 00000000..3238cdd4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunGraderResponseMetadataTokenUsage + { + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage), + jsonSerializerContext) as global::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage; + } + + /// + /// 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::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunGraderResponseMetadataTokenUsage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.g.cs new file mode 100644 index 00000000..0506dc91 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunGraderResponseMetadataTokenUsage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunGraderResponseMetadataTokenUsage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObject.g.cs index 0c0822fc..dc15eed1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObject.g.cs @@ -1,35 +1,28 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI { /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// public sealed partial class RunObject { /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AssistantId { get; set; } - - /// - /// The Unix timestamp (in seconds) for when the run was cancelled. + /// The identifier, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? CancelledAt { get; set; } + public required string Id { get; set; } /// - /// The Unix timestamp (in seconds) for when the run was completed. + /// The object type, which is always `thread.run`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? CompletedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectJsonConverter))] + public global::tryAGI.OpenAI.RunObjectObject Object { get; set; } /// /// The Unix timestamp (in seconds) for when the run was created. @@ -40,128 +33,123 @@ public sealed partial class RunObject public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The Unix timestamp (in seconds) for when the run will expire. + /// The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? ExpiresAt { get; set; } + public required string ThreadId { get; set; } /// - /// The Unix timestamp (in seconds) for when the run failed. + /// The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? FailedAt { get; set; } + public required string AssistantId { get; set; } /// - /// The identifier, which can be referenced in API endpoints. + /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.RunObjectStatus Status { get; set; } /// - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. + /// Details on the action required to continue the run. Will be `null` if no action is required. /// - [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_details")] + [global::System.Text.Json.Serialization.JsonPropertyName("required_action")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObjectIncompleteDetails? IncompleteDetails { get; set; } + public required global::tryAGI.OpenAI.RunObjectRequiredAction? RequiredAction { get; set; } /// - /// The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + /// The last error associated with this run. Will be `null` if there are no errors. /// - [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Instructions { get; set; } + public required global::tryAGI.OpenAI.RunObjectLastError? LastError { get; set; } /// - /// The last error associated with this run. Will be `null` if there are no errors. + /// The Unix timestamp (in seconds) for when the run will expire. /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObjectLastError? LastError { get; set; } + public required global::System.DateTimeOffset? ExpiresAt { get; set; } /// - /// The maximum number of completion tokens specified to have been used over the course of the run. + /// The Unix timestamp (in seconds) for when the run was started. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required int? MaxCompletionTokens { get; set; } + public required global::System.DateTimeOffset? StartedAt { get; set; } /// - /// The maximum number of prompt tokens specified to have been used over the course of the run. + /// The Unix timestamp (in seconds) for when the run was cancelled. /// - [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required int? MaxPromptTokens { get; set; } + public required global::System.DateTimeOffset? CancelledAt { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The Unix timestamp (in seconds) for when the run failed. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } + public required global::System.DateTimeOffset? FailedAt { get; set; } /// - /// The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + /// The Unix timestamp (in seconds) for when the run was completed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Model { get; set; } + public required global::System.DateTimeOffset? CompletedAt { get; set; } /// - /// The object type, which is always `thread.run`. + /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.RunObjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObjectIncompleteDetails? IncompleteDetails { get; set; } /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// The model that the [assistant](/docs/api-reference/assistants) used for this run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] + [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool? ParallelToolCalls { get; set; } + public required string Model { get; set; } /// - /// Details on the action required to continue the run. Will be `null` if no action is required. + /// The instructions that the [assistant](/docs/api-reference/assistants) used for this run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("required_action")] + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObjectRequiredAction? RequiredAction { get; set; } + public required string Instructions { get; set; } /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
+ /// Default Value: [] ///
- [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AssistantsApiResponseFormatOption ResponseFormat { get; set; } + public required global::System.Collections.Generic.IList> Tools { get; set; } /// - /// The Unix timestamp (in seconds) for when the run was started. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? StartedAt { get; set; } + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStatus Status { get; set; } + public required global::tryAGI.OpenAI.RunCompletionUsageVariant1? Usage { get; set; } /// /// The sampling temperature used for this run. If not set, defaults to 1. @@ -170,50 +158,58 @@ public sealed partial class RunObject public double? Temperature { get; set; } /// - /// The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. + /// The nucleus sampling value used for this run. If not set, defaults to 1. /// - [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } + + /// + /// The maximum number of prompt tokens specified to have been used over the course of the run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_prompt_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ThreadId { get; set; } + public required int? MaxPromptTokens { get; set; } /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + /// The maximum number of completion tokens specified to have been used over the course of the run. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOptionJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("max_completion_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AssistantsApiToolChoiceOption ToolChoice { get; set; } + public required int? MaxCompletionTokens { get; set; } /// - /// The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tools { get; set; } + public required global::tryAGI.OpenAI.AllOf TruncationStrategy { get; set; } /// - /// The nucleus sampling value used for this run. If not set, defaults to 1. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] - public double? TopP { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.AllOf ToolChoice { get; set; } /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. /// - [global::System.Text.Json.Serialization.JsonPropertyName("truncation_strategy")] + [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.TruncationObject TruncationStrategy { get; set; } + public required bool? ParallelToolCalls { get; set; } /// - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOptionJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunCompletionUsage? Usage { get; set; } + public required global::tryAGI.OpenAI.AssistantsApiResponseFormatOption ResponseFormat { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -224,154 +220,139 @@ public sealed partial class RunObject /// /// Initializes a new instance of the class. /// - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for execution of this run. - /// - /// - /// The Unix timestamp (in seconds) for when the run was cancelled. + /// + /// The identifier, which can be referenced in API endpoints. /// - /// - /// The Unix timestamp (in seconds) for when the run was completed. + /// + /// The object type, which is always `thread.run`. /// /// /// The Unix timestamp (in seconds) for when the run was created. /// - /// - /// The Unix timestamp (in seconds) for when the run will expire. - /// - /// - /// The Unix timestamp (in seconds) for when the run failed. + /// + /// The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. /// - /// - /// The identifier, which can be referenced in API endpoints. + /// + /// The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run. /// - /// - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. + /// + /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. /// - /// - /// The instructions that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + /// + /// Details on the action required to continue the run. Will be `null` if no action is required. /// /// /// The last error associated with this run. Will be `null` if there are no errors. /// - /// - /// The maximum number of completion tokens specified to have been used over the course of the run. - /// - /// - /// The maximum number of prompt tokens specified to have been used over the course of the run. + /// + /// The Unix timestamp (in seconds) for when the run will expire. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The Unix timestamp (in seconds) for when the run was started. /// - /// - /// The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. + /// + /// The Unix timestamp (in seconds) for when the run was cancelled. /// - /// - /// The object type, which is always `thread.run`. + /// + /// The Unix timestamp (in seconds) for when the run failed. /// - /// - /// Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// The Unix timestamp (in seconds) for when the run was completed. /// - /// - /// Details on the action required to continue the run. Will be `null` if no action is required. + /// + /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. /// - /// - /// Specifies the format that the model must output. Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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](https://platform.openai.com/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. + /// + /// The model that the [assistant](/docs/api-reference/assistants) used for this run. /// - /// - /// The Unix timestamp (in seconds) for when the run was started. + /// + /// The instructions that the [assistant](/docs/api-reference/assistants) used for this run. /// - /// - /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. + /// + /// The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
+ /// Default Value: [] /// + /// + /// /// /// The sampling temperature used for this run. If not set, defaults to 1. /// - /// - /// The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run. - /// - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tools and instead generates a message.
- /// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.
- /// `required` means the model must call one or more tools before responding to the user.
- /// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. - /// - /// - /// The list of tools that the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for this run. - /// /// /// The nucleus sampling value used for this run. If not set, defaults to 1. /// - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run. + /// + /// The maximum number of prompt tokens specified to have been used over the course of the run. /// - /// - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + /// + /// The maximum number of completion tokens specified to have been used over the course of the run. + /// + /// + /// + /// + /// Whether to enable [parallel function calling](/docs/guides/function-calling#configuring-parallel-function-calling) during tool use. + /// + /// + /// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models#gpt-4o), [GPT-4 Turbo](/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `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. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunObject( - string assistantId, - global::System.DateTimeOffset? cancelledAt, - global::System.DateTimeOffset? completedAt, + string id, global::System.DateTimeOffset createdAt, + string threadId, + string assistantId, + global::tryAGI.OpenAI.RunObjectStatus status, + global::tryAGI.OpenAI.RunObjectRequiredAction? requiredAction, + global::tryAGI.OpenAI.RunObjectLastError? lastError, global::System.DateTimeOffset? expiresAt, + global::System.DateTimeOffset? startedAt, + global::System.DateTimeOffset? cancelledAt, global::System.DateTimeOffset? failedAt, - string id, + global::System.DateTimeOffset? completedAt, global::tryAGI.OpenAI.RunObjectIncompleteDetails? incompleteDetails, + string model, string instructions, - global::tryAGI.OpenAI.RunObjectLastError? lastError, - int? maxCompletionTokens, - int? maxPromptTokens, + global::System.Collections.Generic.IList> tools, global::System.Collections.Generic.Dictionary? metadata, - string model, + global::tryAGI.OpenAI.RunCompletionUsageVariant1? usage, + int? maxPromptTokens, + int? maxCompletionTokens, + global::tryAGI.OpenAI.AllOf truncationStrategy, + global::tryAGI.OpenAI.AllOf toolChoice, bool? parallelToolCalls, - global::tryAGI.OpenAI.RunObjectRequiredAction? requiredAction, global::tryAGI.OpenAI.AssistantsApiResponseFormatOption responseFormat, - global::System.DateTimeOffset? startedAt, - global::tryAGI.OpenAI.RunStatus status, - string threadId, - global::tryAGI.OpenAI.AssistantsApiToolChoiceOption toolChoice, - global::System.Collections.Generic.IList tools, - global::tryAGI.OpenAI.TruncationObject truncationStrategy, - global::tryAGI.OpenAI.RunCompletionUsage? usage, global::tryAGI.OpenAI.RunObjectObject @object, double? temperature, double? topP) { - this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); - this.CancelledAt = cancelledAt; - this.CompletedAt = completedAt; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); + this.Status = status; + this.RequiredAction = requiredAction ?? throw new global::System.ArgumentNullException(nameof(requiredAction)); + this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); this.ExpiresAt = expiresAt; + this.StartedAt = startedAt; + this.CancelledAt = cancelledAt; this.FailedAt = failedAt; - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CompletedAt = completedAt; this.IncompleteDetails = incompleteDetails ?? throw new global::System.ArgumentNullException(nameof(incompleteDetails)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Instructions = instructions ?? throw new global::System.ArgumentNullException(nameof(instructions)); - this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); - this.MaxCompletionTokens = maxCompletionTokens; - this.MaxPromptTokens = maxPromptTokens; + this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); - this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); + this.MaxPromptTokens = maxPromptTokens; + this.MaxCompletionTokens = maxCompletionTokens; + this.TruncationStrategy = truncationStrategy; + this.ToolChoice = toolChoice; this.ParallelToolCalls = parallelToolCalls; - this.RequiredAction = requiredAction ?? throw new global::System.ArgumentNullException(nameof(requiredAction)); this.ResponseFormat = responseFormat; - this.StartedAt = startedAt; - this.Status = status; - this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); - this.ToolChoice = toolChoice; - this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); - this.TruncationStrategy = truncationStrategy ?? throw new global::System.ArgumentNullException(nameof(truncationStrategy)); - this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); this.Object = @object; this.Temperature = temperature; this.TopP = topP; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectRequiredAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectRequiredAction.g.cs index ae33bb39..569e6c3f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectRequiredAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectRequiredAction.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunObjectRequiredAction { - /// - /// Details on the tool outputs needed for this run to continue. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("submit_tool_outputs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; set; } - /// /// For now, this is always `submit_tool_outputs`. /// @@ -22,6 +15,13 @@ public sealed partial class RunObjectRequiredAction [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunObjectRequiredActionTypeJsonConverter))] public global::tryAGI.OpenAI.RunObjectRequiredActionType Type { get; set; } + /// + /// Details on the tool outputs needed for this run to continue. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("submit_tool_outputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObjectRequiredActionSubmitToolOutputs SubmitToolOutputs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class RunObjectRequiredAction /// /// Initializes a new instance of the class. /// - /// - /// Details on the tool outputs needed for this run to continue. - /// /// /// For now, this is always `submit_tool_outputs`. /// + /// + /// Details on the tool outputs needed for this run to continue. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectStatus.g.cs new file mode 100644 index 00000000..debc5161 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunObjectStatus.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. + /// + public enum RunObjectStatus + { + /// + /// + /// + Queued, + /// + /// + /// + InProgress, + /// + /// + /// + RequiresAction, + /// + /// + /// + Cancelling, + /// + /// + /// + Cancelled, + /// + /// + /// + Failed, + /// + /// + /// + Completed, + /// + /// + /// + Incomplete, + /// + /// + /// + Expired, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunObjectStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunObjectStatus value) + { + return value switch + { + RunObjectStatus.Queued => "queued", + RunObjectStatus.InProgress => "in_progress", + RunObjectStatus.RequiresAction => "requires_action", + RunObjectStatus.Cancelling => "cancelling", + RunObjectStatus.Cancelled => "cancelled", + RunObjectStatus.Failed => "failed", + RunObjectStatus.Completed => "completed", + RunObjectStatus.Incomplete => "incomplete", + RunObjectStatus.Expired => "expired", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunObjectStatus? ToEnum(string value) + { + return value switch + { + "queued" => RunObjectStatus.Queued, + "in_progress" => RunObjectStatus.InProgress, + "requires_action" => RunObjectStatus.RequiresAction, + "cancelling" => RunObjectStatus.Cancelling, + "cancelled" => RunObjectStatus.Cancelled, + "failed" => RunObjectStatus.Failed, + "completed" => RunObjectStatus.Completed, + "incomplete" => RunObjectStatus.Incomplete, + "expired" => RunObjectStatus.Expired, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStatus.g.cs deleted file mode 100644 index 953ddd50..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStatus.g.cs +++ /dev/null @@ -1,93 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`. - /// - public enum RunStatus - { - /// - /// - /// - Queued, - /// - /// - /// - InProgress, - /// - /// - /// - RequiresAction, - /// - /// - /// - Cancelling, - /// - /// - /// - Cancelled, - /// - /// - /// - Failed, - /// - /// - /// - Completed, - /// - /// - /// - Incomplete, - /// - /// - /// - Expired, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RunStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RunStatus value) - { - return value switch - { - RunStatus.Queued => "queued", - RunStatus.InProgress => "in_progress", - RunStatus.RequiresAction => "requires_action", - RunStatus.Cancelling => "cancelling", - RunStatus.Cancelled => "cancelled", - RunStatus.Failed => "failed", - RunStatus.Completed => "completed", - RunStatus.Incomplete => "incomplete", - RunStatus.Expired => "expired", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RunStatus? ToEnum(string value) - { - return value switch - { - "queued" => RunStatus.Queued, - "in_progress" => RunStatus.InProgress, - "requires_action" => RunStatus.RequiresAction, - "cancelling" => RunStatus.Cancelling, - "cancelled" => RunStatus.Cancelled, - "failed" => RunStatus.Failed, - "completed" => RunStatus.Completed, - "incomplete" => RunStatus.Incomplete, - "expired" => RunStatus.Expired, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsage.g.cs index d783b099..cb5cf4fa 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsage.g.cs @@ -4,67 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + /// /// public sealed partial class RunStepCompletionUsage { - /// - /// Number of completion tokens used over the course of the run step. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CompletionTokens { get; set; } - - /// - /// Number of prompt tokens used over the course of the run step. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int PromptTokens { get; set; } - - /// - /// Total number of tokens used (prompt + completion). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalTokens { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Number of completion tokens used over the course of the run step. - /// - /// - /// Number of prompt tokens used over the course of the run step. - /// - /// - /// Total number of tokens used (prompt + completion). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepCompletionUsage( - int completionTokens, - int promptTokens, - int totalTokens) - { - this.CompletionTokens = completionTokens; - this.PromptTokens = promptTokens; - this.TotalTokens = totalTokens; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepCompletionUsage() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.Json.g.cs new file mode 100644 index 00000000..17114c00 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepCompletionUsageVariant1 + { + /// + /// 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::tryAGI.OpenAI.RunStepCompletionUsageVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepCompletionUsageVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepCompletionUsageVariant1; + } + + /// + /// 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::tryAGI.OpenAI.RunStepCompletionUsageVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepCompletionUsageVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepCompletionUsageVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.g.cs new file mode 100644 index 00000000..22df76c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepCompletionUsageVariant1.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + /// + public sealed partial class RunStepCompletionUsageVariant1 + { + /// + /// Number of completion tokens used over the course of the run step. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CompletionTokens { get; set; } + + /// + /// Number of prompt tokens used over the course of the run step. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int PromptTokens { get; set; } + + /// + /// Total number of tokens used (prompt + completion). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TotalTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Number of completion tokens used over the course of the run step. + /// + /// + /// Number of prompt tokens used over the course of the run step. + /// + /// + /// Total number of tokens used (prompt + completion). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RunStepCompletionUsageVariant1( + int completionTokens, + int promptTokens, + int totalTokens) + { + this.CompletionTokens = completionTokens; + this.PromptTokens = promptTokens; + this.TotalTokens = totalTokens; + } + + /// + /// Initializes a new instance of the class. + /// + public RunStepCompletionUsageVariant1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObject.g.cs index 07646c5d..1ca292a0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunStepDeltaObject { - /// - /// The delta containing the fields that have changed on the run step. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDeltaObjectDelta Delta { get; set; } - /// /// The identifier of the run step, which can be referenced in API endpoints. /// @@ -29,6 +22,13 @@ public sealed partial class RunStepDeltaObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectObjectJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaObjectObject Object { get; set; } + /// + /// The delta containing the fields that have changed on the run step. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDeltaObjectDelta Delta { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RunStepDeltaObject /// /// Initializes a new instance of the class. /// - /// - /// The delta containing the fields that have changed on the run step. - /// /// /// The identifier of the run step, which can be referenced in API endpoints. /// /// /// The object type, which is always `thread.run.step.delta`. /// + /// + /// The delta containing the fields that have changed on the run step. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaObject( - global::tryAGI.OpenAI.RunStepDeltaObjectDelta delta, string id, + global::tryAGI.OpenAI.RunStepDeltaObjectDelta delta, global::tryAGI.OpenAI.RunStepDeltaObjectObject @object) { - this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDelta.g.cs index 83f405d8..c41499f0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDelta.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDelta.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -12,8 +14,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::tryAGI.OpenAI.JsonConverters.RunStepDeltaObjectDeltaStepDetailsJsonConverter))] - public global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails? StepDetails { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? StepDetails { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,7 +33,7 @@ public sealed partial class RunStepDeltaObjectDelta [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaObjectDelta( - global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails? stepDetails) + global::tryAGI.OpenAI.OneOf? stepDetails) { this.StepDetails = stepDetails; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.Json.g.cs deleted file mode 100644 index 54fd7c46..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepDeltaObjectDeltaStepDetails - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetails?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs deleted file mode 100644 index fae5caa4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetails.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The details of the run step. - /// - public readonly partial struct RunStepDeltaObjectDeltaStepDetails : global::System.IEquatable - { - /// - /// Details of the message creation by the run step. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? MessageCreation { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject value) => new RunStepDeltaObjectDeltaStepDetails((global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject?(RunStepDeltaObjectDeltaStepDetails @this) => @this.MessageCreation; - - /// - /// - /// - public RunStepDeltaObjectDeltaStepDetails(global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? value) - { - MessageCreation = value; - } - - /// - /// Details of the tool call. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? ToolCalls { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject value) => new RunStepDeltaObjectDeltaStepDetails((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject?(RunStepDeltaObjectDeltaStepDetails @this) => @this.ToolCalls; - - /// - /// - /// - public RunStepDeltaObjectDeltaStepDetails(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? value) - { - ToolCalls = value; - } - - /// - /// - /// - public RunStepDeltaObjectDeltaStepDetails( - global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject? messageCreation, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObject? toolCalls - ) - { - MessageCreation = messageCreation; - ToolCalls = toolCalls; - } - - /// - /// - /// - public object? Object => - ToolCalls as object ?? - MessageCreation as object - ; - - /// - /// - /// - public override string? ToString() => - MessageCreation?.ToString() ?? - ToolCalls?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObject), - ToolCalls, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.Json.g.cs deleted file mode 100644 index 1f9b0169..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepDeltaObjectDeltaStepDetailsDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaObjectDeltaStepDetailsDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs deleted file mode 100644 index 41d02af3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaObjectDeltaStepDetailsDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepDeltaObjectDeltaStepDetailsDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepDeltaObjectDeltaStepDetailsDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepDeltaObjectDeltaStepDetailsDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsMessageCreationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsMessageCreationObject.g.cs index 82e66859..a5055bce 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsMessageCreationObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsMessageCreationObject.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDeltaStepDetailsMessageCreationObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message_creation")] - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? MessageCreation { get; set; } - /// /// Always `message_creation`. /// @@ -21,6 +15,12 @@ public sealed partial class RunStepDeltaStepDetailsMessageCreationObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsMessageCreationObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message_creation")] + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? MessageCreation { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,19 +30,19 @@ public sealed partial class RunStepDeltaStepDetailsMessageCreationObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `message_creation`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsMessageCreationObject( - global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? messageCreation, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectType type, + global::tryAGI.OpenAI.RunStepDeltaStepDetailsMessageCreationObjectMessageCreation? messageCreation) { - this.MessageCreation = messageCreation; this.Type = type; + this.MessageCreation = messageCreation; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.Json.g.cs deleted file mode 100644 index 3bd15d33..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepDeltaStepDetailsToolCall - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall?; - } - - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCall?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.g.cs deleted file mode 100644 index 1025aee1..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCall.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct RunStepDeltaStepDetailsToolCall : global::System.IEquatable - { - /// - /// Details of the Code Interpreter tool call the run step was involved in. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? CallsCodeObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? CallsCodeObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsCodeObject))] -#endif - public bool IsCallsCodeObject => CallsCodeObject != null; - - /// - /// - /// - public static implicit operator RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject value) => new RunStepDeltaStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject?(RunStepDeltaStepDetailsToolCall @this) => @this.CallsCodeObject; - - /// - /// - /// - public RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? value) - { - CallsCodeObject = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? CallsFileSearchObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? CallsFileSearchObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsFileSearchObject))] -#endif - public bool IsCallsFileSearchObject => CallsFileSearchObject != null; - - /// - /// - /// - public static implicit operator RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject value) => new RunStepDeltaStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject?(RunStepDeltaStepDetailsToolCall @this) => @this.CallsFileSearchObject; - - /// - /// - /// - public RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? value) - { - CallsFileSearchObject = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? CallsFunctionObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? CallsFunctionObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsFunctionObject))] -#endif - public bool IsCallsFunctionObject => CallsFunctionObject != null; - - /// - /// - /// - public static implicit operator RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject value) => new RunStepDeltaStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject?(RunStepDeltaStepDetailsToolCall @this) => @this.CallsFunctionObject; - - /// - /// - /// - public RunStepDeltaStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? value) - { - CallsFunctionObject = value; - } - - /// - /// - /// - public RunStepDeltaStepDetailsToolCall( - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject? callsCodeObject, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject? callsFileSearchObject, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObject? callsFunctionObject - ) - { - CallsCodeObject = callsCodeObject; - CallsFileSearchObject = callsFileSearchObject; - CallsFunctionObject = callsFunctionObject; - } - - /// - /// - /// - public object? Object => - CallsFunctionObject as object ?? - CallsFileSearchObject as object ?? - CallsCodeObject as object - ; - - /// - /// - /// - public override string? ToString() => - CallsCodeObject?.ToString() ?? - CallsFileSearchObject?.ToString() ?? - CallsFunctionObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCallsCodeObject || IsCallsFileSearchObject || IsCallsFunctionObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? callsCodeObject = null, - global::System.Func? callsFileSearchObject = null, - global::System.Func? callsFunctionObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCallsCodeObject && callsCodeObject != null) - { - return callsCodeObject(CallsCodeObject!); - } - else if (IsCallsFileSearchObject && callsFileSearchObject != null) - { - return callsFileSearchObject(CallsFileSearchObject!); - } - else if (IsCallsFunctionObject && callsFunctionObject != null) - { - return callsFunctionObject(CallsFunctionObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? callsCodeObject = null, - global::System.Action? callsFileSearchObject = null, - global::System.Action? callsFunctionObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCallsCodeObject) - { - callsCodeObject?.Invoke(CallsCodeObject!); - } - else if (IsCallsFileSearchObject) - { - callsFileSearchObject?.Invoke(CallsFileSearchObject!); - } - else if (IsCallsFunctionObject) - { - callsFunctionObject?.Invoke(CallsFunctionObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - CallsCodeObject, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObject), - CallsFileSearchObject, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObject), - CallsFunctionObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(RunStepDeltaStepDetailsToolCall other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsCodeObject, other.CallsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsFileSearchObject, other.CallsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsFunctionObject, other.CallsFunctionObject) - ; - } - - /// - /// - /// - public static bool operator ==(RunStepDeltaStepDetailsToolCall obj1, RunStepDeltaStepDetailsToolCall obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(RunStepDeltaStepDetailsToolCall obj1, RunStepDeltaStepDetailsToolCall obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is RunStepDeltaStepDetailsToolCall o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.Json.g.cs deleted file mode 100644 index 1095023c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepDeltaStepDetailsToolCallDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.g.cs deleted file mode 100644 index 006c80c8..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepDeltaStepDetailsToolCallDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepDeltaStepDetailsToolCallDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepDeltaStepDetailsToolCallDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObject.g.cs index dd315fc3..d2f5cc2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObject.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObject { /// - /// The Code Interpreter tool call definition. + /// The index of the tool call in the tool calls array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? CodeInterpreter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } /// /// The ID of the tool call. @@ -20,13 +21,6 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObject [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// The index of the tool call in the tool calls array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Index { get; set; } - /// /// The type of tool call. This is always going to be `code_interpreter` for this type of tool call. /// @@ -34,6 +28,12 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType Type { get; set; } + /// + /// The Code Interpreter tool call definition. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? CodeInterpreter { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,31 +43,31 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObject /// /// Initializes a new instance of the class. /// - /// - /// The Code Interpreter tool call definition. + /// + /// The index of the tool call in the tool calls array. /// /// /// The ID of the tool call. /// - /// - /// The index of the tool call in the tool calls array. - /// /// /// The type of tool call. This is always going to be `code_interpreter` for this type of tool call. /// + /// + /// The Code Interpreter tool call definition. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsCodeObject( int index, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? codeInterpreter, string? id, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectType type, + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter? codeInterpreter) { this.Index = index; - this.CodeInterpreter = codeInterpreter; this.Id = id; this.Type = type; + this.CodeInterpreter = codeInterpreter; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs index 5f67e2a9..fb4629f0 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -18,7 +20,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 @@ -40,7 +42,7 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterp #endif public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter( string? input, - global::System.Collections.Generic.IList? outputs) + global::System.Collections.Generic.IList>? outputs) { this.Input = input; this.Outputs = outputs; diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs deleted file mode 100644 index 81f77515..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs deleted file mode 100644 index 01ff4a06..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput : global::System.IEquatable - { - /// - /// Text output from the Code Interpreter tool call as part of a run step. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? Logs { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject value) => new RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject?(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Logs; - - /// - /// - /// - public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? value) - { - Logs = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? Image { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject value) => new RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput((global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject?(RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Image; - - /// - /// - /// - public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? value) - { - Image = value; - } - - /// - /// - /// - public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutput( - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject? logs, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject? image - ) - { - Logs = logs; - Image = image; - } - - /// - /// - /// - public object? Object => - Image as object ?? - Logs as object - ; - - /// - /// - /// - public override string? ToString() => - Logs?.ToString() ?? - Image?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject), - Image, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs deleted file mode 100644 index c520c320..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs deleted file mode 100644 index ed9e954e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.g.cs index 671221a4..50c8b98e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputImageObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image")] - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Image { get; set; } - /// /// The index of the output in the outputs array. /// @@ -28,6 +22,12 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputImageObjec [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image")] + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? Image { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,24 +37,24 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputImageObjec /// /// Initializes a new instance of the class. /// - /// /// /// The index of the output in the outputs array. /// /// /// Always `image`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsCodeOutputImageObject( int index, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? image, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType type, + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage? image) { this.Index = index; - this.Image = image; this.Type = type; + this.Image = image; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.g.cs index f466eaf9..11971895 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage { /// - /// The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + /// The [file](/docs/api-reference/files) ID of the image. /// [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] public string? FileId { get; set; } @@ -24,7 +24,7 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputImageObjec /// Initializes a new instance of the class. /// /// - /// The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + /// The [file](/docs/api-reference/files) ID of the image. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.g.cs index d8d7f1ea..7d27a5c2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.g.cs @@ -15,12 +15,6 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject [global::System.Text.Json.Serialization.JsonRequired] public required int Index { get; set; } - /// - /// The text output from the Code Interpreter tool call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logs")] - public string? Logs { get; set; } - /// /// Always `logs`. /// @@ -28,6 +22,12 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType Type { get; set; } + /// + /// The text output from the Code Interpreter tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + public string? Logs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -40,23 +40,23 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject /// /// The index of the output in the outputs array. /// - /// - /// The text output from the Code Interpreter tool call. - /// /// /// Always `logs`. /// + /// + /// The text output from the Code Interpreter tool call. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject( int index, - string? logs, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType type, + string? logs) { this.Index = index; - this.Logs = logs; this.Type = type; + this.Logs = logs; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFileSearchObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFileSearchObject.g.cs index 453f6253..8dc0f4e7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFileSearchObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFileSearchObject.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDeltaStepDetailsToolCallsFileSearchObject { /// - /// For now, this is always going to be an empty object. + /// The index of the tool call in the tool calls array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + [global::System.Text.Json.Serialization.JsonPropertyName("index")] [global::System.Text.Json.Serialization.JsonRequired] - public required object FileSearch { get; set; } + public required int Index { get; set; } /// /// The ID of the tool call object. @@ -21,13 +21,6 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFileSearchObject [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// The index of the tool call in the tool calls array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Index { get; set; } - /// /// The type of tool call. This is always going to be `file_search` for this type of tool call. /// @@ -35,6 +28,13 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFileSearchObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFileSearchObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType Type { get; set; } + /// + /// For now, this is always going to be an empty object. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object FileSearch { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,29 +44,29 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFileSearchObject /// /// Initializes a new instance of the class. /// - /// - /// For now, this is always going to be an empty object. + /// + /// The index of the tool call in the tool calls array. /// /// /// The ID of the tool call object. /// - /// - /// The index of the tool call in the tool calls array. - /// /// /// The type of tool call. This is always going to be `file_search` for this type of tool call. /// + /// + /// For now, this is always going to be an empty object. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsFileSearchObject( - object fileSearch, int index, + object fileSearch, string? id, global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFileSearchObjectType type) { - this.FileSearch = fileSearch ?? throw new global::System.ArgumentNullException(nameof(fileSearch)); this.Index = index; + this.FileSearch = fileSearch ?? throw new global::System.ArgumentNullException(nameof(fileSearch)); this.Id = id; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObject.g.cs index 35e4342b..6c2ba7b1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObject.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObject { /// - /// The definition of the function that was called. + /// The index of the tool call in the tool calls array. /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Function { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } /// /// The ID of the tool call object. @@ -20,13 +21,6 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObject [global::System.Text.Json.Serialization.JsonPropertyName("id")] public string? Id { get; set; } - /// - /// The index of the tool call in the tool calls array. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Index { get; set; } - /// /// The type of tool call. This is always going to be `function` for this type of tool call. /// @@ -34,6 +28,12 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsFunctionObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType Type { get; set; } + /// + /// The definition of the function that was called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -43,31 +43,31 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObject /// /// Initializes a new instance of the class. /// - /// - /// The definition of the function that was called. + /// + /// The index of the tool call in the tool calls array. /// /// /// The ID of the tool call object. /// - /// - /// The index of the tool call in the tool calls array. - /// /// /// The type of tool call. This is always going to be `function` for this type of tool call. /// + /// + /// The definition of the function that was called. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsFunctionObject( int index, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? function, string? id, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectType type, + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction? function) { this.Index = index; - this.Function = function; this.Id = id; this.Type = type; + this.Function = function; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.g.cs index 79557479..2d7c5c87 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObjectFunction { - /// - /// The arguments passed to the function. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] - public string? Arguments { get; set; } - /// /// The name of the function. /// @@ -21,7 +15,13 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObjectFuncti public string? Name { get; set; } /// - /// The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + /// The arguments passed to the function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("output")] public string? Output { get; set; } @@ -35,25 +35,23 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObjectFuncti /// /// Initializes a new instance of the class. /// - /// - /// The arguments passed to the function. - /// /// /// The name of the function. /// - /// - /// The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + /// + /// The arguments passed to the function. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsFunctionObjectFunction( - string? arguments, string? name, + string? arguments, string? output) { - this.Arguments = arguments; this.Name = name; + this.Arguments = arguments; this.Output = output; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs new file mode 100644 index 00000000..cb0e509f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput + { + /// + /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput; + } + + /// + /// 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::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs new file mode 100644 index 00000000..1db6a483 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDeltaStepDetailsToolCallsFunctionObjectFunctionOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs index f3459fe9..b0866fc1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDeltaStepDetailsToolCallsObject.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,12 +10,6 @@ namespace tryAGI.OpenAI /// 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; } - /// /// Always `tool_calls`. /// @@ -21,6 +17,12 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDeltaStepDetailsToolCallsObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObjectType Type { get; set; } + /// + /// 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; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +32,21 @@ public sealed partial class RunStepDeltaStepDetailsToolCallsObject /// /// Initializes a new instance of the class. /// - /// - /// 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`. - /// /// /// Always `tool_calls`. /// + /// + /// 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`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDeltaStepDetailsToolCallsObject( - global::System.Collections.Generic.IList? toolCalls, - global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObjectType type) + global::tryAGI.OpenAI.RunStepDeltaStepDetailsToolCallsObjectType type, + global::System.Collections.Generic.IList>? toolCalls) { - this.ToolCalls = toolCalls; this.Type = type; + this.ToolCalls = toolCalls; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsMessageCreationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsMessageCreationObject.g.cs index d4537dac..9cdc5b7a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsMessageCreationObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsMessageCreationObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDetailsMessageCreationObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message_creation")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } - /// /// Always `message_creation`. /// @@ -22,6 +15,13 @@ public sealed partial class RunStepDetailsMessageCreationObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsMessageCreationObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message_creation")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDetailsMessageCreationObjectMessageCreation MessageCreation { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepDetailsMessageCreationObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `message_creation`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.Json.g.cs deleted file mode 100644 index d73d664c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepDetailsToolCall - { - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCall? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCall), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDetailsToolCall?; - } - - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCall? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCall), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDetailsToolCall?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.g.cs deleted file mode 100644 index 90314326..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCall.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct RunStepDetailsToolCall : global::System.IEquatable - { - /// - /// Details of the Code Interpreter tool call the run step was involved in. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? CallsCodeObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? CallsCodeObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsCodeObject))] -#endif - public bool IsCallsCodeObject => CallsCodeObject != null; - - /// - /// - /// - public static implicit operator RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject value) => new RunStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject?(RunStepDetailsToolCall @this) => @this.CallsCodeObject; - - /// - /// - /// - public RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? value) - { - CallsCodeObject = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? CallsFileSearchObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? CallsFileSearchObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsFileSearchObject))] -#endif - public bool IsCallsFileSearchObject => CallsFileSearchObject != null; - - /// - /// - /// - public static implicit operator RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject value) => new RunStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject?(RunStepDetailsToolCall @this) => @this.CallsFileSearchObject; - - /// - /// - /// - public RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? value) - { - CallsFileSearchObject = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? CallsFunctionObject { get; init; } -#else - public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? CallsFunctionObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CallsFunctionObject))] -#endif - public bool IsCallsFunctionObject => CallsFunctionObject != null; - - /// - /// - /// - public static implicit operator RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject value) => new RunStepDetailsToolCall((global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject?(RunStepDetailsToolCall @this) => @this.CallsFunctionObject; - - /// - /// - /// - public RunStepDetailsToolCall(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? value) - { - CallsFunctionObject = value; - } - - /// - /// - /// - public RunStepDetailsToolCall( - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject? callsCodeObject, - global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject? callsFileSearchObject, - global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObject? callsFunctionObject - ) - { - CallsCodeObject = callsCodeObject; - CallsFileSearchObject = callsFileSearchObject; - CallsFunctionObject = callsFunctionObject; - } - - /// - /// - /// - public object? Object => - CallsFunctionObject as object ?? - CallsFileSearchObject as object ?? - CallsCodeObject as object - ; - - /// - /// - /// - public override string? ToString() => - CallsCodeObject?.ToString() ?? - CallsFileSearchObject?.ToString() ?? - CallsFunctionObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCallsCodeObject || IsCallsFileSearchObject || IsCallsFunctionObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? callsCodeObject = null, - global::System.Func? callsFileSearchObject = null, - global::System.Func? callsFunctionObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCallsCodeObject && callsCodeObject != null) - { - return callsCodeObject(CallsCodeObject!); - } - else if (IsCallsFileSearchObject && callsFileSearchObject != null) - { - return callsFileSearchObject(CallsFileSearchObject!); - } - else if (IsCallsFunctionObject && callsFunctionObject != null) - { - return callsFunctionObject(CallsFunctionObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? callsCodeObject = null, - global::System.Action? callsFileSearchObject = null, - global::System.Action? callsFunctionObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCallsCodeObject) - { - callsCodeObject?.Invoke(CallsCodeObject!); - } - else if (IsCallsFileSearchObject) - { - callsFileSearchObject?.Invoke(CallsFileSearchObject!); - } - else if (IsCallsFunctionObject) - { - callsFunctionObject?.Invoke(CallsFunctionObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - CallsCodeObject, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObject), - CallsFileSearchObject, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObject), - CallsFunctionObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(RunStepDetailsToolCall other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsCodeObject, other.CallsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsFileSearchObject, other.CallsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CallsFunctionObject, other.CallsFunctionObject) - ; - } - - /// - /// - /// - public static bool operator ==(RunStepDetailsToolCall obj1, RunStepDetailsToolCall obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(RunStepDetailsToolCall obj1, RunStepDetailsToolCall obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is RunStepDetailsToolCall o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.Json.g.cs deleted file mode 100644 index d7e33fb7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepDetailsToolCallDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDetailsToolCallDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.g.cs deleted file mode 100644 index b334d53b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepDetailsToolCallDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepDetailsToolCallDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepDetailsToolCallDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObject.g.cs index 157dbd40..e89736e1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDetailsToolCallsCodeObject { - /// - /// The Code Interpreter tool call definition. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } - /// /// The ID of the tool call. /// @@ -29,6 +22,13 @@ public sealed partial class RunStepDetailsToolCallsCodeObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectType Type { get; set; } + /// + /// The Code Interpreter tool call definition. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter CodeInterpreter { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RunStepDetailsToolCallsCodeObject /// /// Initializes a new instance of the class. /// - /// - /// The Code Interpreter tool call definition. - /// /// /// The ID of the tool call. /// /// /// The type of tool call. This is always going to be `code_interpreter` for this type of tool call. /// + /// + /// The Code Interpreter tool call definition. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsCodeObject( - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, string id, + global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreter codeInterpreter, global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectType type) { - this.CodeInterpreter = codeInterpreter ?? throw new global::System.ArgumentNullException(nameof(codeInterpreter)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CodeInterpreter = codeInterpreter ?? throw new global::System.ArgumentNullException(nameof(codeInterpreter)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs index 5125f2d6..760728d6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreter.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -20,7 +22,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 @@ -42,7 +44,7 @@ public sealed partial class RunStepDetailsToolCallsCodeObjectCodeInterpreter #endif public RunStepDetailsToolCallsCodeObjectCodeInterpreter( string input, - global::System.Collections.Generic.IList outputs) + global::System.Collections.Generic.IList> outputs) { this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); this.Outputs = outputs ?? throw new global::System.ArgumentNullException(nameof(outputs)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs deleted file mode 100644 index 8fd90e4a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput - { - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs deleted file mode 100644 index 71979cd7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput : global::System.IEquatable - { - /// - /// Text output from the Code Interpreter tool call as part of a run step. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? Logs { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject value) => new RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput((global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject?(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Logs; - - /// - /// - /// - public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? value) - { - Logs = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? Image { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject value) => new RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput((global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject?(RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput @this) => @this.Image; - - /// - /// - /// - public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? value) - { - Image = value; - } - - /// - /// - /// - public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutput( - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject? logs, - global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObject? image - ) - { - Logs = logs; - Image = image; - } - - /// - /// - /// - public object? Object => - Image as object ?? - Logs as object - ; - - /// - /// - /// - public override string? ToString() => - Logs?.ToString() ?? - Image?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObject), - Image, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs deleted file mode 100644 index 13d55998..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs deleted file mode 100644 index 5c4bcc7f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObject.g.cs index 50fc8fb3..69dd6086 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDetailsToolCallsCodeOutputImageObject { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("image")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } - /// /// Always `image`. /// @@ -22,6 +15,13 @@ public sealed partial class RunStepDetailsToolCallsCodeOutputImageObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputImageObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputImageObjectImage Image { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepDetailsToolCallsCodeOutputImageObject /// /// Initializes a new instance of the class. /// - /// /// /// Always `image`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObjectImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObjectImage.g.cs index 3ae2c7ca..d449e730 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObjectImage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputImageObjectImage.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDetailsToolCallsCodeOutputImageObjectImage { /// - /// The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + /// The [file](/docs/api-reference/files) ID of the image. /// [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -25,7 +25,7 @@ public sealed partial class RunStepDetailsToolCallsCodeOutputImageObjectImage /// Initializes a new instance of the class. /// /// - /// The [file](https://platform.openai.com/docs/api-reference/files) ID of the image. + /// The [file](/docs/api-reference/files) ID of the image. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputLogsObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputLogsObject.g.cs index 2abf459c..8fe79a59 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputLogsObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsCodeOutputLogsObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDetailsToolCallsCodeOutputLogsObject { - /// - /// The text output from the Code Interpreter tool call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Logs { get; set; } - /// /// Always `logs`. /// @@ -22,6 +15,13 @@ public sealed partial class RunStepDetailsToolCallsCodeOutputLogsObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsCodeOutputLogsObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsCodeOutputLogsObjectType Type { get; set; } + /// + /// The text output from the Code Interpreter tool call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Logs { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class RunStepDetailsToolCallsCodeOutputLogsObject /// /// Initializes a new instance of the class. /// - /// - /// The text output from the Code Interpreter tool call. - /// /// /// Always `logs`. /// + /// + /// The text output from the Code Interpreter tool call. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchObject.g.cs index b4cc8d92..4efc570b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunStepDetailsToolCallsFileSearchObject { - /// - /// For now, this is always going to be an empty object. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; set; } - /// /// The ID of the tool call object. /// @@ -29,6 +22,13 @@ public sealed partial class RunStepDetailsToolCallsFileSearchObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectType Type { get; set; } + /// + /// For now, this is always going to be an empty object. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch FileSearch { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RunStepDetailsToolCallsFileSearchObject /// /// Initializes a new instance of the class. /// - /// - /// For now, this is always going to be an empty object. - /// /// /// The ID of the tool call object. /// /// /// The type of tool call. This is always going to be `file_search` for this type of tool call. /// + /// + /// For now, this is always going to be an empty object. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsFileSearchObject( - global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch, string id, + global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectFileSearch fileSearch, global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchObjectType type) { - this.FileSearch = fileSearch ?? throw new global::System.ArgumentNullException(nameof(fileSearch)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.FileSearch = fileSearch ?? throw new global::System.ArgumentNullException(nameof(fileSearch)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObject.g.cs index df384615..1c82e7da 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObject.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunStepDetailsToolCallsFileSearchResultObject { - /// - /// The content of the result that was found. The content is only included if requested via the include query parameter. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public global::System.Collections.Generic.IList? Content { get; set; } - /// /// The ID of the file that result was found in. /// @@ -35,6 +29,12 @@ public sealed partial class RunStepDetailsToolCallsFileSearchResultObject [global::System.Text.Json.Serialization.JsonRequired] public required double Score { get; set; } + /// + /// The content of the result that was found. The content is only included if requested via the include query parameter. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::System.Collections.Generic.IList? Content { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -44,9 +44,6 @@ public sealed partial class RunStepDetailsToolCallsFileSearchResultObject /// /// Initializes a new instance of the class. /// - /// - /// The content of the result that was found. The content is only included if requested via the include query parameter. - /// /// /// The ID of the file that result was found in. /// @@ -56,6 +53,9 @@ public sealed partial class RunStepDetailsToolCallsFileSearchResultObject /// /// The score of the result. All values must be a floating point number between 0 and 1. /// + /// + /// The content of the result that was found. The content is only included if requested via the include query parameter. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObjectContentItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObjectContentItem.g.cs index de886bd7..4fb600a8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObjectContentItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFileSearchResultObjectContentItem.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunStepDetailsToolCallsFileSearchResultObjectContentItem { - /// - /// The text content of the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - /// /// The type of the content. /// @@ -21,6 +15,12 @@ public sealed partial class RunStepDetailsToolCallsFileSearchResultObjectContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFileSearchResultObjectContentItemTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? Type { get; set; } + /// + /// The text content of the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,21 +30,21 @@ public sealed partial class RunStepDetailsToolCallsFileSearchResultObjectContent /// /// Initializes a new instance of the class. /// - /// - /// The text content of the file. - /// /// /// The type of the content. /// + /// + /// The text content of the file. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsFileSearchResultObjectContentItem( - string? text, - global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? type) + global::tryAGI.OpenAI.RunStepDetailsToolCallsFileSearchResultObjectContentItemType? type, + string? text) { - this.Text = text; this.Type = type; + this.Text = text; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObject.g.cs index 096a3504..5cdbb8a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class RunStepDetailsToolCallsFunctionObject { - /// - /// The definition of the function that was called. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction Function { get; set; } - /// /// The ID of the tool call object. /// @@ -29,6 +22,13 @@ public sealed partial class RunStepDetailsToolCallsFunctionObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsFunctionObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectType Type { get; set; } + /// + /// The definition of the function that was called. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RunStepDetailsToolCallsFunctionObject /// /// Initializes a new instance of the class. /// - /// - /// The definition of the function that was called. - /// /// /// The ID of the tool call object. /// /// /// The type of tool call. This is always going to be `function` for this type of tool call. /// + /// + /// The definition of the function that was called. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsFunctionObject( - global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction function, string id, + global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunction function, global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectType type) { - this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunction.g.cs index 51a482de..9bc77ed5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunction.g.cs @@ -9,21 +9,21 @@ namespace tryAGI.OpenAI public sealed partial class RunStepDetailsToolCallsFunctionObjectFunction { /// - /// The arguments passed to the function. + /// The name of the function. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string Name { get; set; } /// - /// The name of the function. + /// The arguments passed to the function. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string Arguments { get; set; } /// - /// The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("output")] [global::System.Text.Json.Serialization.JsonRequired] @@ -38,25 +38,23 @@ public sealed partial class RunStepDetailsToolCallsFunctionObjectFunction /// /// Initializes a new instance of the class. /// - /// - /// The arguments passed to the function. - /// /// /// The name of the function. /// - /// - /// The output of the function. This will be `null` if the outputs have not been [submitted](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) yet. + /// + /// The arguments passed to the function. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsFunctionObjectFunction( - string arguments, string name, + string arguments, string? output) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Output = output ?? throw new global::System.ArgumentNullException(nameof(output)); } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs new file mode 100644 index 00000000..ea1b8de1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepDetailsToolCallsFunctionObjectFunctionOutput + { + /// + /// 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::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput; + } + + /// + /// 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::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepDetailsToolCallsFunctionObjectFunctionOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs new file mode 100644 index 00000000..04d0138b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsFunctionObjectFunctionOutput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepDetailsToolCallsFunctionObjectFunctionOutput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsObject.g.cs index e1c50687..f7446729 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepDetailsToolCallsObject.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -8,13 +10,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class RunStepDetailsToolCallsObject { - /// - /// 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")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList ToolCalls { get; set; } - /// /// Always `tool_calls`. /// @@ -22,6 +17,13 @@ public sealed partial class RunStepDetailsToolCallsObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepDetailsToolCallsObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunStepDetailsToolCallsObjectType Type { get; set; } + /// + /// 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")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> ToolCalls { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,17 +33,17 @@ public sealed partial class RunStepDetailsToolCallsObject /// /// Initializes a new instance of the class. /// - /// - /// 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`. - /// /// /// Always `tool_calls`. /// + /// + /// 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`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepDetailsToolCallsObject( - global::System.Collections.Generic.IList toolCalls, + global::System.Collections.Generic.IList> toolCalls, global::tryAGI.OpenAI.RunStepDetailsToolCallsObjectType type) { this.ToolCalls = toolCalls ?? throw new global::System.ArgumentNullException(nameof(toolCalls)); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObject.g.cs index 0e3e7a2e..2636a748 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObject.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,27 +11,18 @@ namespace tryAGI.OpenAI public sealed partial class RunStepObject { /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AssistantId { get; set; } - - /// - /// The Unix timestamp (in seconds) for when the run step was cancelled. + /// The identifier of the run step, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? CancelledAt { get; set; } + public required string Id { get; set; } /// - /// The Unix timestamp (in seconds) for when the run step completed. + /// The object type, which is always `thread.run.step`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? CompletedAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectObjectJsonConverter))] + public global::tryAGI.OpenAI.RunStepObjectObject Object { get; set; } /// /// The Unix timestamp (in seconds) for when the run step was created. @@ -40,95 +33,96 @@ public sealed partial class RunStepObject public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. + /// The ID of the [assistant](/docs/api-reference/assistants) associated with the run step. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expired_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? ExpiredAt { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AssistantId { get; set; } /// - /// The Unix timestamp (in seconds) for when the run step failed. + /// The ID of the [thread](/docs/api-reference/threads) that was run. /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? FailedAt { get; set; } + public required string ThreadId { get; set; } /// - /// The identifier of the run step, which can be referenced in API endpoints. + /// The ID of the [run](/docs/api-reference/runs) that this run step is a part of. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string RunId { get; set; } /// - /// The last error associated with this run step. Will be `null` if there are no errors. + /// The type of run step, which can be either `message_creation` or `tool_calls`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObjectLastError? LastError { get; set; } + public required global::tryAGI.OpenAI.RunStepObjectType Type { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObjectStatus Status { get; set; } /// - /// The object type, which is always `thread.run.step`. + /// The details of the run step. /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.RunStepObjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("step_details")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf StepDetails { get; set; } /// - /// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required string RunId { get; set; } + public required global::tryAGI.OpenAI.RunStepObjectLastError2? LastError { get; set; } /// - /// The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObjectStatus Status { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expired_at")] + public global::System.DateTimeOffset? ExpiredAt { get; set; } /// - /// The details of the run step. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("step_details")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectStepDetailsJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("cancelled_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObjectStepDetails StepDetails { get; set; } + public required global::System.DateTimeOffset? CancelledAt { get; set; } /// - /// The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("failed_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required string ThreadId { get; set; } + public required global::System.DateTimeOffset? FailedAt { get; set; } /// - /// The type of run step, which can be either `message_creation` or `tool_calls`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObjectType Type { get; set; } + public required global::System.DateTimeOffset? CompletedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// - /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("usage")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepCompletionUsage? Usage { get; set; } + public required global::tryAGI.OpenAI.RunStepCompletionUsageVariant1? Usage { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -139,42 +133,26 @@ public sealed partial class RunStepObject /// /// Initializes a new instance of the class. /// - /// - /// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step. - /// - /// - /// The Unix timestamp (in seconds) for when the run step was cancelled. + /// + /// The identifier of the run step, which can be referenced in API endpoints. /// - /// - /// The Unix timestamp (in seconds) for when the run step completed. + /// + /// The object type, which is always `thread.run.step`. /// /// /// The Unix timestamp (in seconds) for when the run step was created. /// - /// - /// The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. - /// - /// - /// The Unix timestamp (in seconds) for when the run step failed. - /// - /// - /// The identifier of the run step, which can be referenced in API endpoints. - /// - /// - /// The last error associated with this run step. Will be `null` if there are no errors. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The ID of the [assistant](/docs/api-reference/assistants) associated with the run step. /// - /// - /// The object type, which is always `thread.run.step`. + /// + /// The ID of the [thread](/docs/api-reference/threads) that was run. /// /// - /// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of. + /// The ID of the [run](/docs/api-reference/runs) that this run step is a part of. + /// + /// + /// The type of run step, which can be either `message_creation` or `tool_calls`. /// /// /// The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. @@ -182,52 +160,50 @@ public sealed partial class RunStepObject /// /// The details of the run step. /// - /// - /// The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run. - /// - /// - /// The type of run step, which can be either `message_creation` or `tool_calls`. - /// - /// - /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. - /// + /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunStepObject( - string assistantId, - global::System.DateTimeOffset? cancelledAt, - global::System.DateTimeOffset? completedAt, - global::System.DateTimeOffset createdAt, - global::System.DateTimeOffset? failedAt, string id, - global::tryAGI.OpenAI.RunStepObjectLastError? lastError, - string runId, - global::tryAGI.OpenAI.RunStepObjectStatus status, - global::tryAGI.OpenAI.RunStepObjectStepDetails stepDetails, + global::System.DateTimeOffset createdAt, + string assistantId, string threadId, + string runId, global::tryAGI.OpenAI.RunStepObjectType type, - global::tryAGI.OpenAI.RunStepCompletionUsage? usage, + global::tryAGI.OpenAI.RunStepObjectStatus status, + global::tryAGI.OpenAI.OneOf stepDetails, + global::tryAGI.OpenAI.RunStepObjectLastError2? lastError, + global::System.DateTimeOffset? cancelledAt, + global::System.DateTimeOffset? failedAt, + global::System.DateTimeOffset? completedAt, + global::tryAGI.OpenAI.RunStepCompletionUsageVariant1? usage, + global::tryAGI.OpenAI.RunStepObjectObject @object, global::System.DateTimeOffset? expiredAt, - global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.RunStepObjectObject @object) + global::System.Collections.Generic.Dictionary? metadata) { - this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); - this.CancelledAt = cancelledAt; - this.CompletedAt = completedAt; - this.CreatedAt = createdAt; - this.FailedAt = failedAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); + this.CreatedAt = createdAt; + this.AssistantId = assistantId ?? throw new global::System.ArgumentNullException(nameof(assistantId)); + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); this.RunId = runId ?? throw new global::System.ArgumentNullException(nameof(runId)); + this.Type = type; this.Status = status; this.StepDetails = stepDetails; - this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); - this.Type = type; + this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); + this.CancelledAt = cancelledAt ?? throw new global::System.ArgumentNullException(nameof(cancelledAt)); + this.FailedAt = failedAt ?? throw new global::System.ArgumentNullException(nameof(failedAt)); + this.CompletedAt = completedAt ?? throw new global::System.ArgumentNullException(nameof(completedAt)); this.Usage = usage ?? throw new global::System.ArgumentNullException(nameof(usage)); + this.Object = @object; this.ExpiredAt = expiredAt; this.Metadata = metadata; - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.Json.g.cs new file mode 100644 index 00000000..f4a7cb7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepObjectCancelledAt + { + /// + /// 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::tryAGI.OpenAI.RunStepObjectCancelledAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepObjectCancelledAt), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepObjectCancelledAt; + } + + /// + /// 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::tryAGI.OpenAI.RunStepObjectCancelledAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepObjectCancelledAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectCancelledAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.g.cs new file mode 100644 index 00000000..0aff0453 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCancelledAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepObjectCancelledAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.Json.g.cs new file mode 100644 index 00000000..367a0da8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepObjectCompletedAt + { + /// + /// 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::tryAGI.OpenAI.RunStepObjectCompletedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepObjectCompletedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepObjectCompletedAt; + } + + /// + /// 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::tryAGI.OpenAI.RunStepObjectCompletedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepObjectCompletedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectCompletedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.g.cs new file mode 100644 index 00000000..fc2c08e7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectCompletedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepObjectCompletedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.Json.g.cs new file mode 100644 index 00000000..4a84639b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepObjectExpiredAt + { + /// + /// 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::tryAGI.OpenAI.RunStepObjectExpiredAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepObjectExpiredAt), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepObjectExpiredAt; + } + + /// + /// 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::tryAGI.OpenAI.RunStepObjectExpiredAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepObjectExpiredAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectExpiredAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.g.cs new file mode 100644 index 00000000..96a020c8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectExpiredAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepObjectExpiredAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.Json.g.cs new file mode 100644 index 00000000..c8cb5bd8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepObjectFailedAt + { + /// + /// 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::tryAGI.OpenAI.RunStepObjectFailedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepObjectFailedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepObjectFailedAt; + } + + /// + /// 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::tryAGI.OpenAI.RunStepObjectFailedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepObjectFailedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectFailedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.g.cs new file mode 100644 index 00000000..c34961b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectFailedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class RunStepObjectFailedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError.g.cs index 36026971..93955e7c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError.g.cs @@ -4,56 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The last error associated with this run step. Will be `null` if there are no errors. + /// /// public sealed partial class RunStepObjectLastError { - /// - /// One of `server_error` or `rate_limit_exceeded`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObjectLastErrorCode Code { get; set; } - - /// - /// A human-readable description of the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// One of `server_error` or `rate_limit_exceeded`. - /// - /// - /// A human-readable description of the error. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepObjectLastError( - global::tryAGI.OpenAI.RunStepObjectLastErrorCode code, - string message) - { - this.Code = code; - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepObjectLastError() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.Json.g.cs new file mode 100644 index 00000000..daf52021 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class RunStepObjectLastError2 + { + /// + /// 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::tryAGI.OpenAI.RunStepObjectLastError2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.RunStepObjectLastError2), + jsonSerializerContext) as global::tryAGI.OpenAI.RunStepObjectLastError2; + } + + /// + /// 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::tryAGI.OpenAI.RunStepObjectLastError2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.RunStepObjectLastError2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectLastError2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.g.cs new file mode 100644 index 00000000..e8fba4c9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectLastError2.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The last error associated with this run step. Will be `null` if there are no errors. + /// + public sealed partial class RunStepObjectLastError2 + { + /// + /// One of `server_error` or `rate_limit_exceeded`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepObjectLastErrorCodeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObjectLastErrorCode Code { get; set; } + + /// + /// A human-readable description of the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// One of `server_error` or `rate_limit_exceeded`. + /// + /// + /// A human-readable description of the error. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RunStepObjectLastError2( + global::tryAGI.OpenAI.RunStepObjectLastErrorCode code, + string message) + { + this.Code = code; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public RunStepObjectLastError2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.Json.g.cs deleted file mode 100644 index 3a15c38f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct RunStepObjectStepDetails - { - /// - /// 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::tryAGI.OpenAI.RunStepObjectStepDetails? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepObjectStepDetails), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepObjectStepDetails? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepObjectStepDetails), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectStepDetails?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.g.cs deleted file mode 100644 index 3c5cb89d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetails.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The details of the run step. - /// - public readonly partial struct RunStepObjectStepDetails : global::System.IEquatable - { - /// - /// Details of the message creation by the run step. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? MessageCreation { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsMessageCreationObject value) => new RunStepObjectStepDetails((global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject?(RunStepObjectStepDetails @this) => @this.MessageCreation; - - /// - /// - /// - public RunStepObjectStepDetails(global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? value) - { - MessageCreation = value; - } - - /// - /// Details of the tool call. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? ToolCalls { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.RunStepDetailsToolCallsObject value) => new RunStepObjectStepDetails((global::tryAGI.OpenAI.RunStepDetailsToolCallsObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RunStepDetailsToolCallsObject?(RunStepObjectStepDetails @this) => @this.ToolCalls; - - /// - /// - /// - public RunStepObjectStepDetails(global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? value) - { - ToolCalls = value; - } - - /// - /// - /// - public RunStepObjectStepDetails( - global::tryAGI.OpenAI.RunStepDetailsMessageCreationObject? messageCreation, - global::tryAGI.OpenAI.RunStepDetailsToolCallsObject? toolCalls - ) - { - MessageCreation = messageCreation; - ToolCalls = toolCalls; - } - - /// - /// - /// - public object? Object => - ToolCalls as object ?? - MessageCreation as object - ; - - /// - /// - /// - public override string? ToString() => - MessageCreation?.ToString() ?? - ToolCalls?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.RunStepDetailsMessageCreationObject), - ToolCalls, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.Json.g.cs deleted file mode 100644 index 32ba20e9..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepObjectStepDetailsDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepObjectStepDetailsDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs deleted file mode 100644 index 04d9fdc3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepObjectStepDetailsDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepObjectStepDetailsDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepObjectStepDetailsDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepObjectStepDetailsDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEvent.g.cs index 0584d8fe..48874330 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEvent.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct RunStepStreamEvent : global::System.IEquatable { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is created. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.RunStepStreamEventVariant1? Value1 { get; init; } @@ -27,144 +27,177 @@ namespace tryAGI.OpenAI public bool IsValue1 => Value1 != null; /// - /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. /// - public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant1 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant1?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant1?(RunStepStreamEvent @this) => @this.Value1; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// Occurs when parts of a [run step](/docs/api-reference/run-steps/step-object) are being streamed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Value3 { get; init; } +#else + public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Value3 { get; } +#endif /// /// /// - public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant1? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is completed. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Value2 { get; init; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Value4 { get; init; } #else - public global::tryAGI.OpenAI.RunStepStreamEventVariant2? Value2 { get; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Value4 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] #endif - public bool IsValue2 => Value2 != null; + public bool IsValue4 => Value4 != null; /// - /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) fails. /// - public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant2 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant2?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Value5 { get; init; } +#else + public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Value5 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant2?(RunStepStreamEvent @this) => @this.Value2; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] +#endif + public bool IsValue5 => Value5 != null; + + /// + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is cancelled. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Value6 { get; init; } +#else + public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Value6 { get; } +#endif /// /// /// - public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant2? value) - { - Value2 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] +#endif + public bool IsValue6 => Value6 != null; /// - /// Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) expires. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Value3 { get; init; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Value7 { get; init; } #else - public global::tryAGI.OpenAI.RunStepStreamEventVariant3? Value3 { get; } + public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Value7 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] #endif - public bool IsValue3 => Value3 != null; - + public bool IsValue7 => Value7 != null; /// /// /// - public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant3 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant3?)value); + public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant1 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant1?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant3?(RunStepStreamEvent @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant1?(RunStepStreamEvent @this) => @this.Value1; /// /// /// - public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant3? value) + public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant1? value) { - Value3 = value; + Value1 = value; } /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Value4 { get; init; } -#else - public global::tryAGI.OpenAI.RunStepStreamEventVariant4? Value4 { get; } -#endif + public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant2 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant2?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; + public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant2?(RunStepStreamEvent @this) => @this.Value2; /// /// /// - public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant4 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant4?)value); + public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant2? value) + { + Value2 = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant4?(RunStepStreamEvent @this) => @this.Value4; + public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant3 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant3?)value); /// /// /// - public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant4? value) + public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant3?(RunStepStreamEvent @this) => @this.Value3; + + /// + /// + /// + public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant3? value) { - Value4 = value; + Value3 = value; } /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Value5 { get; init; } -#else - public global::tryAGI.OpenAI.RunStepStreamEventVariant5? Value5 { get; } -#endif + public static implicit operator RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant4 value) => new RunStepStreamEvent((global::tryAGI.OpenAI.RunStepStreamEventVariant4?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; + public static implicit operator global::tryAGI.OpenAI.RunStepStreamEventVariant4?(RunStepStreamEvent @this) => @this.Value4; + + /// + /// + /// + public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant4? value) + { + Value4 = value; + } /// /// @@ -184,23 +217,6 @@ public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant5? valu Value5 = value; } - /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Value6 { get; init; } -#else - public global::tryAGI.OpenAI.RunStepStreamEventVariant6? Value6 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] -#endif - public bool IsValue6 => Value6 != null; - /// /// /// @@ -219,23 +235,6 @@ public RunStepStreamEvent(global::tryAGI.OpenAI.RunStepStreamEventVariant6? valu Value6 = value; } - /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Value7 { get; init; } -#else - public global::tryAGI.OpenAI.RunStepStreamEventVariant7? Value7 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] -#endif - public bool IsValue7 => Value7 != null; - /// /// /// @@ -307,7 +306,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6 || IsValue7; + 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; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.Json.g.cs deleted file mode 100644 index bfe3671b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStepStreamEventDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStepStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStepStreamEventDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStepStreamEventDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RunStepStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStepStreamEventDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStepStreamEventDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.g.cs deleted file mode 100644 index c1c09e3a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStepStreamEventDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStepStreamEventDiscriminator( - string? @event) - { - this.Event = @event; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStepStreamEventDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant1.g.cs index 4743cefc..715abbf5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant1.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant1.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is created. /// public sealed partial class RunStepStreamEventVariant1 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant1 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant1EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant1Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant1 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant2.g.cs index b57e82c5..967f6da3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant2.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) moves to an `in_progress` state. /// public sealed partial class RunStepStreamEventVariant2 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant2 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant2EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant2Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant2 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant3.g.cs index 623e4bb9..4fae3ad8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant3.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when parts of a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being streamed. + /// Occurs when parts of a [run step](/docs/api-reference/run-steps/step-object) are being streamed. /// public sealed partial class RunStepStreamEventVariant3 { - /// - /// Represents a run step delta i.e. any changed fields on a run step during streaming. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepDeltaObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant3EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant3Event Event { get; set; } + /// + /// Represents a run step delta i.e. any changed fields on a run step during streaming. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepDeltaObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant3 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a run step delta i.e. any changed fields on a run step during streaming. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant4.g.cs index dd6a5225..9689ae29 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant4.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant4.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is completed. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is completed. /// public sealed partial class RunStepStreamEventVariant4 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant4 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant4EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant4Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant4 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant5.g.cs index 2c5c1163..36472ebe 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant5.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant5.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) fails. /// public sealed partial class RunStepStreamEventVariant5 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant5 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant5EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant5Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant5 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant6.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant6.g.cs index 95f02e25..b9141943 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant6.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant6.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is cancelled. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) is cancelled. /// public sealed partial class RunStepStreamEventVariant6 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant6 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant6EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant6Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant6 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant7.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant7.g.cs index 8d4ba68f..8b0b120b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant7.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStepStreamEventVariant7.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires. + /// Occurs when a [run step](/docs/api-reference/run-steps/step-object) expires. /// public sealed partial class RunStepStreamEventVariant7 { - /// - /// Represents a step in execution of a run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStepStreamEventVariant7 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStepStreamEventVariant7EventJsonConverter))] public global::tryAGI.OpenAI.RunStepStreamEventVariant7Event Event { get; set; } + /// + /// Represents a step in execution of a run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunStepObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStepStreamEventVariant7 /// /// Initializes a new instance of the class. /// + /// /// /// Represents a step in execution of a run. /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEvent.g.cs index f2a763a6..35659d6a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEvent.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct RunStreamEvent : global::System.IEquatable { /// - /// Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + /// Occurs when a new [run](/docs/api-reference/runs/object) is created. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.RunStreamEventVariant1? Value1 { get; init; } @@ -27,214 +27,264 @@ namespace tryAGI.OpenAI public bool IsValue1 => Value1 != null; /// - /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant1 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant1?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant2? Value2 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant1?(RunStreamEvent @this) => @this.Value1; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant3? Value3 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant3? Value3 { get; } +#endif /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant1? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant2? Value2 { get; init; } + public global::tryAGI.OpenAI.RunStreamEventVariant4? Value4 { get; init; } #else - public global::tryAGI.OpenAI.RunStreamEventVariant2? Value2 { get; } + public global::tryAGI.OpenAI.RunStreamEventVariant4? Value4 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] #endif - public bool IsValue2 => Value2 != null; + public bool IsValue4 => Value4 != null; /// - /// + /// Occurs when a [run](/docs/api-reference/runs/object) is completed. /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant2 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant2?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant5? Value5 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant5? Value5 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant2?(RunStreamEvent @this) => @this.Value2; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] +#endif + public bool IsValue5 => Value5 != null; + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant6? Value6 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant6? Value6 { get; } +#endif /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant2? value) - { - Value2 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] +#endif + public bool IsValue6 => Value6 != null; /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + /// Occurs when a [run](/docs/api-reference/runs/object) fails. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant3? Value3 { get; init; } + public global::tryAGI.OpenAI.RunStreamEventVariant7? Value7 { get; init; } #else - public global::tryAGI.OpenAI.RunStreamEventVariant3? Value3 { get; } + public global::tryAGI.OpenAI.RunStreamEventVariant7? Value7 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] #endif - public bool IsValue3 => Value3 != null; + public bool IsValue7 => Value7 != null; /// - /// + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant3 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant3?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant8? Value8 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant8? Value8 { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant3?(RunStreamEvent @this) => @this.Value3; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] +#endif + public bool IsValue8 => Value8 != null; + + /// + /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RunStreamEventVariant9? Value9 { get; init; } +#else + public global::tryAGI.OpenAI.RunStreamEventVariant9? Value9 { get; } +#endif /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant3? value) - { - Value3 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] +#endif + public bool IsValue9 => Value9 != null; /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + /// Occurs when a [run](/docs/api-reference/runs/object) expires. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant4? Value4 { get; init; } + public global::tryAGI.OpenAI.RunStreamEventVariant10? Value10 { get; init; } #else - public global::tryAGI.OpenAI.RunStreamEventVariant4? Value4 { get; } + public global::tryAGI.OpenAI.RunStreamEventVariant10? Value10 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] #endif - public bool IsValue4 => Value4 != null; - + public bool IsValue10 => Value10 != null; /// /// /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant4 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant4?)value); + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant1 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant1?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant4?(RunStreamEvent @this) => @this.Value4; + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant1?(RunStreamEvent @this) => @this.Value1; /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant4? value) + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant1? value) { - Value4 = value; + Value1 = value; } /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant5? Value5 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant5? Value5 { get; } -#endif + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant2 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant2?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] -#endif - public bool IsValue5 => Value5 != null; + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant2?(RunStreamEvent @this) => @this.Value2; /// /// /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant5 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant5?)value); + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant2? value) + { + Value2 = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant5?(RunStreamEvent @this) => @this.Value5; + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant3 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant3?)value); /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant5? value) + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant3?(RunStreamEvent @this) => @this.Value3; + + /// + /// + /// + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant3? value) { - Value5 = value; + Value3 = value; } /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant6? Value6 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant6? Value6 { get; } -#endif + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant4 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant4?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] -#endif - public bool IsValue6 => Value6 != null; + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant4?(RunStreamEvent @this) => @this.Value4; /// /// /// - public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant6 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant6?)value); + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant4? value) + { + Value4 = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant6?(RunStreamEvent @this) => @this.Value6; + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant5 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant5?)value); /// /// /// - public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant6? value) + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant5?(RunStreamEvent @this) => @this.Value5; + + /// + /// + /// + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant5? value) { - Value6 = value; + Value5 = value; } /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant7? Value7 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant7? Value7 { get; } -#endif + public static implicit operator RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant6 value) => new RunStreamEvent((global::tryAGI.OpenAI.RunStreamEventVariant6?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] -#endif - public bool IsValue7 => Value7 != null; + public static implicit operator global::tryAGI.OpenAI.RunStreamEventVariant6?(RunStreamEvent @this) => @this.Value6; + + /// + /// + /// + public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant6? value) + { + Value6 = value; + } /// /// @@ -254,23 +304,6 @@ public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant7? value) Value7 = value; } - /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant8? Value8 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant8? Value8 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] -#endif - public bool IsValue8 => Value8 != null; - /// /// /// @@ -289,23 +322,6 @@ public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant8? value) Value8 = value; } - /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant9? Value9 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant9? Value9 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] -#endif - public bool IsValue9 => Value9 != null; - /// /// /// @@ -324,23 +340,6 @@ public RunStreamEvent(global::tryAGI.OpenAI.RunStreamEventVariant9? value) Value9 = value; } - /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RunStreamEventVariant10? Value10 { get; init; } -#else - public global::tryAGI.OpenAI.RunStreamEventVariant10? Value10 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] -#endif - public bool IsValue10 => Value10 != null; - /// /// /// @@ -424,7 +423,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6 || IsValue7 || IsValue8 || IsValue9 || IsValue10; + 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; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.Json.g.cs deleted file mode 100644 index 3cdf1a48..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class RunStreamEventDiscriminator - { - /// - /// 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::tryAGI.OpenAI.RunStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.RunStreamEventDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.RunStreamEventDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.RunStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.RunStreamEventDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.RunStreamEventDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.g.cs deleted file mode 100644 index 00f0f553..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class RunStreamEventDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RunStreamEventDiscriminator( - string? @event) - { - this.Event = @event; - } - - /// - /// Initializes a new instance of the class. - /// - public RunStreamEventDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant1.g.cs index ea12692f..01f3c5e5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant1.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant1.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is created. + /// Occurs when a new [run](/docs/api-reference/runs/object) is created. /// public sealed partial class RunStreamEventVariant1 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant1 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant1EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant1Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant1 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant10.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant10.g.cs index 12495239..aa801ac8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant10.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant10.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. + /// Occurs when a [run](/docs/api-reference/runs/object) expires. /// public sealed partial class RunStreamEventVariant10 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant10 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant10EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant10Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant10 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant2.g.cs index 9d97bb92..d680dc99 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant2.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `queued` status. + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. /// public sealed partial class RunStreamEventVariant2 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant2 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant2EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant2Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant2 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant3.g.cs index ef1c006f..4a651300 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant3.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant3.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an `in_progress` status. + /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. /// public sealed partial class RunStreamEventVariant3 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant3 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant3EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant3Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant3 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant4.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant4.g.cs index ef4790c2..af868383 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant4.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant4.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `requires_action` status. + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. /// public sealed partial class RunStreamEventVariant4 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant4 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant4EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant4Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant4 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant5.g.cs index 7e5a07a8..da2c25d8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant5.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant5.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed. + /// Occurs when a [run](/docs/api-reference/runs/object) is completed. /// public sealed partial class RunStreamEventVariant5 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant5 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant5EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant5Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant5 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant6.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant6.g.cs index 831d82ab..8d52c57c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant6.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant6.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with status `incomplete`. + /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. /// public sealed partial class RunStreamEventVariant6 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant6 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant6EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant6Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant6 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant7.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant7.g.cs index 46ea9d73..ad7e2f94 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant7.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant7.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. + /// Occurs when a [run](/docs/api-reference/runs/object) fails. /// public sealed partial class RunStreamEventVariant7 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant7 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant7EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant7Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant7 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant8.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant8.g.cs index fa078369..50ef00d8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant8.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant8.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a `cancelling` status. + /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. /// public sealed partial class RunStreamEventVariant8 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant8 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant8EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant8Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant8 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant9.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant9.g.cs index c4777bbd..407d9fcc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant9.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunStreamEventVariant9.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled. + /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. /// public sealed partial class RunStreamEventVariant9 { - /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunObject Data { get; set; } - /// /// /// @@ -22,6 +15,13 @@ public sealed partial class RunStreamEventVariant9 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunStreamEventVariant9EventJsonConverter))] public global::tryAGI.OpenAI.RunStreamEventVariant9Event Event { get; set; } + /// + /// Represents an execution run on a [thread](/docs/api-reference/threads). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class RunStreamEventVariant9 /// /// Initializes a new instance of the class. /// + /// /// - /// Represents an execution run on a [thread](https://platform.openai.com/docs/api-reference/threads). + /// Represents an execution run on a [thread](/docs/api-reference/threads). /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObject.g.cs index 1b5f8f66..4e06bd79 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObject.g.cs @@ -9,14 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class RunToolCallObject { /// - /// The function definition. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("function")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.RunToolCallObjectFunction Function { get; set; } - - /// - /// The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. + /// The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint. /// [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -29,6 +22,13 @@ public sealed partial class RunToolCallObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RunToolCallObjectTypeJsonConverter))] public global::tryAGI.OpenAI.RunToolCallObjectType Type { get; set; } + /// + /// The function definition. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.RunToolCallObjectFunction Function { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class RunToolCallObject /// /// Initializes a new instance of the class. /// - /// - /// The function definition. - /// /// - /// The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs) endpoint. + /// The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint. /// /// /// The type of tool call the output is required for. For now, this is always `function`. /// + /// + /// The function definition. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunToolCallObject( - global::tryAGI.OpenAI.RunToolCallObjectFunction function, string id, + global::tryAGI.OpenAI.RunToolCallObjectFunction function, global::tryAGI.OpenAI.RunToolCallObjectType type) { - this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObjectFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObjectFunction.g.cs index 0a1491b5..1d7175e4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObjectFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RunToolCallObjectFunction.g.cs @@ -9,18 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class RunToolCallObjectFunction { /// - /// The arguments that the model expects you to pass to the function. + /// The name of the function. /// - [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Arguments { get; set; } + public required string Name { get; set; } /// - /// The name of the function. + /// The arguments that the model expects you to pass to the function. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + public required string Arguments { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -31,21 +31,21 @@ public sealed partial class RunToolCallObjectFunction /// /// Initializes a new instance of the class. /// - /// - /// The arguments that the model expects you to pass to the function. - /// /// /// The name of the function. /// + /// + /// The arguments that the model expects you to pass to the function. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RunToolCallObjectFunction( - string arguments, - string name) + string name, + string arguments) { - this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.Json.g.cs deleted file mode 100644 index 2a7f7af4..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Screenshot - { - /// - /// 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::tryAGI.OpenAI.Screenshot? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Screenshot), - jsonSerializerContext) as global::tryAGI.OpenAI.Screenshot; - } - - /// - /// 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::tryAGI.OpenAI.Screenshot? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Screenshot), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Screenshot; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.g.cs deleted file mode 100644 index e6f9ce78..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Screenshot.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A screenshot action. - /// - public sealed partial class Screenshot - { - /// - /// Specifies the event type. For a screenshot action, this property is
- /// always set to `screenshot`.
- /// Default Value: screenshot - ///
- /// global::tryAGI.OpenAI.ScreenshotType.Screenshot - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotTypeJsonConverter))] - public global::tryAGI.OpenAI.ScreenshotType Type { get; set; } = global::tryAGI.OpenAI.ScreenshotType.Screenshot; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Specifies the event type. For a screenshot action, this property is
- /// always set to `screenshot`.
- /// Default Value: screenshot - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Screenshot( - global::tryAGI.OpenAI.ScreenshotType type = global::tryAGI.OpenAI.ScreenshotType.Screenshot) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Screenshot() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.Json.g.cs new file mode 100644 index 00000000..57b8a85c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ScreenshotParam + { + /// + /// 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::tryAGI.OpenAI.ScreenshotParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ScreenshotParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ScreenshotParam; + } + + /// + /// 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::tryAGI.OpenAI.ScreenshotParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ScreenshotParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ScreenshotParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.g.cs new file mode 100644 index 00000000..8525592a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A screenshot action. + /// + public sealed partial class ScreenshotParam + { + /// + /// Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
+ /// Default Value: screenshot + ///
+ /// global::tryAGI.OpenAI.ScreenshotParamType.Screenshot + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ScreenshotParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ScreenshotParamType Type { get; set; } = global::tryAGI.OpenAI.ScreenshotParamType.Screenshot; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
+ /// Default Value: screenshot + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ScreenshotParam( + global::tryAGI.OpenAI.ScreenshotParamType type = global::tryAGI.OpenAI.ScreenshotParamType.Screenshot) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ScreenshotParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParamType.g.cs new file mode 100644 index 00000000..348fcd45 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a screenshot action, this property is always set to `screenshot`.
+ /// Default Value: screenshot + ///
+ public enum ScreenshotParamType + { + /// + /// + /// + Screenshot, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ScreenshotParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ScreenshotParamType value) + { + return value switch + { + ScreenshotParamType.Screenshot => "screenshot", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ScreenshotParamType? ToEnum(string value) + { + return value switch + { + "screenshot" => ScreenshotParamType.Screenshot, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotType.g.cs deleted file mode 100644 index e0f4b15b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScreenshotType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a screenshot action, this property is
- /// always set to `screenshot`.
- /// Default Value: screenshot - ///
- public enum ScreenshotType - { - /// - /// - /// - Screenshot, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ScreenshotTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ScreenshotType value) - { - return value switch - { - ScreenshotType.Screenshot => "screenshot", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ScreenshotType? ToEnum(string value) - { - return value switch - { - "screenshot" => ScreenshotType.Screenshot, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.Json.g.cs deleted file mode 100644 index 2a5d8eae..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Scroll - { - /// - /// 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::tryAGI.OpenAI.Scroll? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Scroll), - jsonSerializerContext) as global::tryAGI.OpenAI.Scroll; - } - - /// - /// 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::tryAGI.OpenAI.Scroll? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Scroll), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Scroll; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.g.cs deleted file mode 100644 index 9acbd81a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Scroll.g.cs +++ /dev/null @@ -1,99 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A scroll action. - /// - public sealed partial class Scroll - { - /// - /// The horizontal scroll distance. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scroll_x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ScrollX { get; set; } - - /// - /// The vertical scroll distance. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scroll_y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ScrollY { get; set; } - - /// - /// Specifies the event type. For a scroll action, this property is
- /// always set to `scroll`.
- /// Default Value: scroll - ///
- /// global::tryAGI.OpenAI.ScrollType.Scroll - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ScrollTypeJsonConverter))] - public global::tryAGI.OpenAI.ScrollType Type { get; set; } = global::tryAGI.OpenAI.ScrollType.Scroll; - - /// - /// The x-coordinate where the scroll occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("x")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int X { get; set; } - - /// - /// The y-coordinate where the scroll occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("y")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Y { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The horizontal scroll distance. - /// - /// - /// The vertical scroll distance. - /// - /// - /// Specifies the event type. For a scroll action, this property is
- /// always set to `scroll`.
- /// Default Value: scroll - /// - /// - /// The x-coordinate where the scroll occurred. - /// - /// - /// The y-coordinate where the scroll occurred. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Scroll( - int scrollX, - int scrollY, - int x, - int y, - global::tryAGI.OpenAI.ScrollType type = global::tryAGI.OpenAI.ScrollType.Scroll) - { - this.ScrollX = scrollX; - this.ScrollY = scrollY; - this.X = x; - this.Y = y; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Scroll() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.Json.g.cs new file mode 100644 index 00000000..cdba1999 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ScrollParam + { + /// + /// 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::tryAGI.OpenAI.ScrollParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ScrollParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ScrollParam; + } + + /// + /// 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::tryAGI.OpenAI.ScrollParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ScrollParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ScrollParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.g.cs new file mode 100644 index 00000000..b4995b89 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParam.g.cs @@ -0,0 +1,97 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A scroll action. + /// + public sealed partial class ScrollParam + { + /// + /// Specifies the event type. For a scroll action, this property is always set to `scroll`.
+ /// Default Value: scroll + ///
+ /// global::tryAGI.OpenAI.ScrollParamType.Scroll + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ScrollParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ScrollParamType Type { get; set; } = global::tryAGI.OpenAI.ScrollParamType.Scroll; + + /// + /// The x-coordinate where the scroll occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int X { get; set; } + + /// + /// The y-coordinate where the scroll occurred. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Y { get; set; } + + /// + /// The horizontal scroll distance. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scroll_x")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ScrollX { get; set; } + + /// + /// The vertical scroll distance. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scroll_y")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ScrollY { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a scroll action, this property is always set to `scroll`.
+ /// Default Value: scroll + /// + /// + /// The x-coordinate where the scroll occurred. + /// + /// + /// The y-coordinate where the scroll occurred. + /// + /// + /// The horizontal scroll distance. + /// + /// + /// The vertical scroll distance. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ScrollParam( + int x, + int y, + int scrollX, + int scrollY, + global::tryAGI.OpenAI.ScrollParamType type = global::tryAGI.OpenAI.ScrollParamType.Scroll) + { + this.X = x; + this.Y = y; + this.ScrollX = scrollX; + this.ScrollY = scrollY; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ScrollParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParamType.g.cs new file mode 100644 index 00000000..ad29d5c6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a scroll action, this property is always set to `scroll`.
+ /// Default Value: scroll + ///
+ public enum ScrollParamType + { + /// + /// + /// + Scroll, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ScrollParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ScrollParamType value) + { + return value switch + { + ScrollParamType.Scroll => "scroll", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ScrollParamType? ToEnum(string value) + { + return value switch + { + "scroll" => ScrollParamType.Scroll, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollType.g.cs deleted file mode 100644 index d5f6c5c5..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ScrollType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a scroll action, this property is
- /// always set to `scroll`.
- /// Default Value: scroll - ///
- public enum ScrollType - { - /// - /// - /// - Scroll, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ScrollTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ScrollType value) - { - return value switch - { - ScrollType.Scroll => "scroll", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ScrollType? ToEnum(string value) - { - return value switch - { - "scroll" => ScrollType.Scroll, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SearchContentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SearchContentType.g.cs new file mode 100644 index 00000000..59d5ec8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SearchContentType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum SearchContentType + { + /// + /// + /// + Text, + /// + /// + /// + Image, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SearchContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SearchContentType value) + { + return value switch + { + SearchContentType.Text => "text", + SearchContentType.Image => "image", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SearchContentType? ToEnum(string value) + { + return value switch + { + "text" => SearchContentType.Text, + "image" => SearchContentType.Image, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.Json.g.cs new file mode 100644 index 00000000..5380bf8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ServiceTier + { + /// + /// 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::tryAGI.OpenAI.ServiceTier? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ServiceTier), + jsonSerializerContext) as global::tryAGI.OpenAI.ServiceTier; + } + + /// + /// 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::tryAGI.OpenAI.ServiceTier? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ServiceTier), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ServiceTier; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.g.cs index 8dddac05..ce0fa4e6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTier.g.cs @@ -4,72 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Specifies the processing type used for serving the request.
- /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- /// - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
- /// - When not set, the default behavior is 'auto'.
- /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
- /// Default Value: auto + /// ///
- public enum ServiceTier + public sealed partial class ServiceTier { - /// - /// - /// - Auto, - /// - /// - /// - Default, - /// - /// //platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - /// - Flex, - /// - /// - /// - Scale, - /// - /// //platform.openai.com/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. - /// - Priority, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ServiceTierExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ServiceTier value) - { - return value switch - { - ServiceTier.Auto => "auto", - ServiceTier.Default => "default", - ServiceTier.Flex => "flex", - ServiceTier.Scale => "scale", - ServiceTier.Priority => "priority", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static ServiceTier? ToEnum(string value) - { - return value switch - { - "auto" => ServiceTier.Auto, - "default" => ServiceTier.Default, - "flex" => ServiceTier.Flex, - "scale" => ServiceTier.Scale, - "priority" => ServiceTier.Priority, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTierEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTierEnum.g.cs new file mode 100644 index 00000000..605a7f4e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ServiceTierEnum.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the processing type used for serving the request.
+ /// - If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
+ /// - If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
+ /// - If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.
+ /// - When not set, the default behavior is 'auto'.
+ /// When the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.
+ /// Default Value: auto + ///
+ public enum ServiceTierEnum + { + /// + /// + /// + Auto, + /// + /// + /// + Default, + /// + /// //openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + /// + Flex, + /// + /// + /// + Scale, + /// + /// //openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier. + /// + Priority, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ServiceTierEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ServiceTierEnum value) + { + return value switch + { + ServiceTierEnum.Auto => "auto", + ServiceTierEnum.Default => "default", + ServiceTierEnum.Flex => "flex", + ServiceTierEnum.Scale => "scale", + ServiceTierEnum.Priority => "priority", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ServiceTierEnum? ToEnum(string value) + { + return value switch + { + "auto" => ServiceTierEnum.Auto, + "default" => ServiceTierEnum.Default, + "flex" => ServiceTierEnum.Flex, + "scale" => ServiceTierEnum.Scale, + "priority" => ServiceTierEnum.Priority, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.Json.g.cs deleted file mode 100644 index 1c483b44..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Session - { - /// - /// 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::tryAGI.OpenAI.Session? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Session), - jsonSerializerContext) as global::tryAGI.OpenAI.Session?; - } - - /// - /// 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::tryAGI.OpenAI.Session? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Session), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Session?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.g.cs deleted file mode 100644 index 0da1c2cf..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session.g.cs +++ /dev/null @@ -1,223 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Session configuration to use for the client secret. Choose either a realtime
- /// session or a transcription session. - ///
- public readonly partial struct Session : global::System.IEquatable - { - /// - /// Realtime session object configuration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? RealtimeCreateRequestGA { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? RealtimeCreateRequestGA { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RealtimeCreateRequestGA))] -#endif - public bool IsRealtimeCreateRequestGA => RealtimeCreateRequestGA != null; - - /// - /// - /// - public static implicit operator Session(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA value) => new Session((global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA?(Session @this) => @this.RealtimeCreateRequestGA; - - /// - /// - /// - public Session(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? value) - { - RealtimeCreateRequestGA = value; - } - - /// - /// Realtime transcription session object configuration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? RealtimeTranscriptionCreateRequestGA { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? RealtimeTranscriptionCreateRequestGA { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RealtimeTranscriptionCreateRequestGA))] -#endif - public bool IsRealtimeTranscriptionCreateRequestGA => RealtimeTranscriptionCreateRequestGA != null; - - /// - /// - /// - public static implicit operator Session(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA value) => new Session((global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA?(Session @this) => @this.RealtimeTranscriptionCreateRequestGA; - - /// - /// - /// - public Session(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? value) - { - RealtimeTranscriptionCreateRequestGA = value; - } - - /// - /// - /// - public Session( - global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? realtimeCreateRequestGA, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA? realtimeTranscriptionCreateRequestGA - ) - { - RealtimeCreateRequestGA = realtimeCreateRequestGA; - RealtimeTranscriptionCreateRequestGA = realtimeTranscriptionCreateRequestGA; - } - - /// - /// - /// - public object? Object => - RealtimeTranscriptionCreateRequestGA as object ?? - RealtimeCreateRequestGA as object - ; - - /// - /// - /// - public override string? ToString() => - RealtimeCreateRequestGA?.ToString() ?? - RealtimeTranscriptionCreateRequestGA?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsRealtimeCreateRequestGA || IsRealtimeTranscriptionCreateRequestGA; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? realtimeCreateRequestGA = null, - global::System.Func? realtimeTranscriptionCreateRequestGA = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsRealtimeCreateRequestGA && realtimeCreateRequestGA != null) - { - return realtimeCreateRequestGA(RealtimeCreateRequestGA!); - } - else if (IsRealtimeTranscriptionCreateRequestGA && realtimeTranscriptionCreateRequestGA != null) - { - return realtimeTranscriptionCreateRequestGA(RealtimeTranscriptionCreateRequestGA!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? realtimeCreateRequestGA = null, - global::System.Action? realtimeTranscriptionCreateRequestGA = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsRealtimeCreateRequestGA) - { - realtimeCreateRequestGA?.Invoke(RealtimeCreateRequestGA!); - } - else if (IsRealtimeTranscriptionCreateRequestGA) - { - realtimeTranscriptionCreateRequestGA?.Invoke(RealtimeTranscriptionCreateRequestGA!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - RealtimeCreateRequestGA, - typeof(global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA), - RealtimeTranscriptionCreateRequestGA, - typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestGA), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Session other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RealtimeCreateRequestGA, other.RealtimeCreateRequestGA) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RealtimeTranscriptionCreateRequestGA, other.RealtimeTranscriptionCreateRequestGA) - ; - } - - /// - /// - /// - public static bool operator ==(Session obj1, Session obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Session obj1, Session obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Session o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session2.g.cs index 386e56f4..e57276ed 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session2.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Session2.g.cs @@ -14,53 +14,52 @@ namespace tryAGI.OpenAI /// for keys is one minute. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? RealtimeSessionCreateResponseGA { get; init; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? Realtime { get; init; } #else - public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? RealtimeSessionCreateResponseGA { get; } + public global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? Realtime { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RealtimeSessionCreateResponseGA))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Realtime))] #endif - public bool IsRealtimeSessionCreateResponseGA => RealtimeSessionCreateResponseGA != null; + public bool IsRealtime => Realtime != null; /// - /// + /// A Realtime transcription session configuration object. /// - public static implicit operator Session2(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA value) => new Session2((global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? Transcription { get; init; } +#else + public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? Transcription { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA?(Session2 @this) => @this.RealtimeSessionCreateResponseGA; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Transcription))] +#endif + public bool IsTranscription => Transcription != null; /// /// /// - public Session2(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? value) - { - RealtimeSessionCreateResponseGA = value; - } + public static implicit operator Session2(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA value) => new Session2((global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA?)value); /// - /// A Realtime transcription session configuration object. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? RealtimeTranscriptionSessionCreateResponseGA { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? RealtimeTranscriptionSessionCreateResponseGA { get; } -#endif + public static implicit operator global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA?(Session2 @this) => @this.Realtime; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RealtimeTranscriptionSessionCreateResponseGA))] -#endif - public bool IsRealtimeTranscriptionSessionCreateResponseGA => RealtimeTranscriptionSessionCreateResponseGA != null; + public Session2(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? value) + { + Realtime = value; + } /// /// @@ -70,42 +69,42 @@ public Session2(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? value) /// /// /// - public static implicit operator global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA?(Session2 @this) => @this.RealtimeTranscriptionSessionCreateResponseGA; + public static implicit operator global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA?(Session2 @this) => @this.Transcription; /// /// /// public Session2(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? value) { - RealtimeTranscriptionSessionCreateResponseGA = value; + Transcription = value; } /// /// /// public Session2( - global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? realtimeSessionCreateResponseGA, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? realtimeTranscriptionSessionCreateResponseGA + global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA? realtime, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA? transcription ) { - RealtimeSessionCreateResponseGA = realtimeSessionCreateResponseGA; - RealtimeTranscriptionSessionCreateResponseGA = realtimeTranscriptionSessionCreateResponseGA; + Realtime = realtime; + Transcription = transcription; } /// /// /// public object? Object => - RealtimeTranscriptionSessionCreateResponseGA as object ?? - RealtimeSessionCreateResponseGA as object + Transcription as object ?? + Realtime as object ; /// /// /// public override string? ToString() => - RealtimeSessionCreateResponseGA?.ToString() ?? - RealtimeTranscriptionSessionCreateResponseGA?.ToString() + Realtime?.ToString() ?? + Transcription?.ToString() ; /// @@ -113,15 +112,15 @@ RealtimeSessionCreateResponseGA as object /// public bool Validate() { - return IsRealtimeSessionCreateResponseGA || IsRealtimeTranscriptionSessionCreateResponseGA; + return IsRealtime && !IsTranscription || !IsRealtime && IsTranscription; } /// /// /// public TResult? Match( - global::System.Func? realtimeSessionCreateResponseGA = null, - global::System.Func? realtimeTranscriptionSessionCreateResponseGA = null, + global::System.Func? realtime = null, + global::System.Func? transcription = null, bool validate = true) { if (validate) @@ -129,13 +128,13 @@ public bool Validate() Validate(); } - if (IsRealtimeSessionCreateResponseGA && realtimeSessionCreateResponseGA != null) + if (IsRealtime && realtime != null) { - return realtimeSessionCreateResponseGA(RealtimeSessionCreateResponseGA!); + return realtime(Realtime!); } - else if (IsRealtimeTranscriptionSessionCreateResponseGA && realtimeTranscriptionSessionCreateResponseGA != null) + else if (IsTranscription && transcription != null) { - return realtimeTranscriptionSessionCreateResponseGA(RealtimeTranscriptionSessionCreateResponseGA!); + return transcription(Transcription!); } return default(TResult); @@ -145,8 +144,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? realtimeSessionCreateResponseGA = null, - global::System.Action? realtimeTranscriptionSessionCreateResponseGA = null, + global::System.Action? realtime = null, + global::System.Action? transcription = null, bool validate = true) { if (validate) @@ -154,13 +153,13 @@ public void Match( Validate(); } - if (IsRealtimeSessionCreateResponseGA) + if (IsRealtime) { - realtimeSessionCreateResponseGA?.Invoke(RealtimeSessionCreateResponseGA!); + realtime?.Invoke(Realtime!); } - else if (IsRealtimeTranscriptionSessionCreateResponseGA) + else if (IsTranscription) { - realtimeTranscriptionSessionCreateResponseGA?.Invoke(RealtimeTranscriptionSessionCreateResponseGA!); + transcription?.Invoke(Transcription!); } } @@ -171,9 +170,9 @@ public override int GetHashCode() { var fields = new object?[] { - RealtimeSessionCreateResponseGA, + Realtime, typeof(global::tryAGI.OpenAI.RealtimeSessionCreateResponseGA), - RealtimeTranscriptionSessionCreateResponseGA, + Transcription, typeof(global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponseGA), }; const int offset = unchecked((int)2166136261); @@ -191,8 +190,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(Session2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RealtimeSessionCreateResponseGA, other.RealtimeSessionCreateResponseGA) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RealtimeTranscriptionSessionCreateResponseGA, other.RealtimeTranscriptionSessionCreateResponseGA) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Realtime, other.Realtime) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Transcription, other.Transcription) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.Json.g.cs new file mode 100644 index 00000000..30c281bc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SetDefaultSkillVersionBody + { + /// + /// 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::tryAGI.OpenAI.SetDefaultSkillVersionBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SetDefaultSkillVersionBody), + jsonSerializerContext) as global::tryAGI.OpenAI.SetDefaultSkillVersionBody; + } + + /// + /// 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::tryAGI.OpenAI.SetDefaultSkillVersionBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SetDefaultSkillVersionBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SetDefaultSkillVersionBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.g.cs new file mode 100644 index 00000000..abe628c6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SetDefaultSkillVersionBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Updates the default version pointer for a skill. + /// + public sealed partial class SetDefaultSkillVersionBody + { + /// + /// The skill version number to set as default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("default_version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DefaultVersion { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The skill version number to set as default. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SetDefaultSkillVersionBody( + string defaultVersion) + { + this.DefaultVersion = defaultVersion ?? throw new global::System.ArgumentNullException(nameof(defaultVersion)); + } + + /// + /// Initializes a new instance of the class. + /// + public SetDefaultSkillVersionBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.Json.g.cs new file mode 100644 index 00000000..07e5a090 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillListResource + { + /// + /// 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::tryAGI.OpenAI.SkillListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillListResource; + } + + /// + /// 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::tryAGI.OpenAI.SkillListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.g.cs new file mode 100644 index 00000000..23c8c622 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResource.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillListResource + { + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.SkillListResourceObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SkillListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.SkillListResourceObject Object { get; set; } = global::tryAGI.OpenAI.SkillListResourceObject.List; + + /// + /// A list of items + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? LastId { get; set; } + + /// + /// Whether there are more items available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + /// + /// + /// A list of items + /// + /// + /// + /// + /// Whether there are more items available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkillListResource( + global::System.Collections.Generic.IList data, + string? firstId, + string? lastId, + bool hasMore, + global::tryAGI.OpenAI.SkillListResourceObject @object = global::tryAGI.OpenAI.SkillListResourceObject.List) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); + this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public SkillListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..07e5b000 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.SkillListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.SkillListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.g.cs new file mode 100644 index 00000000..016e1a86 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.Json.g.cs new file mode 100644 index 00000000..7338b082 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.SkillListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.SkillListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.g.cs new file mode 100644 index 00000000..28ab758b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceObject.g.cs new file mode 100644 index 00000000..16befe72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillListResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ public enum SkillListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SkillListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SkillListResourceObject value) + { + return value switch + { + SkillListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SkillListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => SkillListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.Json.g.cs new file mode 100644 index 00000000..ffda1a5a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillReferenceParam + { + /// + /// 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::tryAGI.OpenAI.SkillReferenceParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillReferenceParam), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillReferenceParam; + } + + /// + /// 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::tryAGI.OpenAI.SkillReferenceParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillReferenceParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillReferenceParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.g.cs new file mode 100644 index 00000000..227d5eac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParam.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillReferenceParam + { + /// + /// References a skill created with the /v1/skills endpoint.
+ /// Default Value: skill_reference + ///
+ /// global::tryAGI.OpenAI.SkillReferenceParamType.SkillReference + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SkillReferenceParamTypeJsonConverter))] + public global::tryAGI.OpenAI.SkillReferenceParamType Type { get; set; } = global::tryAGI.OpenAI.SkillReferenceParamType.SkillReference; + + /// + /// The ID of the referenced skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skill_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SkillId { get; set; } + + /// + /// Optional skill version. Use a positive integer or 'latest'. Omit for default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public string? Version { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// References a skill created with the /v1/skills endpoint.
+ /// Default Value: skill_reference + /// + /// + /// The ID of the referenced skill. + /// + /// + /// Optional skill version. Use a positive integer or 'latest'. Omit for default. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkillReferenceParam( + string skillId, + string? version, + global::tryAGI.OpenAI.SkillReferenceParamType type = global::tryAGI.OpenAI.SkillReferenceParamType.SkillReference) + { + this.SkillId = skillId ?? throw new global::System.ArgumentNullException(nameof(skillId)); + this.Type = type; + this.Version = version; + } + + /// + /// Initializes a new instance of the class. + /// + public SkillReferenceParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParamType.g.cs new file mode 100644 index 00000000..8b1e8172 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillReferenceParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// References a skill created with the /v1/skills endpoint.
+ /// Default Value: skill_reference + ///
+ public enum SkillReferenceParamType + { + /// + /// + /// + SkillReference, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SkillReferenceParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SkillReferenceParamType value) + { + return value switch + { + SkillReferenceParamType.SkillReference => "skill_reference", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SkillReferenceParamType? ToEnum(string value) + { + return value switch + { + "skill_reference" => SkillReferenceParamType.SkillReference, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.Json.g.cs new file mode 100644 index 00000000..ff93104a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillResource + { + /// + /// 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::tryAGI.OpenAI.SkillResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillResource), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillResource; + } + + /// + /// 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::tryAGI.OpenAI.SkillResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.g.cs new file mode 100644 index 00000000..df67594b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResource.g.cs @@ -0,0 +1,122 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillResource + { + /// + /// Unique identifier for the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The object type, which is `skill`.
+ /// Default Value: skill + ///
+ /// global::tryAGI.OpenAI.SkillResourceObject.Skill + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SkillResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.SkillResourceObject Object { get; set; } = global::tryAGI.OpenAI.SkillResourceObject.Skill; + + /// + /// Name of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Description of the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Unix timestamp (seconds) for when the skill was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Default version for the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("default_version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DefaultVersion { get; set; } + + /// + /// Latest version for the skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("latest_version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string LatestVersion { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for the skill. + /// + /// + /// The object type, which is `skill`.
+ /// Default Value: skill + /// + /// + /// Name of the skill. + /// + /// + /// Description of the skill. + /// + /// + /// Unix timestamp (seconds) for when the skill was created. + /// + /// + /// Default version for the skill. + /// + /// + /// Latest version for the skill. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkillResource( + string id, + string name, + string description, + global::System.DateTimeOffset createdAt, + string defaultVersion, + string latestVersion, + global::tryAGI.OpenAI.SkillResourceObject @object = global::tryAGI.OpenAI.SkillResourceObject.Skill) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.CreatedAt = createdAt; + this.DefaultVersion = defaultVersion ?? throw new global::System.ArgumentNullException(nameof(defaultVersion)); + this.LatestVersion = latestVersion ?? throw new global::System.ArgumentNullException(nameof(latestVersion)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public SkillResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResourceObject.g.cs new file mode 100644 index 00000000..0674b425 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type, which is `skill`.
+ /// Default Value: skill + ///
+ public enum SkillResourceObject + { + /// + /// + /// + Skill, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SkillResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SkillResourceObject value) + { + return value switch + { + SkillResourceObject.Skill => "skill", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SkillResourceObject? ToEnum(string value) + { + return value switch + { + "skill" => SkillResourceObject.Skill, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.Json.g.cs new file mode 100644 index 00000000..d671b5b1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillVersionListResource + { + /// + /// 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::tryAGI.OpenAI.SkillVersionListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillVersionListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillVersionListResource; + } + + /// + /// 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::tryAGI.OpenAI.SkillVersionListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillVersionListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillVersionListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.g.cs new file mode 100644 index 00000000..c9f6916b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResource.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillVersionListResource + { + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.SkillVersionListResourceObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.SkillVersionListResourceObject Object { get; set; } = global::tryAGI.OpenAI.SkillVersionListResourceObject.List; + + /// + /// A list of items + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? LastId { get; set; } + + /// + /// Whether there are more items available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + /// + /// + /// A list of items + /// + /// + /// + /// + /// Whether there are more items available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkillVersionListResource( + global::System.Collections.Generic.IList data, + string? firstId, + string? lastId, + bool hasMore, + global::tryAGI.OpenAI.SkillVersionListResourceObject @object = global::tryAGI.OpenAI.SkillVersionListResourceObject.List) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); + this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public SkillVersionListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..6c62e847 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillVersionListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.SkillVersionListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillVersionListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillVersionListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.SkillVersionListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillVersionListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillVersionListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.g.cs new file mode 100644 index 00000000..89863799 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillVersionListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.Json.g.cs new file mode 100644 index 00000000..32c20fb3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillVersionListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.SkillVersionListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillVersionListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillVersionListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.SkillVersionListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillVersionListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillVersionListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.g.cs new file mode 100644 index 00000000..002e78bf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillVersionListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceObject.g.cs new file mode 100644 index 00000000..0f5ee3a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionListResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ public enum SkillVersionListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SkillVersionListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SkillVersionListResourceObject value) + { + return value switch + { + SkillVersionListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SkillVersionListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => SkillVersionListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.Json.g.cs new file mode 100644 index 00000000..c8faff66 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SkillVersionResource + { + /// + /// 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::tryAGI.OpenAI.SkillVersionResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillVersionResource), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillVersionResource; + } + + /// + /// 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::tryAGI.OpenAI.SkillVersionResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillVersionResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillVersionResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.g.cs new file mode 100644 index 00000000..7f381974 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResource.g.cs @@ -0,0 +1,122 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SkillVersionResource + { + /// + /// The object type, which is `skill.version`.
+ /// Default Value: skill.version + ///
+ /// global::tryAGI.OpenAI.SkillVersionResourceObject.SkillVersion + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SkillVersionResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.SkillVersionResourceObject Object { get; set; } = global::tryAGI.OpenAI.SkillVersionResourceObject.SkillVersion; + + /// + /// Unique identifier for the skill version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Identifier of the skill for this version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skill_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SkillId { get; set; } + + /// + /// Version number for this skill. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Version { get; set; } + + /// + /// Unix timestamp (seconds) for when the version was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Name of the skill version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Description of the skill version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The object type, which is `skill.version`.
+ /// Default Value: skill.version + /// + /// + /// Unique identifier for the skill version. + /// + /// + /// Identifier of the skill for this version. + /// + /// + /// Version number for this skill. + /// + /// + /// Unix timestamp (seconds) for when the version was created. + /// + /// + /// Name of the skill version. + /// + /// + /// Description of the skill version. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkillVersionResource( + string id, + string skillId, + string version, + global::System.DateTimeOffset createdAt, + string name, + string description, + global::tryAGI.OpenAI.SkillVersionResourceObject @object = global::tryAGI.OpenAI.SkillVersionResourceObject.SkillVersion) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.SkillId = skillId ?? throw new global::System.ArgumentNullException(nameof(skillId)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.CreatedAt = createdAt; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public SkillVersionResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResourceObject.g.cs new file mode 100644 index 00000000..c1ebf16a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillVersionResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type, which is `skill.version`.
+ /// Default Value: skill.version + ///
+ public enum SkillVersionResourceObject + { + /// + /// + /// + SkillVersion, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SkillVersionResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SkillVersionResourceObject value) + { + return value switch + { + SkillVersionResourceObject.SkillVersion => "skill.version", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SkillVersionResourceObject? ToEnum(string value) + { + return value switch + { + "skill.version" => SkillVersionResourceObject.SkillVersion, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.Json.g.cs new file mode 100644 index 00000000..7c829a0a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct SkillsItem + { + /// + /// 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::tryAGI.OpenAI.SkillsItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillsItem), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillsItem?; + } + + /// + /// 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::tryAGI.OpenAI.SkillsItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillsItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillsItem?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.g.cs new file mode 100644 index 00000000..afc8c88e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct SkillsItem : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SkillReferenceParam? SkillReference { get; init; } +#else + public global::tryAGI.OpenAI.SkillReferenceParam? SkillReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SkillReference))] +#endif + public bool IsSkillReference => SkillReference != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InlineSkillParam? Inline { get; init; } +#else + public global::tryAGI.OpenAI.InlineSkillParam? Inline { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Inline))] +#endif + public bool IsInline => Inline != null; + /// + /// + /// + public static implicit operator SkillsItem(global::tryAGI.OpenAI.SkillReferenceParam value) => new SkillsItem((global::tryAGI.OpenAI.SkillReferenceParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.SkillReferenceParam?(SkillsItem @this) => @this.SkillReference; + + /// + /// + /// + public SkillsItem(global::tryAGI.OpenAI.SkillReferenceParam? value) + { + SkillReference = value; + } + + /// + /// + /// + public static implicit operator SkillsItem(global::tryAGI.OpenAI.InlineSkillParam value) => new SkillsItem((global::tryAGI.OpenAI.InlineSkillParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InlineSkillParam?(SkillsItem @this) => @this.Inline; + + /// + /// + /// + public SkillsItem(global::tryAGI.OpenAI.InlineSkillParam? value) + { + Inline = value; + } + + /// + /// + /// + public SkillsItem( + global::tryAGI.OpenAI.SkillReferenceParam? skillReference, + global::tryAGI.OpenAI.InlineSkillParam? inline + ) + { + SkillReference = skillReference; + Inline = inline; + } + + /// + /// + /// + public object? Object => + Inline as object ?? + SkillReference as object + ; + + /// + /// + /// + public override string? ToString() => + SkillReference?.ToString() ?? + Inline?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsSkillReference && !IsInline || !IsSkillReference && IsInline; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? skillReference = null, + global::System.Func? inline = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSkillReference && skillReference != null) + { + return skillReference(SkillReference!); + } + else if (IsInline && inline != null) + { + return inline(Inline!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? skillReference = null, + global::System.Action? inline = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSkillReference) + { + skillReference?.Invoke(SkillReference!); + } + else if (IsInline) + { + inline?.Invoke(Inline!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + SkillReference, + typeof(global::tryAGI.OpenAI.SkillReferenceParam), + Inline, + typeof(global::tryAGI.OpenAI.InlineSkillParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(SkillsItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(SkillReference, other.SkillReference) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Inline, other.Inline) + ; + } + + /// + /// + /// + public static bool operator ==(SkillsItem obj1, SkillsItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(SkillsItem obj1, SkillsItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is SkillsItem o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.Json.g.cs new file mode 100644 index 00000000..ee829e2a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct SkillsItem2 + { + /// + /// 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::tryAGI.OpenAI.SkillsItem2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SkillsItem2), + jsonSerializerContext) as global::tryAGI.OpenAI.SkillsItem2?; + } + + /// + /// 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::tryAGI.OpenAI.SkillsItem2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SkillsItem2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SkillsItem2?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.g.cs new file mode 100644 index 00000000..77a7cc9a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SkillsItem2.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct SkillsItem2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SkillReferenceParam? SkillReference { get; init; } +#else + public global::tryAGI.OpenAI.SkillReferenceParam? SkillReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SkillReference))] +#endif + public bool IsSkillReference => SkillReference != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.InlineSkillParam? Inline { get; init; } +#else + public global::tryAGI.OpenAI.InlineSkillParam? Inline { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Inline))] +#endif + public bool IsInline => Inline != null; + /// + /// + /// + public static implicit operator SkillsItem2(global::tryAGI.OpenAI.SkillReferenceParam value) => new SkillsItem2((global::tryAGI.OpenAI.SkillReferenceParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.SkillReferenceParam?(SkillsItem2 @this) => @this.SkillReference; + + /// + /// + /// + public SkillsItem2(global::tryAGI.OpenAI.SkillReferenceParam? value) + { + SkillReference = value; + } + + /// + /// + /// + public static implicit operator SkillsItem2(global::tryAGI.OpenAI.InlineSkillParam value) => new SkillsItem2((global::tryAGI.OpenAI.InlineSkillParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.InlineSkillParam?(SkillsItem2 @this) => @this.Inline; + + /// + /// + /// + public SkillsItem2(global::tryAGI.OpenAI.InlineSkillParam? value) + { + Inline = value; + } + + /// + /// + /// + public SkillsItem2( + global::tryAGI.OpenAI.SkillReferenceParam? skillReference, + global::tryAGI.OpenAI.InlineSkillParam? inline + ) + { + SkillReference = skillReference; + Inline = inline; + } + + /// + /// + /// + public object? Object => + Inline as object ?? + SkillReference as object + ; + + /// + /// + /// + public override string? ToString() => + SkillReference?.ToString() ?? + Inline?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsSkillReference && !IsInline || !IsSkillReference && IsInline; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? skillReference = null, + global::System.Func? inline = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSkillReference && skillReference != null) + { + return skillReference(SkillReference!); + } + else if (IsInline && inline != null) + { + return inline(Inline!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? skillReference = null, + global::System.Action? inline = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSkillReference) + { + skillReference?.Invoke(SkillReference!); + } + else if (IsInline) + { + inline?.Invoke(Inline!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + SkillReference, + typeof(global::tryAGI.OpenAI.SkillReferenceParam), + Inline, + typeof(global::tryAGI.OpenAI.InlineSkillParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(SkillsItem2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(SkillReference, other.SkillReference) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Inline, other.Inline) + ; + } + + /// + /// + /// + public static bool operator ==(SkillsItem2 obj1, SkillsItem2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(SkillsItem2 obj1, SkillsItem2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is SkillsItem2 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.Json.g.cs deleted file mode 100644 index e1c5ceef..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Source - { - /// - /// 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::tryAGI.OpenAI.Source? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Source), - jsonSerializerContext) as global::tryAGI.OpenAI.Source?; - } - - /// - /// 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::tryAGI.OpenAI.Source? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Source), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Source?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.g.cs deleted file mode 100644 index d08fff24..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Determines what populates the `item` namespace in this run's data source. - /// - public readonly partial struct Source : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContent { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContent { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileContent))] -#endif - public bool IsEvalJsonlFileContent => EvalJsonlFileContent != null; - - /// - /// - /// - public static implicit operator Source(global::tryAGI.OpenAI.EvalJsonlFileContentSource value) => new Source((global::tryAGI.OpenAI.EvalJsonlFileContentSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileContentSource?(Source @this) => @this.EvalJsonlFileContent; - - /// - /// - /// - public Source(global::tryAGI.OpenAI.EvalJsonlFileContentSource? value) - { - EvalJsonlFileContent = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileId { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileId { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileId))] -#endif - public bool IsEvalJsonlFileId => EvalJsonlFileId != null; - - /// - /// - /// - public static implicit operator Source(global::tryAGI.OpenAI.EvalJsonlFileIdSource value) => new Source((global::tryAGI.OpenAI.EvalJsonlFileIdSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileIdSource?(Source @this) => @this.EvalJsonlFileId; - - /// - /// - /// - public Source(global::tryAGI.OpenAI.EvalJsonlFileIdSource? value) - { - EvalJsonlFileId = value; - } - - /// - /// A StoredCompletionsRunDataSource configuration describing a set of filters - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalStoredCompletionsSource? EvalStoredCompletions { get; init; } -#else - public global::tryAGI.OpenAI.EvalStoredCompletionsSource? EvalStoredCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalStoredCompletions))] -#endif - public bool IsEvalStoredCompletions => EvalStoredCompletions != null; - - /// - /// - /// - public static implicit operator Source(global::tryAGI.OpenAI.EvalStoredCompletionsSource value) => new Source((global::tryAGI.OpenAI.EvalStoredCompletionsSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalStoredCompletionsSource?(Source @this) => @this.EvalStoredCompletions; - - /// - /// - /// - public Source(global::tryAGI.OpenAI.EvalStoredCompletionsSource? value) - { - EvalStoredCompletions = value; - } - - /// - /// - /// - public Source( - global::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContent, - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileId, - global::tryAGI.OpenAI.EvalStoredCompletionsSource? evalStoredCompletions - ) - { - EvalJsonlFileContent = evalJsonlFileContent; - EvalJsonlFileId = evalJsonlFileId; - EvalStoredCompletions = evalStoredCompletions; - } - - /// - /// - /// - public object? Object => - EvalStoredCompletions as object ?? - EvalJsonlFileId as object ?? - EvalJsonlFileContent as object - ; - - /// - /// - /// - public override string? ToString() => - EvalJsonlFileContent?.ToString() ?? - EvalJsonlFileId?.ToString() ?? - EvalStoredCompletions?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsEvalJsonlFileContent || IsEvalJsonlFileId || IsEvalStoredCompletions; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? evalJsonlFileContent = null, - global::System.Func? evalJsonlFileId = null, - global::System.Func? evalStoredCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContent && evalJsonlFileContent != null) - { - return evalJsonlFileContent(EvalJsonlFileContent!); - } - else if (IsEvalJsonlFileId && evalJsonlFileId != null) - { - return evalJsonlFileId(EvalJsonlFileId!); - } - else if (IsEvalStoredCompletions && evalStoredCompletions != null) - { - return evalStoredCompletions(EvalStoredCompletions!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? evalJsonlFileContent = null, - global::System.Action? evalJsonlFileId = null, - global::System.Action? evalStoredCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContent) - { - evalJsonlFileContent?.Invoke(EvalJsonlFileContent!); - } - else if (IsEvalJsonlFileId) - { - evalJsonlFileId?.Invoke(EvalJsonlFileId!); - } - else if (IsEvalStoredCompletions) - { - evalStoredCompletions?.Invoke(EvalStoredCompletions!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - EvalJsonlFileContent, - typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), - EvalJsonlFileId, - typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), - EvalStoredCompletions, - typeof(global::tryAGI.OpenAI.EvalStoredCompletionsSource), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Source other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileContent, other.EvalJsonlFileContent) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileId, other.EvalJsonlFileId) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalStoredCompletions, other.EvalStoredCompletions) - ; - } - - /// - /// - /// - public static bool operator ==(Source obj1, Source obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Source obj1, Source obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Source o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.Json.g.cs deleted file mode 100644 index 33eb9e87..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Source2 - { - /// - /// 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::tryAGI.OpenAI.Source2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Source2), - jsonSerializerContext) as global::tryAGI.OpenAI.Source2?; - } - - /// - /// 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::tryAGI.OpenAI.Source2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Source2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Source2?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.g.cs deleted file mode 100644 index 56dcda2b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source2.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Determines what populates the `item` namespace in the data source. - /// - public readonly partial struct Source2 : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContentSource { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContentSource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileContentSource))] -#endif - public bool IsEvalJsonlFileContentSource => EvalJsonlFileContentSource != null; - - /// - /// - /// - public static implicit operator Source2(global::tryAGI.OpenAI.EvalJsonlFileContentSource value) => new Source2((global::tryAGI.OpenAI.EvalJsonlFileContentSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileContentSource?(Source2 @this) => @this.EvalJsonlFileContentSource; - - /// - /// - /// - public Source2(global::tryAGI.OpenAI.EvalJsonlFileContentSource? value) - { - EvalJsonlFileContentSource = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileIdSource { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileIdSource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileIdSource))] -#endif - public bool IsEvalJsonlFileIdSource => EvalJsonlFileIdSource != null; - - /// - /// - /// - public static implicit operator Source2(global::tryAGI.OpenAI.EvalJsonlFileIdSource value) => new Source2((global::tryAGI.OpenAI.EvalJsonlFileIdSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileIdSource?(Source2 @this) => @this.EvalJsonlFileIdSource; - - /// - /// - /// - public Source2(global::tryAGI.OpenAI.EvalJsonlFileIdSource? value) - { - EvalJsonlFileIdSource = value; - } - - /// - /// - /// - public Source2( - global::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContentSource, - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileIdSource - ) - { - EvalJsonlFileContentSource = evalJsonlFileContentSource; - EvalJsonlFileIdSource = evalJsonlFileIdSource; - } - - /// - /// - /// - public object? Object => - EvalJsonlFileIdSource as object ?? - EvalJsonlFileContentSource as object - ; - - /// - /// - /// - public override string? ToString() => - EvalJsonlFileContentSource?.ToString() ?? - EvalJsonlFileIdSource?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsEvalJsonlFileContentSource || IsEvalJsonlFileIdSource; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? evalJsonlFileContentSource = null, - global::System.Func? evalJsonlFileIdSource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContentSource && evalJsonlFileContentSource != null) - { - return evalJsonlFileContentSource(EvalJsonlFileContentSource!); - } - else if (IsEvalJsonlFileIdSource && evalJsonlFileIdSource != null) - { - return evalJsonlFileIdSource(EvalJsonlFileIdSource!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? evalJsonlFileContentSource = null, - global::System.Action? evalJsonlFileIdSource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContentSource) - { - evalJsonlFileContentSource?.Invoke(EvalJsonlFileContentSource!); - } - else if (IsEvalJsonlFileIdSource) - { - evalJsonlFileIdSource?.Invoke(EvalJsonlFileIdSource!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - EvalJsonlFileContentSource, - typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), - EvalJsonlFileIdSource, - typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Source2 other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileContentSource, other.EvalJsonlFileContentSource) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileIdSource, other.EvalJsonlFileIdSource) - ; - } - - /// - /// - /// - public static bool operator ==(Source2 obj1, Source2 obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Source2 obj1, Source2 obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Source2 o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.Json.g.cs deleted file mode 100644 index 570525ea..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct Source3 - { - /// - /// 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::tryAGI.OpenAI.Source3? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Source3), - jsonSerializerContext) as global::tryAGI.OpenAI.Source3?; - } - - /// - /// 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::tryAGI.OpenAI.Source3? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Source3), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Source3?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.g.cs deleted file mode 100644 index e259f420..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Source3.g.cs +++ /dev/null @@ -1,274 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Determines what populates the `item` namespace in this run's data source. - /// - public readonly partial struct Source3 : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContentSource { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileContentSource? EvalJsonlFileContentSource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileContentSource))] -#endif - public bool IsEvalJsonlFileContentSource => EvalJsonlFileContentSource != null; - - /// - /// - /// - public static implicit operator Source3(global::tryAGI.OpenAI.EvalJsonlFileContentSource value) => new Source3((global::tryAGI.OpenAI.EvalJsonlFileContentSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileContentSource?(Source3 @this) => @this.EvalJsonlFileContentSource; - - /// - /// - /// - public Source3(global::tryAGI.OpenAI.EvalJsonlFileContentSource? value) - { - EvalJsonlFileContentSource = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileIdSource { get; init; } -#else - public global::tryAGI.OpenAI.EvalJsonlFileIdSource? EvalJsonlFileIdSource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalJsonlFileIdSource))] -#endif - public bool IsEvalJsonlFileIdSource => EvalJsonlFileIdSource != null; - - /// - /// - /// - public static implicit operator Source3(global::tryAGI.OpenAI.EvalJsonlFileIdSource value) => new Source3((global::tryAGI.OpenAI.EvalJsonlFileIdSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalJsonlFileIdSource?(Source3 @this) => @this.EvalJsonlFileIdSource; - - /// - /// - /// - public Source3(global::tryAGI.OpenAI.EvalJsonlFileIdSource? value) - { - EvalJsonlFileIdSource = value; - } - - /// - /// A EvalResponsesSource object describing a run data source configuration. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalResponsesSource? EvalResponsesSource { get; init; } -#else - public global::tryAGI.OpenAI.EvalResponsesSource? EvalResponsesSource { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalResponsesSource))] -#endif - public bool IsEvalResponsesSource => EvalResponsesSource != null; - - /// - /// - /// - public static implicit operator Source3(global::tryAGI.OpenAI.EvalResponsesSource value) => new Source3((global::tryAGI.OpenAI.EvalResponsesSource?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalResponsesSource?(Source3 @this) => @this.EvalResponsesSource; - - /// - /// - /// - public Source3(global::tryAGI.OpenAI.EvalResponsesSource? value) - { - EvalResponsesSource = value; - } - - /// - /// - /// - public Source3( - global::tryAGI.OpenAI.EvalJsonlFileContentSource? evalJsonlFileContentSource, - global::tryAGI.OpenAI.EvalJsonlFileIdSource? evalJsonlFileIdSource, - global::tryAGI.OpenAI.EvalResponsesSource? evalResponsesSource - ) - { - EvalJsonlFileContentSource = evalJsonlFileContentSource; - EvalJsonlFileIdSource = evalJsonlFileIdSource; - EvalResponsesSource = evalResponsesSource; - } - - /// - /// - /// - public object? Object => - EvalResponsesSource as object ?? - EvalJsonlFileIdSource as object ?? - EvalJsonlFileContentSource as object - ; - - /// - /// - /// - public override string? ToString() => - EvalJsonlFileContentSource?.ToString() ?? - EvalJsonlFileIdSource?.ToString() ?? - EvalResponsesSource?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsEvalJsonlFileContentSource || IsEvalJsonlFileIdSource || IsEvalResponsesSource; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? evalJsonlFileContentSource = null, - global::System.Func? evalJsonlFileIdSource = null, - global::System.Func? evalResponsesSource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContentSource && evalJsonlFileContentSource != null) - { - return evalJsonlFileContentSource(EvalJsonlFileContentSource!); - } - else if (IsEvalJsonlFileIdSource && evalJsonlFileIdSource != null) - { - return evalJsonlFileIdSource(EvalJsonlFileIdSource!); - } - else if (IsEvalResponsesSource && evalResponsesSource != null) - { - return evalResponsesSource(EvalResponsesSource!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? evalJsonlFileContentSource = null, - global::System.Action? evalJsonlFileIdSource = null, - global::System.Action? evalResponsesSource = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsEvalJsonlFileContentSource) - { - evalJsonlFileContentSource?.Invoke(EvalJsonlFileContentSource!); - } - else if (IsEvalJsonlFileIdSource) - { - evalJsonlFileIdSource?.Invoke(EvalJsonlFileIdSource!); - } - else if (IsEvalResponsesSource) - { - evalResponsesSource?.Invoke(EvalResponsesSource!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - EvalJsonlFileContentSource, - typeof(global::tryAGI.OpenAI.EvalJsonlFileContentSource), - EvalJsonlFileIdSource, - typeof(global::tryAGI.OpenAI.EvalJsonlFileIdSource), - EvalResponsesSource, - typeof(global::tryAGI.OpenAI.EvalResponsesSource), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(Source3 other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileContentSource, other.EvalJsonlFileContentSource) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalJsonlFileIdSource, other.EvalJsonlFileIdSource) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalResponsesSource, other.EvalResponsesSource) - ; - } - - /// - /// - /// - public static bool operator ==(Source3 obj1, Source3 obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(Source3 obj1, Source3 obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is Source3 o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.Json.g.cs new file mode 100644 index 00000000..dfefcc42 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SpecificApplyPatchParam + { + /// + /// 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::tryAGI.OpenAI.SpecificApplyPatchParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), + jsonSerializerContext) as global::tryAGI.OpenAI.SpecificApplyPatchParam; + } + + /// + /// 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::tryAGI.OpenAI.SpecificApplyPatchParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SpecificApplyPatchParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.g.cs new file mode 100644 index 00000000..9a8a6395 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Forces the model to call the apply_patch tool when executing a tool call. + /// + public sealed partial class SpecificApplyPatchParam + { + /// + /// The tool to call. Always `apply_patch`.
+ /// Default Value: apply_patch + ///
+ /// global::tryAGI.OpenAI.SpecificApplyPatchParamType.ApplyPatch + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SpecificApplyPatchParamTypeJsonConverter))] + public global::tryAGI.OpenAI.SpecificApplyPatchParamType Type { get; set; } = global::tryAGI.OpenAI.SpecificApplyPatchParamType.ApplyPatch; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The tool to call. Always `apply_patch`.
+ /// Default Value: apply_patch + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SpecificApplyPatchParam( + global::tryAGI.OpenAI.SpecificApplyPatchParamType type = global::tryAGI.OpenAI.SpecificApplyPatchParamType.ApplyPatch) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public SpecificApplyPatchParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParamType.g.cs new file mode 100644 index 00000000..f159d641 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificApplyPatchParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The tool to call. Always `apply_patch`.
+ /// Default Value: apply_patch + ///
+ public enum SpecificApplyPatchParamType + { + /// + /// + /// + ApplyPatch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SpecificApplyPatchParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SpecificApplyPatchParamType value) + { + return value switch + { + SpecificApplyPatchParamType.ApplyPatch => "apply_patch", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SpecificApplyPatchParamType? ToEnum(string value) + { + return value switch + { + "apply_patch" => SpecificApplyPatchParamType.ApplyPatch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.Json.g.cs new file mode 100644 index 00000000..405cf97e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SpecificFunctionShellParam + { + /// + /// 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::tryAGI.OpenAI.SpecificFunctionShellParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), + jsonSerializerContext) as global::tryAGI.OpenAI.SpecificFunctionShellParam; + } + + /// + /// 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::tryAGI.OpenAI.SpecificFunctionShellParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SpecificFunctionShellParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.g.cs new file mode 100644 index 00000000..24dc0ab1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Forces the model to call the shell tool when a tool call is required. + /// + public sealed partial class SpecificFunctionShellParam + { + /// + /// The tool to call. Always `shell`.
+ /// Default Value: shell + ///
+ /// global::tryAGI.OpenAI.SpecificFunctionShellParamType.Shell + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SpecificFunctionShellParamTypeJsonConverter))] + public global::tryAGI.OpenAI.SpecificFunctionShellParamType Type { get; set; } = global::tryAGI.OpenAI.SpecificFunctionShellParamType.Shell; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The tool to call. Always `shell`.
+ /// Default Value: shell + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SpecificFunctionShellParam( + global::tryAGI.OpenAI.SpecificFunctionShellParamType type = global::tryAGI.OpenAI.SpecificFunctionShellParamType.Shell) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public SpecificFunctionShellParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParamType.g.cs new file mode 100644 index 00000000..333a4963 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpecificFunctionShellParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The tool to call. Always `shell`.
+ /// Default Value: shell + ///
+ public enum SpecificFunctionShellParamType + { + /// + /// + /// + Shell, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SpecificFunctionShellParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SpecificFunctionShellParamType value) + { + return value switch + { + SpecificFunctionShellParamType.Shell => "shell", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SpecificFunctionShellParamType? ToEnum(string value) + { + return value switch + { + "shell" => SpecificFunctionShellParamType.Shell, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpeechAudioDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpeechAudioDeltaEvent.g.cs index 96fcd437..9bf53734 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpeechAudioDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SpeechAudioDeltaEvent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class SpeechAudioDeltaEvent { - /// - /// A chunk of Base64-encoded audio data. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Audio { get; set; } - /// /// The type of the event. Always `speech.audio.delta`. /// @@ -22,6 +15,13 @@ public sealed partial class SpeechAudioDeltaEvent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SpeechAudioDeltaEventTypeJsonConverter))] public global::tryAGI.OpenAI.SpeechAudioDeltaEventType Type { get; set; } + /// + /// A chunk of Base64-encoded audio data. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Audio { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class SpeechAudioDeltaEvent /// /// Initializes a new instance of the class. /// - /// - /// A chunk of Base64-encoded audio data. - /// /// /// The type of the event. Always `speech.audio.delta`. /// + /// + /// A chunk of Base64-encoded audio data. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategy.g.cs index 48a9f29b..c9028ed8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategy.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategy.g.cs @@ -9,19 +9,19 @@ namespace tryAGI.OpenAI public sealed partial class StaticChunkingStrategy { /// - /// The number of tokens that overlap between chunks. The default value is `400`.
- /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkOverlapTokens { get; set; } + public required int MaxChunkSizeTokens { get; set; } /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// The number of tokens that overlap between chunks. The default value is `400`.
+ /// Note that the overlap must not exceed half of `max_chunk_size_tokens`. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_chunk_size_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("chunk_overlap_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int MaxChunkSizeTokens { get; set; } + public required int ChunkOverlapTokens { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -32,22 +32,22 @@ public sealed partial class StaticChunkingStrategy /// /// Initializes a new instance of the class. /// + /// + /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + /// /// /// The number of tokens that overlap between chunks. The default value is `400`.
/// Note that the overlap must not exceed half of `max_chunk_size_tokens`. /// - /// - /// The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public StaticChunkingStrategy( - int chunkOverlapTokens, - int maxChunkSizeTokens) + int maxChunkSizeTokens, + int chunkOverlapTokens) { - this.ChunkOverlapTokens = chunkOverlapTokens; this.MaxChunkSizeTokens = maxChunkSizeTokens; + this.ChunkOverlapTokens = chunkOverlapTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyRequestParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyRequestParam.g.cs index 1c56b315..645c0267 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyRequestParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyRequestParam.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class StaticChunkingStrategyRequestParam { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("static")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.StaticChunkingStrategy Static { get; set; } - /// /// Always `static`. /// @@ -22,6 +15,13 @@ public sealed partial class StaticChunkingStrategyRequestParam [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeJsonConverter))] public global::tryAGI.OpenAI.StaticChunkingStrategyRequestParamType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("static")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.StaticChunkingStrategy Static { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class StaticChunkingStrategyRequestParam /// /// Initializes a new instance of the class. /// - /// /// /// Always `static`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyResponseParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyResponseParam.g.cs index 413dedcb..3648d195 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyResponseParam.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StaticChunkingStrategyResponseParam.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class StaticChunkingStrategyResponseParam { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("static")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.StaticChunkingStrategy Static { get; set; } - /// /// Always `static`. /// @@ -22,6 +15,13 @@ public sealed partial class StaticChunkingStrategyResponseParam [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StaticChunkingStrategyResponseParamTypeJsonConverter))] public global::tryAGI.OpenAI.StaticChunkingStrategyResponseParamType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("static")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.StaticChunkingStrategy Static { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,10 +31,10 @@ public sealed partial class StaticChunkingStrategyResponseParam /// /// Initializes a new instance of the class. /// - /// /// /// Always `static`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.Json.g.cs new file mode 100644 index 00000000..07170a2a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct Status + { + /// + /// 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::tryAGI.OpenAI.Status? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Status), + jsonSerializerContext) as global::tryAGI.OpenAI.Status?; + } + + /// + /// 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::tryAGI.OpenAI.Status? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Status), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Status?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.g.cs new file mode 100644 index 00000000..23715356 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Status.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Current status for the thread. Defaults to `active` for newly created threads. + /// + public readonly partial struct Status : global::System.IEquatable + { + /// + /// Indicates that a thread is active. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ActiveStatus? Active { get; init; } +#else + public global::tryAGI.OpenAI.ActiveStatus? Active { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Active))] +#endif + public bool IsActive => Active != null; + + /// + /// Indicates that a thread is locked and cannot accept new input. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LockedStatus? Locked { get; init; } +#else + public global::tryAGI.OpenAI.LockedStatus? Locked { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Locked))] +#endif + public bool IsLocked => Locked != null; + + /// + /// Indicates that a thread has been closed. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ClosedStatus? Closed { get; init; } +#else + public global::tryAGI.OpenAI.ClosedStatus? Closed { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Closed))] +#endif + public bool IsClosed => Closed != null; + /// + /// + /// + public static implicit operator Status(global::tryAGI.OpenAI.ActiveStatus value) => new Status((global::tryAGI.OpenAI.ActiveStatus?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ActiveStatus?(Status @this) => @this.Active; + + /// + /// + /// + public Status(global::tryAGI.OpenAI.ActiveStatus? value) + { + Active = value; + } + + /// + /// + /// + public static implicit operator Status(global::tryAGI.OpenAI.LockedStatus value) => new Status((global::tryAGI.OpenAI.LockedStatus?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LockedStatus?(Status @this) => @this.Locked; + + /// + /// + /// + public Status(global::tryAGI.OpenAI.LockedStatus? value) + { + Locked = value; + } + + /// + /// + /// + public static implicit operator Status(global::tryAGI.OpenAI.ClosedStatus value) => new Status((global::tryAGI.OpenAI.ClosedStatus?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ClosedStatus?(Status @this) => @this.Closed; + + /// + /// + /// + public Status(global::tryAGI.OpenAI.ClosedStatus? value) + { + Closed = value; + } + + /// + /// + /// + public Status( + global::tryAGI.OpenAI.ActiveStatus? active, + global::tryAGI.OpenAI.LockedStatus? locked, + global::tryAGI.OpenAI.ClosedStatus? closed + ) + { + Active = active; + Locked = locked; + Closed = closed; + } + + /// + /// + /// + public object? Object => + Closed as object ?? + Locked as object ?? + Active as object + ; + + /// + /// + /// + public override string? ToString() => + Active?.ToString() ?? + Locked?.ToString() ?? + Closed?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsActive && !IsLocked && !IsClosed || !IsActive && IsLocked && !IsClosed || !IsActive && !IsLocked && IsClosed; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? active = null, + global::System.Func? locked = null, + global::System.Func? closed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsActive && active != null) + { + return active(Active!); + } + else if (IsLocked && locked != null) + { + return locked(Locked!); + } + else if (IsClosed && closed != null) + { + return closed(Closed!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? active = null, + global::System.Action? locked = null, + global::System.Action? closed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsActive) + { + active?.Invoke(Active!); + } + else if (IsLocked) + { + locked?.Invoke(Locked!); + } + else if (IsClosed) + { + closed?.Invoke(Closed!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Active, + typeof(global::tryAGI.OpenAI.ActiveStatus), + Locked, + typeof(global::tryAGI.OpenAI.LockedStatus), + Closed, + typeof(global::tryAGI.OpenAI.ClosedStatus), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Status other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Active, other.Active) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Locked, other.Locked) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Closed, other.Closed) + ; + } + + /// + /// + /// + public static bool operator ==(Status obj1, Status obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Status obj1, Status obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Status o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StopConfiguration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StopConfiguration.g.cs index d38ac4ff..8cfb2427 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StopConfiguration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.StopConfiguration.g.cs @@ -7,7 +7,8 @@ namespace tryAGI.OpenAI /// /// Not supported with latest reasoning models `o3` and `o4-mini`.
/// Up to 4 sequences where the API will stop generating further tokens. The
- /// returned text will not contain the stop sequence. + /// returned text will not contain the stop sequence.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
public readonly partial struct StopConfiguration : global::System.IEquatable { @@ -28,24 +29,6 @@ namespace tryAGI.OpenAI #endif public bool IsValue1 => Value1 != null; - /// - /// - /// - public static implicit operator StopConfiguration(string value) => new StopConfiguration((string?)value); - - /// - /// - /// - public static implicit operator string?(StopConfiguration @this) => @this.Value1; - - /// - /// - /// - public StopConfiguration(string? value) - { - Value1 = value; - } - /// /// /// @@ -62,13 +45,22 @@ public StopConfiguration(string? value) [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] #endif public bool IsValue2 => Value2 != null; + /// + /// + /// + public static implicit operator StopConfiguration(string value) => new StopConfiguration((string?)value); /// /// /// - public StopConfiguration(global::System.Collections.Generic.IList? value) + public static implicit operator string?(StopConfiguration @this) => @this.Value1; + + /// + /// + /// + public StopConfiguration(string? value) { - Value2 = value; + Value1 = value; } /// @@ -104,7 +96,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2; + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequest.g.cs index 22a4668e..714ae91e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequest.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class SubmitToolOutputsRunRequest { - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("stream")] - public bool? Stream { get; set; } - /// /// A list of tools for which the outputs are being submitted. /// @@ -21,6 +15,12 @@ public sealed partial class SubmitToolOutputsRunRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList ToolOutputs { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,12 +30,10 @@ public sealed partial class SubmitToolOutputsRunRequest /// /// Initializes a new instance of the class. /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// /// /// A list of tools for which the outputs are being submitted. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.Json.g.cs new file mode 100644 index 00000000..87bd57ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class SubmitToolOutputsRunRequestStream + { + /// + /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream), + jsonSerializerContext) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream; + } + + /// + /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestStream; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.g.cs new file mode 100644 index 00000000..63845fef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestStream.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class SubmitToolOutputsRunRequestStream + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestToolOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestToolOutput.g.cs index 5d008200..ac83c2bc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestToolOutput.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestToolOutput.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI ///
public sealed partial class SubmitToolOutputsRunRequestToolOutput { - /// - /// The output of the tool call to be submitted to continue the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] - public string? Output { get; set; } - /// /// The ID of the tool call in the `required_action` object within the run object the output is being submitted for. /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_id")] public string? ToolCallId { get; set; } + /// + /// The output of the tool call to be submitted to continue the run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + public string? Output { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class SubmitToolOutputsRunRequestToolOutput /// /// Initializes a new instance of the class. /// - /// - /// The output of the tool call to be submitted to continue the run. - /// /// /// The ID of the tool call in the `required_action` object within the run object the output is being submitted for. /// + /// + /// The output of the tool call to be submitted to continue the run. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SubmitToolOutputsRunRequestToolOutput( - string? output, - string? toolCallId) + string? toolCallId, + string? output) { - this.Output = output; this.ToolCallId = toolCallId; + this.Output = output; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.Json.g.cs deleted file mode 100644 index c1757fa0..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class SubmitToolOutputsRunRequestWithoutStream - { - /// - /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream), - jsonSerializerContext) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream; - } - - /// - /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStream; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.g.cs deleted file mode 100644 index 1d8b259d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStream.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class SubmitToolOutputsRunRequestWithoutStream - { - /// - /// A list of tools for which the outputs are being submitted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_outputs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList ToolOutputs { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A list of tools for which the outputs are being submitted. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public SubmitToolOutputsRunRequestWithoutStream( - global::System.Collections.Generic.IList toolOutputs) - { - this.ToolOutputs = toolOutputs ?? throw new global::System.ArgumentNullException(nameof(toolOutputs)); - } - - /// - /// Initializes a new instance of the class. - /// - public SubmitToolOutputsRunRequestWithoutStream() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.Json.g.cs deleted file mode 100644 index c25b5d47..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class SubmitToolOutputsRunRequestWithoutStreamToolOutput - { - /// - /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput), - jsonSerializerContext) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput; - } - - /// - /// 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::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.SubmitToolOutputsRunRequestWithoutStreamToolOutput; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.g.cs deleted file mode 100644 index 26321a3a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SubmitToolOutputsRunRequestWithoutStreamToolOutput.g.cs +++ /dev/null @@ -1,56 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class SubmitToolOutputsRunRequestWithoutStreamToolOutput - { - /// - /// The output of the tool call to be submitted to continue the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("output")] - public string? Output { get; set; } - - /// - /// The ID of the tool call in the `required_action` object within the run object the output is being submitted for. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_id")] - public string? ToolCallId { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The output of the tool call to be submitted to continue the run. - /// - /// - /// The ID of the tool call in the `required_action` object within the run object the output is being submitted for. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public SubmitToolOutputsRunRequestWithoutStreamToolOutput( - string? output, - string? toolCallId) - { - this.Output = output; - this.ToolCallId = toolCallId; - } - - /// - /// Initializes a new instance of the class. - /// - public SubmitToolOutputsRunRequestWithoutStreamToolOutput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.Json.g.cs deleted file mode 100644 index cfe270ff..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Summary - { - /// - /// 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::tryAGI.OpenAI.Summary? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Summary), - jsonSerializerContext) as global::tryAGI.OpenAI.Summary; - } - - /// - /// 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::tryAGI.OpenAI.Summary? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Summary), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Summary; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.g.cs deleted file mode 100644 index 44c71873..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Summary.g.cs +++ /dev/null @@ -1,61 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A summary text from the model. - /// - public sealed partial class Summary - { - /// - /// A summary of the reasoning output from the model so far. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// The type of the object. Always `summary_text`.
- /// Default Value: summary_text - ///
- /// global::tryAGI.OpenAI.SummaryType.SummaryText - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTypeJsonConverter))] - public global::tryAGI.OpenAI.SummaryType Type { get; set; } = global::tryAGI.OpenAI.SummaryType.SummaryText; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// A summary of the reasoning output from the model so far. - /// - /// - /// The type of the object. Always `summary_text`.
- /// Default Value: summary_text - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Summary( - string text, - global::tryAGI.OpenAI.SummaryType type = global::tryAGI.OpenAI.SummaryType.SummaryText) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Summary() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryTextContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryTextContent.g.cs index 5b573211..abd3970b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryTextContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryTextContent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class SummaryTextContent { - /// - /// A summary of the reasoning output from the model so far. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of the object. Always `summary_text`.
/// Default Value: summary_text @@ -24,6 +17,13 @@ public sealed partial class SummaryTextContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SummaryTextContentTypeJsonConverter))] public global::tryAGI.OpenAI.SummaryTextContentType Type { get; set; } = global::tryAGI.OpenAI.SummaryTextContentType.SummaryText; + /// + /// A summary of the reasoning output from the model so far. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,13 +33,13 @@ public sealed partial class SummaryTextContent /// /// Initializes a new instance of the class. /// - /// - /// A summary of the reasoning output from the model so far. - /// /// /// The type of the object. Always `summary_text`.
/// Default Value: summary_text /// + /// + /// A summary of the reasoning output from the model so far. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryType.g.cs deleted file mode 100644 index b3e81c97..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryType.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of the object. Always `summary_text`.
- /// Default Value: summary_text - ///
- public enum SummaryType - { - /// - /// - /// - SummaryText, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class SummaryTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this SummaryType value) - { - return value switch - { - SummaryType.SummaryText => "summary_text", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static SummaryType? ToEnum(string value) - { - return value switch - { - "summary_text" => SummaryType.SummaryText, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.Json.g.cs new file mode 100644 index 00000000..1922456f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskGroupItem + { + /// + /// 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::tryAGI.OpenAI.TaskGroupItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskGroupItem), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskGroupItem; + } + + /// + /// 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::tryAGI.OpenAI.TaskGroupItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskGroupItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskGroupItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.g.cs new file mode 100644 index 00000000..fa21da2f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItem.g.cs @@ -0,0 +1,113 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Collection of workflow tasks grouped together in the thread. + /// + public sealed partial class TaskGroupItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.TaskGroupItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemObjectJsonConverter))] + public global::tryAGI.OpenAI.TaskGroupItemObject Object { get; set; } = global::tryAGI.OpenAI.TaskGroupItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Type discriminator that is always `chatkit.task_group`.
+ /// Default Value: chatkit.task_group + ///
+ /// global::tryAGI.OpenAI.TaskGroupItemType.ChatkitTaskGroup + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskGroupItemTypeJsonConverter))] + public global::tryAGI.OpenAI.TaskGroupItemType Type { get; set; } = global::tryAGI.OpenAI.TaskGroupItemType.ChatkitTaskGroup; + + /// + /// Tasks included in the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tasks")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tasks { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Type discriminator that is always `chatkit.task_group`.
+ /// Default Value: chatkit.task_group + /// + /// + /// Tasks included in the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TaskGroupItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + global::System.Collections.Generic.IList tasks, + global::tryAGI.OpenAI.TaskGroupItemObject @object = global::tryAGI.OpenAI.TaskGroupItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.TaskGroupItemType type = global::tryAGI.OpenAI.TaskGroupItemType.ChatkitTaskGroup) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.Tasks = tasks ?? throw new global::System.ArgumentNullException(nameof(tasks)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public TaskGroupItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemObject.g.cs new file mode 100644 index 00000000..d367fd2d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum TaskGroupItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TaskGroupItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TaskGroupItemObject value) + { + return value switch + { + TaskGroupItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TaskGroupItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => TaskGroupItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemType.g.cs new file mode 100644 index 00000000..32abfad1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupItemType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.task_group`.
+ /// Default Value: chatkit.task_group + ///
+ public enum TaskGroupItemType + { + /// + /// + /// + ChatkitTaskGroup, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TaskGroupItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TaskGroupItemType value) + { + return value switch + { + TaskGroupItemType.ChatkitTaskGroup => "chatkit.task_group", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TaskGroupItemType? ToEnum(string value) + { + return value switch + { + "chatkit.task_group" => TaskGroupItemType.ChatkitTaskGroup, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.Json.g.cs new file mode 100644 index 00000000..b539a224 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskGroupTask + { + /// + /// 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::tryAGI.OpenAI.TaskGroupTask? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskGroupTask), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskGroupTask; + } + + /// + /// 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::tryAGI.OpenAI.TaskGroupTask? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskGroupTask), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskGroupTask; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.g.cs new file mode 100644 index 00000000..d076b45b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTask.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Task entry that appears within a TaskGroup. + /// + public sealed partial class TaskGroupTask + { + /// + /// Subtype for the grouped task. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.TaskType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("heading")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Heading { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Summary { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Subtype for the grouped task. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TaskGroupTask( + global::tryAGI.OpenAI.TaskType type, + string? heading, + string? summary) + { + this.Type = type; + this.Heading = heading ?? throw new global::System.ArgumentNullException(nameof(heading)); + this.Summary = summary ?? throw new global::System.ArgumentNullException(nameof(summary)); + } + + /// + /// Initializes a new instance of the class. + /// + public TaskGroupTask() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.Json.g.cs new file mode 100644 index 00000000..f3f1c16f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskGroupTaskHeading + { + /// + /// 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::tryAGI.OpenAI.TaskGroupTaskHeading? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskGroupTaskHeading), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskGroupTaskHeading; + } + + /// + /// 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::tryAGI.OpenAI.TaskGroupTaskHeading? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskGroupTaskHeading), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskGroupTaskHeading; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.g.cs new file mode 100644 index 00000000..555b66fd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskHeading.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TaskGroupTaskHeading + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.Json.g.cs new file mode 100644 index 00000000..6de1745d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskGroupTaskSummary + { + /// + /// 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::tryAGI.OpenAI.TaskGroupTaskSummary? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskGroupTaskSummary), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskGroupTaskSummary; + } + + /// + /// 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::tryAGI.OpenAI.TaskGroupTaskSummary? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskGroupTaskSummary), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskGroupTaskSummary; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.g.cs new file mode 100644 index 00000000..f16cf8fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskGroupTaskSummary.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TaskGroupTaskSummary + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.Json.g.cs new file mode 100644 index 00000000..0489f3c9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskItem + { + /// + /// 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::tryAGI.OpenAI.TaskItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskItem), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskItem; + } + + /// + /// 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::tryAGI.OpenAI.TaskItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.g.cs new file mode 100644 index 00000000..5697935c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItem.g.cs @@ -0,0 +1,134 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Task emitted by the workflow to show progress and status updates. + /// + public sealed partial class TaskItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.TaskItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemObjectJsonConverter))] + public global::tryAGI.OpenAI.TaskItemObject Object { get; set; } = global::tryAGI.OpenAI.TaskItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Type discriminator that is always `chatkit.task`.
+ /// Default Value: chatkit.task + ///
+ /// global::tryAGI.OpenAI.TaskItemType.ChatkitTask + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskItemTypeJsonConverter))] + public global::tryAGI.OpenAI.TaskItemType Type { get; set; } = global::tryAGI.OpenAI.TaskItemType.ChatkitTask; + + /// + /// Subtype for the task. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("task_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TaskTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.TaskType TaskType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("heading")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Heading { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Summary { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Type discriminator that is always `chatkit.task`.
+ /// Default Value: chatkit.task + /// + /// + /// Subtype for the task. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TaskItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + global::tryAGI.OpenAI.TaskType taskType, + string? heading, + string? summary, + global::tryAGI.OpenAI.TaskItemObject @object = global::tryAGI.OpenAI.TaskItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.TaskItemType type = global::tryAGI.OpenAI.TaskItemType.ChatkitTask) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.TaskType = taskType; + this.Heading = heading ?? throw new global::System.ArgumentNullException(nameof(heading)); + this.Summary = summary ?? throw new global::System.ArgumentNullException(nameof(summary)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public TaskItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.Json.g.cs new file mode 100644 index 00000000..2fbff799 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskItemHeading + { + /// + /// 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::tryAGI.OpenAI.TaskItemHeading? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskItemHeading), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskItemHeading; + } + + /// + /// 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::tryAGI.OpenAI.TaskItemHeading? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskItemHeading), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskItemHeading; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.g.cs new file mode 100644 index 00000000..298e3d65 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemHeading.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TaskItemHeading + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemObject.g.cs new file mode 100644 index 00000000..2ef26c51 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum TaskItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TaskItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TaskItemObject value) + { + return value switch + { + TaskItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TaskItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => TaskItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.Json.g.cs new file mode 100644 index 00000000..a83d431d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TaskItemSummary + { + /// + /// 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::tryAGI.OpenAI.TaskItemSummary? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TaskItemSummary), + jsonSerializerContext) as global::tryAGI.OpenAI.TaskItemSummary; + } + + /// + /// 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::tryAGI.OpenAI.TaskItemSummary? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TaskItemSummary), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TaskItemSummary; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.g.cs new file mode 100644 index 00000000..4407d834 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemSummary.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TaskItemSummary + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemType.g.cs new file mode 100644 index 00000000..6fb7ab57 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskItemType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.task`.
+ /// Default Value: chatkit.task + ///
+ public enum TaskItemType + { + /// + /// + /// + ChatkitTask, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TaskItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TaskItemType value) + { + return value switch + { + TaskItemType.ChatkitTask => "chatkit.task", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TaskItemType? ToEnum(string value) + { + return value switch + { + "chatkit.task" => TaskItemType.ChatkitTask, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskType.g.cs new file mode 100644 index 00000000..aee9612f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TaskType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum TaskType + { + /// + /// + /// + Custom, + /// + /// + /// + Thought, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TaskTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TaskType value) + { + return value switch + { + TaskType.Custom => "custom", + TaskType.Thought => "thought", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TaskType? ToEnum(string value) + { + return value switch + { + "custom" => TaskType.Custom, + "thought" => TaskType.Thought, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.Json.g.cs deleted file mode 100644 index 2acd0ef6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct TestingCriteriaItem - { - /// - /// 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::tryAGI.OpenAI.TestingCriteriaItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TestingCriteriaItem), - jsonSerializerContext) as global::tryAGI.OpenAI.TestingCriteriaItem?; - } - - /// - /// 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::tryAGI.OpenAI.TestingCriteriaItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TestingCriteriaItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TestingCriteriaItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.g.cs deleted file mode 100644 index 747aaa60..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TestingCriteriaItem.g.cs +++ /dev/null @@ -1,379 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct TestingCriteriaItem : global::System.IEquatable - { - /// - /// A LabelModelGrader object which uses a model to assign labels to each item
- /// in the evaluation. - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CreateEvalLabelModelGrader? CreateEvalLabelModelGrader { get; init; } -#else - public global::tryAGI.OpenAI.CreateEvalLabelModelGrader? CreateEvalLabelModelGrader { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateEvalLabelModelGrader))] -#endif - public bool IsCreateEvalLabelModelGrader => CreateEvalLabelModelGrader != null; - - /// - /// - /// - public static implicit operator TestingCriteriaItem(global::tryAGI.OpenAI.CreateEvalLabelModelGrader value) => new TestingCriteriaItem((global::tryAGI.OpenAI.CreateEvalLabelModelGrader?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CreateEvalLabelModelGrader?(TestingCriteriaItem @this) => @this.CreateEvalLabelModelGrader; - - /// - /// - /// - public TestingCriteriaItem(global::tryAGI.OpenAI.CreateEvalLabelModelGrader? value) - { - CreateEvalLabelModelGrader = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderStringCheck? EvalGraderStringCheck { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderStringCheck? EvalGraderStringCheck { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalGraderStringCheck))] -#endif - public bool IsEvalGraderStringCheck => EvalGraderStringCheck != null; - - /// - /// - /// - public static implicit operator TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderStringCheck value) => new TestingCriteriaItem((global::tryAGI.OpenAI.EvalGraderStringCheck?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalGraderStringCheck?(TestingCriteriaItem @this) => @this.EvalGraderStringCheck; - - /// - /// - /// - public TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderStringCheck? value) - { - EvalGraderStringCheck = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderTextSimilarity? EvalGraderTextSimilarity { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderTextSimilarity? EvalGraderTextSimilarity { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalGraderTextSimilarity))] -#endif - public bool IsEvalGraderTextSimilarity => EvalGraderTextSimilarity != null; - - /// - /// - /// - public static implicit operator TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderTextSimilarity value) => new TestingCriteriaItem((global::tryAGI.OpenAI.EvalGraderTextSimilarity?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalGraderTextSimilarity?(TestingCriteriaItem @this) => @this.EvalGraderTextSimilarity; - - /// - /// - /// - public TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderTextSimilarity? value) - { - EvalGraderTextSimilarity = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderPython? EvalGraderPython { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderPython? EvalGraderPython { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalGraderPython))] -#endif - public bool IsEvalGraderPython => EvalGraderPython != null; - - /// - /// - /// - public static implicit operator TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderPython value) => new TestingCriteriaItem((global::tryAGI.OpenAI.EvalGraderPython?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalGraderPython?(TestingCriteriaItem @this) => @this.EvalGraderPython; - - /// - /// - /// - public TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderPython? value) - { - EvalGraderPython = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.EvalGraderScoreModel? EvalGraderScoreModel { get; init; } -#else - public global::tryAGI.OpenAI.EvalGraderScoreModel? EvalGraderScoreModel { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EvalGraderScoreModel))] -#endif - public bool IsEvalGraderScoreModel => EvalGraderScoreModel != null; - - /// - /// - /// - public static implicit operator TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderScoreModel value) => new TestingCriteriaItem((global::tryAGI.OpenAI.EvalGraderScoreModel?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.EvalGraderScoreModel?(TestingCriteriaItem @this) => @this.EvalGraderScoreModel; - - /// - /// - /// - public TestingCriteriaItem(global::tryAGI.OpenAI.EvalGraderScoreModel? value) - { - EvalGraderScoreModel = value; - } - - /// - /// - /// - public TestingCriteriaItem( - global::tryAGI.OpenAI.CreateEvalLabelModelGrader? createEvalLabelModelGrader, - global::tryAGI.OpenAI.EvalGraderStringCheck? evalGraderStringCheck, - global::tryAGI.OpenAI.EvalGraderTextSimilarity? evalGraderTextSimilarity, - global::tryAGI.OpenAI.EvalGraderPython? evalGraderPython, - global::tryAGI.OpenAI.EvalGraderScoreModel? evalGraderScoreModel - ) - { - CreateEvalLabelModelGrader = createEvalLabelModelGrader; - EvalGraderStringCheck = evalGraderStringCheck; - EvalGraderTextSimilarity = evalGraderTextSimilarity; - EvalGraderPython = evalGraderPython; - EvalGraderScoreModel = evalGraderScoreModel; - } - - /// - /// - /// - public object? Object => - EvalGraderScoreModel as object ?? - EvalGraderPython as object ?? - EvalGraderTextSimilarity as object ?? - EvalGraderStringCheck as object ?? - CreateEvalLabelModelGrader as object - ; - - /// - /// - /// - public override string? ToString() => - CreateEvalLabelModelGrader?.ToString() ?? - EvalGraderStringCheck?.ToString() ?? - EvalGraderTextSimilarity?.ToString() ?? - EvalGraderPython?.ToString() ?? - EvalGraderScoreModel?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsCreateEvalLabelModelGrader || IsEvalGraderStringCheck || IsEvalGraderTextSimilarity || IsEvalGraderPython || IsEvalGraderScoreModel; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? createEvalLabelModelGrader = null, - global::System.Func? evalGraderStringCheck = null, - global::System.Func? evalGraderTextSimilarity = null, - global::System.Func? evalGraderPython = null, - global::System.Func? evalGraderScoreModel = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCreateEvalLabelModelGrader && createEvalLabelModelGrader != null) - { - return createEvalLabelModelGrader(CreateEvalLabelModelGrader!); - } - else if (IsEvalGraderStringCheck && evalGraderStringCheck != null) - { - return evalGraderStringCheck(EvalGraderStringCheck!); - } - else if (IsEvalGraderTextSimilarity && evalGraderTextSimilarity != null) - { - return evalGraderTextSimilarity(EvalGraderTextSimilarity!); - } - else if (IsEvalGraderPython && evalGraderPython != null) - { - return evalGraderPython(EvalGraderPython!); - } - else if (IsEvalGraderScoreModel && evalGraderScoreModel != null) - { - return evalGraderScoreModel(EvalGraderScoreModel!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? createEvalLabelModelGrader = null, - global::System.Action? evalGraderStringCheck = null, - global::System.Action? evalGraderTextSimilarity = null, - global::System.Action? evalGraderPython = null, - global::System.Action? evalGraderScoreModel = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsCreateEvalLabelModelGrader) - { - createEvalLabelModelGrader?.Invoke(CreateEvalLabelModelGrader!); - } - else if (IsEvalGraderStringCheck) - { - evalGraderStringCheck?.Invoke(EvalGraderStringCheck!); - } - else if (IsEvalGraderTextSimilarity) - { - evalGraderTextSimilarity?.Invoke(EvalGraderTextSimilarity!); - } - else if (IsEvalGraderPython) - { - evalGraderPython?.Invoke(EvalGraderPython!); - } - else if (IsEvalGraderScoreModel) - { - evalGraderScoreModel?.Invoke(EvalGraderScoreModel!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - CreateEvalLabelModelGrader, - typeof(global::tryAGI.OpenAI.CreateEvalLabelModelGrader), - EvalGraderStringCheck, - typeof(global::tryAGI.OpenAI.EvalGraderStringCheck), - EvalGraderTextSimilarity, - typeof(global::tryAGI.OpenAI.EvalGraderTextSimilarity), - EvalGraderPython, - typeof(global::tryAGI.OpenAI.EvalGraderPython), - EvalGraderScoreModel, - typeof(global::tryAGI.OpenAI.EvalGraderScoreModel), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TestingCriteriaItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CreateEvalLabelModelGrader, other.CreateEvalLabelModelGrader) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalGraderStringCheck, other.EvalGraderStringCheck) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalGraderTextSimilarity, other.EvalGraderTextSimilarity) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalGraderPython, other.EvalGraderPython) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(EvalGraderScoreModel, other.EvalGraderScoreModel) - ; - } - - /// - /// - /// - public static bool operator ==(TestingCriteriaItem obj1, TestingCriteriaItem obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TestingCriteriaItem obj1, TestingCriteriaItem obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TestingCriteriaItem o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.Json.g.cs deleted file mode 100644 index 0a5f8d0e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct TextAnnotation - { - /// - /// 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::tryAGI.OpenAI.TextAnnotation? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TextAnnotation), - jsonSerializerContext) as global::tryAGI.OpenAI.TextAnnotation?; - } - - /// - /// 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::tryAGI.OpenAI.TextAnnotation? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TextAnnotation), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextAnnotation?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.g.cs deleted file mode 100644 index 296adf89..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotation.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct TextAnnotation : global::System.IEquatable - { - /// - /// 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::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? MessageContentAnnotationsFileCitationObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? MessageContentAnnotationsFileCitationObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentAnnotationsFileCitationObject))] -#endif - public bool IsMessageContentAnnotationsFileCitationObject => MessageContentAnnotationsFileCitationObject != null; - - /// - /// - /// - public static implicit operator TextAnnotation(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject value) => new TextAnnotation((global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject?(TextAnnotation @this) => @this.MessageContentAnnotationsFileCitationObject; - - /// - /// - /// - public TextAnnotation(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? value) - { - MessageContentAnnotationsFileCitationObject = 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::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? MessageContentAnnotationsFilePathObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? MessageContentAnnotationsFilePathObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentAnnotationsFilePathObject))] -#endif - public bool IsMessageContentAnnotationsFilePathObject => MessageContentAnnotationsFilePathObject != null; - - /// - /// - /// - public static implicit operator TextAnnotation(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject value) => new TextAnnotation((global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject?(TextAnnotation @this) => @this.MessageContentAnnotationsFilePathObject; - - /// - /// - /// - public TextAnnotation(global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? value) - { - MessageContentAnnotationsFilePathObject = value; - } - - /// - /// - /// - public TextAnnotation( - global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject? messageContentAnnotationsFileCitationObject, - global::tryAGI.OpenAI.MessageContentTextAnnotationsFilePathObject? messageContentAnnotationsFilePathObject - ) - { - MessageContentAnnotationsFileCitationObject = messageContentAnnotationsFileCitationObject; - MessageContentAnnotationsFilePathObject = messageContentAnnotationsFilePathObject; - } - - /// - /// - /// - public object? Object => - MessageContentAnnotationsFilePathObject as object ?? - MessageContentAnnotationsFileCitationObject as object - ; - - /// - /// - /// - public override string? ToString() => - MessageContentAnnotationsFileCitationObject?.ToString() ?? - MessageContentAnnotationsFilePathObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsMessageContentAnnotationsFileCitationObject || IsMessageContentAnnotationsFilePathObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? messageContentAnnotationsFileCitationObject = null, - global::System.Func? messageContentAnnotationsFilePathObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsMessageContentAnnotationsFileCitationObject && messageContentAnnotationsFileCitationObject != null) - { - return messageContentAnnotationsFileCitationObject(MessageContentAnnotationsFileCitationObject!); - } - else if (IsMessageContentAnnotationsFilePathObject && messageContentAnnotationsFilePathObject != null) - { - return messageContentAnnotationsFilePathObject(MessageContentAnnotationsFilePathObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? messageContentAnnotationsFileCitationObject = null, - global::System.Action? messageContentAnnotationsFilePathObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsMessageContentAnnotationsFileCitationObject) - { - messageContentAnnotationsFileCitationObject?.Invoke(MessageContentAnnotationsFileCitationObject!); - } - else if (IsMessageContentAnnotationsFilePathObject) - { - messageContentAnnotationsFilePathObject?.Invoke(MessageContentAnnotationsFilePathObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - MessageContentAnnotationsFileCitationObject, - typeof(global::tryAGI.OpenAI.MessageContentTextAnnotationsFileCitationObject), - MessageContentAnnotationsFilePathObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TextAnnotation other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentAnnotationsFileCitationObject, other.MessageContentAnnotationsFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentAnnotationsFilePathObject, other.MessageContentAnnotationsFilePathObject) - ; - } - - /// - /// - /// - public static bool operator ==(TextAnnotation obj1, TextAnnotation obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TextAnnotation obj1, TextAnnotation obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TextAnnotation o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.Json.g.cs deleted file mode 100644 index 9708fa3e..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct TextAnnotationDelta - { - /// - /// 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::tryAGI.OpenAI.TextAnnotationDelta? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TextAnnotationDelta), - jsonSerializerContext) as global::tryAGI.OpenAI.TextAnnotationDelta?; - } - - /// - /// 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::tryAGI.OpenAI.TextAnnotationDelta? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TextAnnotationDelta), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextAnnotationDelta?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.g.cs deleted file mode 100644 index 74a3231c..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDelta.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct TextAnnotationDelta : global::System.IEquatable - { - /// - /// 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::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? MessageContentAnnotationsFileCitationObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? MessageContentAnnotationsFileCitationObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentAnnotationsFileCitationObject))] -#endif - public bool IsMessageContentAnnotationsFileCitationObject => MessageContentAnnotationsFileCitationObject != null; - - /// - /// - /// - public static implicit operator TextAnnotationDelta(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject value) => new TextAnnotationDelta((global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject?(TextAnnotationDelta @this) => @this.MessageContentAnnotationsFileCitationObject; - - /// - /// - /// - public TextAnnotationDelta(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? value) - { - MessageContentAnnotationsFileCitationObject = 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::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? MessageContentAnnotationsFilePathObject { get; init; } -#else - public global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? MessageContentAnnotationsFilePathObject { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentAnnotationsFilePathObject))] -#endif - public bool IsMessageContentAnnotationsFilePathObject => MessageContentAnnotationsFilePathObject != null; - - /// - /// - /// - public static implicit operator TextAnnotationDelta(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject value) => new TextAnnotationDelta((global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject?(TextAnnotationDelta @this) => @this.MessageContentAnnotationsFilePathObject; - - /// - /// - /// - public TextAnnotationDelta(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? value) - { - MessageContentAnnotationsFilePathObject = value; - } - - /// - /// - /// - public TextAnnotationDelta( - global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? messageContentAnnotationsFileCitationObject, - global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? messageContentAnnotationsFilePathObject - ) - { - MessageContentAnnotationsFileCitationObject = messageContentAnnotationsFileCitationObject; - MessageContentAnnotationsFilePathObject = messageContentAnnotationsFilePathObject; - } - - /// - /// - /// - public object? Object => - MessageContentAnnotationsFilePathObject as object ?? - MessageContentAnnotationsFileCitationObject as object - ; - - /// - /// - /// - public override string? ToString() => - MessageContentAnnotationsFileCitationObject?.ToString() ?? - MessageContentAnnotationsFilePathObject?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsMessageContentAnnotationsFileCitationObject || IsMessageContentAnnotationsFilePathObject; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? messageContentAnnotationsFileCitationObject = null, - global::System.Func? messageContentAnnotationsFilePathObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsMessageContentAnnotationsFileCitationObject && messageContentAnnotationsFileCitationObject != null) - { - return messageContentAnnotationsFileCitationObject(MessageContentAnnotationsFileCitationObject!); - } - else if (IsMessageContentAnnotationsFilePathObject && messageContentAnnotationsFilePathObject != null) - { - return messageContentAnnotationsFilePathObject(MessageContentAnnotationsFilePathObject!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? messageContentAnnotationsFileCitationObject = null, - global::System.Action? messageContentAnnotationsFilePathObject = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsMessageContentAnnotationsFileCitationObject) - { - messageContentAnnotationsFileCitationObject?.Invoke(MessageContentAnnotationsFileCitationObject!); - } - else if (IsMessageContentAnnotationsFilePathObject) - { - messageContentAnnotationsFilePathObject?.Invoke(MessageContentAnnotationsFilePathObject!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - MessageContentAnnotationsFileCitationObject, - typeof(global::tryAGI.OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), - MessageContentAnnotationsFilePathObject, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TextAnnotationDelta other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentAnnotationsFileCitationObject, other.MessageContentAnnotationsFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentAnnotationsFilePathObject, other.MessageContentAnnotationsFilePathObject) - ; - } - - /// - /// - /// - public static bool operator ==(TextAnnotationDelta obj1, TextAnnotationDelta obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TextAnnotationDelta obj1, TextAnnotationDelta obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TextAnnotationDelta o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.Json.g.cs deleted file mode 100644 index 2b1f7211..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class TextAnnotationDeltaDiscriminator - { - /// - /// 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::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextAnnotationDeltaDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.g.cs deleted file mode 100644 index d4d76ce3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDeltaDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class TextAnnotationDeltaDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TextAnnotationDeltaDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public TextAnnotationDeltaDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.Json.g.cs deleted file mode 100644 index e2097535..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class TextAnnotationDiscriminator - { - /// - /// 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::tryAGI.OpenAI.TextAnnotationDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TextAnnotationDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.TextAnnotationDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.TextAnnotationDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TextAnnotationDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextAnnotationDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.g.cs deleted file mode 100644 index a7c07456..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextAnnotationDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class TextAnnotationDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TextAnnotationDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public TextAnnotationDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextContent.g.cs index b2ceb51b..7f09971c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextContent.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class TextContent { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// Default Value: text /// @@ -23,6 +16,13 @@ public sealed partial class TextContent [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextContentTypeJsonConverter))] public global::tryAGI.OpenAI.TextContentType Type { get; set; } = global::tryAGI.OpenAI.TextContentType.Text; + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -32,10 +32,10 @@ public sealed partial class TextContent /// /// Initializes a new instance of the class. /// - /// /// /// Default Value: text /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfiguration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfiguration.g.cs index ae0401f0..ea6bf519 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfiguration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfiguration.g.cs @@ -8,7 +8,7 @@ namespace tryAGI.OpenAI /// An object specifying the format that the model must output.
/// Configuring `{ "type": "json_schema" }` enables Structured Outputs,
/// which ensures the model will match your supplied JSON schema. Learn more in the
- /// [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
+ /// [Structured Outputs guide](/docs/guides/structured-outputs).
/// The default format is `{ "type": "text" }` with no additional options.
/// **Not recommended for gpt-4o and newer models:**
/// Setting to `{ "type": "json_object" }` enables the older JSON mode, which
@@ -21,92 +21,91 @@ namespace tryAGI.OpenAI /// Default response format. Used to generate text responses. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFormatText? Value1 { get; init; } + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; init; } #else - public global::tryAGI.OpenAI.ResponseFormatText? Value1 { get; } + public global::tryAGI.OpenAI.ResponseFormatText? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsValue1 => Value1 != null; + public bool IsText => Text != null; /// - /// - /// - public static implicit operator TextResponseFormatConfiguration(global::tryAGI.OpenAI.ResponseFormatText value) => new TextResponseFormatConfiguration((global::tryAGI.OpenAI.ResponseFormatText?)value); - - /// - /// + /// JSON Schema response format. Used to generate structured JSON responses.
+ /// Learn more about [Structured Outputs](/docs/guides/structured-outputs). ///
- public static implicit operator global::tryAGI.OpenAI.ResponseFormatText?(TextResponseFormatConfiguration @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? JsonSchema { get; init; } +#else + public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? JsonSchema { get; } +#endif /// /// /// - public TextResponseFormatConfiguration(global::tryAGI.OpenAI.ResponseFormatText? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonSchema))] +#endif + public bool IsJsonSchema => JsonSchema != null; /// - /// JSON Schema response format. Used to generate structured JSON responses.
- /// Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + /// JSON object response format. An older method of generating JSON responses.
+ /// Using `json_schema` is recommended for models that support it. Note that the
+ /// model will not generate JSON without a system or user message instructing it
+ /// to do so. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? Value2 { get; init; } + public global::tryAGI.OpenAI.ResponseFormatJsonObject? JsonObject { get; init; } #else - public global::tryAGI.OpenAI.TextResponseFormatJsonSchema? Value2 { get; } + public global::tryAGI.OpenAI.ResponseFormatJsonObject? JsonObject { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonObject))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsJsonObject => JsonObject != null; /// /// /// - public static implicit operator TextResponseFormatConfiguration(global::tryAGI.OpenAI.TextResponseFormatJsonSchema value) => new TextResponseFormatConfiguration((global::tryAGI.OpenAI.TextResponseFormatJsonSchema?)value); + public static implicit operator TextResponseFormatConfiguration(global::tryAGI.OpenAI.ResponseFormatText value) => new TextResponseFormatConfiguration((global::tryAGI.OpenAI.ResponseFormatText?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.TextResponseFormatJsonSchema?(TextResponseFormatConfiguration @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.ResponseFormatText?(TextResponseFormatConfiguration @this) => @this.Text; /// /// /// - public TextResponseFormatConfiguration(global::tryAGI.OpenAI.TextResponseFormatJsonSchema? value) + public TextResponseFormatConfiguration(global::tryAGI.OpenAI.ResponseFormatText? value) { - Value2 = value; + Text = value; } /// - /// JSON object response format. An older method of generating JSON responses.
- /// Using `json_schema` is recommended for models that support it. Note that the
- /// model will not generate JSON without a system or user message instructing it
- /// to do so. + /// ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ResponseFormatJsonObject? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.ResponseFormatJsonObject? Value3 { get; } -#endif + public static implicit operator TextResponseFormatConfiguration(global::tryAGI.OpenAI.TextResponseFormatJsonSchema value) => new TextResponseFormatConfiguration((global::tryAGI.OpenAI.TextResponseFormatJsonSchema?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.TextResponseFormatJsonSchema?(TextResponseFormatConfiguration @this) => @this.JsonSchema; + + /// + /// + /// + public TextResponseFormatConfiguration(global::tryAGI.OpenAI.TextResponseFormatJsonSchema? value) + { + JsonSchema = value; + } /// /// @@ -116,46 +115,46 @@ public TextResponseFormatConfiguration(global::tryAGI.OpenAI.TextResponseFormatJ /// /// /// - public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonObject?(TextResponseFormatConfiguration @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.ResponseFormatJsonObject?(TextResponseFormatConfiguration @this) => @this.JsonObject; /// /// /// public TextResponseFormatConfiguration(global::tryAGI.OpenAI.ResponseFormatJsonObject? value) { - Value3 = value; + JsonObject = value; } /// /// /// public TextResponseFormatConfiguration( - global::tryAGI.OpenAI.ResponseFormatText? value1, - global::tryAGI.OpenAI.TextResponseFormatJsonSchema? value2, - global::tryAGI.OpenAI.ResponseFormatJsonObject? value3 + global::tryAGI.OpenAI.ResponseFormatText? text, + global::tryAGI.OpenAI.TextResponseFormatJsonSchema? jsonSchema, + global::tryAGI.OpenAI.ResponseFormatJsonObject? jsonObject ) { - Value1 = value1; - Value2 = value2; - Value3 = value3; + Text = text; + JsonSchema = jsonSchema; + JsonObject = jsonObject; } /// /// /// public object? Object => - Value3 as object ?? - Value2 as object ?? - Value1 as object + JsonObject as object ?? + JsonSchema as object ?? + Text as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() + Text?.ToString() ?? + JsonSchema?.ToString() ?? + JsonObject?.ToString() ; /// @@ -163,16 +162,16 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3; + return IsText && !IsJsonSchema && !IsJsonObject || !IsText && IsJsonSchema && !IsJsonObject || !IsText && !IsJsonSchema && IsJsonObject; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, + global::System.Func? text = null, + global::System.Func? jsonSchema = null, + global::System.Func? jsonObject = null, bool validate = true) { if (validate) @@ -180,17 +179,17 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsText && text != null) { - return value1(Value1!); + return text(Text!); } - else if (IsValue2 && value2 != null) + else if (IsJsonSchema && jsonSchema != null) { - return value2(Value2!); + return jsonSchema(JsonSchema!); } - else if (IsValue3 && value3 != null) + else if (IsJsonObject && jsonObject != null) { - return value3(Value3!); + return jsonObject(JsonObject!); } return default(TResult); @@ -200,9 +199,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, + global::System.Action? text = null, + global::System.Action? jsonSchema = null, + global::System.Action? jsonObject = null, bool validate = true) { if (validate) @@ -210,17 +209,17 @@ public void Match( Validate(); } - if (IsValue1) + if (IsText) { - value1?.Invoke(Value1!); + text?.Invoke(Text!); } - else if (IsValue2) + else if (IsJsonSchema) { - value2?.Invoke(Value2!); + jsonSchema?.Invoke(JsonSchema!); } - else if (IsValue3) + else if (IsJsonObject) { - value3?.Invoke(Value3!); + jsonObject?.Invoke(JsonObject!); } } @@ -231,11 +230,11 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Text, typeof(global::tryAGI.OpenAI.ResponseFormatText), - Value2, + JsonSchema, typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchema), - Value3, + JsonObject, typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), }; const int offset = unchecked((int)2166136261); @@ -253,9 +252,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(TextResponseFormatConfiguration 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(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonSchema, other.JsonSchema) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.Json.g.cs deleted file mode 100644 index a5298070..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class TextResponseFormatConfigurationDiscriminator - { - /// - /// 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::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextResponseFormatConfigurationDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.g.cs deleted file mode 100644 index 303aefe2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatConfigurationDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class TextResponseFormatConfigurationDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TextResponseFormatConfigurationDiscriminator( - string? type) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public TextResponseFormatConfigurationDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchema.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchema.g.cs index aeb6a962..4bb95d00 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchema.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchema.g.cs @@ -5,10 +5,17 @@ namespace tryAGI.OpenAI { /// /// JSON Schema response format. Used to generate structured JSON responses.
- /// Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs). + /// Learn more about [Structured Outputs](/docs/guides/structured-outputs). ///
public sealed partial class TextResponseFormatJsonSchema { + /// + /// The type of response format being defined. Always `json_schema`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatJsonSchemaTypeJsonConverter))] + public global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType Type { get; set; } + /// /// A description of what the response format is for, used by the model to
/// determine how to respond in the format. @@ -33,23 +40,11 @@ public sealed partial class TextResponseFormatJsonSchema public required object Schema { get; set; } /// - /// Whether to enable strict schema adherence when generating the output.
- /// If set to true, the model will always follow the exact schema defined
- /// in the `schema` field. Only a subset of JSON Schema is supported when
- /// `strict` is `true`. To learn more, read the [Structured Outputs
- /// guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// Default Value: false + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("strict")] public bool? Strict { get; set; } - /// - /// The type of response format being defined. Always `json_schema`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TextResponseFormatJsonSchemaTypeJsonConverter))] - public global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -59,6 +54,9 @@ public sealed partial class TextResponseFormatJsonSchema /// /// Initializes a new instance of the class. /// + /// + /// The type of response format being defined. Always `json_schema`. + /// /// /// A description of what the response format is for, used by the model to
/// determine how to respond in the format. @@ -71,32 +69,22 @@ public sealed partial class TextResponseFormatJsonSchema /// The schema for the response format, described as a JSON Schema object.
/// Learn how to build JSON schemas [here](https://json-schema.org/). /// - /// - /// Whether to enable strict schema adherence when generating the output.
- /// If set to true, the model will always follow the exact schema defined
- /// in the `schema` field. Only a subset of JSON Schema is supported when
- /// `strict` is `true`. To learn more, read the [Structured Outputs
- /// guide](https://platform.openai.com/docs/guides/structured-outputs).
- /// Default Value: false - /// - /// - /// The type of response format being defined. Always `json_schema`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TextResponseFormatJsonSchema( string name, object schema, + global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType type, string? description, - bool? strict, - global::tryAGI.OpenAI.TextResponseFormatJsonSchemaType type) + bool? strict) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Schema = schema ?? throw new global::System.ArgumentNullException(nameof(schema)); + this.Type = type; this.Description = description; this.Strict = strict; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.Json.g.cs new file mode 100644 index 00000000..b9ed5847 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TextResponseFormatJsonSchemaStrict + { + /// + /// 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::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict), + jsonSerializerContext) as global::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict; + } + + /// + /// 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::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TextResponseFormatJsonSchemaStrict; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.g.cs new file mode 100644 index 00000000..90333b1a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextResponseFormatJsonSchemaStrict.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TextResponseFormatJsonSchemaStrict + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.Json.g.cs new file mode 100644 index 00000000..16aebb4e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ThreadItem + { + /// + /// 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::tryAGI.OpenAI.ThreadItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadItem), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadItem?; + } + + /// + /// 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::tryAGI.OpenAI.ThreadItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadItem?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.g.cs new file mode 100644 index 00000000..384b064c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItem.g.cs @@ -0,0 +1,429 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct ThreadItem : global::System.IEquatable + { + /// + /// User-authored messages within a thread. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.UserMessageItem? ChatkitUserMessage { get; init; } +#else + public global::tryAGI.OpenAI.UserMessageItem? ChatkitUserMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitUserMessage))] +#endif + public bool IsChatkitUserMessage => ChatkitUserMessage != null; + + /// + /// Assistant-authored message within a thread. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.AssistantMessageItem? ChatkitAssistantMessage { get; init; } +#else + public global::tryAGI.OpenAI.AssistantMessageItem? ChatkitAssistantMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitAssistantMessage))] +#endif + public bool IsChatkitAssistantMessage => ChatkitAssistantMessage != null; + + /// + /// Thread item that renders a widget payload. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WidgetMessageItem? ChatkitWidget { get; init; } +#else + public global::tryAGI.OpenAI.WidgetMessageItem? ChatkitWidget { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitWidget))] +#endif + public bool IsChatkitWidget => ChatkitWidget != null; + + /// + /// Record of a client side tool invocation initiated by the assistant. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ClientToolCallItem? ChatkitClientToolCall { get; init; } +#else + public global::tryAGI.OpenAI.ClientToolCallItem? ChatkitClientToolCall { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitClientToolCall))] +#endif + public bool IsChatkitClientToolCall => ChatkitClientToolCall != null; + + /// + /// Task emitted by the workflow to show progress and status updates. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TaskItem? ChatkitTask { get; init; } +#else + public global::tryAGI.OpenAI.TaskItem? ChatkitTask { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitTask))] +#endif + public bool IsChatkitTask => ChatkitTask != null; + + /// + /// Collection of workflow tasks grouped together in the thread. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TaskGroupItem? ChatkitTaskGroup { get; init; } +#else + public global::tryAGI.OpenAI.TaskGroupItem? ChatkitTaskGroup { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatkitTaskGroup))] +#endif + public bool IsChatkitTaskGroup => ChatkitTaskGroup != null; + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.UserMessageItem value) => new ThreadItem((global::tryAGI.OpenAI.UserMessageItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.UserMessageItem?(ThreadItem @this) => @this.ChatkitUserMessage; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.UserMessageItem? value) + { + ChatkitUserMessage = value; + } + + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.AssistantMessageItem value) => new ThreadItem((global::tryAGI.OpenAI.AssistantMessageItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.AssistantMessageItem?(ThreadItem @this) => @this.ChatkitAssistantMessage; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.AssistantMessageItem? value) + { + ChatkitAssistantMessage = value; + } + + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.WidgetMessageItem value) => new ThreadItem((global::tryAGI.OpenAI.WidgetMessageItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.WidgetMessageItem?(ThreadItem @this) => @this.ChatkitWidget; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.WidgetMessageItem? value) + { + ChatkitWidget = value; + } + + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.ClientToolCallItem value) => new ThreadItem((global::tryAGI.OpenAI.ClientToolCallItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ClientToolCallItem?(ThreadItem @this) => @this.ChatkitClientToolCall; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.ClientToolCallItem? value) + { + ChatkitClientToolCall = value; + } + + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.TaskItem value) => new ThreadItem((global::tryAGI.OpenAI.TaskItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TaskItem?(ThreadItem @this) => @this.ChatkitTask; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.TaskItem? value) + { + ChatkitTask = value; + } + + /// + /// + /// + public static implicit operator ThreadItem(global::tryAGI.OpenAI.TaskGroupItem value) => new ThreadItem((global::tryAGI.OpenAI.TaskGroupItem?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TaskGroupItem?(ThreadItem @this) => @this.ChatkitTaskGroup; + + /// + /// + /// + public ThreadItem(global::tryAGI.OpenAI.TaskGroupItem? value) + { + ChatkitTaskGroup = value; + } + + /// + /// + /// + public ThreadItem( + global::tryAGI.OpenAI.UserMessageItem? chatkitUserMessage, + global::tryAGI.OpenAI.AssistantMessageItem? chatkitAssistantMessage, + global::tryAGI.OpenAI.WidgetMessageItem? chatkitWidget, + global::tryAGI.OpenAI.ClientToolCallItem? chatkitClientToolCall, + global::tryAGI.OpenAI.TaskItem? chatkitTask, + global::tryAGI.OpenAI.TaskGroupItem? chatkitTaskGroup + ) + { + ChatkitUserMessage = chatkitUserMessage; + ChatkitAssistantMessage = chatkitAssistantMessage; + ChatkitWidget = chatkitWidget; + ChatkitClientToolCall = chatkitClientToolCall; + ChatkitTask = chatkitTask; + ChatkitTaskGroup = chatkitTaskGroup; + } + + /// + /// + /// + public object? Object => + ChatkitTaskGroup as object ?? + ChatkitTask as object ?? + ChatkitClientToolCall as object ?? + ChatkitWidget as object ?? + ChatkitAssistantMessage as object ?? + ChatkitUserMessage as object + ; + + /// + /// + /// + public override string? ToString() => + ChatkitUserMessage?.ToString() ?? + ChatkitAssistantMessage?.ToString() ?? + ChatkitWidget?.ToString() ?? + ChatkitClientToolCall?.ToString() ?? + ChatkitTask?.ToString() ?? + ChatkitTaskGroup?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsChatkitUserMessage && !IsChatkitAssistantMessage && !IsChatkitWidget && !IsChatkitClientToolCall && !IsChatkitTask && !IsChatkitTaskGroup || !IsChatkitUserMessage && IsChatkitAssistantMessage && !IsChatkitWidget && !IsChatkitClientToolCall && !IsChatkitTask && !IsChatkitTaskGroup || !IsChatkitUserMessage && !IsChatkitAssistantMessage && IsChatkitWidget && !IsChatkitClientToolCall && !IsChatkitTask && !IsChatkitTaskGroup || !IsChatkitUserMessage && !IsChatkitAssistantMessage && !IsChatkitWidget && IsChatkitClientToolCall && !IsChatkitTask && !IsChatkitTaskGroup || !IsChatkitUserMessage && !IsChatkitAssistantMessage && !IsChatkitWidget && !IsChatkitClientToolCall && IsChatkitTask && !IsChatkitTaskGroup || !IsChatkitUserMessage && !IsChatkitAssistantMessage && !IsChatkitWidget && !IsChatkitClientToolCall && !IsChatkitTask && IsChatkitTaskGroup; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? chatkitUserMessage = null, + global::System.Func? chatkitAssistantMessage = null, + global::System.Func? chatkitWidget = null, + global::System.Func? chatkitClientToolCall = null, + global::System.Func? chatkitTask = null, + global::System.Func? chatkitTaskGroup = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsChatkitUserMessage && chatkitUserMessage != null) + { + return chatkitUserMessage(ChatkitUserMessage!); + } + else if (IsChatkitAssistantMessage && chatkitAssistantMessage != null) + { + return chatkitAssistantMessage(ChatkitAssistantMessage!); + } + else if (IsChatkitWidget && chatkitWidget != null) + { + return chatkitWidget(ChatkitWidget!); + } + else if (IsChatkitClientToolCall && chatkitClientToolCall != null) + { + return chatkitClientToolCall(ChatkitClientToolCall!); + } + else if (IsChatkitTask && chatkitTask != null) + { + return chatkitTask(ChatkitTask!); + } + else if (IsChatkitTaskGroup && chatkitTaskGroup != null) + { + return chatkitTaskGroup(ChatkitTaskGroup!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? chatkitUserMessage = null, + global::System.Action? chatkitAssistantMessage = null, + global::System.Action? chatkitWidget = null, + global::System.Action? chatkitClientToolCall = null, + global::System.Action? chatkitTask = null, + global::System.Action? chatkitTaskGroup = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsChatkitUserMessage) + { + chatkitUserMessage?.Invoke(ChatkitUserMessage!); + } + else if (IsChatkitAssistantMessage) + { + chatkitAssistantMessage?.Invoke(ChatkitAssistantMessage!); + } + else if (IsChatkitWidget) + { + chatkitWidget?.Invoke(ChatkitWidget!); + } + else if (IsChatkitClientToolCall) + { + chatkitClientToolCall?.Invoke(ChatkitClientToolCall!); + } + else if (IsChatkitTask) + { + chatkitTask?.Invoke(ChatkitTask!); + } + else if (IsChatkitTaskGroup) + { + chatkitTaskGroup?.Invoke(ChatkitTaskGroup!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ChatkitUserMessage, + typeof(global::tryAGI.OpenAI.UserMessageItem), + ChatkitAssistantMessage, + typeof(global::tryAGI.OpenAI.AssistantMessageItem), + ChatkitWidget, + typeof(global::tryAGI.OpenAI.WidgetMessageItem), + ChatkitClientToolCall, + typeof(global::tryAGI.OpenAI.ClientToolCallItem), + ChatkitTask, + typeof(global::tryAGI.OpenAI.TaskItem), + ChatkitTaskGroup, + typeof(global::tryAGI.OpenAI.TaskGroupItem), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ThreadItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitUserMessage, other.ChatkitUserMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitAssistantMessage, other.ChatkitAssistantMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitWidget, other.ChatkitWidget) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitClientToolCall, other.ChatkitClientToolCall) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitTask, other.ChatkitTask) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatkitTaskGroup, other.ChatkitTaskGroup) + ; + } + + /// + /// + /// + public static bool operator ==(ThreadItem obj1, ThreadItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ThreadItem obj1, ThreadItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ThreadItem o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.Json.g.cs new file mode 100644 index 00000000..e7e18900 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadItemDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ThreadItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadItemDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadItemDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ThreadItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadItemDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadItemDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.g.cs new file mode 100644 index 00000000..8d0facee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadItemDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadItemDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.Json.g.cs new file mode 100644 index 00000000..7471b3ee --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadItemListResource + { + /// + /// 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::tryAGI.OpenAI.ThreadItemListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadItemListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadItemListResource; + } + + /// + /// 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::tryAGI.OpenAI.ThreadItemListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadItemListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadItemListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.g.cs new file mode 100644 index 00000000..08446d07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResource.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A paginated list of thread items rendered for the ChatKit API. + /// + public sealed partial class ThreadItemListResource + { + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.ThreadItemListResourceObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ThreadItemListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ThreadItemListResourceObject Object { get; set; } = global::tryAGI.OpenAI.ThreadItemListResourceObject.List; + + /// + /// A list of items + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? LastId { get; set; } + + /// + /// Whether there are more items available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + /// + /// + /// A list of items + /// + /// + /// + /// + /// Whether there are more items available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadItemListResource( + global::System.Collections.Generic.IList data, + string? firstId, + string? lastId, + bool hasMore, + global::tryAGI.OpenAI.ThreadItemListResourceObject @object = global::tryAGI.OpenAI.ThreadItemListResourceObject.List) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); + this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadItemListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..bd2338b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadItemListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.ThreadItemListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadItemListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadItemListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.ThreadItemListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadItemListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadItemListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.g.cs new file mode 100644 index 00000000..27f975a8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadItemListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.Json.g.cs new file mode 100644 index 00000000..1cd4edd6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadItemListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.ThreadItemListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadItemListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadItemListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.ThreadItemListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadItemListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadItemListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.g.cs new file mode 100644 index 00000000..41da8cd9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadItemListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceObject.g.cs new file mode 100644 index 00000000..7d8bf53a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadItemListResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ public enum ThreadItemListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ThreadItemListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ThreadItemListResourceObject value) + { + return value switch + { + ThreadItemListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ThreadItemListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => ThreadItemListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.Json.g.cs new file mode 100644 index 00000000..a43eb567 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadListResource + { + /// + /// 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::tryAGI.OpenAI.ThreadListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadListResource; + } + + /// + /// 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::tryAGI.OpenAI.ThreadListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.g.cs new file mode 100644 index 00000000..7e7c9037 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResource.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A paginated list of ChatKit threads. + /// + public sealed partial class ThreadListResource + { + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.ThreadListResourceObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ThreadListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ThreadListResourceObject Object { get; set; } = global::tryAGI.OpenAI.ThreadListResourceObject.List; + + /// + /// A list of items + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? LastId { get; set; } + + /// + /// Whether there are more items available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + /// + /// + /// A list of items + /// + /// + /// + /// + /// Whether there are more items available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadListResource( + global::System.Collections.Generic.IList data, + string? firstId, + string? lastId, + bool hasMore, + global::tryAGI.OpenAI.ThreadListResourceObject @object = global::tryAGI.OpenAI.ThreadListResourceObject.List) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); + this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..1f81b434 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.ThreadListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.ThreadListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.g.cs new file mode 100644 index 00000000..944ff19d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.Json.g.cs new file mode 100644 index 00000000..b67b5230 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.ThreadListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.ThreadListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.g.cs new file mode 100644 index 00000000..b36af106 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceObject.g.cs new file mode 100644 index 00000000..53ce9066 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadListResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ public enum ThreadListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ThreadListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ThreadListResourceObject value) + { + return value switch + { + ThreadListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ThreadListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => ThreadListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObject.g.cs index 79014c6c..f68a9e32 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObject.g.cs @@ -4,18 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). + /// Represents a thread that contains [messages](/docs/api-reference/messages). /// public sealed partial class ThreadObject { - /// - /// The Unix timestamp (in seconds) for when the thread was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - /// /// The identifier, which can be referenced in API endpoints. /// @@ -23,17 +15,6 @@ public sealed partial class ThreadObject [global::System.Text.Json.Serialization.JsonRequired] public required string Id { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } - /// /// The object type, which is always `thread`. /// @@ -42,11 +23,26 @@ public sealed partial class ThreadObject public global::tryAGI.OpenAI.ThreadObjectObject Object { get; set; } /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// The Unix timestamp (in seconds) for when the thread was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ThreadObjectToolResources? ToolResources { get; set; } + public required global::tryAGI.OpenAI.ThreadObjectToolResources2? ToolResources { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -57,39 +53,31 @@ public sealed partial class ThreadObject /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the thread was created. - /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The object type, which is always `thread`. /// - /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// + /// The Unix timestamp (in seconds) for when the thread was created. /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ThreadObject( - global::System.DateTimeOffset createdAt, string id, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.ThreadObjectToolResources2? toolResources, global::System.Collections.Generic.Dictionary? metadata, - global::tryAGI.OpenAI.ThreadObjectToolResources? toolResources, global::tryAGI.OpenAI.ThreadObjectObject @object) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.CreatedAt = createdAt; this.ToolResources = toolResources ?? throw new global::System.ArgumentNullException(nameof(toolResources)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources.g.cs index d7cf89ce..14c7a7af 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources.g.cs @@ -4,49 +4,15 @@ namespace tryAGI.OpenAI { /// - /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// /// public sealed partial class ThreadObjectToolResources { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] - public global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? CodeInterpreter { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? FileSearch { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ThreadObjectToolResources( - global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? codeInterpreter, - global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? fileSearch) - { - this.CodeInterpreter = codeInterpreter; - this.FileSearch = fileSearch; - } - - /// - /// Initializes a new instance of the class. - /// - public ThreadObjectToolResources() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.Json.g.cs new file mode 100644 index 00000000..428ac866 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadObjectToolResources2 + { + /// + /// 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::tryAGI.OpenAI.ThreadObjectToolResources2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadObjectToolResources2), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadObjectToolResources2; + } + + /// + /// 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::tryAGI.OpenAI.ThreadObjectToolResources2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadObjectToolResources2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadObjectToolResources2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.g.cs new file mode 100644 index 00000000..da327fad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResources2.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A set of resources that are made available to the assistant's tools in this thread. 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. + /// + public sealed partial class ThreadObjectToolResources2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code_interpreter")] + public global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? CodeInterpreter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] + public global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? FileSearch { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadObjectToolResources2( + global::tryAGI.OpenAI.ThreadObjectToolResourcesCodeInterpreter? codeInterpreter, + global::tryAGI.OpenAI.ThreadObjectToolResourcesFileSearch? fileSearch) + { + this.CodeInterpreter = codeInterpreter; + this.FileSearch = fileSearch; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadObjectToolResources2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesCodeInterpreter.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesCodeInterpreter.g.cs index 12e9ebca..9a353fda 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesCodeInterpreter.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesCodeInterpreter.g.cs @@ -9,7 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class ThreadObjectToolResourcesCodeInterpreter { /// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] ///
[global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] public global::System.Collections.Generic.IList? FileIds { get; set; } @@ -24,7 +25,8 @@ public sealed partial class ThreadObjectToolResourcesCodeInterpreter /// Initializes a new instance of the class. ///
/// - /// A list of [file](https://platform.openai.com/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + /// A list of [file](/docs/api-reference/files) IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
+ /// Default Value: [] /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesFileSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesFileSearch.g.cs index 950f2c4b..447ae84b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesFileSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadObjectToolResourcesFileSearch.g.cs @@ -9,7 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class ThreadObjectToolResourcesFileSearch { /// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_ids")] public global::System.Collections.Generic.IList? VectorStoreIds { get; set; } @@ -24,7 +24,7 @@ public sealed partial class ThreadObjectToolResourcesFileSearch /// Initializes a new instance of the class. ///
/// - /// The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. + /// The [vector store](/docs/api-reference/vector-stores/object) attached to this thread. There can be a maximum of 1 vector store attached to the thread. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.Json.g.cs new file mode 100644 index 00000000..d5d5a5b5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadResource + { + /// + /// 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::tryAGI.OpenAI.ThreadResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadResource), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadResource; + } + + /// + /// 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::tryAGI.OpenAI.ThreadResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.g.cs new file mode 100644 index 00000000..0cd8e30f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResource.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Represents a ChatKit thread and its current status.
+ /// Example: {"id":"cthr_def456","object":"chatkit.thread","created_at":1712345600,"title":"Demo feedback","status":{"type":"active"},"user":"user_456"} + ///
+ public sealed partial class ThreadResource + { + /// + /// Identifier of the thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread`.
+ /// Default Value: chatkit.thread + ///
+ /// global::tryAGI.OpenAI.ThreadResourceObject.ChatkitThread + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ThreadResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.ThreadResourceObject Object { get; set; } = global::tryAGI.OpenAI.ThreadResourceObject.ChatkitThread; + + /// + /// Unix timestamp (in seconds) for when the thread was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Title { get; set; } + + /// + /// Current status for the thread. Defaults to `active` for newly created threads. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.StatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Status Status { get; set; } + + /// + /// Free-form string that identifies your end user who owns the thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string User { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread. + /// + /// + /// Type discriminator that is always `chatkit.thread`.
+ /// Default Value: chatkit.thread + /// + /// + /// Unix timestamp (in seconds) for when the thread was created. + /// + /// + /// + /// Current status for the thread. Defaults to `active` for newly created threads. + /// + /// + /// Free-form string that identifies your end user who owns the thread. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadResource( + string id, + global::System.DateTimeOffset createdAt, + string? title, + global::tryAGI.OpenAI.Status status, + string user, + global::tryAGI.OpenAI.ThreadResourceObject @object = global::tryAGI.OpenAI.ThreadResourceObject.ChatkitThread) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); + this.Status = status; + this.User = user ?? throw new global::System.ArgumentNullException(nameof(user)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceObject.g.cs new file mode 100644 index 00000000..710e5fb9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread`.
+ /// Default Value: chatkit.thread + ///
+ public enum ThreadResourceObject + { + /// + /// + /// + ChatkitThread, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ThreadResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ThreadResourceObject value) + { + return value switch + { + ThreadResourceObject.ChatkitThread => "chatkit.thread", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ThreadResourceObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread" => ThreadResourceObject.ChatkitThread, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.Json.g.cs new file mode 100644 index 00000000..ca917187 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadResourceStatusDiscriminator + { + /// + /// 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::tryAGI.OpenAI.ThreadResourceStatusDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadResourceStatusDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadResourceStatusDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.ThreadResourceStatusDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadResourceStatusDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadResourceStatusDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.g.cs new file mode 100644 index 00000000..d098cca8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceStatusDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadResourceStatusDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ThreadResourceStatusDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ThreadResourceStatusDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.Json.g.cs new file mode 100644 index 00000000..bdb5d854 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ThreadResourceTitle + { + /// + /// 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::tryAGI.OpenAI.ThreadResourceTitle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ThreadResourceTitle), + jsonSerializerContext) as global::tryAGI.OpenAI.ThreadResourceTitle; + } + + /// + /// 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::tryAGI.OpenAI.ThreadResourceTitle? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ThreadResourceTitle), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadResourceTitle; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.g.cs new file mode 100644 index 00000000..01fedc14 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadResourceTitle.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ThreadResourceTitle + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEvent.g.cs index 0fb96ae8..5b8bd52f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEvent.g.cs @@ -10,7 +10,7 @@ namespace tryAGI.OpenAI public readonly partial struct ThreadStreamEvent : global::System.IEquatable { /// - /// Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. /// #if NET6_0_OR_GREATER public global::tryAGI.OpenAI.ThreadStreamEventVariant1? Value1 { get; init; } @@ -25,7 +25,6 @@ namespace tryAGI.OpenAI [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] #endif public bool IsValue1 => Value1 != null; - /// /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.Json.g.cs deleted file mode 100644 index 345244d2..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class ThreadStreamEventDiscriminator - { - /// - /// 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::tryAGI.OpenAI.ThreadStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ThreadStreamEventDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.ThreadStreamEventDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.ThreadStreamEventDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ThreadStreamEventDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ThreadStreamEventDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.g.cs deleted file mode 100644 index d93d9bf6..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class ThreadStreamEventDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("event")] - public string? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ThreadStreamEventDiscriminator( - string? @event) - { - this.Event = @event; - } - - /// - /// Initializes a new instance of the class. - /// - public ThreadStreamEventDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventVariant1.g.cs index 90955aff..84e07f0d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventVariant1.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ThreadStreamEventVariant1.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is created. + /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. /// public sealed partial class ThreadStreamEventVariant1 { - /// - /// Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.ThreadObject Data { get; set; } - /// /// Whether to enable input audio transcription. /// @@ -28,6 +21,13 @@ public sealed partial class ThreadStreamEventVariant1 [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ThreadStreamEventVariant1EventJsonConverter))] public global::tryAGI.OpenAI.ThreadStreamEventVariant1Event Event { get; set; } + /// + /// Represents a thread that contains [messages](/docs/api-reference/messages). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ThreadObject Data { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,13 +37,13 @@ public sealed partial class ThreadStreamEventVariant1 /// /// Initializes a new instance of the class. /// - /// - /// Represents a thread that contains [messages](https://platform.openai.com/docs/api-reference/messages). - /// /// /// Whether to enable input audio transcription. /// /// + /// + /// Represents a thread that contains [messages](/docs/api-reference/messages). + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.Json.g.cs new file mode 100644 index 00000000..ed5d7798 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBody + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBody), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBody; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.g.cs new file mode 100644 index 00000000..74499391 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBody.g.cs @@ -0,0 +1,138 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public global::tryAGI.OpenAI.OneOf>? Input { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("previous_response_id")] + public string? PreviousResponseId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public global::tryAGI.OpenAI.ResponseTextParam? Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reasoning")] + public global::tryAGI.OpenAI.Reasoning? Reasoning { get; set; } + + /// + /// The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("truncation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TruncationEnumJsonConverter))] + public global::tryAGI.OpenAI.TruncationEnum? Truncation { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("instructions")] + public string? Instructions { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] + public global::tryAGI.OpenAI.ConversationParam? Conversation { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + public global::tryAGI.OpenAI.ToolChoiceParam? ToolChoice { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parallel_tool_calls")] + public bool? ParallelToolCalls { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error. + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TokenCountsBody( + string? model, + global::tryAGI.OpenAI.OneOf>? input, + string? previousResponseId, + global::System.Collections.Generic.IList? tools, + global::tryAGI.OpenAI.ResponseTextParam? text, + global::tryAGI.OpenAI.Reasoning? reasoning, + global::tryAGI.OpenAI.TruncationEnum? truncation, + string? instructions, + global::tryAGI.OpenAI.ConversationParam? conversation, + global::tryAGI.OpenAI.ToolChoiceParam? toolChoice, + bool? parallelToolCalls) + { + this.Model = model; + this.Input = input; + this.PreviousResponseId = previousResponseId; + this.Tools = tools; + this.Text = text; + this.Reasoning = reasoning; + this.Truncation = truncation; + this.Instructions = instructions; + this.Conversation = conversation; + this.ToolChoice = toolChoice; + this.ParallelToolCalls = parallelToolCalls; + } + + /// + /// Initializes a new instance of the class. + /// + public TokenCountsBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.Json.g.cs new file mode 100644 index 00000000..e1b5f29b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyConversation + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyConversation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyConversation), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyConversation; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyConversation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyConversation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyConversation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.g.cs new file mode 100644 index 00000000..b14bd78b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyConversation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyConversation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.Json.g.cs new file mode 100644 index 00000000..b4d21971 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyInput + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyInput), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyInput; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyInput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyInput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.g.cs new file mode 100644 index 00000000..cc6f4930 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyInput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.Json.g.cs new file mode 100644 index 00000000..579f847f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyInstructions + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyInstructions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyInstructions), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyInstructions; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyInstructions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyInstructions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyInstructions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.g.cs new file mode 100644 index 00000000..60fb32ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyInstructions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyInstructions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.Json.g.cs new file mode 100644 index 00000000..78b228e2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyModel + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyModel), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyModel; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.g.cs new file mode 100644 index 00000000..4b1482fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.Json.g.cs new file mode 100644 index 00000000..66ef8012 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyParallelToolCalls + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyParallelToolCalls; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.g.cs new file mode 100644 index 00000000..2595e7d5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyParallelToolCalls.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyParallelToolCalls + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.Json.g.cs new file mode 100644 index 00000000..20f77faa --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyPreviousResponseId + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyPreviousResponseId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.g.cs new file mode 100644 index 00000000..fcb65a1d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyPreviousResponseId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyPreviousResponseId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.Json.g.cs new file mode 100644 index 00000000..e9d18259 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyReasoning + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyReasoning? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyReasoning), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyReasoning; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyReasoning? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyReasoning), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyReasoning; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.g.cs new file mode 100644 index 00000000..f5563007 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyReasoning.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyReasoning + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.Json.g.cs new file mode 100644 index 00000000..d68b2bef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyText + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyText), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyText; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.g.cs new file mode 100644 index 00000000..19ebe577 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyText.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyText + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.Json.g.cs new file mode 100644 index 00000000..d3674e23 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyToolChoice + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyToolChoice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyToolChoice), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyToolChoice; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyToolChoice? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyToolChoice), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyToolChoice; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.g.cs new file mode 100644 index 00000000..c006e161 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyToolChoice.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyToolChoice + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.Json.g.cs new file mode 100644 index 00000000..89b418ce --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsBodyTools + { + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyTools? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsBodyTools), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsBodyTools; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsBodyTools? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsBodyTools), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsBodyTools; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.g.cs new file mode 100644 index 00000000..6b54b38d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsBodyTools.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TokenCountsBodyTools + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.Json.g.cs new file mode 100644 index 00000000..584072be --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TokenCountsResource + { + /// + /// 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::tryAGI.OpenAI.TokenCountsResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TokenCountsResource), + jsonSerializerContext) as global::tryAGI.OpenAI.TokenCountsResource; + } + + /// + /// 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::tryAGI.OpenAI.TokenCountsResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TokenCountsResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TokenCountsResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.g.cs new file mode 100644 index 00000000..7c52f380 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResource.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Example: {"object":"response.input_tokens","input_tokens":123} + /// + public sealed partial class TokenCountsResource + { + /// + /// Default Value: response.input_tokens + /// + /// global::tryAGI.OpenAI.TokenCountsResourceObject.ResponseInputTokens + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TokenCountsResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.TokenCountsResourceObject Object { get; set; } = global::tryAGI.OpenAI.TokenCountsResourceObject.ResponseInputTokens; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: response.input_tokens + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TokenCountsResource( + int inputTokens, + global::tryAGI.OpenAI.TokenCountsResourceObject @object = global::tryAGI.OpenAI.TokenCountsResourceObject.ResponseInputTokens) + { + this.InputTokens = inputTokens; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public TokenCountsResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResourceObject.g.cs new file mode 100644 index 00000000..53129aae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TokenCountsResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: response.input_tokens + /// + public enum TokenCountsResourceObject + { + /// + /// + /// + ResponseInputTokens, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TokenCountsResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TokenCountsResourceObject value) + { + return value switch + { + TokenCountsResourceObject.ResponseInputTokens => "response.input_tokens", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TokenCountsResourceObject? ToEnum(string value) + { + return value switch + { + "response.input_tokens" => TokenCountsResourceObject.ResponseInputTokens, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Tool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Tool.g.cs index 6201ff0a..3b00816b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Tool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Tool.g.cs @@ -27,322 +27,477 @@ namespace tryAGI.OpenAI public bool IsFunction => Function != null; /// - /// + /// A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). /// - public static implicit operator Tool(global::tryAGI.OpenAI.FunctionTool value) => new Tool((global::tryAGI.OpenAI.FunctionTool?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FileSearchTool? FileSearch { get; init; } +#else + public global::tryAGI.OpenAI.FileSearchTool? FileSearch { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FunctionTool?(Tool @this) => @this.Function; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] +#endif + public bool IsFileSearch => FileSearch != null; + + /// + /// A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ComputerTool? Computer { get; init; } +#else + public global::tryAGI.OpenAI.ComputerTool? Computer { get; } +#endif /// /// /// - public Tool(global::tryAGI.OpenAI.FunctionTool? value) - { - Function = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Computer))] +#endif + public bool IsComputer => Computer != null; /// - /// A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). + /// A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.FileSearchTool? FileSearch { get; init; } + public global::tryAGI.OpenAI.ComputerUsePreviewTool? ComputerUsePreview { get; init; } #else - public global::tryAGI.OpenAI.FileSearchTool? FileSearch { get; } + public global::tryAGI.OpenAI.ComputerUsePreviewTool? ComputerUsePreview { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerUsePreview))] #endif - public bool IsFileSearch => FileSearch != null; + public bool IsComputerUsePreview => ComputerUsePreview != null; /// - /// + /// Search the Internet for sources related to the prompt. Learn more about the
+ /// [web search tool](/docs/guides/tools-web-search). ///
- public static implicit operator Tool(global::tryAGI.OpenAI.FileSearchTool value) => new Tool((global::tryAGI.OpenAI.FileSearchTool?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchTool? WebSearch { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchTool? WebSearch { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.FileSearchTool?(Tool @this) => @this.FileSearch; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearch))] +#endif + public bool IsWebSearch => WebSearch != null; + + /// + /// Give the model access to additional tools via remote Model Context Protocol
+ /// (MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.MCPTool? Mcp { get; init; } +#else + public global::tryAGI.OpenAI.MCPTool? Mcp { get; } +#endif /// /// /// - public Tool(global::tryAGI.OpenAI.FileSearchTool? value) - { - FileSearch = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Mcp))] +#endif + public bool IsMcp => Mcp != null; /// - /// A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + /// A tool that runs Python code to help generate a response to a prompt. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ComputerUsePreviewTool? ComputerUsePreview { get; init; } + public global::tryAGI.OpenAI.CodeInterpreterTool? CodeInterpreter { get; init; } #else - public global::tryAGI.OpenAI.ComputerUsePreviewTool? ComputerUsePreview { get; } + public global::tryAGI.OpenAI.CodeInterpreterTool? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ComputerUsePreview))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] +#endif + public bool IsCodeInterpreter => CodeInterpreter != null; + + /// + /// A tool that generates images using the GPT image models. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ImageGenTool? ImageGeneration { get; init; } +#else + public global::tryAGI.OpenAI.ImageGenTool? ImageGeneration { get; } #endif - public bool IsComputerUsePreview => ComputerUsePreview != null; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.ComputerUsePreviewTool value) => new Tool((global::tryAGI.OpenAI.ComputerUsePreviewTool?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGeneration))] +#endif + public bool IsImageGeneration => ImageGeneration != null; + + /// + /// A tool that allows the model to execute shell commands in a local environment. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.LocalShellToolParam? LocalShell { get; init; } +#else + public global::tryAGI.OpenAI.LocalShellToolParam? LocalShell { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.ComputerUsePreviewTool?(Tool @this) => @this.ComputerUsePreview; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShell))] +#endif + public bool IsLocalShell => LocalShell != null; + + /// + /// A tool that allows the model to execute shell commands. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionShellToolParam? Shell { get; init; } +#else + public global::tryAGI.OpenAI.FunctionShellToolParam? Shell { get; } +#endif /// /// /// - public Tool(global::tryAGI.OpenAI.ComputerUsePreviewTool? value) - { - ComputerUsePreview = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Shell))] +#endif + public bool IsShell => Shell != null; /// - /// Search the Internet for sources related to the prompt. Learn more about the
- /// [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + /// A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchTool? WebSearch { get; init; } + public global::tryAGI.OpenAI.CustomToolParam? Custom { get; init; } #else - public global::tryAGI.OpenAI.WebSearchTool? WebSearch { get; } + public global::tryAGI.OpenAI.CustomToolParam? Custom { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] +#endif + public bool IsCustom => Custom != null; + + /// + /// Groups function/custom tools under a shared namespace. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.NamespaceToolParam? Namespace { get; init; } +#else + public global::tryAGI.OpenAI.NamespaceToolParam? Namespace { get; } #endif - public bool IsWebSearch => WebSearch != null; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.WebSearchTool value) => new Tool((global::tryAGI.OpenAI.WebSearchTool?)value); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Namespace))] +#endif + public bool IsNamespace => Namespace != null; + + /// + /// Hosted or BYOT tool search configuration for deferred tools. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolSearchToolParam? ToolSearch { get; init; } +#else + public global::tryAGI.OpenAI.ToolSearchToolParam? ToolSearch { get; } +#endif /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchTool?(Tool @this) => @this.WebSearch; +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolSearch))] +#endif + public bool IsToolSearch => ToolSearch != null; + + /// + /// This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchPreviewTool? WebSearchPreview { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchPreviewTool? WebSearchPreview { get; } +#endif /// /// /// - public Tool(global::tryAGI.OpenAI.WebSearchTool? value) - { - WebSearch = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchPreview))] +#endif + public bool IsWebSearchPreview => WebSearchPreview != null; /// - /// Give the model access to additional tools via remote Model Context Protocol
- /// (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + /// Allows the assistant to create, delete, or update files using unified diffs. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPTool? MCP { get; init; } + public global::tryAGI.OpenAI.ApplyPatchToolParam? ApplyPatch { get; init; } #else - public global::tryAGI.OpenAI.MCPTool? MCP { get; } + public global::tryAGI.OpenAI.ApplyPatchToolParam? ApplyPatch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCP))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApplyPatch))] #endif - public bool IsMCP => MCP != null; + public bool IsApplyPatch => ApplyPatch != null; + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.FunctionTool value) => new Tool((global::tryAGI.OpenAI.FunctionTool?)value); /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.MCPTool value) => new Tool((global::tryAGI.OpenAI.MCPTool?)value); + public static implicit operator global::tryAGI.OpenAI.FunctionTool?(Tool @this) => @this.Function; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.FunctionTool? value) + { + Function = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.MCPTool?(Tool @this) => @this.MCP; + public static implicit operator Tool(global::tryAGI.OpenAI.FileSearchTool value) => new Tool((global::tryAGI.OpenAI.FileSearchTool?)value); /// /// /// - public Tool(global::tryAGI.OpenAI.MCPTool? value) + public static implicit operator global::tryAGI.OpenAI.FileSearchTool?(Tool @this) => @this.FileSearch; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.FileSearchTool? value) { - MCP = value; + FileSearch = value; } /// - /// A tool that runs Python code to help generate a response to a prompt. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CodeInterpreterTool? CodeInterpreter { get; init; } -#else - public global::tryAGI.OpenAI.CodeInterpreterTool? CodeInterpreter { get; } -#endif + public static implicit operator Tool(global::tryAGI.OpenAI.ComputerTool value) => new Tool((global::tryAGI.OpenAI.ComputerTool?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] -#endif - public bool IsCodeInterpreter => CodeInterpreter != null; + public static implicit operator global::tryAGI.OpenAI.ComputerTool?(Tool @this) => @this.Computer; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.CodeInterpreterTool value) => new Tool((global::tryAGI.OpenAI.CodeInterpreterTool?)value); + public Tool(global::tryAGI.OpenAI.ComputerTool? value) + { + Computer = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.CodeInterpreterTool?(Tool @this) => @this.CodeInterpreter; + public static implicit operator Tool(global::tryAGI.OpenAI.ComputerUsePreviewTool value) => new Tool((global::tryAGI.OpenAI.ComputerUsePreviewTool?)value); /// /// /// - public Tool(global::tryAGI.OpenAI.CodeInterpreterTool? value) + public static implicit operator global::tryAGI.OpenAI.ComputerUsePreviewTool?(Tool @this) => @this.ComputerUsePreview; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.ComputerUsePreviewTool? value) { - CodeInterpreter = value; + ComputerUsePreview = value; } /// - /// A tool that generates images using a model like `gpt-image-1`. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ImageGenTool? ImageGen { get; init; } -#else - public global::tryAGI.OpenAI.ImageGenTool? ImageGen { get; } -#endif + public static implicit operator Tool(global::tryAGI.OpenAI.WebSearchTool value) => new Tool((global::tryAGI.OpenAI.WebSearchTool?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageGen))] -#endif - public bool IsImageGen => ImageGen != null; + public static implicit operator global::tryAGI.OpenAI.WebSearchTool?(Tool @this) => @this.WebSearch; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.ImageGenTool value) => new Tool((global::tryAGI.OpenAI.ImageGenTool?)value); + public Tool(global::tryAGI.OpenAI.WebSearchTool? value) + { + WebSearch = value; + } /// /// /// - public static implicit operator global::tryAGI.OpenAI.ImageGenTool?(Tool @this) => @this.ImageGen; + public static implicit operator Tool(global::tryAGI.OpenAI.MCPTool value) => new Tool((global::tryAGI.OpenAI.MCPTool?)value); /// /// /// - public Tool(global::tryAGI.OpenAI.ImageGenTool? value) + public static implicit operator global::tryAGI.OpenAI.MCPTool?(Tool @this) => @this.Mcp; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.MCPTool? value) { - ImageGen = value; + Mcp = value; } /// - /// A tool that allows the model to execute shell commands in a local environment. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.LocalShellTool? LocalShell { get; init; } -#else - public global::tryAGI.OpenAI.LocalShellTool? LocalShell { get; } -#endif + public static implicit operator Tool(global::tryAGI.OpenAI.CodeInterpreterTool value) => new Tool((global::tryAGI.OpenAI.CodeInterpreterTool?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LocalShell))] -#endif - public bool IsLocalShell => LocalShell != null; + public static implicit operator global::tryAGI.OpenAI.CodeInterpreterTool?(Tool @this) => @this.CodeInterpreter; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.LocalShellTool value) => new Tool((global::tryAGI.OpenAI.LocalShellTool?)value); + public Tool(global::tryAGI.OpenAI.CodeInterpreterTool? value) + { + CodeInterpreter = value; + } + + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.ImageGenTool value) => new Tool((global::tryAGI.OpenAI.ImageGenTool?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.LocalShellTool?(Tool @this) => @this.LocalShell; + public static implicit operator global::tryAGI.OpenAI.ImageGenTool?(Tool @this) => @this.ImageGeneration; /// /// /// - public Tool(global::tryAGI.OpenAI.LocalShellTool? value) + public Tool(global::tryAGI.OpenAI.ImageGenTool? value) + { + ImageGeneration = value; + } + + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.LocalShellToolParam value) => new Tool((global::tryAGI.OpenAI.LocalShellToolParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.LocalShellToolParam?(Tool @this) => @this.LocalShell; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.LocalShellToolParam? value) { LocalShell = value; } /// - /// A custom tool that processes input using a specified format. Learn more about
- /// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools). + /// ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomTool? Custom { get; init; } -#else - public global::tryAGI.OpenAI.CustomTool? Custom { get; } -#endif + public static implicit operator Tool(global::tryAGI.OpenAI.FunctionShellToolParam value) => new Tool((global::tryAGI.OpenAI.FunctionShellToolParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] -#endif - public bool IsCustom => Custom != null; + public static implicit operator global::tryAGI.OpenAI.FunctionShellToolParam?(Tool @this) => @this.Shell; /// /// /// - public static implicit operator Tool(global::tryAGI.OpenAI.CustomTool value) => new Tool((global::tryAGI.OpenAI.CustomTool?)value); + public Tool(global::tryAGI.OpenAI.FunctionShellToolParam? value) + { + Shell = value; + } + + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.CustomToolParam value) => new Tool((global::tryAGI.OpenAI.CustomToolParam?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.CustomTool?(Tool @this) => @this.Custom; + public static implicit operator global::tryAGI.OpenAI.CustomToolParam?(Tool @this) => @this.Custom; /// /// /// - public Tool(global::tryAGI.OpenAI.CustomTool? value) + public Tool(global::tryAGI.OpenAI.CustomToolParam? value) { Custom = value; } /// - /// This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchPreviewTool? WebSearchPreview { get; init; } -#else - public global::tryAGI.OpenAI.WebSearchPreviewTool? WebSearchPreview { get; } -#endif + public static implicit operator Tool(global::tryAGI.OpenAI.NamespaceToolParam value) => new Tool((global::tryAGI.OpenAI.NamespaceToolParam?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearchPreview))] -#endif - public bool IsWebSearchPreview => WebSearchPreview != null; + public static implicit operator global::tryAGI.OpenAI.NamespaceToolParam?(Tool @this) => @this.Namespace; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.NamespaceToolParam? value) + { + Namespace = value; + } + + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.ToolSearchToolParam value) => new Tool((global::tryAGI.OpenAI.ToolSearchToolParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolSearchToolParam?(Tool @this) => @this.ToolSearch; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.ToolSearchToolParam? value) + { + ToolSearch = value; + } /// /// @@ -362,46 +517,79 @@ public Tool(global::tryAGI.OpenAI.WebSearchPreviewTool? value) WebSearchPreview = value; } + /// + /// + /// + public static implicit operator Tool(global::tryAGI.OpenAI.ApplyPatchToolParam value) => new Tool((global::tryAGI.OpenAI.ApplyPatchToolParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ApplyPatchToolParam?(Tool @this) => @this.ApplyPatch; + + /// + /// + /// + public Tool(global::tryAGI.OpenAI.ApplyPatchToolParam? value) + { + ApplyPatch = value; + } + /// /// /// public Tool( global::tryAGI.OpenAI.FunctionTool? function, global::tryAGI.OpenAI.FileSearchTool? fileSearch, + global::tryAGI.OpenAI.ComputerTool? computer, global::tryAGI.OpenAI.ComputerUsePreviewTool? computerUsePreview, global::tryAGI.OpenAI.WebSearchTool? webSearch, - global::tryAGI.OpenAI.MCPTool? mCP, + global::tryAGI.OpenAI.MCPTool? mcp, global::tryAGI.OpenAI.CodeInterpreterTool? codeInterpreter, - global::tryAGI.OpenAI.ImageGenTool? imageGen, - global::tryAGI.OpenAI.LocalShellTool? localShell, - global::tryAGI.OpenAI.CustomTool? custom, - global::tryAGI.OpenAI.WebSearchPreviewTool? webSearchPreview + global::tryAGI.OpenAI.ImageGenTool? imageGeneration, + global::tryAGI.OpenAI.LocalShellToolParam? localShell, + global::tryAGI.OpenAI.FunctionShellToolParam? shell, + global::tryAGI.OpenAI.CustomToolParam? custom, + global::tryAGI.OpenAI.NamespaceToolParam? @namespace, + global::tryAGI.OpenAI.ToolSearchToolParam? toolSearch, + global::tryAGI.OpenAI.WebSearchPreviewTool? webSearchPreview, + global::tryAGI.OpenAI.ApplyPatchToolParam? applyPatch ) { Function = function; FileSearch = fileSearch; + Computer = computer; ComputerUsePreview = computerUsePreview; WebSearch = webSearch; - MCP = mCP; + Mcp = mcp; CodeInterpreter = codeInterpreter; - ImageGen = imageGen; + ImageGeneration = imageGeneration; LocalShell = localShell; + Shell = shell; Custom = custom; + Namespace = @namespace; + ToolSearch = toolSearch; WebSearchPreview = webSearchPreview; + ApplyPatch = applyPatch; } /// /// /// public object? Object => + ApplyPatch as object ?? WebSearchPreview as object ?? + ToolSearch as object ?? + Namespace as object ?? Custom as object ?? + Shell as object ?? LocalShell as object ?? - ImageGen as object ?? + ImageGeneration as object ?? CodeInterpreter as object ?? - MCP as object ?? + Mcp as object ?? WebSearch as object ?? ComputerUsePreview as object ?? + Computer as object ?? FileSearch as object ?? Function as object ; @@ -412,14 +600,19 @@ Function as object public override string? ToString() => Function?.ToString() ?? FileSearch?.ToString() ?? + Computer?.ToString() ?? ComputerUsePreview?.ToString() ?? WebSearch?.ToString() ?? - MCP?.ToString() ?? + Mcp?.ToString() ?? CodeInterpreter?.ToString() ?? - ImageGen?.ToString() ?? + ImageGeneration?.ToString() ?? LocalShell?.ToString() ?? + Shell?.ToString() ?? Custom?.ToString() ?? - WebSearchPreview?.ToString() + Namespace?.ToString() ?? + ToolSearch?.ToString() ?? + WebSearchPreview?.ToString() ?? + ApplyPatch?.ToString() ; /// @@ -427,7 +620,7 @@ Function as object /// public bool Validate() { - return IsFunction || IsFileSearch || IsComputerUsePreview || IsWebSearch || IsMCP || IsCodeInterpreter || IsImageGen || IsLocalShell || IsCustom || IsWebSearchPreview; + return IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && IsNamespace && !IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && IsToolSearch && !IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && IsWebSearchPreview && !IsApplyPatch || !IsFunction && !IsFileSearch && !IsComputer && !IsComputerUsePreview && !IsWebSearch && !IsMcp && !IsCodeInterpreter && !IsImageGeneration && !IsLocalShell && !IsShell && !IsCustom && !IsNamespace && !IsToolSearch && !IsWebSearchPreview && IsApplyPatch; } /// @@ -436,14 +629,19 @@ public bool Validate() public TResult? Match( global::System.Func? function = null, global::System.Func? fileSearch = null, + global::System.Func? computer = null, global::System.Func? computerUsePreview = null, global::System.Func? webSearch = null, - global::System.Func? mCP = null, + global::System.Func? mcp = null, global::System.Func? codeInterpreter = null, - global::System.Func? imageGen = null, - global::System.Func? localShell = null, - global::System.Func? custom = null, + global::System.Func? imageGeneration = null, + global::System.Func? localShell = null, + global::System.Func? shell = null, + global::System.Func? custom = null, + global::System.Func? @namespace = null, + global::System.Func? toolSearch = null, global::System.Func? webSearchPreview = null, + global::System.Func? applyPatch = null, bool validate = true) { if (validate) @@ -459,6 +657,10 @@ public bool Validate() { return fileSearch(FileSearch!); } + else if (IsComputer && computer != null) + { + return computer(Computer!); + } else if (IsComputerUsePreview && computerUsePreview != null) { return computerUsePreview(ComputerUsePreview!); @@ -467,30 +669,46 @@ public bool Validate() { return webSearch(WebSearch!); } - else if (IsMCP && mCP != null) + else if (IsMcp && mcp != null) { - return mCP(MCP!); + return mcp(Mcp!); } else if (IsCodeInterpreter && codeInterpreter != null) { return codeInterpreter(CodeInterpreter!); } - else if (IsImageGen && imageGen != null) + else if (IsImageGeneration && imageGeneration != null) { - return imageGen(ImageGen!); + return imageGeneration(ImageGeneration!); } else if (IsLocalShell && localShell != null) { return localShell(LocalShell!); } + else if (IsShell && shell != null) + { + return shell(Shell!); + } else if (IsCustom && custom != null) { return custom(Custom!); } + else if (IsNamespace && @namespace != null) + { + return @namespace(Namespace!); + } + else if (IsToolSearch && toolSearch != null) + { + return toolSearch(ToolSearch!); + } else if (IsWebSearchPreview && webSearchPreview != null) { return webSearchPreview(WebSearchPreview!); } + else if (IsApplyPatch && applyPatch != null) + { + return applyPatch(ApplyPatch!); + } return default(TResult); } @@ -501,14 +719,19 @@ public bool Validate() public void Match( global::System.Action? function = null, global::System.Action? fileSearch = null, + global::System.Action? computer = null, global::System.Action? computerUsePreview = null, global::System.Action? webSearch = null, - global::System.Action? mCP = null, + global::System.Action? mcp = null, global::System.Action? codeInterpreter = null, - global::System.Action? imageGen = null, - global::System.Action? localShell = null, - global::System.Action? custom = null, + global::System.Action? imageGeneration = null, + global::System.Action? localShell = null, + global::System.Action? shell = null, + global::System.Action? custom = null, + global::System.Action? @namespace = null, + global::System.Action? toolSearch = null, global::System.Action? webSearchPreview = null, + global::System.Action? applyPatch = null, bool validate = true) { if (validate) @@ -524,6 +747,10 @@ public void Match( { fileSearch?.Invoke(FileSearch!); } + else if (IsComputer) + { + computer?.Invoke(Computer!); + } else if (IsComputerUsePreview) { computerUsePreview?.Invoke(ComputerUsePreview!); @@ -532,30 +759,46 @@ public void Match( { webSearch?.Invoke(WebSearch!); } - else if (IsMCP) + else if (IsMcp) { - mCP?.Invoke(MCP!); + mcp?.Invoke(Mcp!); } else if (IsCodeInterpreter) { codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsImageGen) + else if (IsImageGeneration) { - imageGen?.Invoke(ImageGen!); + imageGeneration?.Invoke(ImageGeneration!); } else if (IsLocalShell) { localShell?.Invoke(LocalShell!); } + else if (IsShell) + { + shell?.Invoke(Shell!); + } else if (IsCustom) { custom?.Invoke(Custom!); } + else if (IsNamespace) + { + @namespace?.Invoke(Namespace!); + } + else if (IsToolSearch) + { + toolSearch?.Invoke(ToolSearch!); + } else if (IsWebSearchPreview) { webSearchPreview?.Invoke(WebSearchPreview!); } + else if (IsApplyPatch) + { + applyPatch?.Invoke(ApplyPatch!); + } } /// @@ -569,22 +812,32 @@ public override int GetHashCode() typeof(global::tryAGI.OpenAI.FunctionTool), FileSearch, typeof(global::tryAGI.OpenAI.FileSearchTool), + Computer, + typeof(global::tryAGI.OpenAI.ComputerTool), ComputerUsePreview, typeof(global::tryAGI.OpenAI.ComputerUsePreviewTool), WebSearch, typeof(global::tryAGI.OpenAI.WebSearchTool), - MCP, + Mcp, typeof(global::tryAGI.OpenAI.MCPTool), CodeInterpreter, typeof(global::tryAGI.OpenAI.CodeInterpreterTool), - ImageGen, + ImageGeneration, typeof(global::tryAGI.OpenAI.ImageGenTool), LocalShell, - typeof(global::tryAGI.OpenAI.LocalShellTool), + typeof(global::tryAGI.OpenAI.LocalShellToolParam), + Shell, + typeof(global::tryAGI.OpenAI.FunctionShellToolParam), Custom, - typeof(global::tryAGI.OpenAI.CustomTool), + typeof(global::tryAGI.OpenAI.CustomToolParam), + Namespace, + typeof(global::tryAGI.OpenAI.NamespaceToolParam), + ToolSearch, + typeof(global::tryAGI.OpenAI.ToolSearchToolParam), WebSearchPreview, typeof(global::tryAGI.OpenAI.WebSearchPreviewTool), + ApplyPatch, + typeof(global::tryAGI.OpenAI.ApplyPatchToolParam), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -603,14 +856,19 @@ public bool Equals(Tool other) return global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Computer, other.Computer) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ComputerUsePreview, other.ComputerUsePreview) && global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearch, other.WebSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCP, other.MCP) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Mcp, other.Mcp) && global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGen, other.ImageGen) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShell, other.LocalShell) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchPreview, other.WebSearchPreview) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageGeneration, other.ImageGeneration) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(LocalShell, other.LocalShell) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Shell, other.Shell) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Namespace, other.Namespace) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolSearch, other.ToolSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearchPreview, other.WebSearchPreview) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ApplyPatch, other.ApplyPatch) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.Json.g.cs deleted file mode 100644 index f12c6368..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ToolChoice5 - { - /// - /// 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::tryAGI.OpenAI.ToolChoice5? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ToolChoice5), - jsonSerializerContext) as global::tryAGI.OpenAI.ToolChoice5?; - } - - /// - /// 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::tryAGI.OpenAI.ToolChoice5? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ToolChoice5), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolChoice5?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.g.cs deleted file mode 100644 index e219874f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice5.g.cs +++ /dev/null @@ -1,437 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// How the model should select which tool (or tools) to use when generating
- /// a response. See the `tools` parameter to see how to specify which tools
- /// the model can call. - ///
- public readonly partial struct ToolChoice5 : global::System.IEquatable - { - /// - /// Controls which (if any) tool is called by the model.
- /// `none` means the model will not call any tool and instead generates a message.
- /// `auto` means the model can pick between generating a message or calling one or
- /// more tools.
- /// `required` means the model must call one or more tools. - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceOptions? ChoiceOptions { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceOptions? ChoiceOptions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceOptions))] -#endif - public bool IsChoiceOptions => ChoiceOptions != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceOptions value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceOptions?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceOptions?(ToolChoice5 @this) => @this.ChoiceOptions; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceOptions? value) - { - ChoiceOptions = value; - } - - /// - /// Constrains the tools available to the model to a pre-defined set. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceAllowed? ChoiceAllowed { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceAllowed? ChoiceAllowed { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceAllowed))] -#endif - public bool IsChoiceAllowed => ChoiceAllowed != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceAllowed value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceAllowed?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceAllowed?(ToolChoice5 @this) => @this.ChoiceAllowed; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceAllowed? value) - { - ChoiceAllowed = value; - } - - /// - /// Indicates that the model should use a built-in tool to generate a response.
- /// [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceTypes? ChoiceTypes { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceTypes? ChoiceTypes { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceTypes))] -#endif - public bool IsChoiceTypes => ChoiceTypes != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceTypes value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceTypes?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceTypes?(ToolChoice5 @this) => @this.ChoiceTypes; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceTypes? value) - { - ChoiceTypes = value; - } - - /// - /// Use this option to force the model to call a specific function. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceFunction? ChoiceFunction { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceFunction? ChoiceFunction { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceFunction))] -#endif - public bool IsChoiceFunction => ChoiceFunction != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceFunction value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceFunction?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceFunction?(ToolChoice5 @this) => @this.ChoiceFunction; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceFunction? value) - { - ChoiceFunction = value; - } - - /// - /// Use this option to force the model to call a specific tool on a remote MCP server. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceMCP? ChoiceMCP { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceMCP? ChoiceMCP { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceMCP))] -#endif - public bool IsChoiceMCP => ChoiceMCP != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceMCP value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceMCP?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceMCP?(ToolChoice5 @this) => @this.ChoiceMCP; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceMCP? value) - { - ChoiceMCP = value; - } - - /// - /// Use this option to force the model to call a specific custom tool. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ToolChoiceCustom? ChoiceCustom { get; init; } -#else - public global::tryAGI.OpenAI.ToolChoiceCustom? ChoiceCustom { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChoiceCustom))] -#endif - public bool IsChoiceCustom => ChoiceCustom != null; - - /// - /// - /// - public static implicit operator ToolChoice5(global::tryAGI.OpenAI.ToolChoiceCustom value) => new ToolChoice5((global::tryAGI.OpenAI.ToolChoiceCustom?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ToolChoiceCustom?(ToolChoice5 @this) => @this.ChoiceCustom; - - /// - /// - /// - public ToolChoice5(global::tryAGI.OpenAI.ToolChoiceCustom? value) - { - ChoiceCustom = value; - } - - /// - /// - /// - public ToolChoice5( - global::tryAGI.OpenAI.ToolChoiceOptions? choiceOptions, - global::tryAGI.OpenAI.ToolChoiceAllowed? choiceAllowed, - global::tryAGI.OpenAI.ToolChoiceTypes? choiceTypes, - global::tryAGI.OpenAI.ToolChoiceFunction? choiceFunction, - global::tryAGI.OpenAI.ToolChoiceMCP? choiceMCP, - global::tryAGI.OpenAI.ToolChoiceCustom? choiceCustom - ) - { - ChoiceOptions = choiceOptions; - ChoiceAllowed = choiceAllowed; - ChoiceTypes = choiceTypes; - ChoiceFunction = choiceFunction; - ChoiceMCP = choiceMCP; - ChoiceCustom = choiceCustom; - } - - /// - /// - /// - public object? Object => - ChoiceCustom as object ?? - ChoiceMCP as object ?? - ChoiceFunction as object ?? - ChoiceTypes as object ?? - ChoiceAllowed as object ?? - ChoiceOptions as object - ; - - /// - /// - /// - public override string? ToString() => - ChoiceOptions?.ToValueString() ?? - ChoiceAllowed?.ToString() ?? - ChoiceTypes?.ToString() ?? - ChoiceFunction?.ToString() ?? - ChoiceMCP?.ToString() ?? - ChoiceCustom?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsChoiceOptions || IsChoiceAllowed || IsChoiceTypes || IsChoiceFunction || IsChoiceMCP || IsChoiceCustom; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? choiceOptions = null, - global::System.Func? choiceAllowed = null, - global::System.Func? choiceTypes = null, - global::System.Func? choiceFunction = null, - global::System.Func? choiceMCP = null, - global::System.Func? choiceCustom = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsChoiceOptions && choiceOptions != null) - { - return choiceOptions(ChoiceOptions!); - } - else if (IsChoiceAllowed && choiceAllowed != null) - { - return choiceAllowed(ChoiceAllowed!); - } - else if (IsChoiceTypes && choiceTypes != null) - { - return choiceTypes(ChoiceTypes!); - } - else if (IsChoiceFunction && choiceFunction != null) - { - return choiceFunction(ChoiceFunction!); - } - else if (IsChoiceMCP && choiceMCP != null) - { - return choiceMCP(ChoiceMCP!); - } - else if (IsChoiceCustom && choiceCustom != null) - { - return choiceCustom(ChoiceCustom!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? choiceOptions = null, - global::System.Action? choiceAllowed = null, - global::System.Action? choiceTypes = null, - global::System.Action? choiceFunction = null, - global::System.Action? choiceMCP = null, - global::System.Action? choiceCustom = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsChoiceOptions) - { - choiceOptions?.Invoke(ChoiceOptions!); - } - else if (IsChoiceAllowed) - { - choiceAllowed?.Invoke(ChoiceAllowed!); - } - else if (IsChoiceTypes) - { - choiceTypes?.Invoke(ChoiceTypes!); - } - else if (IsChoiceFunction) - { - choiceFunction?.Invoke(ChoiceFunction!); - } - else if (IsChoiceMCP) - { - choiceMCP?.Invoke(ChoiceMCP!); - } - else if (IsChoiceCustom) - { - choiceCustom?.Invoke(ChoiceCustom!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ChoiceOptions, - typeof(global::tryAGI.OpenAI.ToolChoiceOptions), - ChoiceAllowed, - typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), - ChoiceTypes, - typeof(global::tryAGI.OpenAI.ToolChoiceTypes), - ChoiceFunction, - typeof(global::tryAGI.OpenAI.ToolChoiceFunction), - ChoiceMCP, - typeof(global::tryAGI.OpenAI.ToolChoiceMCP), - ChoiceCustom, - typeof(global::tryAGI.OpenAI.ToolChoiceCustom), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ToolChoice5 other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceOptions, other.ChoiceOptions) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceAllowed, other.ChoiceAllowed) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceTypes, other.ChoiceTypes) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceFunction, other.ChoiceFunction) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceMCP, other.ChoiceMCP) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChoiceCustom, other.ChoiceCustom) - ; - } - - /// - /// - /// - public static bool operator ==(ToolChoice5 obj1, ToolChoice5 obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(ToolChoice5 obj1, ToolChoice5 obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is ToolChoice5 o && Equals(o); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.Json.g.cs new file mode 100644 index 00000000..953062d8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolChoice8 + { + /// + /// 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::tryAGI.OpenAI.ToolChoice8? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolChoice8), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolChoice8; + } + + /// + /// 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::tryAGI.OpenAI.ToolChoice8? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolChoice8), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolChoice8; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.g.cs new file mode 100644 index 00000000..f438868d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoice8.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Tool selection that the assistant should honor when executing the item. + /// + public sealed partial class ToolChoice8 + { + /// + /// Identifier of the requested tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the requested tool. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolChoice8( + string id) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + } + + /// + /// Initializes a new instance of the class. + /// + public ToolChoice8() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceAllowed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceAllowed.g.cs index 7b1c9b9c..deb2c2a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceAllowed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceAllowed.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class ToolChoiceAllowed { + /// + /// Allowed tool configuration type. Always `allowed_tools`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolChoiceAllowedType Type { get; set; } + /// /// Constrains the tools available to the model to a pre-defined set.
/// `auto` allows the model to pick from among the allowed tools and generate a
@@ -34,13 +41,6 @@ public sealed partial class ToolChoiceAllowed [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Tools { get; set; } - /// - /// Allowed tool configuration type. Always `allowed_tools`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceAllowedTypeJsonConverter))] - public global::tryAGI.OpenAI.ToolChoiceAllowedType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -50,6 +50,9 @@ public sealed partial class ToolChoiceAllowed /// /// Initializes a new instance of the class. /// + /// + /// Allowed tool configuration type. Always `allowed_tools`. + /// /// /// Constrains the tools available to the model to a pre-defined set.
/// `auto` allows the model to pick from among the allowed tools and generate a
@@ -67,9 +70,6 @@ public sealed partial class ToolChoiceAllowed /// ]
/// ``` /// - /// - /// Allowed tool configuration type. Always `allowed_tools`. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceCustom.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceCustom.g.cs index af6fb0e7..241ff9fb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceCustom.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceCustom.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ToolChoiceCustom { - /// - /// The name of the custom tool to call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - /// /// For custom tool calling, the type is always `custom`. /// @@ -22,6 +15,13 @@ public sealed partial class ToolChoiceCustom [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceCustomTypeJsonConverter))] public global::tryAGI.OpenAI.ToolChoiceCustomType Type { get; set; } + /// + /// The name of the custom tool to call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ToolChoiceCustom /// /// Initializes a new instance of the class. /// - /// - /// The name of the custom tool to call. - /// /// /// For custom tool calling, the type is always `custom`. /// + /// + /// The name of the custom tool to call. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceFunction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceFunction.g.cs index eb1c26a0..917d2cd9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceFunction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceFunction.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class ToolChoiceFunction { - /// - /// The name of the function to call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - /// /// For function calling, the type is always `function`. /// @@ -22,6 +15,13 @@ public sealed partial class ToolChoiceFunction [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceFunctionTypeJsonConverter))] public global::tryAGI.OpenAI.ToolChoiceFunctionType Type { get; set; } + /// + /// The name of the function to call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class ToolChoiceFunction /// /// Initializes a new instance of the class. /// - /// - /// The name of the function to call. - /// /// /// For function calling, the type is always `function`. /// + /// + /// The name of the function to call. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCP.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCP.g.cs index 034131e3..fc67e697 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCP.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCP.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class ToolChoiceMCP { /// - /// The name of the tool to call on the server. + /// For MCP tools, the type is always `mcp`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceMCPTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolChoiceMCPType Type { get; set; } /// /// The label of the MCP server to use. @@ -22,11 +23,10 @@ public sealed partial class ToolChoiceMCP public required string ServerLabel { get; set; } /// - /// For MCP tools, the type is always `mcp`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolChoiceMCPTypeJsonConverter))] - public global::tryAGI.OpenAI.ToolChoiceMCPType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,26 +37,24 @@ public sealed partial class ToolChoiceMCP /// /// Initializes a new instance of the class. /// - /// - /// The name of the tool to call on the server. + /// + /// For MCP tools, the type is always `mcp`. /// /// /// The label of the MCP server to use. /// - /// - /// For MCP tools, the type is always `mcp`. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ToolChoiceMCP( string serverLabel, - string? name, - global::tryAGI.OpenAI.ToolChoiceMCPType type) + global::tryAGI.OpenAI.ToolChoiceMCPType type, + string? name) { this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); - this.Name = name; this.Type = type; + this.Name = name; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.Json.g.cs new file mode 100644 index 00000000..d1cbda56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolChoiceMCPName + { + /// + /// 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::tryAGI.OpenAI.ToolChoiceMCPName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolChoiceMCPName), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolChoiceMCPName; + } + + /// + /// 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::tryAGI.OpenAI.ToolChoiceMCPName? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolChoiceMCPName), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolChoiceMCPName; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.g.cs new file mode 100644 index 00000000..67b7b40a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceMCPName.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolChoiceMCPName + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.Json.g.cs new file mode 100644 index 00000000..5d56505f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ToolChoiceParam + { + /// + /// 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::tryAGI.OpenAI.ToolChoiceParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolChoiceParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolChoiceParam?; + } + + /// + /// 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::tryAGI.OpenAI.ToolChoiceParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolChoiceParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolChoiceParam?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.g.cs new file mode 100644 index 00000000..0bf8bb53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceParam.g.cs @@ -0,0 +1,540 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// How the model should select which tool (or tools) to use when generating
+ /// a response. See the `tools` parameter to see how to specify which tools
+ /// the model can call. + ///
+ public readonly partial struct ToolChoiceParam : global::System.IEquatable + { + /// + /// Controls which (if any) tool is called by the model.
+ /// `none` means the model will not call any tool and instead generates a message.
+ /// `auto` means the model can pick between generating a message or calling one or
+ /// more tools.
+ /// `required` means the model must call one or more tools. + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceOptions? ToolChoiceMode { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceOptions? ToolChoiceMode { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolChoiceMode))] +#endif + public bool IsToolChoiceMode => ToolChoiceMode != null; + + /// + /// Constrains the tools available to the model to a pre-defined set. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceAllowed? AllowedTools { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceAllowed? AllowedTools { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AllowedTools))] +#endif + public bool IsAllowedTools => AllowedTools != null; + + /// + /// Indicates that the model should use a built-in tool to generate a response.
+ /// [Learn more about built-in tools](/docs/guides/tools). + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceTypes? HostedTool { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceTypes? HostedTool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(HostedTool))] +#endif + public bool IsHostedTool => HostedTool != null; + + /// + /// Use this option to force the model to call a specific function. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceFunction? FunctionTool { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceFunction? FunctionTool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionTool))] +#endif + public bool IsFunctionTool => FunctionTool != null; + + /// + /// Use this option to force the model to call a specific tool on a remote MCP server. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceMCP? McpTool { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceMCP? McpTool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(McpTool))] +#endif + public bool IsMcpTool => McpTool != null; + + /// + /// Use this option to force the model to call a specific custom tool. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.ToolChoiceCustom? CustomTool { get; init; } +#else + public global::tryAGI.OpenAI.ToolChoiceCustom? CustomTool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomTool))] +#endif + public bool IsCustomTool => CustomTool != null; + + /// + /// Forces the model to call the apply_patch tool when executing a tool call. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SpecificApplyPatchParam? SpecificApplyPatchToolChoice { get; init; } +#else + public global::tryAGI.OpenAI.SpecificApplyPatchParam? SpecificApplyPatchToolChoice { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SpecificApplyPatchToolChoice))] +#endif + public bool IsSpecificApplyPatchToolChoice => SpecificApplyPatchToolChoice != null; + + /// + /// Forces the model to call the shell tool when a tool call is required. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.SpecificFunctionShellParam? SpecificShellToolChoice { get; init; } +#else + public global::tryAGI.OpenAI.SpecificFunctionShellParam? SpecificShellToolChoice { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SpecificShellToolChoice))] +#endif + public bool IsSpecificShellToolChoice => SpecificShellToolChoice != null; + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceOptions value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceOptions?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceOptions?(ToolChoiceParam @this) => @this.ToolChoiceMode; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceOptions? value) + { + ToolChoiceMode = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceAllowed value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceAllowed?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceAllowed?(ToolChoiceParam @this) => @this.AllowedTools; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceAllowed? value) + { + AllowedTools = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceTypes value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceTypes?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceTypes?(ToolChoiceParam @this) => @this.HostedTool; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceTypes? value) + { + HostedTool = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceFunction value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceFunction?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceFunction?(ToolChoiceParam @this) => @this.FunctionTool; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceFunction? value) + { + FunctionTool = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceMCP value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceMCP?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceMCP?(ToolChoiceParam @this) => @this.McpTool; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceMCP? value) + { + McpTool = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceCustom value) => new ToolChoiceParam((global::tryAGI.OpenAI.ToolChoiceCustom?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.ToolChoiceCustom?(ToolChoiceParam @this) => @this.CustomTool; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.ToolChoiceCustom? value) + { + CustomTool = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.SpecificApplyPatchParam value) => new ToolChoiceParam((global::tryAGI.OpenAI.SpecificApplyPatchParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.SpecificApplyPatchParam?(ToolChoiceParam @this) => @this.SpecificApplyPatchToolChoice; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.SpecificApplyPatchParam? value) + { + SpecificApplyPatchToolChoice = value; + } + + /// + /// + /// + public static implicit operator ToolChoiceParam(global::tryAGI.OpenAI.SpecificFunctionShellParam value) => new ToolChoiceParam((global::tryAGI.OpenAI.SpecificFunctionShellParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.SpecificFunctionShellParam?(ToolChoiceParam @this) => @this.SpecificShellToolChoice; + + /// + /// + /// + public ToolChoiceParam(global::tryAGI.OpenAI.SpecificFunctionShellParam? value) + { + SpecificShellToolChoice = value; + } + + /// + /// + /// + public ToolChoiceParam( + global::tryAGI.OpenAI.ToolChoiceOptions? toolChoiceMode, + global::tryAGI.OpenAI.ToolChoiceAllowed? allowedTools, + global::tryAGI.OpenAI.ToolChoiceTypes? hostedTool, + global::tryAGI.OpenAI.ToolChoiceFunction? functionTool, + global::tryAGI.OpenAI.ToolChoiceMCP? mcpTool, + global::tryAGI.OpenAI.ToolChoiceCustom? customTool, + global::tryAGI.OpenAI.SpecificApplyPatchParam? specificApplyPatchToolChoice, + global::tryAGI.OpenAI.SpecificFunctionShellParam? specificShellToolChoice + ) + { + ToolChoiceMode = toolChoiceMode; + AllowedTools = allowedTools; + HostedTool = hostedTool; + FunctionTool = functionTool; + McpTool = mcpTool; + CustomTool = customTool; + SpecificApplyPatchToolChoice = specificApplyPatchToolChoice; + SpecificShellToolChoice = specificShellToolChoice; + } + + /// + /// + /// + public object? Object => + SpecificShellToolChoice as object ?? + SpecificApplyPatchToolChoice as object ?? + CustomTool as object ?? + McpTool as object ?? + FunctionTool as object ?? + HostedTool as object ?? + AllowedTools as object ?? + ToolChoiceMode as object + ; + + /// + /// + /// + public override string? ToString() => + ToolChoiceMode?.ToValueString() ?? + AllowedTools?.ToString() ?? + HostedTool?.ToString() ?? + FunctionTool?.ToString() ?? + McpTool?.ToString() ?? + CustomTool?.ToString() ?? + SpecificApplyPatchToolChoice?.ToString() ?? + SpecificShellToolChoice?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && !IsFunctionTool && !IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && IsAllowedTools && !IsHostedTool && !IsFunctionTool && !IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && IsHostedTool && !IsFunctionTool && !IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && IsFunctionTool && !IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && !IsFunctionTool && IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && !IsFunctionTool && !IsMcpTool && IsCustomTool && !IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && !IsFunctionTool && !IsMcpTool && !IsCustomTool && IsSpecificApplyPatchToolChoice && !IsSpecificShellToolChoice || !IsToolChoiceMode && !IsAllowedTools && !IsHostedTool && !IsFunctionTool && !IsMcpTool && !IsCustomTool && !IsSpecificApplyPatchToolChoice && IsSpecificShellToolChoice; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? toolChoiceMode = null, + global::System.Func? allowedTools = null, + global::System.Func? hostedTool = null, + global::System.Func? functionTool = null, + global::System.Func? mcpTool = null, + global::System.Func? customTool = null, + global::System.Func? specificApplyPatchToolChoice = null, + global::System.Func? specificShellToolChoice = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsToolChoiceMode && toolChoiceMode != null) + { + return toolChoiceMode(ToolChoiceMode!); + } + else if (IsAllowedTools && allowedTools != null) + { + return allowedTools(AllowedTools!); + } + else if (IsHostedTool && hostedTool != null) + { + return hostedTool(HostedTool!); + } + else if (IsFunctionTool && functionTool != null) + { + return functionTool(FunctionTool!); + } + else if (IsMcpTool && mcpTool != null) + { + return mcpTool(McpTool!); + } + else if (IsCustomTool && customTool != null) + { + return customTool(CustomTool!); + } + else if (IsSpecificApplyPatchToolChoice && specificApplyPatchToolChoice != null) + { + return specificApplyPatchToolChoice(SpecificApplyPatchToolChoice!); + } + else if (IsSpecificShellToolChoice && specificShellToolChoice != null) + { + return specificShellToolChoice(SpecificShellToolChoice!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? toolChoiceMode = null, + global::System.Action? allowedTools = null, + global::System.Action? hostedTool = null, + global::System.Action? functionTool = null, + global::System.Action? mcpTool = null, + global::System.Action? customTool = null, + global::System.Action? specificApplyPatchToolChoice = null, + global::System.Action? specificShellToolChoice = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsToolChoiceMode) + { + toolChoiceMode?.Invoke(ToolChoiceMode!); + } + else if (IsAllowedTools) + { + allowedTools?.Invoke(AllowedTools!); + } + else if (IsHostedTool) + { + hostedTool?.Invoke(HostedTool!); + } + else if (IsFunctionTool) + { + functionTool?.Invoke(FunctionTool!); + } + else if (IsMcpTool) + { + mcpTool?.Invoke(McpTool!); + } + else if (IsCustomTool) + { + customTool?.Invoke(CustomTool!); + } + else if (IsSpecificApplyPatchToolChoice) + { + specificApplyPatchToolChoice?.Invoke(SpecificApplyPatchToolChoice!); + } + else if (IsSpecificShellToolChoice) + { + specificShellToolChoice?.Invoke(SpecificShellToolChoice!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ToolChoiceMode, + typeof(global::tryAGI.OpenAI.ToolChoiceOptions), + AllowedTools, + typeof(global::tryAGI.OpenAI.ToolChoiceAllowed), + HostedTool, + typeof(global::tryAGI.OpenAI.ToolChoiceTypes), + FunctionTool, + typeof(global::tryAGI.OpenAI.ToolChoiceFunction), + McpTool, + typeof(global::tryAGI.OpenAI.ToolChoiceMCP), + CustomTool, + typeof(global::tryAGI.OpenAI.ToolChoiceCustom), + SpecificApplyPatchToolChoice, + typeof(global::tryAGI.OpenAI.SpecificApplyPatchParam), + SpecificShellToolChoice, + typeof(global::tryAGI.OpenAI.SpecificFunctionShellParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolChoiceParam other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolChoiceMode, other.ToolChoiceMode) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AllowedTools, other.AllowedTools) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(HostedTool, other.HostedTool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FunctionTool, other.FunctionTool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(McpTool, other.McpTool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomTool, other.CustomTool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SpecificApplyPatchToolChoice, other.SpecificApplyPatchToolChoice) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SpecificShellToolChoice, other.SpecificShellToolChoice) + ; + } + + /// + /// + /// + public static bool operator ==(ToolChoiceParam obj1, ToolChoiceParam obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolChoiceParam obj1, ToolChoiceParam obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolChoiceParam o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypes.g.cs index b58e88db..f382c194 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypes.g.cs @@ -5,17 +5,19 @@ namespace tryAGI.OpenAI { /// /// Indicates that the model should use a built-in tool to generate a response.
- /// [Learn more about built-in tools](https://platform.openai.com/docs/guides/tools). + /// [Learn more about built-in tools](/docs/guides/tools). ///
public sealed partial class ToolChoiceTypes { /// /// The type of hosted tool the model should to use. Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// [built-in tools](/docs/guides/tools).
/// Allowed values are:
/// - `file_search`
/// - `web_search_preview`
+ /// - `computer`
/// - `computer_use_preview`
+ /// - `computer_use`
/// - `code_interpreter`
/// - `image_generation` ///
@@ -35,11 +37,13 @@ public sealed partial class ToolChoiceTypes ///
/// /// The type of hosted tool the model should to use. Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// [built-in tools](/docs/guides/tools).
/// Allowed values are:
/// - `file_search`
/// - `web_search_preview`
+ /// - `computer`
/// - `computer_use_preview`
+ /// - `computer_use`
/// - `code_interpreter`
/// - `image_generation` /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypesType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypesType.g.cs index 39a05c11..34ba89fd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypesType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolChoiceTypesType.g.cs @@ -5,11 +5,13 @@ namespace tryAGI.OpenAI { /// /// The type of hosted tool the model should to use. Learn more about
- /// [built-in tools](https://platform.openai.com/docs/guides/tools).
+ /// [built-in tools](/docs/guides/tools).
/// Allowed values are:
/// - `file_search`
/// - `web_search_preview`
+ /// - `computer`
/// - `computer_use_preview`
+ /// - `computer_use`
/// - `code_interpreter`
/// - `image_generation` ///
@@ -26,10 +28,18 @@ public enum ToolChoiceTypesType /// /// /// + Computer, + /// + /// + /// ComputerUsePreview, /// /// /// + ComputerUse, + /// + /// + /// WebSearchPreview20250311, /// /// @@ -55,7 +65,9 @@ public static string ToValueString(this ToolChoiceTypesType value) { ToolChoiceTypesType.FileSearch => "file_search", ToolChoiceTypesType.WebSearchPreview => "web_search_preview", + ToolChoiceTypesType.Computer => "computer", ToolChoiceTypesType.ComputerUsePreview => "computer_use_preview", + ToolChoiceTypesType.ComputerUse => "computer_use", ToolChoiceTypesType.WebSearchPreview20250311 => "web_search_preview_2025_03_11", ToolChoiceTypesType.ImageGeneration => "image_generation", ToolChoiceTypesType.CodeInterpreter => "code_interpreter", @@ -71,7 +83,9 @@ public static string ToValueString(this ToolChoiceTypesType value) { "file_search" => ToolChoiceTypesType.FileSearch, "web_search_preview" => ToolChoiceTypesType.WebSearchPreview, + "computer" => ToolChoiceTypesType.Computer, "computer_use_preview" => ToolChoiceTypesType.ComputerUsePreview, + "computer_use" => ToolChoiceTypesType.ComputerUse, "web_search_preview_2025_03_11" => ToolChoiceTypesType.WebSearchPreview20250311, "image_generation" => ToolChoiceTypesType.ImageGeneration, "code_interpreter" => ToolChoiceTypesType.CodeInterpreter, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.Json.g.cs new file mode 100644 index 00000000..ea159b8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCall + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCall? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCall; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCall? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCall), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCall; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.g.cs new file mode 100644 index 00000000..6a8ed87a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCall.g.cs @@ -0,0 +1,120 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCall + { + /// + /// The type of the item. Always `tool_search_call`.
+ /// Default Value: tool_search_call + ///
+ /// global::tryAGI.OpenAI.ToolSearchCallType.ToolSearchCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchCallType Type { get; set; } = global::tryAGI.OpenAI.ToolSearchCallType.ToolSearchCall; + + /// + /// The unique ID of the tool search call item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? CallId { get; set; } + + /// + /// Whether tool search was executed by the server or by the client. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ToolSearchExecutionType Execution { get; set; } + + /// + /// Arguments used for the tool search call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Arguments { get; set; } + + /// + /// The status of the tool search call item that was recorded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionCallStatus Status { get; set; } + + /// + /// The identifier of the actor that created the item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `tool_search_call`.
+ /// Default Value: tool_search_call + /// + /// + /// The unique ID of the tool search call item. + /// + /// + /// + /// Whether tool search was executed by the server or by the client. + /// + /// + /// Arguments used for the tool search call. + /// + /// + /// The status of the tool search call item that was recorded. + /// + /// + /// The identifier of the actor that created the item. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolSearchCall( + string id, + string? callId, + global::tryAGI.OpenAI.ToolSearchExecutionType execution, + object arguments, + global::tryAGI.OpenAI.FunctionCallStatus status, + string? createdBy, + global::tryAGI.OpenAI.ToolSearchCallType type = global::tryAGI.OpenAI.ToolSearchCallType.ToolSearchCall) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Execution = execution; + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Status = status; + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolSearchCall() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.Json.g.cs new file mode 100644 index 00000000..9676857e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallArguments + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallArguments? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallArguments), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallArguments; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallArguments? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallArguments), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallArguments; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.g.cs new file mode 100644 index 00000000..341935ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallArguments.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Arguments used for the tool search call. + /// + public sealed partial class ToolSearchCallArguments + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.Json.g.cs new file mode 100644 index 00000000..faf59331 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallCallId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallCallId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallCallId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallCallId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallCallId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallCallId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallCallId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.g.cs new file mode 100644 index 00000000..9b955069 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallCallId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCallCallId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.Json.g.cs new file mode 100644 index 00000000..c26fe9eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallItemParam + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallItemParam; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.g.cs new file mode 100644 index 00000000..7af7d14b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParam.g.cs @@ -0,0 +1,100 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCallItemParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + public string? CallId { get; set; } + + /// + /// The item type. Always `tool_search_call`.
+ /// Default Value: tool_search_call + ///
+ /// global::tryAGI.OpenAI.ToolSearchCallItemParamType.ToolSearchCall + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchCallItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchCallItemParamType Type { get; set; } = global::tryAGI.OpenAI.ToolSearchCallItemParamType.ToolSearchCall; + + /// + /// Whether tool search was executed by the server or by the client. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchExecutionType? Execution { get; set; } + + /// + /// The arguments supplied to the tool search call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Arguments { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public global::tryAGI.OpenAI.FunctionCallItemStatus? Status { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// The item type. Always `tool_search_call`.
+ /// Default Value: tool_search_call + /// + /// + /// Whether tool search was executed by the server or by the client. + /// + /// + /// The arguments supplied to the tool search call. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolSearchCallItemParam( + object arguments, + string? id, + string? callId, + global::tryAGI.OpenAI.ToolSearchExecutionType? execution, + global::tryAGI.OpenAI.FunctionCallItemStatus? status, + global::tryAGI.OpenAI.ToolSearchCallItemParamType type = global::tryAGI.OpenAI.ToolSearchCallItemParamType.ToolSearchCall) + { + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Id = id; + this.CallId = callId; + this.Type = type; + this.Execution = execution; + this.Status = status; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolSearchCallItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.Json.g.cs new file mode 100644 index 00000000..61f0fe1b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallItemParamCallId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamCallId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamCallId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallItemParamCallId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamCallId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamCallId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallItemParamCallId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.g.cs new file mode 100644 index 00000000..307e8d75 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamCallId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCallItemParamCallId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.Json.g.cs new file mode 100644 index 00000000..833a5db8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallItemParamId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.g.cs new file mode 100644 index 00000000..bcbfd6bb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCallItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.Json.g.cs new file mode 100644 index 00000000..5242b01b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchCallItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchCallItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchCallItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchCallItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchCallItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.g.cs new file mode 100644 index 00000000..208cd05b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchCallItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamType.g.cs new file mode 100644 index 00000000..6ecbaa07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The item type. Always `tool_search_call`.
+ /// Default Value: tool_search_call + ///
+ public enum ToolSearchCallItemParamType + { + /// + /// + /// + ToolSearchCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchCallItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchCallItemParamType value) + { + return value switch + { + ToolSearchCallItemParamType.ToolSearchCall => "tool_search_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchCallItemParamType? ToEnum(string value) + { + return value switch + { + "tool_search_call" => ToolSearchCallItemParamType.ToolSearchCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallType.g.cs new file mode 100644 index 00000000..f589b44a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchCallType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `tool_search_call`.
+ /// Default Value: tool_search_call + ///
+ public enum ToolSearchCallType + { + /// + /// + /// + ToolSearchCall, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchCallType value) + { + return value switch + { + ToolSearchCallType.ToolSearchCall => "tool_search_call", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchCallType? ToEnum(string value) + { + return value switch + { + "tool_search_call" => ToolSearchCallType.ToolSearchCall, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchExecutionType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchExecutionType.g.cs new file mode 100644 index 00000000..68afeaef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchExecutionType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum ToolSearchExecutionType + { + /// + /// + /// + Server, + /// + /// + /// + Client, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchExecutionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchExecutionType value) + { + return value switch + { + ToolSearchExecutionType.Server => "server", + ToolSearchExecutionType.Client => "client", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchExecutionType? ToEnum(string value) + { + return value switch + { + "server" => ToolSearchExecutionType.Server, + "client" => ToolSearchExecutionType.Client, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.Json.g.cs new file mode 100644 index 00000000..f9c8897f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutput + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutput; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutput), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutput; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.g.cs new file mode 100644 index 00000000..995dfb47 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutput.g.cs @@ -0,0 +1,120 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutput + { + /// + /// The type of the item. Always `tool_search_output`.
+ /// Default Value: tool_search_output + ///
+ /// global::tryAGI.OpenAI.ToolSearchOutputType.ToolSearchOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchOutputType Type { get; set; } = global::tryAGI.OpenAI.ToolSearchOutputType.ToolSearchOutput; + + /// + /// The unique ID of the tool search output item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? CallId { get; set; } + + /// + /// Whether tool search was executed by the server or by the client. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.ToolSearchExecutionType Execution { get; set; } + + /// + /// The loaded tool definitions returned by tool search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tools { get; set; } + + /// + /// The status of the tool search output item that was recorded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.FunctionCallOutputStatusEnumJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.FunctionCallOutputStatusEnum Status { get; set; } + + /// + /// The identifier of the actor that created the item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_by")] + public string? CreatedBy { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the item. Always `tool_search_output`.
+ /// Default Value: tool_search_output + /// + /// + /// The unique ID of the tool search output item. + /// + /// + /// + /// Whether tool search was executed by the server or by the client. + /// + /// + /// The loaded tool definitions returned by tool search. + /// + /// + /// The status of the tool search output item that was recorded. + /// + /// + /// The identifier of the actor that created the item. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolSearchOutput( + string id, + string? callId, + global::tryAGI.OpenAI.ToolSearchExecutionType execution, + global::System.Collections.Generic.IList tools, + global::tryAGI.OpenAI.FunctionCallOutputStatusEnum status, + string? createdBy, + global::tryAGI.OpenAI.ToolSearchOutputType type = global::tryAGI.OpenAI.ToolSearchOutputType.ToolSearchOutput) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.Execution = execution; + this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); + this.Status = status; + this.Type = type; + this.CreatedBy = createdBy; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolSearchOutput() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.Json.g.cs new file mode 100644 index 00000000..fcf8affd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutputCallId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputCallId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutputCallId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutputCallId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputCallId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutputCallId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutputCallId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.g.cs new file mode 100644 index 00000000..258d5e29 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputCallId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutputCallId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.Json.g.cs new file mode 100644 index 00000000..34106acf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutputItemParam + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutputItemParam; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutputItemParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.g.cs new file mode 100644 index 00000000..cc217f71 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParam.g.cs @@ -0,0 +1,100 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutputItemParam + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + public string? CallId { get; set; } + + /// + /// The item type. Always `tool_search_output`.
+ /// Default Value: tool_search_output + ///
+ /// global::tryAGI.OpenAI.ToolSearchOutputItemParamType.ToolSearchOutput + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchOutputItemParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchOutputItemParamType Type { get; set; } = global::tryAGI.OpenAI.ToolSearchOutputItemParamType.ToolSearchOutput; + + /// + /// Whether tool search was executed by the server or by the client. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchExecutionType? Execution { get; set; } + + /// + /// The loaded tool definitions returned by the tool search output. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public global::tryAGI.OpenAI.FunctionCallItemStatus? Status { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// The item type. Always `tool_search_output`.
+ /// Default Value: tool_search_output + /// + /// + /// Whether tool search was executed by the server or by the client. + /// + /// + /// The loaded tool definitions returned by the tool search output. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolSearchOutputItemParam( + global::System.Collections.Generic.IList tools, + string? id, + string? callId, + global::tryAGI.OpenAI.ToolSearchExecutionType? execution, + global::tryAGI.OpenAI.FunctionCallItemStatus? status, + global::tryAGI.OpenAI.ToolSearchOutputItemParamType type = global::tryAGI.OpenAI.ToolSearchOutputItemParamType.ToolSearchOutput) + { + this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); + this.Id = id; + this.CallId = callId; + this.Type = type; + this.Execution = execution; + this.Status = status; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolSearchOutputItemParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.Json.g.cs new file mode 100644 index 00000000..71ada496 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutputItemParamCallId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamCallId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamCallId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutputItemParamCallId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamCallId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamCallId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutputItemParamCallId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.g.cs new file mode 100644 index 00000000..1afa4e1a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamCallId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutputItemParamCallId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.Json.g.cs new file mode 100644 index 00000000..2729f1ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutputItemParamId + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamId), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutputItemParamId; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutputItemParamId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.g.cs new file mode 100644 index 00000000..f4944ce5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutputItemParamId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.Json.g.cs new file mode 100644 index 00000000..4decdf6b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchOutputItemParamStatus + { + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamStatus), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchOutputItemParamStatus; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchOutputItemParamStatus? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchOutputItemParamStatus), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchOutputItemParamStatus; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.g.cs new file mode 100644 index 00000000..2b19b377 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamStatus.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchOutputItemParamStatus + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamType.g.cs new file mode 100644 index 00000000..205c5f34 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputItemParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The item type. Always `tool_search_output`.
+ /// Default Value: tool_search_output + ///
+ public enum ToolSearchOutputItemParamType + { + /// + /// + /// + ToolSearchOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchOutputItemParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchOutputItemParamType value) + { + return value switch + { + ToolSearchOutputItemParamType.ToolSearchOutput => "tool_search_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchOutputItemParamType? ToEnum(string value) + { + return value switch + { + "tool_search_output" => ToolSearchOutputItemParamType.ToolSearchOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputType.g.cs new file mode 100644 index 00000000..698c67ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchOutputType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the item. Always `tool_search_output`.
+ /// Default Value: tool_search_output + ///
+ public enum ToolSearchOutputType + { + /// + /// + /// + ToolSearchOutput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchOutputTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchOutputType value) + { + return value switch + { + ToolSearchOutputType.ToolSearchOutput => "tool_search_output", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchOutputType? ToEnum(string value) + { + return value switch + { + "tool_search_output" => ToolSearchOutputType.ToolSearchOutput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.Json.g.cs new file mode 100644 index 00000000..f127a703 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchToolParam + { + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchToolParam), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchToolParam; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchToolParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchToolParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.g.cs new file mode 100644 index 00000000..49907a5c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParam.g.cs @@ -0,0 +1,79 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Hosted or BYOT tool search configuration for deferred tools. + /// + public sealed partial class ToolSearchToolParam + { + /// + /// The type of the tool. Always `tool_search`.
+ /// Default Value: tool_search + ///
+ /// global::tryAGI.OpenAI.ToolSearchToolParamType.ToolSearch + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchToolParamTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchToolParamType Type { get; set; } = global::tryAGI.OpenAI.ToolSearchToolParamType.ToolSearch; + + /// + /// Whether tool search is executed by the server or by the client. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("execution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ToolSearchExecutionTypeJsonConverter))] + public global::tryAGI.OpenAI.ToolSearchExecutionType? Execution { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public object? Parameters { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the tool. Always `tool_search`.
+ /// Default Value: tool_search + /// + /// + /// Whether tool search is executed by the server or by the client. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolSearchToolParam( + global::tryAGI.OpenAI.ToolSearchExecutionType? execution, + string? description, + object? parameters, + global::tryAGI.OpenAI.ToolSearchToolParamType type = global::tryAGI.OpenAI.ToolSearchToolParamType.ToolSearch) + { + this.Type = type; + this.Execution = execution; + this.Description = description; + this.Parameters = parameters; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolSearchToolParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.Json.g.cs new file mode 100644 index 00000000..44202143 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchToolParamDescription + { + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParamDescription? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchToolParamDescription), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchToolParamDescription; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParamDescription? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchToolParamDescription), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchToolParamDescription; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.g.cs new file mode 100644 index 00000000..2b32163e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamDescription.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchToolParamDescription + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.Json.g.cs new file mode 100644 index 00000000..7efcd15a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class ToolSearchToolParamParameters + { + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParamParameters? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolSearchToolParamParameters), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolSearchToolParamParameters; + } + + /// + /// 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::tryAGI.OpenAI.ToolSearchToolParamParameters? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolSearchToolParamParameters), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolSearchToolParamParameters; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.g.cs new file mode 100644 index 00000000..d0b8c74e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamParameters.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class ToolSearchToolParamParameters + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamType.g.cs new file mode 100644 index 00000000..d4823698 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolSearchToolParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the tool. Always `tool_search`.
+ /// Default Value: tool_search + ///
+ public enum ToolSearchToolParamType + { + /// + /// + /// + ToolSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolSearchToolParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolSearchToolParamType value) + { + return value switch + { + ToolSearchToolParamType.ToolSearch => "tool_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolSearchToolParamType? ToEnum(string value) + { + return value switch + { + "tool_search" => ToolSearchToolParamType.ToolSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.Json.g.cs deleted file mode 100644 index 096e2d2d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ToolsItem - { - /// - /// 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::tryAGI.OpenAI.ToolsItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ToolsItem), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ToolsItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ToolsItem), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolsItem?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.g.cs deleted file mode 100644 index 0ea881ac..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ToolsItem : global::System.IEquatable - { - /// - /// A function tool that can be used to generate a response. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.ChatCompletionTool? ChatCompletionTool { get; init; } -#else - public global::tryAGI.OpenAI.ChatCompletionTool? ChatCompletionTool { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatCompletionTool))] -#endif - public bool IsChatCompletionTool => ChatCompletionTool != null; - - /// - /// - /// - public static implicit operator ToolsItem(global::tryAGI.OpenAI.ChatCompletionTool value) => new ToolsItem((global::tryAGI.OpenAI.ChatCompletionTool?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.ChatCompletionTool?(ToolsItem @this) => @this.ChatCompletionTool; - - /// - /// - /// - public ToolsItem(global::tryAGI.OpenAI.ChatCompletionTool? value) - { - ChatCompletionTool = value; - } - - /// - /// A custom tool that processes input using a specified format. - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.CustomToolChatCompletions? CustomToolChatCompletions { get; init; } -#else - public global::tryAGI.OpenAI.CustomToolChatCompletions? CustomToolChatCompletions { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomToolChatCompletions))] -#endif - public bool IsCustomToolChatCompletions => CustomToolChatCompletions != null; - - /// - /// - /// - public static implicit operator ToolsItem(global::tryAGI.OpenAI.CustomToolChatCompletions value) => new ToolsItem((global::tryAGI.OpenAI.CustomToolChatCompletions?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.CustomToolChatCompletions?(ToolsItem @this) => @this.CustomToolChatCompletions; - - /// - /// - /// - public ToolsItem(global::tryAGI.OpenAI.CustomToolChatCompletions? value) - { - CustomToolChatCompletions = value; - } - - /// - /// - /// - public ToolsItem( - global::tryAGI.OpenAI.ChatCompletionTool? chatCompletionTool, - global::tryAGI.OpenAI.CustomToolChatCompletions? customToolChatCompletions - ) - { - ChatCompletionTool = chatCompletionTool; - CustomToolChatCompletions = customToolChatCompletions; - } - - /// - /// - /// - public object? Object => - CustomToolChatCompletions as object ?? - ChatCompletionTool as object - ; - - /// - /// - /// - public override string? ToString() => - ChatCompletionTool?.ToString() ?? - CustomToolChatCompletions?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsChatCompletionTool || IsCustomToolChatCompletions; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? chatCompletionTool = null, - global::System.Func? customToolChatCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsChatCompletionTool && chatCompletionTool != null) - { - return chatCompletionTool(ChatCompletionTool!); - } - else if (IsCustomToolChatCompletions && customToolChatCompletions != null) - { - return customToolChatCompletions(CustomToolChatCompletions!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? chatCompletionTool = null, - global::System.Action? customToolChatCompletions = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsChatCompletionTool) - { - chatCompletionTool?.Invoke(ChatCompletionTool!); - } - else if (IsCustomToolChatCompletions) - { - customToolChatCompletions?.Invoke(CustomToolChatCompletions!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ChatCompletionTool, - typeof(global::tryAGI.OpenAI.ChatCompletionTool), - CustomToolChatCompletions, - typeof(global::tryAGI.OpenAI.CustomToolChatCompletions), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ToolsItem other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatCompletionTool, other.ChatCompletionTool) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomToolChatCompletions, other.CustomToolChatCompletions) - ; - } - - /// - /// - /// - 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.Json.g.cs new file mode 100644 index 00000000..721a017f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct ToolsItem13 + { + /// + /// 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::tryAGI.OpenAI.ToolsItem13? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.ToolsItem13), + jsonSerializerContext) as global::tryAGI.OpenAI.ToolsItem13?; + } + + /// + /// 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::tryAGI.OpenAI.ToolsItem13? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.ToolsItem13), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolsItem13?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.g.cs new file mode 100644 index 00000000..e1654c4c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem13.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A function or custom tool that belongs to a namespace. + /// + public readonly partial struct ToolsItem13 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.FunctionToolParam? Function { get; init; } +#else + public global::tryAGI.OpenAI.FunctionToolParam? Function { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] +#endif + public bool IsFunction => Function != null; + + /// + /// A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools) + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.CustomToolParam? Custom { get; init; } +#else + public global::tryAGI.OpenAI.CustomToolParam? Custom { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Custom))] +#endif + public bool IsCustom => Custom != null; + /// + /// + /// + public static implicit operator ToolsItem13(global::tryAGI.OpenAI.FunctionToolParam value) => new ToolsItem13((global::tryAGI.OpenAI.FunctionToolParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.FunctionToolParam?(ToolsItem13 @this) => @this.Function; + + /// + /// + /// + public ToolsItem13(global::tryAGI.OpenAI.FunctionToolParam? value) + { + Function = value; + } + + /// + /// + /// + public static implicit operator ToolsItem13(global::tryAGI.OpenAI.CustomToolParam value) => new ToolsItem13((global::tryAGI.OpenAI.CustomToolParam?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.CustomToolParam?(ToolsItem13 @this) => @this.Custom; + + /// + /// + /// + public ToolsItem13(global::tryAGI.OpenAI.CustomToolParam? value) + { + Custom = value; + } + + /// + /// + /// + public ToolsItem13( + global::tryAGI.OpenAI.FunctionToolParam? function, + global::tryAGI.OpenAI.CustomToolParam? custom + ) + { + Function = function; + Custom = custom; + } + + /// + /// + /// + public object? Object => + Custom as object ?? + Function as object + ; + + /// + /// + /// + public override string? ToString() => + Function?.ToString() ?? + Custom?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsFunction && !IsCustom || !IsFunction && IsCustom; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? function = null, + global::System.Func? custom = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsFunction && function != null) + { + return function(Function!); + } + else if (IsCustom && custom != null) + { + return custom(Custom!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? function = null, + global::System.Action? custom = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsFunction) + { + function?.Invoke(Function!); + } + else if (IsCustom) + { + custom?.Invoke(Custom!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Function, + typeof(global::tryAGI.OpenAI.FunctionToolParam), + Custom, + typeof(global::tryAGI.OpenAI.CustomToolParam), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ToolsItem13 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Custom, other.Custom) + ; + } + + /// + /// + /// + public static bool operator ==(ToolsItem13 obj1, ToolsItem13 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ToolsItem13 obj1, ToolsItem13 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ToolsItem13 o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.Json.g.cs deleted file mode 100644 index 6c360edf..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ToolsItem2 - { - /// - /// 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::tryAGI.OpenAI.ToolsItem2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ToolsItem2), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ToolsItem2? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ToolsItem2), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolsItem2?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.g.cs deleted file mode 100644 index 9cc62164..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem2.g.cs +++ /dev/null @@ -1,222 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ToolsItem2 : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantToolsCode? AssistantCode { get; init; } -#else - public global::tryAGI.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::tryAGI.OpenAI.AssistantToolsCode value) => new ToolsItem2((global::tryAGI.OpenAI.AssistantToolsCode?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.AssistantToolsCode?(ToolsItem2 @this) => @this.AssistantCode; - - /// - /// - /// - public ToolsItem2(global::tryAGI.OpenAI.AssistantToolsCode? value) - { - AssistantCode = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } -#else - public global::tryAGI.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 ToolsItem2(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly value) => new ToolsItem2((global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly?(ToolsItem2 @this) => @this.AssistantFileSearchTypeOnly; - - /// - /// - /// - public ToolsItem2(global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? value) - { - AssistantFileSearchTypeOnly = value; - } - - /// - /// - /// - public ToolsItem2( - global::tryAGI.OpenAI.AssistantToolsCode? assistantCode, - global::tryAGI.OpenAI.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly - ) - { - AssistantCode = assistantCode; - AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; - } - - /// - /// - /// - public object? Object => - AssistantFileSearchTypeOnly as object ?? - AssistantCode as object - ; - - /// - /// - /// - public override string? ToString() => - AssistantCode?.ToString() ?? - AssistantFileSearchTypeOnly?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return 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::tryAGI.OpenAI.AssistantToolsCode), - AssistantFileSearchTypeOnly, - typeof(global::tryAGI.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 global::System.Linq.Enumerable.Aggregate(fields, 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(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) - ; - } - - /// - /// - /// - 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.Json.g.cs deleted file mode 100644 index 51e31e4b..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public readonly partial struct ToolsItem5 - { - /// - /// 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::tryAGI.OpenAI.ToolsItem5? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.ToolsItem5), - jsonSerializerContext) as global::tryAGI.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::tryAGI.OpenAI.ToolsItem5? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.ToolsItem5), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.ToolsItem5?; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.g.cs deleted file mode 100644 index 1d4d151f..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ToolsItem5.g.cs +++ /dev/null @@ -1,223 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public readonly partial struct ToolsItem5 : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.RealtimeFunctionTool? RealtimeFunctionTool { get; init; } -#else - public global::tryAGI.OpenAI.RealtimeFunctionTool? RealtimeFunctionTool { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RealtimeFunctionTool))] -#endif - public bool IsRealtimeFunctionTool => RealtimeFunctionTool != null; - - /// - /// - /// - public static implicit operator ToolsItem5(global::tryAGI.OpenAI.RealtimeFunctionTool value) => new ToolsItem5((global::tryAGI.OpenAI.RealtimeFunctionTool?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.RealtimeFunctionTool?(ToolsItem5 @this) => @this.RealtimeFunctionTool; - - /// - /// - /// - public ToolsItem5(global::tryAGI.OpenAI.RealtimeFunctionTool? value) - { - RealtimeFunctionTool = value; - } - - /// - /// Give the model access to additional tools via remote Model Context Protocol
- /// (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). - ///
-#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.MCPTool? MCPTool { get; init; } -#else - public global::tryAGI.OpenAI.MCPTool? MCPTool { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MCPTool))] -#endif - public bool IsMCPTool => MCPTool != null; - - /// - /// - /// - public static implicit operator ToolsItem5(global::tryAGI.OpenAI.MCPTool value) => new ToolsItem5((global::tryAGI.OpenAI.MCPTool?)value); - - /// - /// - /// - public static implicit operator global::tryAGI.OpenAI.MCPTool?(ToolsItem5 @this) => @this.MCPTool; - - /// - /// - /// - public ToolsItem5(global::tryAGI.OpenAI.MCPTool? value) - { - MCPTool = value; - } - - /// - /// - /// - public ToolsItem5( - global::tryAGI.OpenAI.RealtimeFunctionTool? realtimeFunctionTool, - global::tryAGI.OpenAI.MCPTool? mCPTool - ) - { - RealtimeFunctionTool = realtimeFunctionTool; - MCPTool = mCPTool; - } - - /// - /// - /// - public object? Object => - MCPTool as object ?? - RealtimeFunctionTool as object - ; - - /// - /// - /// - public override string? ToString() => - RealtimeFunctionTool?.ToString() ?? - MCPTool?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsRealtimeFunctionTool || IsMCPTool; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? realtimeFunctionTool = null, - global::System.Func? mCPTool = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsRealtimeFunctionTool && realtimeFunctionTool != null) - { - return realtimeFunctionTool(RealtimeFunctionTool!); - } - else if (IsMCPTool && mCPTool != null) - { - return mCPTool(MCPTool!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? realtimeFunctionTool = null, - global::System.Action? mCPTool = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsRealtimeFunctionTool) - { - realtimeFunctionTool?.Invoke(RealtimeFunctionTool!); - } - else if (IsMCPTool) - { - mCPTool?.Invoke(MCPTool!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - RealtimeFunctionTool, - typeof(global::tryAGI.OpenAI.RealtimeFunctionTool), - MCPTool, - typeof(global::tryAGI.OpenAI.MCPTool), - }; - 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(ToolsItem5 other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RealtimeFunctionTool, other.RealtimeFunctionTool) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPTool, other.MCPTool) - ; - } - - /// - /// - /// - 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); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb.g.cs index 657fd599..c1716999 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb.g.cs @@ -11,9 +11,9 @@ public sealed partial class TopLogProb /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("token")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Bytes { get; set; } + public required string Token { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class TopLogProb /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } + public required global::System.Collections.Generic.IList Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,20 +38,20 @@ public sealed partial class TopLogProb /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TopLogProb( - global::System.Collections.Generic.IList bytes, + string token, double logprob, - string token) + global::System.Collections.Generic.IList bytes) { - this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); - this.Logprob = logprob; this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.Logprob = logprob; + this.Bytes = bytes ?? throw new global::System.ArgumentNullException(nameof(bytes)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEvent.g.cs index 4633891b..694a4914 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEvent.g.cs @@ -4,10 +4,17 @@ namespace tryAGI.OpenAI { /// - /// Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + /// Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. /// public sealed partial class TranscriptTextDeltaEvent { + /// + /// The type of the event. Always `transcript.text.delta`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDeltaEventTypeJsonConverter))] + public global::tryAGI.OpenAI.TranscriptTextDeltaEventType Type { get; set; } + /// /// The text delta that was additionally transcribed. /// @@ -16,17 +23,16 @@ public sealed partial class TranscriptTextDeltaEvent public required string Delta { get; set; } /// - /// The log probabilities of the delta. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + /// The log probabilities of the delta. Only included if you [create a transcription](/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. /// [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] public global::System.Collections.Generic.IList? Logprobs { get; set; } /// - /// The type of the event. Always `transcript.text.delta`. + /// Identifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDeltaEventTypeJsonConverter))] - public global::tryAGI.OpenAI.TranscriptTextDeltaEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("segment_id")] + public string? SegmentId { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,26 +43,31 @@ public sealed partial class TranscriptTextDeltaEvent /// /// Initializes a new instance of the class. /// + /// + /// The type of the event. Always `transcript.text.delta`. + /// /// /// The text delta that was additionally transcribed. /// /// - /// The log probabilities of the delta. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + /// The log probabilities of the delta. Only included if you [create a transcription](/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. /// - /// - /// The type of the event. Always `transcript.text.delta`. + /// + /// Identifier of the diarized segment that this delta belongs to. Only present when using `gpt-4o-transcribe-diarize`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptTextDeltaEvent( string delta, + global::tryAGI.OpenAI.TranscriptTextDeltaEventType type, global::System.Collections.Generic.IList? logprobs, - global::tryAGI.OpenAI.TranscriptTextDeltaEventType type) + string? segmentId) { this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); - this.Logprobs = logprobs; this.Type = type; + this.Logprobs = logprobs; + this.SegmentId = segmentId; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEventLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEventLogprob.g.cs index 96f78c3f..01026d47 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEventLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDeltaEventLogprob.g.cs @@ -9,10 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class TranscriptTextDeltaEventLogprob { /// - /// The bytes that were used to generate the log probability. + /// The token that was used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] - public global::System.Collections.Generic.IList? Bytes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + public string? Token { get; set; } /// /// The log probability of the token. @@ -21,10 +21,10 @@ public sealed partial class TranscriptTextDeltaEventLogprob public double? Logprob { get; set; } /// - /// The token that was used to generate the log probability. + /// The bytes that were used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] - public string? Token { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + public global::System.Collections.Generic.IList? Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -35,26 +35,26 @@ public sealed partial class TranscriptTextDeltaEventLogprob /// /// Initializes a new instance of the class. /// - /// - /// The bytes that were used to generate the log probability. + /// + /// The token that was used to generate the log probability. /// /// /// The log probability of the token. /// - /// - /// The token that was used to generate the log probability. + /// + /// The bytes that were used to generate the log probability. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptTextDeltaEventLogprob( - global::System.Collections.Generic.IList? bytes, + string? token, double? logprob, - string? token) + global::System.Collections.Generic.IList? bytes) { - this.Bytes = bytes; - this.Logprob = logprob; this.Token = token; + this.Logprob = logprob; + this.Bytes = bytes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEvent.g.cs index fd328d11..dd0c343c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEvent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEvent.g.cs @@ -4,15 +4,16 @@ namespace tryAGI.OpenAI { /// - /// Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. + /// Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`. /// public sealed partial class TranscriptTextDoneEvent { /// - /// The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + /// The type of the event. Always `transcript.text.done`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] - public global::System.Collections.Generic.IList? Logprobs { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDoneEventTypeJsonConverter))] + public global::tryAGI.OpenAI.TranscriptTextDoneEventType Type { get; set; } /// /// The text that was transcribed. @@ -22,11 +23,10 @@ public sealed partial class TranscriptTextDoneEvent public required string Text { get; set; } /// - /// The type of the event. Always `transcript.text.done`. + /// The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextDoneEventTypeJsonConverter))] - public global::tryAGI.OpenAI.TranscriptTextDoneEventType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::System.Collections.Generic.IList? Logprobs { get; set; } /// /// Usage statistics for models billed by token usage. @@ -43,14 +43,14 @@ public sealed partial class TranscriptTextDoneEvent /// /// Initializes a new instance of the class. /// - /// - /// The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. + /// + /// The type of the event. Always `transcript.text.done`. /// /// /// The text that was transcribed. /// - /// - /// The type of the event. Always `transcript.text.done`. + /// + /// The log probabilities of the individual tokens in the transcription. Only included if you [create a transcription](/docs/api-reference/audio/create-transcription) with the `include[]` parameter set to `logprobs`. /// /// /// Usage statistics for models billed by token usage. @@ -60,13 +60,13 @@ public sealed partial class TranscriptTextDoneEvent #endif public TranscriptTextDoneEvent( string text, - global::System.Collections.Generic.IList? logprobs, global::tryAGI.OpenAI.TranscriptTextDoneEventType type, + global::System.Collections.Generic.IList? logprobs, global::tryAGI.OpenAI.TranscriptTextUsageTokens? usage) { this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Logprobs = logprobs; this.Type = type; + this.Logprobs = logprobs; this.Usage = usage; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEventLogprob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEventLogprob.g.cs index bdf47653..ebd30616 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEventLogprob.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextDoneEventLogprob.g.cs @@ -9,10 +9,10 @@ namespace tryAGI.OpenAI public sealed partial class TranscriptTextDoneEventLogprob { /// - /// The bytes that were used to generate the log probability. + /// The token that was used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] - public global::System.Collections.Generic.IList? Bytes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + public string? Token { get; set; } /// /// The log probability of the token. @@ -21,10 +21,10 @@ public sealed partial class TranscriptTextDoneEventLogprob public double? Logprob { get; set; } /// - /// The token that was used to generate the log probability. + /// The bytes that were used to generate the log probability. /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] - public string? Token { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + public global::System.Collections.Generic.IList? Bytes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -35,26 +35,26 @@ public sealed partial class TranscriptTextDoneEventLogprob /// /// Initializes a new instance of the class. /// - /// - /// The bytes that were used to generate the log probability. + /// + /// The token that was used to generate the log probability. /// /// /// The log probability of the token. /// - /// - /// The token that was used to generate the log probability. + /// + /// The bytes that were used to generate the log probability. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptTextDoneEventLogprob( - global::System.Collections.Generic.IList? bytes, + string? token, double? logprob, - string? token) + global::System.Collections.Generic.IList? bytes) { - this.Bytes = bytes; - this.Logprob = logprob; this.Token = token; + this.Logprob = logprob; + this.Bytes = bytes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.Json.g.cs new file mode 100644 index 00000000..ac8586b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TranscriptTextSegmentEvent + { + /// + /// 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::tryAGI.OpenAI.TranscriptTextSegmentEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), + jsonSerializerContext) as global::tryAGI.OpenAI.TranscriptTextSegmentEvent; + } + + /// + /// 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::tryAGI.OpenAI.TranscriptTextSegmentEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TranscriptTextSegmentEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TranscriptTextSegmentEvent; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.g.cs new file mode 100644 index 00000000..c988c023 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEvent.g.cs @@ -0,0 +1,106 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`. + /// + public sealed partial class TranscriptTextSegmentEvent + { + /// + /// The type of the event. Always `transcript.text.segment`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextSegmentEventTypeJsonConverter))] + public global::tryAGI.OpenAI.TranscriptTextSegmentEventType Type { get; set; } + + /// + /// Unique identifier for the segment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Start timestamp of the segment in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required float Start { get; set; } + + /// + /// End timestamp of the segment in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonRequired] + public required float End { get; set; } + + /// + /// Transcript text for this segment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Speaker label for this segment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("speaker")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Speaker { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the event. Always `transcript.text.segment`. + /// + /// + /// Unique identifier for the segment. + /// + /// + /// Start timestamp of the segment in seconds. + /// + /// + /// End timestamp of the segment in seconds. + /// + /// + /// Transcript text for this segment. + /// + /// + /// Speaker label for this segment. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TranscriptTextSegmentEvent( + string id, + float start, + float end, + string text, + string speaker, + global::tryAGI.OpenAI.TranscriptTextSegmentEventType type) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Start = start; + this.End = end; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Speaker = speaker ?? throw new global::System.ArgumentNullException(nameof(speaker)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public TranscriptTextSegmentEvent() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEventType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEventType.g.cs new file mode 100644 index 00000000..b3c779da --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextSegmentEventType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the event. Always `transcript.text.segment`. + /// + public enum TranscriptTextSegmentEventType + { + /// + /// + /// + TranscriptTextSegment, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TranscriptTextSegmentEventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TranscriptTextSegmentEventType value) + { + return value switch + { + TranscriptTextSegmentEventType.TranscriptTextSegment => "transcript.text.segment", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TranscriptTextSegmentEventType? ToEnum(string value) + { + return value switch + { + "transcript.text.segment" => TranscriptTextSegmentEventType.TranscriptTextSegment, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageDuration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageDuration.g.cs index 45ba1fbd..ea56ebbb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageDuration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageDuration.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class TranscriptTextUsageDuration { - /// - /// Duration of the input audio in seconds. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Seconds { get; set; } - /// /// The type of the usage object. Always `duration` for this variant. /// @@ -22,6 +15,13 @@ public sealed partial class TranscriptTextUsageDuration [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageDurationTypeJsonConverter))] public global::tryAGI.OpenAI.TranscriptTextUsageDurationType Type { get; set; } + /// + /// Duration of the input audio in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Seconds { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class TranscriptTextUsageDuration /// /// Initializes a new instance of the class. /// - /// - /// Duration of the input audio in seconds. - /// /// /// The type of the usage object. Always `duration` for this variant. /// + /// + /// Duration of the input audio in seconds. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokens.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokens.g.cs index 7226647c..3612659b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokens.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokens.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class TranscriptTextUsageTokens { /// - /// Details about the input tokens billed for this request. + /// The type of the usage object. Always `tokens` for this variant. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_token_details")] - public global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? InputTokenDetails { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageTokensTypeJsonConverter))] + public global::tryAGI.OpenAI.TranscriptTextUsageTokensType Type { get; set; } /// /// Number of input tokens billed for this request. @@ -21,6 +22,12 @@ public sealed partial class TranscriptTextUsageTokens [global::System.Text.Json.Serialization.JsonRequired] public required int InputTokens { get; set; } + /// + /// Details about the input tokens billed for this request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_token_details")] + public global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? InputTokenDetails { get; set; } + /// /// Number of output tokens generated. /// @@ -35,13 +42,6 @@ public sealed partial class TranscriptTextUsageTokens [global::System.Text.Json.Serialization.JsonRequired] public required int TotalTokens { get; set; } - /// - /// The type of the usage object. Always `tokens` for this variant. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptTextUsageTokensTypeJsonConverter))] - public global::tryAGI.OpenAI.TranscriptTextUsageTokensType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -51,21 +51,21 @@ public sealed partial class TranscriptTextUsageTokens /// /// Initializes a new instance of the class. /// - /// - /// Details about the input tokens billed for this request. + /// + /// The type of the usage object. Always `tokens` for this variant. /// /// /// Number of input tokens billed for this request. /// + /// + /// Details about the input tokens billed for this request. + /// /// /// Number of output tokens generated. /// /// /// Total number of tokens used (input + output). /// - /// - /// The type of the usage object. Always `tokens` for this variant. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -73,14 +73,14 @@ public TranscriptTextUsageTokens( int inputTokens, int outputTokens, int totalTokens, - global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? inputTokenDetails, - global::tryAGI.OpenAI.TranscriptTextUsageTokensType type) + global::tryAGI.OpenAI.TranscriptTextUsageTokensType type, + global::tryAGI.OpenAI.TranscriptTextUsageTokensInputTokenDetails? inputTokenDetails) { this.InputTokens = inputTokens; this.OutputTokens = outputTokens; this.TotalTokens = totalTokens; - this.InputTokenDetails = inputTokenDetails; this.Type = type; + this.InputTokenDetails = inputTokenDetails; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokensInputTokenDetails.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokensInputTokenDetails.g.cs index 33f2403b..54bb451e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokensInputTokenDetails.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptTextUsageTokensInputTokenDetails.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class TranscriptTextUsageTokensInputTokenDetails { - /// - /// Number of audio tokens billed for this request. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] - public int? AudioTokens { get; set; } - /// /// Number of text tokens billed for this request. /// [global::System.Text.Json.Serialization.JsonPropertyName("text_tokens")] public int? TextTokens { get; set; } + /// + /// Number of audio tokens billed for this request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio_tokens")] + public int? AudioTokens { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class TranscriptTextUsageTokensInputTokenDetails /// /// Initializes a new instance of the class. /// - /// - /// Number of audio tokens billed for this request. - /// /// /// Number of text tokens billed for this request. /// + /// + /// Number of audio tokens billed for this request. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptTextUsageTokensInputTokenDetails( - int? audioTokens, - int? textTokens) + int? textTokens, + int? audioTokens) { - this.AudioTokens = audioTokens; this.TextTokens = textTokens; + this.AudioTokens = audioTokens; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.Json.g.cs new file mode 100644 index 00000000..4a142b95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct TranscriptionChunkingStrategy + { + /// + /// 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::tryAGI.OpenAI.TranscriptionChunkingStrategy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategy), + jsonSerializerContext) as global::tryAGI.OpenAI.TranscriptionChunkingStrategy?; + } + + /// + /// 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::tryAGI.OpenAI.TranscriptionChunkingStrategy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TranscriptionChunkingStrategy), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TranscriptionChunkingStrategy?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.g.cs new file mode 100644 index 00000000..c395d097 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategy.g.cs @@ -0,0 +1,225 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls how the audio is cut into chunks. When set to `"auto"`, the
+ /// server first normalizes loudness and then uses voice activity detection (VAD) to
+ /// choose boundaries. `server_vad` object can be provided to tweak VAD detection
+ /// parameters manually. If unset, the audio is transcribed as a single block. + ///
+ public readonly partial struct TranscriptionChunkingStrategy : global::System.IEquatable + { + /// + /// Automatically set chunking parameters based on the audio. Must be set to `"auto"`.
+ /// Default Value: [auto] + ///
+#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? Value1 { get; init; } +#else + public global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.VadConfig? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.VadConfig? 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 TranscriptionChunkingStrategy(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum value) => new TranscriptionChunkingStrategy((global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum?(TranscriptionChunkingStrategy @this) => @this.Value1; + + /// + /// + /// + public TranscriptionChunkingStrategy(global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator TranscriptionChunkingStrategy(global::tryAGI.OpenAI.VadConfig value) => new TranscriptionChunkingStrategy((global::tryAGI.OpenAI.VadConfig?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.VadConfig?(TranscriptionChunkingStrategy @this) => @this.Value2; + + /// + /// + /// + public TranscriptionChunkingStrategy(global::tryAGI.OpenAI.VadConfig? value) + { + Value2 = value; + } + + /// + /// + /// + public TranscriptionChunkingStrategy( + global::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum? value1, + global::tryAGI.OpenAI.VadConfig? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToValueString() ?? + Value2?.ToString() + ; + + /// + /// + /// + 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::tryAGI.OpenAI.TranscriptionChunkingStrategyEnum), + Value2, + typeof(global::tryAGI.OpenAI.VadConfig), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(TranscriptionChunkingStrategy 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 ==(TranscriptionChunkingStrategy obj1, TranscriptionChunkingStrategy obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(TranscriptionChunkingStrategy obj1, TranscriptionChunkingStrategy obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is TranscriptionChunkingStrategy o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategyEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategyEnum.g.cs new file mode 100644 index 00000000..e33cf6d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionChunkingStrategyEnum.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Automatically set chunking parameters based on the audio. Must be set to `"auto"`.
+ /// Default Value: [auto] + ///
+ public enum TranscriptionChunkingStrategyEnum + { + /// + /// + /// + Auto, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TranscriptionChunkingStrategyEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TranscriptionChunkingStrategyEnum value) + { + return value switch + { + TranscriptionChunkingStrategyEnum.Auto => "auto", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TranscriptionChunkingStrategyEnum? ToEnum(string value) + { + return value switch + { + "auto" => TranscriptionChunkingStrategyEnum.Auto, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.Json.g.cs new file mode 100644 index 00000000..e3716804 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TranscriptionDiarizedSegment + { + /// + /// 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::tryAGI.OpenAI.TranscriptionDiarizedSegment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TranscriptionDiarizedSegment), + jsonSerializerContext) as global::tryAGI.OpenAI.TranscriptionDiarizedSegment; + } + + /// + /// 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::tryAGI.OpenAI.TranscriptionDiarizedSegment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TranscriptionDiarizedSegment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TranscriptionDiarizedSegment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.g.cs new file mode 100644 index 00000000..08c6cc90 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegment.g.cs @@ -0,0 +1,106 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A segment of diarized transcript text with speaker metadata. + /// + public sealed partial class TranscriptionDiarizedSegment + { + /// + /// The type of the segment. Always `transcript.text.segment`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TranscriptionDiarizedSegmentTypeJsonConverter))] + public global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType Type { get; set; } + + /// + /// Unique identifier for the segment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Start timestamp of the segment in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required float Start { get; set; } + + /// + /// End timestamp of the segment in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonRequired] + public required float End { get; set; } + + /// + /// Transcript text for this segment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Speaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, ...). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("speaker")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Speaker { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the segment. Always `transcript.text.segment`. + /// + /// + /// Unique identifier for the segment. + /// + /// + /// Start timestamp of the segment in seconds. + /// + /// + /// End timestamp of the segment in seconds. + /// + /// + /// Transcript text for this segment. + /// + /// + /// Speaker label for this segment. When known speakers are provided, the label matches `known_speaker_names[]`. Otherwise speakers are labeled sequentially using capital letters (`A`, `B`, ...). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TranscriptionDiarizedSegment( + string id, + float start, + float end, + string text, + string speaker, + global::tryAGI.OpenAI.TranscriptionDiarizedSegmentType type) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Start = start; + this.End = end; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Speaker = speaker ?? throw new global::System.ArgumentNullException(nameof(speaker)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public TranscriptionDiarizedSegment() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegmentType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegmentType.g.cs new file mode 100644 index 00000000..d7a12dab --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionDiarizedSegmentType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of the segment. Always `transcript.text.segment`. + /// + public enum TranscriptionDiarizedSegmentType + { + /// + /// + /// + TranscriptTextSegment, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TranscriptionDiarizedSegmentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TranscriptionDiarizedSegmentType value) + { + return value switch + { + TranscriptionDiarizedSegmentType.TranscriptTextSegment => "transcript.text.segment", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TranscriptionDiarizedSegmentType? ToEnum(string value) + { + return value switch + { + "transcript.text.segment" => TranscriptionDiarizedSegmentType.TranscriptTextSegment, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionInclude.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionInclude.g.cs index a10bc887..8e6eb9db 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionInclude.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionInclude.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// + /// Default Value: [] /// public enum TranscriptionInclude { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionSegment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionSegment.g.cs index e9dc801e..8d7d8782 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionSegment.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionSegment.g.cs @@ -9,74 +9,74 @@ namespace tryAGI.OpenAI public sealed partial class TranscriptionSegment { /// - /// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. + /// Unique identifier of the segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("avg_logprob")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required float AvgLogprob { get; set; } + public required int Id { get; set; } /// - /// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. + /// Seek offset of the segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("compression_ratio")] + [global::System.Text.Json.Serialization.JsonPropertyName("seek")] [global::System.Text.Json.Serialization.JsonRequired] - public required float CompressionRatio { get; set; } + public required int Seek { get; set; } /// - /// End time of the segment in seconds. + /// Start time of the segment in seconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonPropertyName("start")] [global::System.Text.Json.Serialization.JsonRequired] - public required float End { get; set; } + public required float Start { get; set; } /// - /// Unique identifier of the segment. + /// End time of the segment in seconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("end")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Id { get; set; } + public required float End { get; set; } /// - /// Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. + /// Text content of the segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("no_speech_prob")] + [global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] - public required float NoSpeechProb { get; set; } + public required string Text { get; set; } /// - /// Seek offset of the segment. + /// Array of token IDs for the text content. /// - [global::System.Text.Json.Serialization.JsonPropertyName("seek")] + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Seek { get; set; } + public required global::System.Collections.Generic.IList Tokens { get; set; } /// - /// Start time of the segment in seconds. + /// Temperature parameter used for generating the segment. /// - [global::System.Text.Json.Serialization.JsonPropertyName("start")] + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] [global::System.Text.Json.Serialization.JsonRequired] - public required float Start { get; set; } + public required float Temperature { get; set; } /// - /// Temperature parameter used for generating the segment. + /// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + [global::System.Text.Json.Serialization.JsonPropertyName("avg_logprob")] [global::System.Text.Json.Serialization.JsonRequired] - public required float Temperature { get; set; } + public required float AvgLogprob { get; set; } /// - /// Text content of the segment. + /// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonPropertyName("compression_ratio")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } + public required float CompressionRatio { get; set; } /// - /// Array of token IDs for the text content. + /// Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. /// - [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("no_speech_prob")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tokens { get; set; } + public required float NoSpeechProb { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -87,29 +87,17 @@ public sealed partial class TranscriptionSegment /// /// Initializes a new instance of the class. /// - /// - /// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. - /// - /// - /// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. - /// - /// - /// End time of the segment in seconds. - /// /// /// Unique identifier of the segment. /// - /// - /// Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. - /// /// /// Seek offset of the segment. /// /// /// Start time of the segment in seconds. /// - /// - /// Temperature parameter used for generating the segment. + /// + /// End time of the segment in seconds. /// /// /// Text content of the segment. @@ -117,31 +105,43 @@ public sealed partial class TranscriptionSegment /// /// Array of token IDs for the text content. /// + /// + /// Temperature parameter used for generating the segment. + /// + /// + /// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. + /// + /// + /// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. + /// + /// + /// Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptionSegment( - float avgLogprob, - float compressionRatio, - float end, int id, - float noSpeechProb, int seek, float start, - float temperature, + float end, string text, - global::System.Collections.Generic.IList tokens) + global::System.Collections.Generic.IList tokens, + float temperature, + float avgLogprob, + float compressionRatio, + float noSpeechProb) { - this.AvgLogprob = avgLogprob; - this.CompressionRatio = compressionRatio; - this.End = end; this.Id = id; - this.NoSpeechProb = noSpeechProb; this.Seek = seek; this.Start = start; - this.Temperature = temperature; + this.End = end; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.Tokens = tokens ?? throw new global::System.ArgumentNullException(nameof(tokens)); + this.Temperature = temperature; + this.AvgLogprob = avgLogprob; + this.CompressionRatio = compressionRatio; + this.NoSpeechProb = noSpeechProb; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionWord.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionWord.g.cs index 0974dad7..9d6c6ddf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionWord.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TranscriptionWord.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class TranscriptionWord { /// - /// End time of the word in seconds. + /// The text content of the word. /// - [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonPropertyName("word")] [global::System.Text.Json.Serialization.JsonRequired] - public required float End { get; set; } + public required string Word { get; set; } /// /// Start time of the word in seconds. @@ -23,11 +23,11 @@ public sealed partial class TranscriptionWord public required float Start { get; set; } /// - /// The text content of the word. + /// End time of the word in seconds. /// - [global::System.Text.Json.Serialization.JsonPropertyName("word")] + [global::System.Text.Json.Serialization.JsonPropertyName("end")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Word { get; set; } + public required float End { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,26 +38,26 @@ public sealed partial class TranscriptionWord /// /// Initializes a new instance of the class. /// - /// - /// End time of the word in seconds. + /// + /// The text content of the word. /// /// /// Start time of the word in seconds. /// - /// - /// The text content of the word. + /// + /// End time of the word in seconds. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TranscriptionWord( - float end, + string word, float start, - string word) + float end) { - this.End = end; - this.Start = start; this.Word = word ?? throw new global::System.ArgumentNullException(nameof(word)); + this.Start = start; + this.End = end; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationEnum.g.cs new file mode 100644 index 00000000..63413689 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationEnum.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum TruncationEnum + { + /// + /// + /// + Auto, + /// + /// + /// + Disabled, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TruncationEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TruncationEnum value) + { + return value switch + { + TruncationEnum.Auto => "auto", + TruncationEnum.Disabled => "disabled", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TruncationEnum? ToEnum(string value) + { + return value switch + { + "auto" => TruncationEnum.Auto, + "disabled" => TruncationEnum.Disabled, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObject.g.cs index f358753a..3fae70ae 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObject.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class TruncationObject { - /// - /// The number of most recent messages from the thread when constructing the context for the run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_messages")] - public int? LastMessages { get; set; } - /// /// The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. /// @@ -22,6 +16,12 @@ public sealed partial class TruncationObject [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.TruncationObjectType Type { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_messages")] + public int? LastMessages { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,10 @@ public sealed partial class TruncationObject /// /// Initializes a new instance of the class. /// - /// - /// The number of most recent messages from the thread when constructing the context for the run. - /// /// /// The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.Json.g.cs new file mode 100644 index 00000000..5aa6d0cc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TruncationObjectLastMessages + { + /// + /// 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::tryAGI.OpenAI.TruncationObjectLastMessages? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TruncationObjectLastMessages), + jsonSerializerContext) as global::tryAGI.OpenAI.TruncationObjectLastMessages; + } + + /// + /// 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::tryAGI.OpenAI.TruncationObjectLastMessages? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TruncationObjectLastMessages), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TruncationObjectLastMessages; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.g.cs new file mode 100644 index 00000000..2f8232ed --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TruncationObjectLastMessages.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class TruncationObjectLastMessages + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.Json.g.cs deleted file mode 100644 index a77fc0c3..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Type - { - /// - /// 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::tryAGI.OpenAI.Type? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Type), - jsonSerializerContext) as global::tryAGI.OpenAI.Type; - } - - /// - /// 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::tryAGI.OpenAI.Type? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Type), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Type; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.g.cs deleted file mode 100644 index 902cbd40..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Type.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// An action to type in text. - /// - public sealed partial class Type - { - /// - /// The text to type. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Specifies the event type. For a type action, this property is
- /// always set to `type`.
- /// Default Value: type - ///
- /// global::tryAGI.OpenAI.TypeType1.Type - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TypeType1JsonConverter))] - public global::tryAGI.OpenAI.TypeType1 Type1 { get; set; } = global::tryAGI.OpenAI.TypeType1.Type; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The text to type. - /// - /// - /// Specifies the event type. For a type action, this property is
- /// always set to `type`.
- /// Default Value: type - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Type( - string text, - global::tryAGI.OpenAI.TypeType1 type1 = global::tryAGI.OpenAI.TypeType1.Type) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Type1 = type1; - } - - /// - /// Initializes a new instance of the class. - /// - public Type() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.Json.g.cs new file mode 100644 index 00000000..6c2d0f4a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class TypeParam + { + /// + /// 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::tryAGI.OpenAI.TypeParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.TypeParam), + jsonSerializerContext) as global::tryAGI.OpenAI.TypeParam; + } + + /// + /// 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::tryAGI.OpenAI.TypeParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.TypeParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.TypeParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.g.cs new file mode 100644 index 00000000..ad85acac --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParam.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// An action to type in text. + /// + public sealed partial class TypeParam + { + /// + /// Specifies the event type. For a type action, this property is always set to `type`.
+ /// Default Value: type + ///
+ /// global::tryAGI.OpenAI.TypeParamType.Type + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.TypeParamTypeJsonConverter))] + public global::tryAGI.OpenAI.TypeParamType Type { get; set; } = global::tryAGI.OpenAI.TypeParamType.Type; + + /// + /// The text to type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a type action, this property is always set to `type`.
+ /// Default Value: type + /// + /// + /// The text to type. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TypeParam( + string text, + global::tryAGI.OpenAI.TypeParamType type = global::tryAGI.OpenAI.TypeParamType.Type) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public TypeParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParamType.g.cs new file mode 100644 index 00000000..d7fdc720 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a type action, this property is always set to `type`.
+ /// Default Value: type + ///
+ public enum TypeParamType + { + /// + /// + /// + Type, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TypeParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TypeParamType value) + { + return value switch + { + TypeParamType.Type => "type", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TypeParamType? ToEnum(string value) + { + return value switch + { + "type" => TypeParamType.Type, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeType1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeType1.g.cs deleted file mode 100644 index a9280443..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TypeType1.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a type action, this property is
- /// always set to `type`.
- /// Default Value: type - ///
- public enum TypeType1 - { - /// - /// - /// - Type, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TypeType1Extensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TypeType1 value) - { - return value switch - { - TypeType1.Type => "type", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TypeType1? ToEnum(string value) - { - return value switch - { - "type" => TypeType1.Type, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateChatCompletionRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateChatCompletionRequest.g.cs index f53a6bfc..45177a1c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateChatCompletionRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateChatCompletionRequest.g.cs @@ -9,11 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class UpdateChatCompletionRequest { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] @@ -28,13 +24,7 @@ public sealed partial class UpdateChatCompletionRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs index 27984db8..3cd7f899 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs @@ -9,11 +9,8 @@ namespace tryAGI.OpenAI public sealed partial class UpdateConversationBody { /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// 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, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. ///
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] @@ -29,11 +26,8 @@ public sealed partial class UpdateConversationBody /// Initializes a new instance of the class. ///
/// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// 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, and querying for objects via API or the dashboard.
+ /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateEvalRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateEvalRequest.g.cs index cf191c91..a2383032 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateEvalRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateEvalRequest.g.cs @@ -8,22 +8,18 @@ namespace tryAGI.OpenAI ///
public sealed partial class UpdateEvalRequest { - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } - /// /// Rename the evaluation. /// [global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -33,25 +29,19 @@ public sealed partial class UpdateEvalRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// Rename the evaluation. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateEvalRequest( - global::System.Collections.Generic.Dictionary? metadata, - string? name) + string? name, + global::System.Collections.Generic.Dictionary? metadata) { - this.Metadata = metadata; this.Name = name; + this.Metadata = metadata; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.Json.g.cs new file mode 100644 index 00000000..5f511414 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UpdateGroupBody + { + /// + /// 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::tryAGI.OpenAI.UpdateGroupBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UpdateGroupBody), + jsonSerializerContext) as global::tryAGI.OpenAI.UpdateGroupBody; + } + + /// + /// 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::tryAGI.OpenAI.UpdateGroupBody? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UpdateGroupBody), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UpdateGroupBody; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.g.cs new file mode 100644 index 00000000..dfe2ffb1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateGroupBody.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Request payload for updating the details of an existing group. + /// + public sealed partial class UpdateGroupBody + { + /// + /// New display name for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// New display name for the group. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateGroupBody( + string name) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateGroupBody() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreFileAttributesRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreFileAttributesRequest.g.cs index c65c68fb..7841e855 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreFileAttributesRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreFileAttributesRequest.g.cs @@ -9,11 +9,7 @@ namespace tryAGI.OpenAI public sealed partial class UpdateVectorStoreFileAttributesRequest { /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("attributes")] [global::System.Text.Json.Serialization.JsonRequired] @@ -28,13 +24,7 @@ public sealed partial class UpdateVectorStoreFileAttributesRequest /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreRequest.g.cs index fdde432d..3fdb4b7f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVectorStoreRequest.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,26 +11,23 @@ namespace tryAGI.OpenAI public sealed partial class UpdateVectorStoreRequest { /// - /// The expiration policy for a vector store. + /// The name of the vector store. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.VectorStoreExpirationAfter? ExpiresAfter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? ExpiresAfter { get; set; } /// - /// The name of the vector store. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -39,30 +38,22 @@ public sealed partial class UpdateVectorStoreRequest /// /// Initializes a new instance of the class. /// - /// - /// The expiration policy for a vector store. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the vector store. /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateVectorStoreRequest( - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter, - global::System.Collections.Generic.Dictionary? metadata, - string? name) + string? name, + global::tryAGI.OpenAI.AllOf? expiresAfter, + global::System.Collections.Generic.Dictionary? metadata) { + this.Name = name; this.ExpiresAfter = expiresAfter; this.Metadata = metadata; - this.Name = name; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.Json.g.cs new file mode 100644 index 00000000..aeb0f9ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UpdateVoiceConsentRequest + { + /// + /// 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::tryAGI.OpenAI.UpdateVoiceConsentRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UpdateVoiceConsentRequest), + jsonSerializerContext) as global::tryAGI.OpenAI.UpdateVoiceConsentRequest; + } + + /// + /// 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::tryAGI.OpenAI.UpdateVoiceConsentRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UpdateVoiceConsentRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UpdateVoiceConsentRequest; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.g.cs new file mode 100644 index 00000000..50a0d913 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateVoiceConsentRequest.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UpdateVoiceConsentRequest + { + /// + /// The updated label for this consent recording. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The updated label for this consent recording. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateVoiceConsentRequest( + string name) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateVoiceConsentRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Upload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Upload.g.cs index 23246076..1d21655a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Upload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Upload.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,11 +11,11 @@ namespace tryAGI.OpenAI public sealed partial class Upload { /// - /// The intended number of bytes to be uploaded. + /// The Upload unique identifier, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Bytes { get; set; } + public required string Id { get; set; } /// /// The Unix timestamp (in seconds) for when the Upload was created. @@ -23,20 +25,6 @@ public sealed partial class Upload [global::System.Text.Json.Serialization.JsonRequired] public required global::System.DateTimeOffset CreatedAt { get; set; } - /// - /// The Unix timestamp (in seconds) for when the Upload will expire. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset ExpiresAt { get; set; } - - /// - /// The `File` object represents a document that has been uploaded to OpenAI. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file")] - public global::tryAGI.OpenAI.OpenAIFile? File { get; set; } - /// /// The name of the file to be uploaded. /// @@ -45,21 +33,14 @@ public sealed partial class Upload public required string Filename { get; set; } /// - /// The Upload unique identifier, which can be referenced in API endpoints. + /// The intended number of bytes to be uploaded. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// The object type, which is always "upload". - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectJsonConverter))] - public global::tryAGI.OpenAI.UploadObject Object { get; set; } + public required int Bytes { get; set; } /// - /// The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values. + /// The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values. /// [global::System.Text.Json.Serialization.JsonPropertyName("purpose")] [global::System.Text.Json.Serialization.JsonRequired] @@ -73,6 +54,28 @@ public sealed partial class Upload [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.UploadStatus Status { get; set; } + /// + /// The Unix timestamp (in seconds) for when the Upload will expire. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset ExpiresAt { get; set; } + + /// + /// The object type, which is always "upload". + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UploadObjectJsonConverter))] + public global::tryAGI.OpenAI.UploadObject? Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AllOfJsonConverter))] + public global::tryAGI.OpenAI.AllOf? File { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -82,56 +85,54 @@ public sealed partial class Upload /// /// Initializes a new instance of the class. /// - /// - /// The intended number of bytes to be uploaded. + /// + /// The Upload unique identifier, which can be referenced in API endpoints. /// /// /// The Unix timestamp (in seconds) for when the Upload was created. /// - /// - /// The Unix timestamp (in seconds) for when the Upload will expire. - /// - /// - /// The `File` object represents a document that has been uploaded to OpenAI. - /// /// /// The name of the file to be uploaded. /// - /// - /// The Upload unique identifier, which can be referenced in API endpoints. - /// - /// - /// The object type, which is always "upload". + /// + /// The intended number of bytes to be uploaded. /// /// - /// The intended purpose of the file. [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values. + /// The intended purpose of the file. [Please refer here](/docs/api-reference/files/object#files/object-purpose) for acceptable values. /// /// /// The status of the Upload. /// + /// + /// The Unix timestamp (in seconds) for when the Upload will expire. + /// + /// + /// The object type, which is always "upload". + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Upload( - int bytes, + string id, global::System.DateTimeOffset createdAt, - global::System.DateTimeOffset expiresAt, string filename, - string id, + int bytes, string purpose, global::tryAGI.OpenAI.UploadStatus status, - global::tryAGI.OpenAI.OpenAIFile? file, - global::tryAGI.OpenAI.UploadObject @object) + global::System.DateTimeOffset expiresAt, + global::tryAGI.OpenAI.UploadObject? @object, + global::tryAGI.OpenAI.AllOf? file) { - this.Bytes = bytes; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; - this.ExpiresAt = expiresAt; this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Bytes = bytes; this.Purpose = purpose ?? throw new global::System.ArgumentNullException(nameof(purpose)); this.Status = status; - this.File = file; + this.ExpiresAt = expiresAt; this.Object = @object; + this.File = file; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadCertificateRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadCertificateRequest.g.cs index 0653d2bf..b196a618 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadCertificateRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadCertificateRequest.g.cs @@ -8,6 +8,12 @@ namespace tryAGI.OpenAI /// public sealed partial class UploadCertificateRequest { + /// + /// An optional name for the certificate + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + /// /// The certificate content in PEM format /// @@ -15,12 +21,6 @@ public sealed partial class UploadCertificateRequest [global::System.Text.Json.Serialization.JsonRequired] public required string Content { get; set; } - /// - /// An optional name for the certificate - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -30,12 +30,12 @@ public sealed partial class UploadCertificateRequest /// /// Initializes a new instance of the class. /// - /// - /// The certificate content in PEM format - /// /// /// An optional name for the certificate /// + /// + /// The certificate content in PEM format + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadPart.g.cs index a2996c57..8b9fa50b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UploadPart.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class UploadPart { + /// + /// The upload Part unique identifier, which can be referenced in API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + /// /// The Unix timestamp (in seconds) for when the Part was created. /// @@ -17,11 +24,11 @@ public sealed partial class UploadPart public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The upload Part unique identifier, which can be referenced in API endpoints. + /// The ID of the Upload object that this Part was added to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("upload_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required string UploadId { get; set; } /// /// The object type, which is always `upload.part`. @@ -30,13 +37,6 @@ public sealed partial class UploadPart [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UploadPartObjectJsonConverter))] public global::tryAGI.OpenAI.UploadPartObject Object { get; set; } - /// - /// The ID of the Upload object that this Part was added to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("upload_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string UploadId { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -46,29 +46,29 @@ public sealed partial class UploadPart /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the Part was created. - /// /// /// The upload Part unique identifier, which can be referenced in API endpoints. /// - /// - /// The object type, which is always `upload.part`. + /// + /// The Unix timestamp (in seconds) for when the Part was created. /// /// /// The ID of the Upload object that this Part was added to. /// + /// + /// The object type, which is always `upload.part`. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UploadPart( - global::System.DateTimeOffset createdAt, string id, + global::System.DateTimeOffset createdAt, string uploadId, global::tryAGI.OpenAI.UploadPartObject @object) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; this.UploadId = uploadId ?? throw new global::System.ArgumentNullException(nameof(uploadId)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.Json.g.cs new file mode 100644 index 00000000..871b6aa6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UrlAnnotation + { + /// + /// 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::tryAGI.OpenAI.UrlAnnotation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UrlAnnotation), + jsonSerializerContext) as global::tryAGI.OpenAI.UrlAnnotation; + } + + /// + /// 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::tryAGI.OpenAI.UrlAnnotation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UrlAnnotation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UrlAnnotation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.g.cs new file mode 100644 index 00000000..3c435c88 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotation.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Annotation that references a URL. + /// + public sealed partial class UrlAnnotation + { + /// + /// Type discriminator that is always `url` for this annotation.
+ /// Default Value: url + ///
+ /// global::tryAGI.OpenAI.UrlAnnotationType.Url + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationTypeJsonConverter))] + public global::tryAGI.OpenAI.UrlAnnotationType Type { get; set; } = global::tryAGI.OpenAI.UrlAnnotationType.Url; + + /// + /// URL referenced by the annotation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.UrlAnnotationSource Source { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `url` for this annotation.
+ /// Default Value: url + /// + /// + /// URL referenced by the annotation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UrlAnnotation( + global::tryAGI.OpenAI.UrlAnnotationSource source, + global::tryAGI.OpenAI.UrlAnnotationType type = global::tryAGI.OpenAI.UrlAnnotationType.Url) + { + this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UrlAnnotation() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.Json.g.cs new file mode 100644 index 00000000..73309756 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UrlAnnotationSource + { + /// + /// 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::tryAGI.OpenAI.UrlAnnotationSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UrlAnnotationSource), + jsonSerializerContext) as global::tryAGI.OpenAI.UrlAnnotationSource; + } + + /// + /// 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::tryAGI.OpenAI.UrlAnnotationSource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UrlAnnotationSource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UrlAnnotationSource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.g.cs new file mode 100644 index 00000000..d14d54d1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSource.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// URL backing an annotation entry. + /// + public sealed partial class UrlAnnotationSource + { + /// + /// Type discriminator that is always `url`.
+ /// Default Value: url + ///
+ /// global::tryAGI.OpenAI.UrlAnnotationSourceType.Url + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UrlAnnotationSourceTypeJsonConverter))] + public global::tryAGI.OpenAI.UrlAnnotationSourceType Type { get; set; } = global::tryAGI.OpenAI.UrlAnnotationSourceType.Url; + + /// + /// URL referenced by the annotation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `url`.
+ /// Default Value: url + /// + /// + /// URL referenced by the annotation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UrlAnnotationSource( + string url, + global::tryAGI.OpenAI.UrlAnnotationSourceType type = global::tryAGI.OpenAI.UrlAnnotationSourceType.Url) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UrlAnnotationSource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSourceType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSourceType.g.cs new file mode 100644 index 00000000..fc5d2fbe --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationSourceType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `url`.
+ /// Default Value: url + ///
+ public enum UrlAnnotationSourceType + { + /// + /// + /// + Url, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UrlAnnotationSourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UrlAnnotationSourceType value) + { + return value switch + { + UrlAnnotationSourceType.Url => "url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UrlAnnotationSourceType? ToEnum(string value) + { + return value switch + { + "url" => UrlAnnotationSourceType.Url, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationType.g.cs new file mode 100644 index 00000000..316e1980 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlAnnotationType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `url` for this annotation.
+ /// Default Value: url + ///
+ public enum UrlAnnotationType + { + /// + /// + /// + Url, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UrlAnnotationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UrlAnnotationType value) + { + return value switch + { + UrlAnnotationType.Url => "url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UrlAnnotationType? ToEnum(string value) + { + return value switch + { + "url" => UrlAnnotationType.Url, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody.g.cs index b3344d76..52e36c9a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody.g.cs @@ -9,11 +9,20 @@ namespace tryAGI.OpenAI public sealed partial class UrlCitationBody { /// - /// The index of the last character of the URL citation in the message. + /// The type of the URL citation. Always `url_citation`.
+ /// Default Value: url_citation ///
- [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] + /// global::tryAGI.OpenAI.UrlCitationBodyType.UrlCitation + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeJsonConverter))] + public global::tryAGI.OpenAI.UrlCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.UrlCitationBodyType.UrlCitation; + + /// + /// The URL of the web resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] [global::System.Text.Json.Serialization.JsonRequired] - public required int EndIndex { get; set; } + public required string Url { get; set; } /// /// The index of the first character of the URL citation in the message. @@ -23,27 +32,18 @@ public sealed partial class UrlCitationBody public required int StartIndex { get; set; } /// - /// The title of the web resource. + /// The index of the last character of the URL citation in the message. /// - [global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_index")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Title { get; set; } - - /// - /// The type of the URL citation. Always `url_citation`.
- /// Default Value: url_citation - ///
- /// global::tryAGI.OpenAI.UrlCitationBodyType.UrlCitation - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UrlCitationBodyTypeJsonConverter))] - public global::tryAGI.OpenAI.UrlCitationBodyType Type { get; set; } = global::tryAGI.OpenAI.UrlCitationBodyType.UrlCitation; + public required int EndIndex { get; set; } /// - /// The URL of the web resource. + /// The title of the web resource. /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonPropertyName("title")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } + public required string Title { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -54,15 +54,6 @@ public sealed partial class UrlCitationBody /// /// Initializes a new instance of the class. /// - /// - /// The index of the last character of the URL citation in the message. - /// - /// - /// The index of the first character of the URL citation in the message. - /// - /// - /// The title of the web resource. - /// /// /// The type of the URL citation. Always `url_citation`.
/// Default Value: url_citation @@ -70,20 +61,29 @@ public sealed partial class UrlCitationBody /// /// The URL of the web resource. /// + /// + /// The index of the first character of the URL citation in the message. + /// + /// + /// The index of the last character of the URL citation in the message. + /// + /// + /// The title of the web resource. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UrlCitationBody( - int endIndex, + string url, int startIndex, + int endIndex, string title, - string url, global::tryAGI.OpenAI.UrlCitationBodyType type = global::tryAGI.OpenAI.UrlCitationBodyType.UrlCitation) { - this.EndIndex = endIndex; + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); this.StartIndex = startIndex; + this.EndIndex = endIndex; this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); - this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResult.g.cs index 747169b4..bc90eb00 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResult.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class UsageAudioSpeechesResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageAudioSpeechesResultObject Object { get; set; } /// /// The number of characters processed. @@ -21,12 +22,6 @@ public sealed partial class UsageAudioSpeechesResult [global::System.Text.Json.Serialization.JsonRequired] public required int Characters { get; set; } - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } - /// /// The count of requests made to the model. /// @@ -37,22 +32,27 @@ public sealed partial class UsageAudioSpeechesResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioSpeechesResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageAudioSpeechesResultObject Object { get; set; } - - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -62,44 +62,36 @@ public sealed partial class UsageAudioSpeechesResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// + /// /// /// The number of characters processed. /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// /// /// The count of requests made to the model. /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. - /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageAudioSpeechesResult( int characters, int numModelRequests, - string? apiKeyId, - string? model, global::tryAGI.OpenAI.UsageAudioSpeechesResultObject @object, string? projectId, - string? userId) + string? userId, + string? apiKeyId, + string? model) { this.Characters = characters; this.NumModelRequests = numModelRequests; - this.ApiKeyId = apiKeyId; - this.Model = model; this.Object = @object; this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..7013621a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioSpeechesResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioSpeechesResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.g.cs new file mode 100644 index 00000000..139999c2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioSpeechesResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.Json.g.cs new file mode 100644 index 00000000..d520f94f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioSpeechesResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioSpeechesResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioSpeechesResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.g.cs new file mode 100644 index 00000000..46d87c35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioSpeechesResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.Json.g.cs new file mode 100644 index 00000000..17004e62 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioSpeechesResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioSpeechesResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.g.cs new file mode 100644 index 00000000..edb620e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioSpeechesResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.Json.g.cs new file mode 100644 index 00000000..1d5d732e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioSpeechesResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioSpeechesResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioSpeechesResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioSpeechesResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioSpeechesResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.g.cs new file mode 100644 index 00000000..26ab40f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioSpeechesResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioSpeechesResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResult.g.cs index b3bb69e2..ebb62cc4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResult.g.cs @@ -9,16 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class UsageAudioTranscriptionsResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioTranscriptionsResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageAudioTranscriptionsResultObject Object { get; set; } /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// The number of seconds processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Seconds { get; set; } /// /// The count of requests made to the model. @@ -30,28 +32,26 @@ public sealed partial class UsageAudioTranscriptionsResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageAudioTranscriptionsResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageAudioTranscriptionsResultObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] - public string? ProjectId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } /// - /// The number of seconds processed. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Seconds { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] - public string? UserId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -62,44 +62,36 @@ public sealed partial class UsageAudioTranscriptionsResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// - /// - /// The count of requests made to the model. - /// /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// /// /// The number of seconds processed. /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// The count of requests made to the model. /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageAudioTranscriptionsResult( - int numModelRequests, int seconds, - string? apiKeyId, - string? model, + int numModelRequests, global::tryAGI.OpenAI.UsageAudioTranscriptionsResultObject @object, string? projectId, - string? userId) + string? userId, + string? apiKeyId, + string? model) { - this.NumModelRequests = numModelRequests; this.Seconds = seconds; - this.ApiKeyId = apiKeyId; - this.Model = model; + this.NumModelRequests = numModelRequests; this.Object = @object; this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..55f3070f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioTranscriptionsResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.g.cs new file mode 100644 index 00000000..8131c191 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioTranscriptionsResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.Json.g.cs new file mode 100644 index 00000000..06e8df77 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioTranscriptionsResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.g.cs new file mode 100644 index 00000000..33f2c7b9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioTranscriptionsResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.Json.g.cs new file mode 100644 index 00000000..2bd82d94 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioTranscriptionsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.g.cs new file mode 100644 index 00000000..811683b3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioTranscriptionsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.Json.g.cs new file mode 100644 index 00000000..3313bc2d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageAudioTranscriptionsResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageAudioTranscriptionsResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.g.cs new file mode 100644 index 00000000..41da5a5e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageAudioTranscriptionsResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageAudioTranscriptionsResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs index 918ff608..ad3ee21f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class UsageCodeInterpreterSessionsResult { - /// - /// The number of code interpreter sessions. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("num_sessions")] - public int? NumSessions { get; set; } - /// /// /// @@ -22,7 +16,13 @@ public sealed partial class UsageCodeInterpreterSessionsResult public global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultObject Object { get; set; } /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// The number of code interpreter sessions. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_sessions")] + public int? NumSessions { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } @@ -36,23 +36,21 @@ public sealed partial class UsageCodeInterpreterSessionsResult /// /// Initializes a new instance of the class. /// + /// /// /// The number of code interpreter sessions. /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageCodeInterpreterSessionsResult( - int? numSessions, global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultObject @object, + int? numSessions, string? projectId) { - this.NumSessions = numSessions; this.Object = @object; + this.NumSessions = numSessions; this.ProjectId = projectId; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.Json.g.cs new file mode 100644 index 00000000..4a806fa8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCodeInterpreterSessionsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCodeInterpreterSessionsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.g.cs new file mode 100644 index 00000000..a18b1e35 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCodeInterpreterSessionsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCodeInterpreterSessionsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsGroupByItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsGroupByItem.g.cs index 615bed67..3d8d38a4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsGroupByItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsGroupByItem.g.cs @@ -28,6 +28,10 @@ public enum UsageCompletionsGroupByItem /// /// Batch, + /// + /// + /// + ServiceTier, } /// @@ -47,6 +51,7 @@ public static string ToValueString(this UsageCompletionsGroupByItem value) UsageCompletionsGroupByItem.ApiKeyId => "api_key_id", UsageCompletionsGroupByItem.Model => "model", UsageCompletionsGroupByItem.Batch => "batch", + UsageCompletionsGroupByItem.ServiceTier => "service_tier", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -62,6 +67,7 @@ public static string ToValueString(this UsageCompletionsGroupByItem value) "api_key_id" => UsageCompletionsGroupByItem.ApiKeyId, "model" => UsageCompletionsGroupByItem.Model, "batch" => UsageCompletionsGroupByItem.Batch, + "service_tier" => UsageCompletionsGroupByItem.ServiceTier, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResult.g.cs index a60f0fc7..c5b32471 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResult.g.cs @@ -9,22 +9,18 @@ namespace tryAGI.OpenAI public sealed partial class UsageCompletionsResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } - - /// - /// When `group_by=batch`, this field tells whether the grouped usage result is batch or not. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("batch")] - public bool? Batch { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageCompletionsResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageCompletionsResultObject Object { get; set; } /// - /// The aggregated number of audio input tokens used, including cached tokens. + /// The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_tokens")] - public int? InputAudioTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { get; set; } /// /// The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens. @@ -33,17 +29,23 @@ public sealed partial class UsageCompletionsResult public int? InputCachedTokens { get; set; } /// - /// The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. + /// The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. /// - [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] [global::System.Text.Json.Serialization.JsonRequired] - public required int InputTokens { get; set; } + public required int OutputTokens { get; set; } /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// The aggregated number of audio input tokens used, including cached tokens. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("input_audio_tokens")] + public int? InputAudioTokens { get; set; } + + /// + /// The aggregated number of audio output tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_tokens")] + public int? OutputAudioTokens { get; set; } /// /// The count of requests made to the model. @@ -55,34 +57,38 @@ public sealed partial class UsageCompletionsResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageCompletionsResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageCompletionsResultObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } /// - /// The aggregated number of audio output tokens used. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_audio_tokens")] - public int? OutputAudioTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } /// - /// The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int OutputTokens { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] - public string? ProjectId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] - public string? UserId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("batch")] + public bool? Batch { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_tier")] + public string? ServiceTier { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -93,69 +99,62 @@ public sealed partial class UsageCompletionsResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// - /// - /// When `group_by=batch`, this field tells whether the grouped usage result is batch or not. - /// - /// - /// The aggregated number of audio input tokens used, including cached tokens. + /// + /// + /// The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. /// /// /// The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens. /// - /// - /// The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens. - /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + /// The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. /// - /// - /// The count of requests made to the model. + /// + /// The aggregated number of audio input tokens used, including cached tokens. /// - /// /// /// The aggregated number of audio output tokens used. /// - /// - /// The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens. - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// The count of requests made to the model. /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageCompletionsResult( int inputTokens, - int numModelRequests, int outputTokens, - string? apiKeyId, - bool? batch, - int? inputAudioTokens, - int? inputCachedTokens, - string? model, + int numModelRequests, global::tryAGI.OpenAI.UsageCompletionsResultObject @object, + int? inputCachedTokens, + int? inputAudioTokens, int? outputAudioTokens, string? projectId, - string? userId) + string? userId, + string? apiKeyId, + string? model, + bool? batch, + string? serviceTier) { this.InputTokens = inputTokens; - this.NumModelRequests = numModelRequests; this.OutputTokens = outputTokens; - this.ApiKeyId = apiKeyId; - this.Batch = batch; - this.InputAudioTokens = inputAudioTokens; - this.InputCachedTokens = inputCachedTokens; - this.Model = model; + this.NumModelRequests = numModelRequests; this.Object = @object; + this.InputCachedTokens = inputCachedTokens; + this.InputAudioTokens = inputAudioTokens; this.OutputAudioTokens = outputAudioTokens; this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + this.Batch = batch; + this.ServiceTier = serviceTier; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..fed81cd4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.g.cs new file mode 100644 index 00000000..5aef63d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.Json.g.cs new file mode 100644 index 00000000..9753bceb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultBatch + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultBatch? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultBatch), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultBatch; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultBatch? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultBatch), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultBatch; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.g.cs new file mode 100644 index 00000000..53486c06 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultBatch.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultBatch + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.Json.g.cs new file mode 100644 index 00000000..8ecc7346 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.g.cs new file mode 100644 index 00000000..a721988b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.Json.g.cs new file mode 100644 index 00000000..6b4ef260 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.g.cs new file mode 100644 index 00000000..c4ee1ea6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.Json.g.cs new file mode 100644 index 00000000..f29f5955 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultServiceTier + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultServiceTier? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultServiceTier), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultServiceTier; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultServiceTier? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultServiceTier), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultServiceTier; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.g.cs new file mode 100644 index 00000000..30d26260 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultServiceTier.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultServiceTier + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.Json.g.cs new file mode 100644 index 00000000..e9f4f792 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageCompletionsResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageCompletionsResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageCompletionsResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageCompletionsResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageCompletionsResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.g.cs new file mode 100644 index 00000000..59fb15a6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageCompletionsResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageCompletionsResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResult.g.cs index 614206b3..69904560 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResult.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class UsageEmbeddingsResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageEmbeddingsResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageEmbeddingsResultObject Object { get; set; } /// /// The aggregated number of input tokens used. @@ -21,12 +22,6 @@ public sealed partial class UsageEmbeddingsResult [global::System.Text.Json.Serialization.JsonRequired] public required int InputTokens { get; set; } - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } - /// /// The count of requests made to the model. /// @@ -37,22 +32,27 @@ public sealed partial class UsageEmbeddingsResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageEmbeddingsResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageEmbeddingsResultObject Object { get; set; } - - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -62,44 +62,36 @@ public sealed partial class UsageEmbeddingsResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// + /// /// /// The aggregated number of input tokens used. /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// /// /// The count of requests made to the model. /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. - /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageEmbeddingsResult( int inputTokens, int numModelRequests, - string? apiKeyId, - string? model, global::tryAGI.OpenAI.UsageEmbeddingsResultObject @object, string? projectId, - string? userId) + string? userId, + string? apiKeyId, + string? model) { this.InputTokens = inputTokens; this.NumModelRequests = numModelRequests; - this.ApiKeyId = apiKeyId; - this.Model = model; this.Object = @object; this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..ace72f56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageEmbeddingsResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageEmbeddingsResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.g.cs new file mode 100644 index 00000000..97821134 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageEmbeddingsResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.Json.g.cs new file mode 100644 index 00000000..808ec970 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageEmbeddingsResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageEmbeddingsResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageEmbeddingsResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.g.cs new file mode 100644 index 00000000..a39123e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageEmbeddingsResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.Json.g.cs new file mode 100644 index 00000000..37503aef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageEmbeddingsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageEmbeddingsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageEmbeddingsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.g.cs new file mode 100644 index 00000000..f4bd916e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageEmbeddingsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.Json.g.cs new file mode 100644 index 00000000..40ddf257 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageEmbeddingsResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageEmbeddingsResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageEmbeddingsResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageEmbeddingsResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageEmbeddingsResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.g.cs new file mode 100644 index 00000000..fa3c9096 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageEmbeddingsResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageEmbeddingsResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResult.g.cs index ee506137..1fb17005 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResult.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class UsageImagesResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageImagesResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageImagesResultObject Object { get; set; } /// /// The number of images processed. @@ -21,12 +22,6 @@ public sealed partial class UsageImagesResult [global::System.Text.Json.Serialization.JsonRequired] public required int Images { get; set; } - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } - /// /// The count of requests made to the model. /// @@ -37,33 +32,38 @@ public sealed partial class UsageImagesResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageImagesResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageImagesResultObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + public string? Source { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + public string? Size { get; set; } /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } /// - /// When `group_by=size`, this field provides the image size of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - public string? Size { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } /// - /// When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - public string? Source { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] - public string? UserId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -74,54 +74,42 @@ public sealed partial class UsageImagesResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// + /// /// /// The number of images processed. /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// /// /// The count of requests made to the model. /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - /// - /// When `group_by=size`, this field provides the image size of the grouped usage result. - /// - /// - /// When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. - /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. - /// + /// + /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageImagesResult( int images, int numModelRequests, - string? apiKeyId, - string? model, global::tryAGI.OpenAI.UsageImagesResultObject @object, - string? projectId, - string? size, string? source, - string? userId) + string? size, + string? projectId, + string? userId, + string? apiKeyId, + string? model) { this.Images = images; this.NumModelRequests = numModelRequests; - this.ApiKeyId = apiKeyId; - this.Model = model; this.Object = @object; - this.ProjectId = projectId; - this.Size = size; this.Source = source; + this.Size = size; + this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..ecc21230 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.g.cs new file mode 100644 index 00000000..91638b5a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.Json.g.cs new file mode 100644 index 00000000..8b535858 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.g.cs new file mode 100644 index 00000000..4ec8b24e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.Json.g.cs new file mode 100644 index 00000000..c16ae065 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.g.cs new file mode 100644 index 00000000..60e3cb9c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.Json.g.cs new file mode 100644 index 00000000..cec38759 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultSize + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultSize? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultSize), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultSize; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultSize? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultSize), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultSize; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.g.cs new file mode 100644 index 00000000..e74ebf69 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSize.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultSize + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.Json.g.cs new file mode 100644 index 00000000..f77d70bb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultSource + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultSource), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultSource; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultSource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultSource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultSource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.g.cs new file mode 100644 index 00000000..197a2662 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultSource.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultSource + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.Json.g.cs new file mode 100644 index 00000000..95a4aa50 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageImagesResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageImagesResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageImagesResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageImagesResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageImagesResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageImagesResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageImagesResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.g.cs new file mode 100644 index 00000000..655063ae --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageImagesResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageImagesResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResult.g.cs index d324e6f4..cb336f92 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResult.g.cs @@ -9,10 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class UsageModerationsResult { /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] - public string? ApiKeyId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageModerationsResultObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageModerationsResultObject Object { get; set; } /// /// The aggregated number of input tokens used. @@ -21,12 +22,6 @@ public sealed partial class UsageModerationsResult [global::System.Text.Json.Serialization.JsonRequired] public required int InputTokens { get; set; } - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] - public string? Model { get; set; } - /// /// The count of requests made to the model. /// @@ -37,22 +32,27 @@ public sealed partial class UsageModerationsResult /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageModerationsResultObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageModerationsResultObject Object { get; set; } - - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] public string? ProjectId { get; set; } /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] public string? UserId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -62,44 +62,36 @@ public sealed partial class UsageModerationsResult /// /// Initializes a new instance of the class. /// - /// - /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. - /// + /// /// /// The aggregated number of input tokens used. /// - /// - /// When `group_by=model`, this field provides the model name of the grouped usage result. - /// /// /// The count of requests made to the model. /// - /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - /// - /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. - /// + /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageModerationsResult( int inputTokens, int numModelRequests, - string? apiKeyId, - string? model, global::tryAGI.OpenAI.UsageModerationsResultObject @object, string? projectId, - string? userId) + string? userId, + string? apiKeyId, + string? model) { this.InputTokens = inputTokens; this.NumModelRequests = numModelRequests; - this.ApiKeyId = apiKeyId; - this.Model = model; this.Object = @object; this.ProjectId = projectId; this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.Json.g.cs new file mode 100644 index 00000000..bd9a82e0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageModerationsResultApiKeyId + { + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageModerationsResultApiKeyId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageModerationsResultApiKeyId; + } + + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultApiKeyId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageModerationsResultApiKeyId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageModerationsResultApiKeyId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.g.cs new file mode 100644 index 00000000..589d1853 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultApiKeyId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageModerationsResultApiKeyId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.Json.g.cs new file mode 100644 index 00000000..b5a3fda4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageModerationsResultModel + { + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageModerationsResultModel), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageModerationsResultModel; + } + + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageModerationsResultModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageModerationsResultModel; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.g.cs new file mode 100644 index 00000000..2251f86a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultModel.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageModerationsResultModel + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.Json.g.cs new file mode 100644 index 00000000..c3918d71 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageModerationsResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageModerationsResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageModerationsResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageModerationsResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageModerationsResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.g.cs new file mode 100644 index 00000000..4a134bc4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageModerationsResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.Json.g.cs new file mode 100644 index 00000000..6bc2f6fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageModerationsResultUserId + { + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageModerationsResultUserId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageModerationsResultUserId; + } + + /// + /// 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::tryAGI.OpenAI.UsageModerationsResultUserId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageModerationsResultUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageModerationsResultUserId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.g.cs new file mode 100644 index 00000000..9a75d2d5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageModerationsResultUserId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageModerationsResultUserId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageResponse.g.cs index 53140fd6..ddee6ff9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class UsageResponse { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageResponseObject Object { get; set; } + /// /// /// @@ -29,13 +36,6 @@ public sealed partial class UsageResponse [global::System.Text.Json.Serialization.JsonRequired] public required string NextPage { get; set; } - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageResponseObject Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,10 +45,10 @@ public sealed partial class UsageResponse /// /// Initializes a new instance of the class. /// + /// /// /// /// - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucket.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucket.g.cs index 8e761448..9fc6e65d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucket.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucket.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -11,30 +13,30 @@ public sealed partial class UsageTimeBucket /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int EndTime { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageTimeBucketObjectJsonConverter))] + public global::tryAGI.OpenAI.UsageTimeBucketObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageTimeBucketObjectJsonConverter))] - public global::tryAGI.OpenAI.UsageTimeBucketObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int StartTime { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("result")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Result { get; set; } + public required int EndTime { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonPropertyName("result")] [global::System.Text.Json.Serialization.JsonRequired] - public required int StartTime { get; set; } + public required global::System.Collections.Generic.IList> Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -45,22 +47,22 @@ public sealed partial class UsageTimeBucket /// /// Initializes a new instance of the class. /// - /// /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UsageTimeBucket( - int endTime, - global::System.Collections.Generic.IList result, int startTime, + int endTime, + global::System.Collections.Generic.IList> result, global::tryAGI.OpenAI.UsageTimeBucketObject @object) { + this.StartTime = startTime; this.EndTime = endTime; this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); - this.StartTime = startTime; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs deleted file mode 100644 index 7002802d..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class UsageTimeBucketResultItemDiscriminator - { - /// - /// 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::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator), - jsonSerializerContext) as global::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator; - } - - /// - /// 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::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageTimeBucketResultItemDiscriminator; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs deleted file mode 100644 index a1e832e7..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// - /// - public sealed partial class UsageTimeBucketResultItemDiscriminator - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - public string? Object { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public UsageTimeBucketResultItemDiscriminator( - string? @object) - { - this.Object = @object; - } - - /// - /// Initializes a new instance of the class. - /// - public UsageTimeBucketResultItemDiscriminator() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResult.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResult.g.cs index b69c6985..0d6e255a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResult.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResult.g.cs @@ -15,12 +15,6 @@ public sealed partial class UsageVectorStoresResult [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UsageVectorStoresResultObjectJsonConverter))] public global::tryAGI.OpenAI.UsageVectorStoresResultObject Object { get; set; } - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] - public string? ProjectId { get; set; } - /// /// The vector stores usage in bytes. /// @@ -28,6 +22,12 @@ public sealed partial class UsageVectorStoresResult [global::System.Text.Json.Serialization.JsonRequired] public required int UsageBytes { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,12 +38,10 @@ public sealed partial class UsageVectorStoresResult /// Initializes a new instance of the class. /// /// - /// - /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. - /// /// /// The vector stores usage in bytes. /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.Json.g.cs new file mode 100644 index 00000000..ec56d434 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UsageVectorStoresResultProjectId + { + /// + /// 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::tryAGI.OpenAI.UsageVectorStoresResultProjectId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UsageVectorStoresResultProjectId), + jsonSerializerContext) as global::tryAGI.OpenAI.UsageVectorStoresResultProjectId; + } + + /// + /// 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::tryAGI.OpenAI.UsageVectorStoresResultProjectId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UsageVectorStoresResultProjectId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UsageVectorStoresResultProjectId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.g.cs new file mode 100644 index 00000000..2db43b0b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UsageVectorStoresResultProjectId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UsageVectorStoresResultProjectId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.User.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.User.g.cs index 53e56704..d4e8b607 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.User.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.User.g.cs @@ -9,19 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class User { /// - /// The Unix timestamp (in seconds) of when the user was added. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("added_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset AddedAt { get; set; } - - /// - /// The email address of the user + /// The object type, which is always `organization.user` /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Email { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserObjectJsonConverter))] + public global::tryAGI.OpenAI.UserObject Object { get; set; } /// /// The identifier, which can be referenced in API endpoints @@ -38,11 +30,11 @@ public sealed partial class User public required string Name { get; set; } /// - /// The object type, which is always `organization.user` + /// The email address of the user /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserObjectJsonConverter))] - public global::tryAGI.OpenAI.UserObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("email")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Email { get; set; } /// /// `owner` or `reader` @@ -52,6 +44,14 @@ public sealed partial class User [global::System.Text.Json.Serialization.JsonRequired] public required global::tryAGI.OpenAI.UserRole Role { get; set; } + /// + /// The Unix timestamp (in seconds) of when the user was added. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("added_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset AddedAt { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -61,11 +61,8 @@ public sealed partial class User /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) of when the user was added. - /// - /// - /// The email address of the user + /// + /// The object type, which is always `organization.user` /// /// /// The identifier, which can be referenced in API endpoints @@ -73,28 +70,31 @@ public sealed partial class User /// /// The name of the user /// - /// - /// The object type, which is always `organization.user` + /// + /// The email address of the user /// /// /// `owner` or `reader` /// + /// + /// The Unix timestamp (in seconds) of when the user was added. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public User( - global::System.DateTimeOffset addedAt, - string email, string id, string name, + string email, global::tryAGI.OpenAI.UserRole role, + global::System.DateTimeOffset addedAt, global::tryAGI.OpenAI.UserObject @object) { - this.AddedAt = addedAt; - this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); this.Role = role; + this.AddedAt = addedAt; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserDeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserDeleteResponse.g.cs index 6af3df14..e7fe21b8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserDeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserDeleteResponse.g.cs @@ -11,9 +11,9 @@ public sealed partial class UserDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Deleted { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserDeleteResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.UserDeleteResponseObject Object { get; set; } /// /// @@ -25,9 +25,9 @@ public sealed partial class UserDeleteResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserDeleteResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.UserDeleteResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,19 +38,19 @@ public sealed partial class UserDeleteResponse /// /// Initializes a new instance of the class. /// - /// - /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UserDeleteResponse( - bool deleted, string id, + bool deleted, global::tryAGI.OpenAI.UserDeleteResponseObject @object) { - this.Deleted = deleted; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.Json.g.cs new file mode 100644 index 00000000..506bc87e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserListResource + { + /// + /// 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::tryAGI.OpenAI.UserListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.UserListResource; + } + + /// + /// 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::tryAGI.OpenAI.UserListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.g.cs new file mode 100644 index 00000000..21c8429d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Paginated list of user objects returned when inspecting group membership. + /// + public sealed partial class UserListResource + { + /// + /// Always `list`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.UserListResourceObject Object { get; set; } + + /// + /// Users in the current page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// Whether more users are available when paginating. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Cursor to fetch the next page of results, or `null` when no further users are available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Next { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `list`. + /// + /// + /// Users in the current page. + /// + /// + /// Whether more users are available when paginating. + /// + /// + /// Cursor to fetch the next page of results, or `null` when no further users are available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + string? next, + global::tryAGI.OpenAI.UserListResourceObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Next = next ?? throw new global::System.ArgumentNullException(nameof(next)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public UserListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.Json.g.cs new file mode 100644 index 00000000..63b15e6c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserListResourceNext + { + /// + /// 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::tryAGI.OpenAI.UserListResourceNext? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserListResourceNext), + jsonSerializerContext) as global::tryAGI.OpenAI.UserListResourceNext; + } + + /// + /// 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::tryAGI.OpenAI.UserListResourceNext? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserListResourceNext), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserListResourceNext; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.g.cs new file mode 100644 index 00000000..6aec0cc5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceNext.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Cursor to fetch the next page of results, or `null` when no further users are available. + /// + public sealed partial class UserListResourceNext + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceObject.g.cs new file mode 100644 index 00000000..6ae6fd54 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `list`. + /// + public enum UserListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserListResourceObject value) + { + return value switch + { + UserListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => UserListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResponse.g.cs index 70f65689..33286f06 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserListResponse.g.cs @@ -11,23 +11,23 @@ public sealed partial class UserListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserListResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.UserListResponseObject Object { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string FirstId { get; set; } + public required global::System.Collections.Generic.IList Data { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasMore { get; set; } + public required string FirstId { get; set; } /// /// @@ -39,9 +39,9 @@ public sealed partial class UserListResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserListResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.UserListResponseObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,25 +52,25 @@ public sealed partial class UserListResponse /// /// Initializes a new instance of the class. /// + /// /// /// - /// /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UserListResponse( global::System.Collections.Generic.IList data, string firstId, - bool hasMore, string lastId, + bool hasMore, global::tryAGI.OpenAI.UserListResponseObject @object) { this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); - this.HasMore = hasMore; this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.Json.g.cs new file mode 100644 index 00000000..2198c031 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserMessageInputText + { + /// + /// 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::tryAGI.OpenAI.UserMessageInputText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserMessageInputText), + jsonSerializerContext) as global::tryAGI.OpenAI.UserMessageInputText; + } + + /// + /// 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::tryAGI.OpenAI.UserMessageInputText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserMessageInputText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserMessageInputText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.g.cs new file mode 100644 index 00000000..0615ddf1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputText.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Text block that a user contributed to the thread. + /// + public sealed partial class UserMessageInputText + { + /// + /// Type discriminator that is always `input_text`.
+ /// Default Value: input_text + ///
+ /// global::tryAGI.OpenAI.UserMessageInputTextType.InputText + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageInputTextTypeJsonConverter))] + public global::tryAGI.OpenAI.UserMessageInputTextType Type { get; set; } = global::tryAGI.OpenAI.UserMessageInputTextType.InputText; + + /// + /// Plain-text content supplied by the user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `input_text`.
+ /// Default Value: input_text + /// + /// + /// Plain-text content supplied by the user. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserMessageInputText( + string text, + global::tryAGI.OpenAI.UserMessageInputTextType type = global::tryAGI.OpenAI.UserMessageInputTextType.InputText) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UserMessageInputText() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputTextType.g.cs new file mode 100644 index 00000000..87383ee5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageInputTextType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `input_text`.
+ /// Default Value: input_text + ///
+ public enum UserMessageInputTextType + { + /// + /// + /// + InputText, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageInputTextTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageInputTextType value) + { + return value switch + { + UserMessageInputTextType.InputText => "input_text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageInputTextType? ToEnum(string value) + { + return value switch + { + "input_text" => UserMessageInputTextType.InputText, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.Json.g.cs new file mode 100644 index 00000000..1e6e2e53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserMessageItem + { + /// + /// 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::tryAGI.OpenAI.UserMessageItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserMessageItem), + jsonSerializerContext) as global::tryAGI.OpenAI.UserMessageItem; + } + + /// + /// 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::tryAGI.OpenAI.UserMessageItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserMessageItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserMessageItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.g.cs new file mode 100644 index 00000000..c3f7af2b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItem.g.cs @@ -0,0 +1,133 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// User-authored messages within a thread. + /// + public sealed partial class UserMessageItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.UserMessageItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemObjectJsonConverter))] + public global::tryAGI.OpenAI.UserMessageItemObject Object { get; set; } = global::tryAGI.OpenAI.UserMessageItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Default Value: chatkit.user_message + /// + /// global::tryAGI.OpenAI.UserMessageItemType.ChatkitUserMessage + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageItemTypeJsonConverter))] + public global::tryAGI.OpenAI.UserMessageItemType Type { get; set; } = global::tryAGI.OpenAI.UserMessageItemType.ChatkitUserMessage; + + /// + /// Ordered content elements supplied by the user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } + + /// + /// Attachments associated with the user message. Defaults to an empty list. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Attachments { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("inference_options")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.InferenceOptions? InferenceOptions { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Default Value: chatkit.user_message + /// + /// + /// Ordered content elements supplied by the user. + /// + /// + /// Attachments associated with the user message. Defaults to an empty list. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserMessageItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + global::System.Collections.Generic.IList content, + global::System.Collections.Generic.IList attachments, + global::tryAGI.OpenAI.InferenceOptions? inferenceOptions, + global::tryAGI.OpenAI.UserMessageItemObject @object = global::tryAGI.OpenAI.UserMessageItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.UserMessageItemType type = global::tryAGI.OpenAI.UserMessageItemType.ChatkitUserMessage) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.Attachments = attachments ?? throw new global::System.ArgumentNullException(nameof(attachments)); + this.InferenceOptions = inferenceOptions ?? throw new global::System.ArgumentNullException(nameof(inferenceOptions)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UserMessageItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.Json.g.cs new file mode 100644 index 00000000..f100f7e4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserMessageItemContentItemDiscriminator + { + /// + /// 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::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator), + jsonSerializerContext) as global::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator; + } + + /// + /// 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::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserMessageItemContentItemDiscriminator; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.g.cs new file mode 100644 index 00000000..fa6ac39d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemContentItemDiscriminator.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UserMessageItemContentItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserMessageItemContentItemDiscriminator( + string? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UserMessageItemContentItemDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.Json.g.cs new file mode 100644 index 00000000..6bed8bc8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserMessageItemInferenceOptions + { + /// + /// 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::tryAGI.OpenAI.UserMessageItemInferenceOptions? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserMessageItemInferenceOptions), + jsonSerializerContext) as global::tryAGI.OpenAI.UserMessageItemInferenceOptions; + } + + /// + /// 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::tryAGI.OpenAI.UserMessageItemInferenceOptions? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserMessageItemInferenceOptions), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserMessageItemInferenceOptions; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.g.cs new file mode 100644 index 00000000..c485cb0c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemInferenceOptions.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class UserMessageItemInferenceOptions + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemObject.g.cs new file mode 100644 index 00000000..c9697373 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum UserMessageItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageItemObject value) + { + return value switch + { + UserMessageItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => UserMessageItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemType.g.cs new file mode 100644 index 00000000..2fbdbcbd --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageItemType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Default Value: chatkit.user_message + /// + public enum UserMessageItemType + { + /// + /// + /// + ChatkitUserMessage, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageItemType value) + { + return value switch + { + UserMessageItemType.ChatkitUserMessage => "chatkit.user_message", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageItemType? ToEnum(string value) + { + return value switch + { + "chatkit.user_message" => UserMessageItemType.ChatkitUserMessage, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.Json.g.cs new file mode 100644 index 00000000..fa22db29 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserMessageQuotedText + { + /// + /// 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::tryAGI.OpenAI.UserMessageQuotedText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserMessageQuotedText), + jsonSerializerContext) as global::tryAGI.OpenAI.UserMessageQuotedText; + } + + /// + /// 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::tryAGI.OpenAI.UserMessageQuotedText? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserMessageQuotedText), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserMessageQuotedText; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.g.cs new file mode 100644 index 00000000..a6cf4e42 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedText.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Quoted snippet that the user referenced in their message. + /// + public sealed partial class UserMessageQuotedText + { + /// + /// Type discriminator that is always `quoted_text`.
+ /// Default Value: quoted_text + ///
+ /// global::tryAGI.OpenAI.UserMessageQuotedTextType.QuotedText + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserMessageQuotedTextTypeJsonConverter))] + public global::tryAGI.OpenAI.UserMessageQuotedTextType Type { get; set; } = global::tryAGI.OpenAI.UserMessageQuotedTextType.QuotedText; + + /// + /// Quoted text content. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Type discriminator that is always `quoted_text`.
+ /// Default Value: quoted_text + /// + /// + /// Quoted text content. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserMessageQuotedText( + string text, + global::tryAGI.OpenAI.UserMessageQuotedTextType type = global::tryAGI.OpenAI.UserMessageQuotedTextType.QuotedText) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public UserMessageQuotedText() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedTextType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedTextType.g.cs new file mode 100644 index 00000000..e9a588eb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserMessageQuotedTextType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `quoted_text`.
+ /// Default Value: quoted_text + ///
+ public enum UserMessageQuotedTextType + { + /// + /// + /// + QuotedText, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageQuotedTextTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageQuotedTextType value) + { + return value switch + { + UserMessageQuotedTextType.QuotedText => "quoted_text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageQuotedTextType? ToEnum(string value) + { + return value switch + { + "quoted_text" => UserMessageQuotedTextType.QuotedText, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.Json.g.cs new file mode 100644 index 00000000..0ebba398 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class UserRoleAssignment + { + /// + /// 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::tryAGI.OpenAI.UserRoleAssignment? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.UserRoleAssignment), + jsonSerializerContext) as global::tryAGI.OpenAI.UserRoleAssignment; + } + + /// + /// 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::tryAGI.OpenAI.UserRoleAssignment? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.UserRoleAssignment), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.UserRoleAssignment; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.g.cs new file mode 100644 index 00000000..01000cc3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignment.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Role assignment linking a user to a role. + /// + public sealed partial class UserRoleAssignment + { + /// + /// Always `user.role`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UserRoleAssignmentObjectJsonConverter))] + public global::tryAGI.OpenAI.UserRoleAssignmentObject Object { get; set; } + + /// + /// Represents an individual `user` within an organization. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.User User { get; set; } + + /// + /// Details about a role that can be assigned through the public Roles API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Role 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Always `user.role`. + /// + /// + /// Represents an individual `user` within an organization. + /// + /// + /// Details about a role that can be assigned through the public Roles API. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UserRoleAssignment( + global::tryAGI.OpenAI.User user, + global::tryAGI.OpenAI.Role role, + global::tryAGI.OpenAI.UserRoleAssignmentObject @object) + { + this.User = user ?? throw new global::System.ArgumentNullException(nameof(user)); + this.Role = role ?? throw new global::System.ArgumentNullException(nameof(role)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public UserRoleAssignment() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignmentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignmentObject.g.cs new file mode 100644 index 00000000..31ad1148 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UserRoleAssignmentObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Always `user.role`. + /// + public enum UserRoleAssignmentObject + { + /// + /// + /// + UserRole, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserRoleAssignmentObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserRoleAssignmentObject value) + { + return value switch + { + UserRoleAssignmentObject.UserRole => "user.role", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserRoleAssignmentObject? ToEnum(string value) + { + return value switch + { + "user.role" => UserRoleAssignmentObject.UserRole, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VadConfig.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VadConfig.g.cs index 30774d9d..4a36f665 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VadConfig.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VadConfig.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI ///
public sealed partial class VadConfig { + /// + /// Must be set to `server_vad` to enable manual chunking using server side VAD. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeJsonConverter))] + public global::tryAGI.OpenAI.VadConfigType Type { get; set; } + /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds).
@@ -34,13 +41,6 @@ public sealed partial class VadConfig [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] public double? Threshold { get; set; } - /// - /// Must be set to `server_vad` to enable manual chunking using server side VAD. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VadConfigTypeJsonConverter))] - public global::tryAGI.OpenAI.VadConfigType Type { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -50,6 +50,9 @@ public sealed partial class VadConfig /// /// Initializes a new instance of the class. /// + /// + /// Must be set to `server_vad` to enable manual chunking using server side VAD. + /// /// /// Amount of audio to include before the VAD detected speech (in
/// milliseconds).
@@ -67,22 +70,19 @@ public sealed partial class VadConfig /// thus might perform better in noisy environments.
/// Default Value: 0.5 /// - /// - /// Must be set to `server_vad` to enable manual chunking using server side VAD. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VadConfig( + global::tryAGI.OpenAI.VadConfigType type, int? prefixPaddingMs, int? silenceDurationMs, - double? threshold, - global::tryAGI.OpenAI.VadConfigType type) + double? threshold) { + this.Type = type; this.PrefixPaddingMs = prefixPaddingMs; this.SilenceDurationMs = silenceDurationMs; this.Threshold = threshold; - this.Type = type; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderRequest.g.cs index f6edd617..02a7d91a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderRequest.g.cs @@ -14,9 +14,9 @@ public sealed partial class ValidateGraderRequest /// The grader used for the fine-tuning job. /// [global::System.Text.Json.Serialization.JsonPropertyName("grader")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf Grader { get; set; } + public required global::tryAGI.OpenAI.OneOf Grader { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -34,7 +34,7 @@ public sealed partial class ValidateGraderRequest [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ValidateGraderRequest( - global::tryAGI.OpenAI.AnyOf grader) + global::tryAGI.OpenAI.OneOf grader) { this.Grader = grader; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderResponse.g.cs index 19db148a..41ea0c80 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ValidateGraderResponse.g.cs @@ -14,8 +14,8 @@ public sealed partial class ValidateGraderResponse /// The grader used for the fine-tuning job. /// [global::System.Text.Json.Serialization.JsonPropertyName("grader")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Grader { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Grader { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -33,7 +33,7 @@ public sealed partial class ValidateGraderResponse [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ValidateGraderResponse( - global::tryAGI.OpenAI.AnyOf? grader) + global::tryAGI.OpenAI.OneOf? grader) { this.Grader = grader; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributes.g.cs index e58df9af..33fce857 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributes.g.cs @@ -4,11 +4,7 @@ namespace tryAGI.OpenAI { /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// ///
public sealed partial class VectorStoreFileAttributes { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.Json.g.cs new file mode 100644 index 00000000..6eaad858 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreFileAttributesVariant1 + { + /// + /// 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::tryAGI.OpenAI.VectorStoreFileAttributesVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreFileAttributesVariant1), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreFileAttributesVariant1; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreFileAttributesVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreFileAttributesVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreFileAttributesVariant1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.g.cs new file mode 100644 index 00000000..24071e43 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileAttributesVariant1.g.cs @@ -0,0 +1,22 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// 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, and querying for objects via API or the dashboard. Keys are strings
+ /// with a maximum length of 64 characters. Values are strings with a maximum
+ /// length of 512 characters, booleans, or numbers. + ///
+ public sealed partial class VectorStoreFileAttributesVariant1 + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObject.g.cs index 0898e451..c93b8507 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObject.g.cs @@ -8,21 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class VectorStoreFileBatchObject { - /// - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_counts")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts FileCounts { get; set; } - /// /// The identifier, which can be referenced in API endpoints. /// @@ -37,6 +22,21 @@ public sealed partial class VectorStoreFileBatchObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileBatchObjectObjectJsonConverter))] public global::tryAGI.OpenAI.VectorStoreFileBatchObjectObject Object { get; set; } + /// + /// The Unix timestamp (in seconds) for when the vector store files batch was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string VectorStoreId { get; set; } + /// /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. /// @@ -46,11 +46,11 @@ public sealed partial class VectorStoreFileBatchObject public required global::tryAGI.OpenAI.VectorStoreFileBatchObjectStatus Status { get; set; } /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_id")] + [global::System.Text.Json.Serialization.JsonPropertyName("file_counts")] [global::System.Text.Json.Serialization.JsonRequired] - public required string VectorStoreId { get; set; } + public required global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts FileCounts { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -61,38 +61,38 @@ public sealed partial class VectorStoreFileBatchObject /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// - /// /// /// The identifier, which can be referenced in API endpoints. /// /// /// The object type, which is always `vector_store.file_batch`. /// - /// - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. + /// + /// The Unix timestamp (in seconds) for when the vector store files batch was created. /// /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to. /// + /// + /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreFileBatchObject( - global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts fileCounts, string id, - global::tryAGI.OpenAI.VectorStoreFileBatchObjectStatus status, + global::System.DateTimeOffset createdAt, string vectorStoreId, + global::tryAGI.OpenAI.VectorStoreFileBatchObjectStatus status, + global::tryAGI.OpenAI.VectorStoreFileBatchObjectFileCounts fileCounts, global::tryAGI.OpenAI.VectorStoreFileBatchObjectObject @object) { - this.CreatedAt = createdAt; - this.FileCounts = fileCounts ?? throw new global::System.ArgumentNullException(nameof(fileCounts)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Status = status; + this.CreatedAt = createdAt; this.VectorStoreId = vectorStoreId ?? throw new global::System.ArgumentNullException(nameof(vectorStoreId)); + this.Status = status; + this.FileCounts = fileCounts ?? throw new global::System.ArgumentNullException(nameof(fileCounts)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObjectFileCounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObjectFileCounts.g.cs index 5642626b..47ab0af7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObjectFileCounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileBatchObjectFileCounts.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class VectorStoreFileBatchObjectFileCounts { /// - /// The number of files that where cancelled. + /// The number of files that are currently being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelled")] + [global::System.Text.Json.Serialization.JsonPropertyName("in_progress")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Cancelled { get; set; } + public required int InProgress { get; set; } /// /// The number of files that have been processed. @@ -30,11 +30,11 @@ public sealed partial class VectorStoreFileBatchObjectFileCounts public required int Failed { get; set; } /// - /// The number of files that are currently being processed. + /// The number of files that where cancelled. /// - [global::System.Text.Json.Serialization.JsonPropertyName("in_progress")] + [global::System.Text.Json.Serialization.JsonPropertyName("cancelled")] [global::System.Text.Json.Serialization.JsonRequired] - public required int InProgress { get; set; } + public required int Cancelled { get; set; } /// /// The total number of files. @@ -52,8 +52,8 @@ public sealed partial class VectorStoreFileBatchObjectFileCounts /// /// Initializes a new instance of the class. /// - /// - /// The number of files that where cancelled. + /// + /// The number of files that are currently being processed. /// /// /// The number of files that have been processed. @@ -61,8 +61,8 @@ public sealed partial class VectorStoreFileBatchObjectFileCounts /// /// The number of files that have failed to process. /// - /// - /// The number of files that are currently being processed. + /// + /// The number of files that where cancelled. /// /// /// The total number of files. @@ -71,16 +71,16 @@ public sealed partial class VectorStoreFileBatchObjectFileCounts [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreFileBatchObjectFileCounts( - int cancelled, + int inProgress, int completed, int failed, - int inProgress, + int cancelled, int total) { - this.Cancelled = cancelled; + this.InProgress = inProgress; this.Completed = completed; this.Failed = failed; - this.InProgress = inProgress; + this.Cancelled = cancelled; this.Total = total; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponse.g.cs index cc739589..c824d412 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponse.g.cs @@ -8,6 +8,13 @@ namespace tryAGI.OpenAI /// public sealed partial class VectorStoreFileContentResponse { + /// + /// The object type, which is always `vector_store.file_content.page` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileContentResponseObjectJsonConverter))] + public global::tryAGI.OpenAI.VectorStoreFileContentResponseObject Object { get; set; } + /// /// Parsed content of the file. /// @@ -23,19 +30,12 @@ public sealed partial class VectorStoreFileContentResponse public required bool HasMore { get; set; } /// - /// The token for the next page, if any. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("next_page")] [global::System.Text.Json.Serialization.JsonRequired] public required string? NextPage { get; set; } - /// - /// The object type, which is always `vector_store.file_content.page` - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileContentResponseObjectJsonConverter))] - public global::tryAGI.OpenAI.VectorStoreFileContentResponseObject Object { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -45,18 +45,16 @@ public sealed partial class VectorStoreFileContentResponse /// /// Initializes a new instance of the class. /// + /// + /// The object type, which is always `vector_store.file_content.page` + /// /// /// Parsed content of the file. /// /// /// Indicates if there are more content pages to fetch. /// - /// - /// The token for the next page, if any. - /// - /// - /// The object type, which is always `vector_store.file_content.page` - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseDataItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseDataItem.g.cs index c0cf9739..6172ccc1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseDataItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseDataItem.g.cs @@ -8,18 +8,18 @@ namespace tryAGI.OpenAI /// public sealed partial class VectorStoreFileContentResponseDataItem { - /// - /// The text content - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - /// /// The content type (currently only `"text"`) /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] public string? Type { get; set; } + /// + /// The text content + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -29,21 +29,21 @@ public sealed partial class VectorStoreFileContentResponseDataItem /// /// Initializes a new instance of the class. /// - /// - /// The text content - /// /// /// The content type (currently only `"text"`) /// + /// + /// The text content + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreFileContentResponseDataItem( - string? text, - string? type) + string? type, + string? text) { - this.Text = text; this.Type = type; + this.Text = text; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.Json.g.cs new file mode 100644 index 00000000..77b50da8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreFileContentResponseNextPage + { + /// + /// 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::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreFileContentResponseNextPage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.g.cs new file mode 100644 index 00000000..9f55c62b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileContentResponseNextPage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VectorStoreFileContentResponseNextPage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObject.g.cs index 1b9cbd95..9d1cf6b3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObject.g.cs @@ -1,4 +1,6 @@ +#pragma warning disable CS0618 // Type or member is obsolete + #nullable enable namespace tryAGI.OpenAI @@ -9,50 +11,40 @@ namespace tryAGI.OpenAI public sealed partial class VectorStoreFileObject { /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// The identifier, which can be referenced in API endpoints. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] - public object? Attributes { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } /// - /// The strategy used to chunk the file. + /// The object type, which is always `vector_store.file`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ChunkingStrategyResponseJsonConverter))] - public global::tryAGI.OpenAI.ChunkingStrategyResponse? ChunkingStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectObjectJsonConverter))] + public global::tryAGI.OpenAI.VectorStoreFileObjectObject Object { get; set; } /// - /// The Unix timestamp (in seconds) for when the vector store file was created. + /// The total vector store usage in bytes. Note that this may be different from the original file size. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("usage_bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required int UsageBytes { get; set; } /// - /// The identifier, which can be referenced in API endpoints. + /// The Unix timestamp (in seconds) for when the vector store file was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// The last error associated with this vector store file. Will be `null` if there are no errors. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] + [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VectorStoreFileObjectLastError? LastError { get; set; } - - /// - /// The object type, which is always `vector_store.file`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.VectorStoreFileObjectObject Object { get; set; } + public required string VectorStoreId { get; set; } /// /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. @@ -63,18 +55,24 @@ public sealed partial class VectorStoreFileObject public required global::tryAGI.OpenAI.VectorStoreFileObjectStatus Status { get; set; } /// - /// The total vector store usage in bytes. Note that this may be different from the original file size. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("usage_bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("last_error")] [global::System.Text.Json.Serialization.JsonRequired] - public required int UsageBytes { get; set; } + public required global::tryAGI.OpenAI.VectorStoreFileObjectLastError2? LastError { get; set; } /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + /// The strategy used to chunk the file. /// - [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string VectorStoreId { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("chunking_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? ChunkingStrategy { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] + public object? Attributes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -85,60 +83,52 @@ public sealed partial class VectorStoreFileObject /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// - /// - /// The strategy used to chunk the file. - /// - /// - /// The Unix timestamp (in seconds) for when the vector store file was created. - /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// The last error associated with this vector store file. Will be `null` if there are no errors. - /// /// /// The object type, which is always `vector_store.file`. /// - /// - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - /// /// /// The total vector store usage in bytes. Note that this may be different from the original file size. /// + /// + /// The Unix timestamp (in seconds) for when the vector store file was created. + /// /// - /// The ID of the [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to. + /// The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to. + /// + /// + /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. /// + /// + /// + /// The strategy used to chunk the file. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreFileObject( - global::System.DateTimeOffset createdAt, string id, - global::tryAGI.OpenAI.VectorStoreFileObjectLastError? lastError, - global::tryAGI.OpenAI.VectorStoreFileObjectStatus status, int usageBytes, + global::System.DateTimeOffset createdAt, string vectorStoreId, - object? attributes, - global::tryAGI.OpenAI.ChunkingStrategyResponse? chunkingStrategy, - global::tryAGI.OpenAI.VectorStoreFileObjectObject @object) + global::tryAGI.OpenAI.VectorStoreFileObjectStatus status, + global::tryAGI.OpenAI.VectorStoreFileObjectLastError2? lastError, + global::tryAGI.OpenAI.VectorStoreFileObjectObject @object, + global::tryAGI.OpenAI.OneOf? chunkingStrategy, + object? attributes) { - this.CreatedAt = createdAt; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); - this.Status = status; this.UsageBytes = usageBytes; + this.CreatedAt = createdAt; this.VectorStoreId = vectorStoreId ?? throw new global::System.ArgumentNullException(nameof(vectorStoreId)); - this.Attributes = attributes; - this.ChunkingStrategy = chunkingStrategy; + this.Status = status; + this.LastError = lastError ?? throw new global::System.ArgumentNullException(nameof(lastError)); this.Object = @object; + this.ChunkingStrategy = chunkingStrategy; + this.Attributes = attributes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError.g.cs index 5071b6a4..309afc67 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError.g.cs @@ -4,56 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The last error associated with this vector store file. Will be `null` if there are no errors. + /// /// public sealed partial class VectorStoreFileObjectLastError { - /// - /// One of `server_error` or `rate_limit_exceeded`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode Code { get; set; } - - /// - /// A human-readable description of the error. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("message")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Message { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// One of `server_error` or `rate_limit_exceeded`. - /// - /// - /// A human-readable description of the error. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public VectorStoreFileObjectLastError( - global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode code, - string message) - { - this.Code = code; - this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); - } - - /// - /// Initializes a new instance of the class. - /// - public VectorStoreFileObjectLastError() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.Json.g.cs new file mode 100644 index 00000000..ec3edd45 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreFileObjectLastError2 + { + /// + /// 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::tryAGI.OpenAI.VectorStoreFileObjectLastError2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreFileObjectLastError2), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreFileObjectLastError2; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreFileObjectLastError2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreFileObjectLastError2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreFileObjectLastError2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.g.cs new file mode 100644 index 00000000..c2fbc959 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastError2.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The last error associated with this vector store file. Will be `null` if there are no errors. + /// + public sealed partial class VectorStoreFileObjectLastError2 + { + /// + /// One of `server_error`, `unsupported_file`, or `invalid_file`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreFileObjectLastErrorCodeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode Code { get; set; } + + /// + /// A human-readable description of the error. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// One of `server_error`, `unsupported_file`, or `invalid_file`. + /// + /// + /// A human-readable description of the error. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VectorStoreFileObjectLastError2( + global::tryAGI.OpenAI.VectorStoreFileObjectLastErrorCode code, + string message) + { + this.Code = code; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public VectorStoreFileObjectLastError2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastErrorCode.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastErrorCode.g.cs index ad7cbca7..aaa69dfd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastErrorCode.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreFileObjectLastErrorCode.g.cs @@ -4,7 +4,7 @@ namespace tryAGI.OpenAI { /// - /// One of `server_error` or `rate_limit_exceeded`. + /// One of `server_error`, `unsupported_file`, or `invalid_file`. /// public enum VectorStoreFileObjectLastErrorCode { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObject.g.cs index c28f66b2..9d932551 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObject.g.cs @@ -9,87 +9,81 @@ namespace tryAGI.OpenAI public sealed partial class VectorStoreObject { /// - /// The Unix timestamp (in seconds) for when the vector store was created. + /// The identifier, which can be referenced in API endpoints. /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset CreatedAt { get; set; } + public required string Id { get; set; } /// - /// The expiration policy for a vector store. + /// The object type, which is always `vector_store`. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] - public global::tryAGI.OpenAI.VectorStoreExpirationAfter? ExpiresAfter { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectObjectJsonConverter))] + public global::tryAGI.OpenAI.VectorStoreObjectObject Object { get; set; } /// - /// The Unix timestamp (in seconds) for when the vector store will expire. + /// The Unix timestamp (in seconds) for when the vector store was created. /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] - public global::System.DateTimeOffset? ExpiresAt { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// + /// The name of the vector store. /// - [global::System.Text.Json.Serialization.JsonPropertyName("file_counts")] + [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VectorStoreObjectFileCounts FileCounts { get; set; } + public required string Name { get; set; } /// - /// The identifier, which can be referenced in API endpoints. + /// The total number of bytes used by the files in the vector store. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("usage_bytes")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required int UsageBytes { get; set; } /// - /// The Unix timestamp (in seconds) for when the vector store was last active. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_active_at")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("file_counts")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTimeOffset? LastActiveAt { get; set; } + public required global::tryAGI.OpenAI.VectorStoreObjectFileCounts FileCounts { 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. ///
- [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectStatusJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } + public required global::tryAGI.OpenAI.VectorStoreObjectStatus Status { get; set; } /// - /// The name of the vector store. + /// The expiration policy for a vector store. /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_after")] + public global::tryAGI.OpenAI.VectorStoreExpirationAfter? ExpiresAfter { get; set; } /// - /// The object type, which is always `vector_store`. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectObjectJsonConverter))] - public global::tryAGI.OpenAI.VectorStoreObjectObject Object { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + public global::System.DateTimeOffset? ExpiresAt { get; set; } /// - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreObjectStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonPropertyName("last_active_at")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.VectorStoreObjectStatus Status { get; set; } + public required global::System.DateTimeOffset? LastActiveAt { get; set; } /// - /// The total number of bytes used by the files in the vector store. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("usage_bytes")] + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] [global::System.Text.Json.Serialization.JsonRequired] - public required int UsageBytes { get; set; } + public required global::System.Collections.Generic.Dictionary? Metadata { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -100,68 +94,58 @@ public sealed partial class VectorStoreObject /// /// Initializes a new instance of the class. /// - /// - /// The Unix timestamp (in seconds) for when the vector store was created. - /// - /// - /// The expiration policy for a vector store. - /// - /// - /// The Unix timestamp (in seconds) for when the vector store will expire. - /// - /// /// /// The identifier, which can be referenced in API endpoints. /// - /// - /// The Unix timestamp (in seconds) for when the vector store was last active. + /// + /// The object type, which is always `vector_store`. /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// + /// The Unix timestamp (in seconds) for when the vector store was created. /// /// /// The name of the vector store. /// - /// - /// The object type, which is always `vector_store`. + /// + /// The total number of bytes used by the files in the vector store. /// + /// /// /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. /// - /// - /// The total number of bytes used by the files in the vector store. + /// + /// The expiration policy for a vector store. /// + /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreObject( + string id, global::System.DateTimeOffset createdAt, + string name, + int usageBytes, global::tryAGI.OpenAI.VectorStoreObjectFileCounts fileCounts, - string id, + global::tryAGI.OpenAI.VectorStoreObjectStatus status, global::System.DateTimeOffset? lastActiveAt, global::System.Collections.Generic.Dictionary? metadata, - string name, - global::tryAGI.OpenAI.VectorStoreObjectStatus status, - int usageBytes, + global::tryAGI.OpenAI.VectorStoreObjectObject @object, global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter, - global::System.DateTimeOffset? expiresAt, - global::tryAGI.OpenAI.VectorStoreObjectObject @object) + global::System.DateTimeOffset? expiresAt) { - this.CreatedAt = createdAt; - this.FileCounts = fileCounts ?? throw new global::System.ArgumentNullException(nameof(fileCounts)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.LastActiveAt = lastActiveAt; - this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.CreatedAt = createdAt; this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Status = status; this.UsageBytes = usageBytes; + this.FileCounts = fileCounts ?? throw new global::System.ArgumentNullException(nameof(fileCounts)); + this.Status = status; + this.LastActiveAt = lastActiveAt ?? throw new global::System.ArgumentNullException(nameof(lastActiveAt)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.Object = @object; this.ExpiresAfter = expiresAfter; this.ExpiresAt = expiresAt; - this.Object = @object; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.Json.g.cs new file mode 100644 index 00000000..35fe0642 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreObjectExpiresAt + { + /// + /// 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::tryAGI.OpenAI.VectorStoreObjectExpiresAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreObjectExpiresAt), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreObjectExpiresAt; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreObjectExpiresAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreObjectExpiresAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreObjectExpiresAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.g.cs new file mode 100644 index 00000000..49371c58 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectExpiresAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VectorStoreObjectExpiresAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectFileCounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectFileCounts.g.cs index acf3e3c7..5bacc230 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectFileCounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectFileCounts.g.cs @@ -9,11 +9,11 @@ namespace tryAGI.OpenAI public sealed partial class VectorStoreObjectFileCounts { /// - /// The number of files that were cancelled. + /// The number of files that are currently being processed. /// - [global::System.Text.Json.Serialization.JsonPropertyName("cancelled")] + [global::System.Text.Json.Serialization.JsonPropertyName("in_progress")] [global::System.Text.Json.Serialization.JsonRequired] - public required int Cancelled { get; set; } + public required int InProgress { get; set; } /// /// The number of files that have been successfully processed. @@ -30,11 +30,11 @@ public sealed partial class VectorStoreObjectFileCounts public required int Failed { get; set; } /// - /// The number of files that are currently being processed. + /// The number of files that were cancelled. /// - [global::System.Text.Json.Serialization.JsonPropertyName("in_progress")] + [global::System.Text.Json.Serialization.JsonPropertyName("cancelled")] [global::System.Text.Json.Serialization.JsonRequired] - public required int InProgress { get; set; } + public required int Cancelled { get; set; } /// /// The total number of files. @@ -52,8 +52,8 @@ public sealed partial class VectorStoreObjectFileCounts /// /// Initializes a new instance of the class. /// - /// - /// The number of files that were cancelled. + /// + /// The number of files that are currently being processed. /// /// /// The number of files that have been successfully processed. @@ -61,8 +61,8 @@ public sealed partial class VectorStoreObjectFileCounts /// /// The number of files that have failed to process. /// - /// - /// The number of files that are currently being processed. + /// + /// The number of files that were cancelled. /// /// /// The total number of files. @@ -71,16 +71,16 @@ public sealed partial class VectorStoreObjectFileCounts [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreObjectFileCounts( - int cancelled, + int inProgress, int completed, int failed, - int inProgress, + int cancelled, int total) { - this.Cancelled = cancelled; + this.InProgress = inProgress; this.Completed = completed; this.Failed = failed; - this.InProgress = inProgress; + this.Cancelled = cancelled; this.Total = total; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.Json.g.cs new file mode 100644 index 00000000..dc77357f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreObjectLastActiveAt + { + /// + /// 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::tryAGI.OpenAI.VectorStoreObjectLastActiveAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreObjectLastActiveAt), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreObjectLastActiveAt; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreObjectLastActiveAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreObjectLastActiveAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreObjectLastActiveAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.g.cs new file mode 100644 index 00000000..ff8e4379 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreObjectLastActiveAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VectorStoreObjectLastActiveAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchRequest.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchRequest.g.cs index 4fa9a6e4..416340de 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchRequest.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchRequest.g.cs @@ -11,11 +11,19 @@ namespace tryAGI.OpenAI public sealed partial class VectorStoreSearchRequest { /// - /// A filter to apply based on file attributes. + /// A query string for a search /// - [global::System.Text.Json.Serialization.JsonPropertyName("filters")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter))] - public global::tryAGI.OpenAI.AnyOf? Filters { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("query")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.OneOf> Query { get; set; } + + /// + /// Whether to rewrite the natural language query for vector search.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("rewrite_query")] + public bool? RewriteQuery { get; set; } /// /// The maximum number of results to return. This number should be between 1 and 50 inclusive.
@@ -25,12 +33,11 @@ public sealed partial class VectorStoreSearchRequest public int? MaxNumResults { get; set; } /// - /// A query string for a search + /// A filter to apply based on file attributes. /// - [global::System.Text.Json.Serialization.JsonPropertyName("query")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.AnyOfJsonConverter>))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.AnyOf> Query { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("filters")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter))] + public global::tryAGI.OpenAI.OneOf? Filters { get; set; } /// /// Ranking options for search. @@ -38,13 +45,6 @@ public sealed partial class VectorStoreSearchRequest [global::System.Text.Json.Serialization.JsonPropertyName("ranking_options")] public global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? RankingOptions { get; set; } - /// - /// Whether to rewrite the natural language query for vector search.
- /// Default Value: false - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("rewrite_query")] - public bool? RewriteQuery { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -54,38 +54,38 @@ public sealed partial class VectorStoreSearchRequest /// /// Initializes a new instance of the class. /// - /// - /// A filter to apply based on file attributes. + /// + /// A query string for a search + /// + /// + /// Whether to rewrite the natural language query for vector search.
+ /// Default Value: false /// /// /// The maximum number of results to return. This number should be between 1 and 50 inclusive.
/// Default Value: 10 /// - /// - /// A query string for a search + /// + /// A filter to apply based on file attributes. /// /// /// Ranking options for search. /// - /// - /// Whether to rewrite the natural language query for vector search.
- /// Default Value: false - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreSearchRequest( - global::tryAGI.OpenAI.AnyOf> query, - global::tryAGI.OpenAI.AnyOf? filters, + global::tryAGI.OpenAI.OneOf> query, + bool? rewriteQuery, int? maxNumResults, - global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? rankingOptions, - bool? rewriteQuery) + global::tryAGI.OpenAI.OneOf? filters, + global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? rankingOptions) { this.Query = query; - this.Filters = filters; + this.RewriteQuery = rewriteQuery; this.MaxNumResults = maxNumResults; + this.Filters = filters; this.RankingOptions = rankingOptions; - this.RewriteQuery = rewriteQuery; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultContentObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultContentObject.g.cs index af0cba4d..d4b1253a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultContentObject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultContentObject.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI /// public sealed partial class VectorStoreSearchResultContentObject { - /// - /// The text content returned from search. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - /// /// The type of content. /// @@ -22,6 +15,13 @@ public sealed partial class VectorStoreSearchResultContentObject [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultContentObjectTypeJsonConverter))] public global::tryAGI.OpenAI.VectorStoreSearchResultContentObjectType Type { get; set; } + /// + /// The text content returned from search. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -31,12 +31,12 @@ public sealed partial class VectorStoreSearchResultContentObject /// /// Initializes a new instance of the class. /// - /// - /// The text content returned from search. - /// /// /// The type of content. /// + /// + /// The text content returned from search. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultItem.g.cs index 6f425c2b..cf38734a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultItem.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultItem.g.cs @@ -8,24 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class VectorStoreSearchResultItem { - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] - [global::System.Text.Json.Serialization.JsonRequired] - public required object? Attributes { get; set; } - - /// - /// Content chunks from the file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Content { get; set; } - /// /// The ID of the vector store file. /// @@ -47,6 +29,20 @@ public sealed partial class VectorStoreSearchResultItem [global::System.Text.Json.Serialization.JsonRequired] public required double Score { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("attributes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object? Attributes { get; set; } + + /// + /// Content chunks from the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,16 +52,6 @@ public sealed partial class VectorStoreSearchResultItem /// /// Initializes a new instance of the class. /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// - /// - /// Content chunks from the file. - /// /// /// The ID of the vector store file. /// @@ -75,21 +61,25 @@ public sealed partial class VectorStoreSearchResultItem /// /// The similarity score for the result. /// + /// + /// + /// Content chunks from the file. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreSearchResultItem( - object? attributes, - global::System.Collections.Generic.IList content, string fileId, string filename, - double score) + double score, + object? attributes, + global::System.Collections.Generic.IList content) { - this.Attributes = attributes ?? throw new global::System.ArgumentNullException(nameof(attributes)); - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Score = score; + this.Attributes = attributes ?? throw new global::System.ArgumentNullException(nameof(attributes)); + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPage.g.cs index 02d6ba05..7ea5368c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPage.g.cs @@ -8,6 +8,20 @@ namespace tryAGI.OpenAI /// public sealed partial class VectorStoreSearchResultsPage { + /// + /// The object type, which is always `vector_store.search_results.page` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultsPageObjectJsonConverter))] + public global::tryAGI.OpenAI.VectorStoreSearchResultsPageObject Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_query")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList SearchQuery { get; set; } + /// /// The list of search result items. /// @@ -23,26 +37,12 @@ public sealed partial class VectorStoreSearchResultsPage public required bool HasMore { get; set; } /// - /// The token for the next page, if any. + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("next_page")] [global::System.Text.Json.Serialization.JsonRequired] public required string? NextPage { get; set; } - /// - /// The object type, which is always `vector_store.search_results.page` - /// - [global::System.Text.Json.Serialization.JsonPropertyName("object")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VectorStoreSearchResultsPageObjectJsonConverter))] - public global::tryAGI.OpenAI.VectorStoreSearchResultsPageObject Object { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("search_query")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList SearchQuery { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -52,33 +52,31 @@ public sealed partial class VectorStoreSearchResultsPage /// /// Initializes a new instance of the class. /// + /// + /// The object type, which is always `vector_store.search_results.page` + /// + /// /// /// The list of search result items. /// /// /// Indicates if there are more results to fetch. /// - /// - /// The token for the next page, if any. - /// - /// - /// The object type, which is always `vector_store.search_results.page` - /// - /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public VectorStoreSearchResultsPage( + global::System.Collections.Generic.IList searchQuery, global::System.Collections.Generic.IList data, bool hasMore, string? nextPage, - global::System.Collections.Generic.IList searchQuery, global::tryAGI.OpenAI.VectorStoreSearchResultsPageObject @object) { + this.SearchQuery = searchQuery ?? throw new global::System.ArgumentNullException(nameof(searchQuery)); this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.HasMore = hasMore; this.NextPage = nextPage ?? throw new global::System.ArgumentNullException(nameof(nextPage)); - this.SearchQuery = searchQuery ?? throw new global::System.ArgumentNullException(nameof(searchQuery)); this.Object = @object; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.Json.g.cs new file mode 100644 index 00000000..bbe05660 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VectorStoreSearchResultsPageNextPage + { + /// + /// 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::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage), + jsonSerializerContext) as global::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage; + } + + /// + /// 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::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VectorStoreSearchResultsPageNextPage; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.g.cs new file mode 100644 index 00000000..8536fbad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VectorStoreSearchResultsPageNextPage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VectorStoreSearchResultsPageNextPage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.Json.g.cs new file mode 100644 index 00000000..4cc4a1c7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class Verbosity + { + /// + /// 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::tryAGI.OpenAI.Verbosity? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.Verbosity), + jsonSerializerContext) as global::tryAGI.OpenAI.Verbosity; + } + + /// + /// 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::tryAGI.OpenAI.Verbosity? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.Verbosity), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Verbosity; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.g.cs index c2ef1fae..c5cd8294 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Verbosity.g.cs @@ -4,57 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Constrains the verbosity of the model's response. Lower values will result in
- /// more concise responses, while higher values will result in more verbose responses.
- /// Currently supported values are `low`, `medium`, and `high`.
- /// Default Value: medium + /// ///
- public enum Verbosity + public sealed partial class Verbosity { - /// - /// - /// - Low, - /// - /// - /// - Medium, - /// - /// - /// - High, - } - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class VerbosityExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this Verbosity value) - { - return value switch - { - Verbosity.Low => "low", - Verbosity.Medium => "medium", - Verbosity.High => "high", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } /// - /// Converts an string to a enum. + /// Additional properties that are not explicitly defined in the schema /// - public static Verbosity? ToEnum(string value) - { - return value switch - { - "low" => Verbosity.Low, - "medium" => Verbosity.Medium, - "high" => Verbosity.High, - _ => null, - }; - } + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VerbosityEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VerbosityEnum.g.cs new file mode 100644 index 00000000..1de9aa56 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VerbosityEnum.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Constrains the verbosity of the model's response. Lower values will result in
+ /// more concise responses, while higher values will result in more verbose responses.
+ /// Currently supported values are `low`, `medium`, and `high`.
+ /// Default Value: medium + ///
+ public enum VerbosityEnum + { + /// + /// + /// + Low, + /// + /// + /// + Medium, + /// + /// + /// + High, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VerbosityEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VerbosityEnum value) + { + return value switch + { + VerbosityEnum.Low => "low", + VerbosityEnum.Medium => "medium", + VerbosityEnum.High => "high", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VerbosityEnum? ToEnum(string value) + { + return value switch + { + "low" => VerbosityEnum.Low, + "medium" => VerbosityEnum.Medium, + "high" => VerbosityEnum.High, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoContentVariant.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoContentVariant.g.cs new file mode 100644 index 00000000..cf406b65 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoContentVariant.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VideoContentVariant + { + /// + /// + /// + Video, + /// + /// + /// + Thumbnail, + /// + /// + /// + Spritesheet, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoContentVariantExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoContentVariant value) + { + return value switch + { + VideoContentVariant.Video => "video", + VideoContentVariant.Thumbnail => "thumbnail", + VideoContentVariant.Spritesheet => "spritesheet", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoContentVariant? ToEnum(string value) + { + return value switch + { + "video" => VideoContentVariant.Video, + "thumbnail" => VideoContentVariant.Thumbnail, + "spritesheet" => VideoContentVariant.Spritesheet, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.Json.g.cs new file mode 100644 index 00000000..06635222 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoListResource + { + /// + /// 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::tryAGI.OpenAI.VideoListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoListResource; + } + + /// + /// 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::tryAGI.OpenAI.VideoListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.g.cs new file mode 100644 index 00000000..be9fef25 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResource.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoListResource + { + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ /// global::tryAGI.OpenAI.VideoListResourceObject.List + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VideoListResourceObject Object { get; set; } = global::tryAGI.OpenAI.VideoListResourceObject.List; + + /// + /// A list of items + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? LastId { get; set; } + + /// + /// Whether there are more items available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + /// + /// + /// A list of items + /// + /// + /// + /// + /// Whether there are more items available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VideoListResource( + global::System.Collections.Generic.IList data, + string? firstId, + string? lastId, + bool hasMore, + global::tryAGI.OpenAI.VideoListResourceObject @object = global::tryAGI.OpenAI.VideoListResourceObject.List) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.FirstId = firstId ?? throw new global::System.ArgumentNullException(nameof(firstId)); + this.LastId = lastId ?? throw new global::System.ArgumentNullException(nameof(lastId)); + this.HasMore = hasMore; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public VideoListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..69178d18 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.VideoListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.VideoListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.g.cs new file mode 100644 index 00000000..c6645104 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.Json.g.cs new file mode 100644 index 00000000..775a8ce9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.VideoListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.VideoListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.g.cs new file mode 100644 index 00000000..119b9dcb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceObject.g.cs new file mode 100644 index 00000000..537d7b18 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoListResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of object returned, must be `list`.
+ /// Default Value: list + ///
+ public enum VideoListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoListResourceObject value) + { + return value switch + { + VideoListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => VideoListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.Json.g.cs new file mode 100644 index 00000000..b32b6f07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct VideoModel + { + /// + /// 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::tryAGI.OpenAI.VideoModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoModel), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoModel?; + } + + /// + /// 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::tryAGI.OpenAI.VideoModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoModel), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoModel?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.g.cs new file mode 100644 index 00000000..2d14a11d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModel.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public readonly partial struct VideoModel : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public string? Value1 { get; init; } +#else + public string? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.VideoModelEnum? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.VideoModelEnum? 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 VideoModel(string value) => new VideoModel((string?)value); + + /// + /// + /// + public static implicit operator string?(VideoModel @this) => @this.Value1; + + /// + /// + /// + public VideoModel(string? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator VideoModel(global::tryAGI.OpenAI.VideoModelEnum value) => new VideoModel((global::tryAGI.OpenAI.VideoModelEnum?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.VideoModelEnum?(VideoModel @this) => @this.Value2; + + /// + /// + /// + public VideoModel(global::tryAGI.OpenAI.VideoModelEnum? value) + { + Value2 = value; + } + + /// + /// + /// + public VideoModel( + string? value1, + global::tryAGI.OpenAI.VideoModelEnum? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToValueString() + ; + + /// + /// + /// + public bool Validate() + { + return 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(string), + Value2, + typeof(global::tryAGI.OpenAI.VideoModelEnum), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(VideoModel 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 ==(VideoModel obj1, VideoModel obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(VideoModel obj1, VideoModel obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is VideoModel o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModelEnum.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModelEnum.g.cs new file mode 100644 index 00000000..6a927ea0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoModelEnum.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VideoModelEnum + { + /// + /// + /// + Sora2, + /// + /// + /// + Sora2Pro, + /// + /// + /// + Sora220251006, + /// + /// + /// + Sora2Pro20251006, + /// + /// + /// + Sora220251208, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoModelEnumExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoModelEnum value) + { + return value switch + { + VideoModelEnum.Sora2 => "sora-2", + VideoModelEnum.Sora2Pro => "sora-2-pro", + VideoModelEnum.Sora220251006 => "sora-2-2025-10-06", + VideoModelEnum.Sora2Pro20251006 => "sora-2-pro-2025-10-06", + VideoModelEnum.Sora220251208 => "sora-2-2025-12-08", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoModelEnum? ToEnum(string value) + { + return value switch + { + "sora-2" => VideoModelEnum.Sora2, + "sora-2-pro" => VideoModelEnum.Sora2Pro, + "sora-2-2025-10-06" => VideoModelEnum.Sora220251006, + "sora-2-pro-2025-10-06" => VideoModelEnum.Sora2Pro20251006, + "sora-2-2025-12-08" => VideoModelEnum.Sora220251208, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.Json.g.cs new file mode 100644 index 00000000..2e7047a2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResource + { + /// + /// 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::tryAGI.OpenAI.VideoResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResource; + } + + /// + /// 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::tryAGI.OpenAI.VideoResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.g.cs new file mode 100644 index 00000000..a15c16d5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResource.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Structured information describing a generated video job. + /// + public sealed partial class VideoResource + { + /// + /// Unique identifier for the video job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The object type, which is always `video`.
+ /// Default Value: video + ///
+ /// global::tryAGI.OpenAI.VideoResourceObject.Video + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VideoResourceObject Object { get; set; } = global::tryAGI.OpenAI.VideoResourceObject.Video; + + /// + /// The video generation model that produced the job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoModelJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.VideoModel Model { get; set; } + + /// + /// Current lifecycle status of the video job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.VideoStatus Status { get; set; } + + /// + /// Approximate completion percentage for the generation task. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("progress")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Progress { get; set; } + + /// + /// Unix timestamp (seconds) for when the job was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset? CompletedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset? ExpiresAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Prompt { get; set; } + + /// + /// The resolution of the generated video. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VideoSizeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.VideoSize Size { get; set; } + + /// + /// Duration of the generated clip in seconds. For extensions, this is the stitched total duration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Seconds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("remixed_from_video_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? RemixedFromVideoId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.Error2? Error { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique identifier for the video job. + /// + /// + /// The object type, which is always `video`.
+ /// Default Value: video + /// + /// + /// The video generation model that produced the job. + /// + /// + /// Current lifecycle status of the video job. + /// + /// + /// Approximate completion percentage for the generation task. + /// + /// + /// Unix timestamp (seconds) for when the job was created. + /// + /// + /// + /// + /// + /// The resolution of the generated video. + /// + /// + /// Duration of the generated clip in seconds. For extensions, this is the stitched total duration. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VideoResource( + string id, + global::tryAGI.OpenAI.VideoModel model, + global::tryAGI.OpenAI.VideoStatus status, + int progress, + global::System.DateTimeOffset createdAt, + global::System.DateTimeOffset? completedAt, + global::System.DateTimeOffset? expiresAt, + string? prompt, + global::tryAGI.OpenAI.VideoSize size, + string seconds, + string? remixedFromVideoId, + global::tryAGI.OpenAI.Error2? error, + global::tryAGI.OpenAI.VideoResourceObject @object = global::tryAGI.OpenAI.VideoResourceObject.Video) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Model = model; + this.Status = status; + this.Progress = progress; + this.CreatedAt = createdAt; + this.CompletedAt = completedAt ?? throw new global::System.ArgumentNullException(nameof(completedAt)); + this.ExpiresAt = expiresAt ?? throw new global::System.ArgumentNullException(nameof(expiresAt)); + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.Size = size; + this.Seconds = seconds ?? throw new global::System.ArgumentNullException(nameof(seconds)); + this.RemixedFromVideoId = remixedFromVideoId ?? throw new global::System.ArgumentNullException(nameof(remixedFromVideoId)); + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public VideoResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.Json.g.cs new file mode 100644 index 00000000..9199cc76 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResourceCompletedAt + { + /// + /// 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::tryAGI.OpenAI.VideoResourceCompletedAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResourceCompletedAt), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResourceCompletedAt; + } + + /// + /// 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::tryAGI.OpenAI.VideoResourceCompletedAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResourceCompletedAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResourceCompletedAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.g.cs new file mode 100644 index 00000000..9b69c8fb --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceCompletedAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoResourceCompletedAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.Json.g.cs new file mode 100644 index 00000000..4d6ed107 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResourceError + { + /// + /// 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::tryAGI.OpenAI.VideoResourceError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResourceError), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResourceError; + } + + /// + /// 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::tryAGI.OpenAI.VideoResourceError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResourceError), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResourceError; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.g.cs new file mode 100644 index 00000000..6bee55f8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceError.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoResourceError + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.Json.g.cs new file mode 100644 index 00000000..a4547802 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResourceExpiresAt + { + /// + /// 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::tryAGI.OpenAI.VideoResourceExpiresAt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResourceExpiresAt), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResourceExpiresAt; + } + + /// + /// 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::tryAGI.OpenAI.VideoResourceExpiresAt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResourceExpiresAt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResourceExpiresAt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.g.cs new file mode 100644 index 00000000..33104632 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceExpiresAt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoResourceExpiresAt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceObject.g.cs new file mode 100644 index 00000000..76646fc8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type, which is always `video`.
+ /// Default Value: video + ///
+ public enum VideoResourceObject + { + /// + /// + /// + Video, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoResourceObject value) + { + return value switch + { + VideoResourceObject.Video => "video", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoResourceObject? ToEnum(string value) + { + return value switch + { + "video" => VideoResourceObject.Video, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.Json.g.cs new file mode 100644 index 00000000..e1571871 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResourcePrompt + { + /// + /// 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::tryAGI.OpenAI.VideoResourcePrompt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResourcePrompt), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResourcePrompt; + } + + /// + /// 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::tryAGI.OpenAI.VideoResourcePrompt? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResourcePrompt), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResourcePrompt; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.g.cs new file mode 100644 index 00000000..2fb42ed9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourcePrompt.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoResourcePrompt + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.Json.g.cs new file mode 100644 index 00000000..d0279ba0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VideoResourceRemixedFromVideoId + { + /// + /// 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::tryAGI.OpenAI.VideoResourceRemixedFromVideoId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VideoResourceRemixedFromVideoId), + jsonSerializerContext) as global::tryAGI.OpenAI.VideoResourceRemixedFromVideoId; + } + + /// + /// 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::tryAGI.OpenAI.VideoResourceRemixedFromVideoId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VideoResourceRemixedFromVideoId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VideoResourceRemixedFromVideoId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.g.cs new file mode 100644 index 00000000..2ba7b078 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoResourceRemixedFromVideoId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VideoResourceRemixedFromVideoId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSeconds.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSeconds.g.cs new file mode 100644 index 00000000..9de53991 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSeconds.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VideoSeconds + { + /// + /// + /// + x4, + /// + /// + /// + x8, + /// + /// + /// + x12, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoSecondsExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoSeconds value) + { + return value switch + { + VideoSeconds.x4 => "4", + VideoSeconds.x8 => "8", + VideoSeconds.x12 => "12", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoSeconds? ToEnum(string value) + { + return value switch + { + "4" => VideoSeconds.x4, + "8" => VideoSeconds.x8, + "12" => VideoSeconds.x12, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSize.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSize.g.cs new file mode 100644 index 00000000..4bab9c97 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoSize.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VideoSize + { + /// + /// + /// + x720x1280, + /// + /// + /// + x1280x720, + /// + /// + /// + x1024x1792, + /// + /// + /// + x1792x1024, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoSizeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoSize value) + { + return value switch + { + VideoSize.x720x1280 => "720x1280", + VideoSize.x1280x720 => "1280x720", + VideoSize.x1024x1792 => "1024x1792", + VideoSize.x1792x1024 => "1792x1024", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoSize? ToEnum(string value) + { + return value switch + { + "720x1280" => VideoSize.x720x1280, + "1280x720" => VideoSize.x1280x720, + "1024x1792" => VideoSize.x1024x1792, + "1792x1024" => VideoSize.x1792x1024, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoStatus.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoStatus.g.cs new file mode 100644 index 00000000..85876d04 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VideoStatus.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VideoStatus + { + /// + /// + /// + Queued, + /// + /// + /// + InProgress, + /// + /// + /// + Completed, + /// + /// + /// + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VideoStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VideoStatus value) + { + return value switch + { + VideoStatus.Queued => "queued", + VideoStatus.InProgress => "in_progress", + VideoStatus.Completed => "completed", + VideoStatus.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VideoStatus? ToEnum(string value) + { + return value switch + { + "queued" => VideoStatus.Queued, + "in_progress" => VideoStatus.InProgress, + "completed" => VideoStatus.Completed, + "failed" => VideoStatus.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.Json.g.cs new file mode 100644 index 00000000..e559302c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceConsentDeletedResource + { + /// + /// 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::tryAGI.OpenAI.VoiceConsentDeletedResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceConsentDeletedResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceConsentDeletedResource; + } + + /// + /// 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::tryAGI.OpenAI.VoiceConsentDeletedResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceConsentDeletedResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceConsentDeletedResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.g.cs new file mode 100644 index 00000000..e8197e04 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResource.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VoiceConsentDeletedResource + { + /// + /// The consent recording identifier.
+ /// Example: cons_1234 + ///
+ /// cons_1234 + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentDeletedResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Deleted { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The consent recording identifier.
+ /// Example: cons_1234 + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceConsentDeletedResource( + string id, + bool deleted, + global::tryAGI.OpenAI.VoiceConsentDeletedResourceObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Deleted = deleted; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceConsentDeletedResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResourceObject.g.cs new file mode 100644 index 00000000..55b8fff0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentDeletedResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VoiceConsentDeletedResourceObject + { + /// + /// + /// + AudioVoiceConsent, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VoiceConsentDeletedResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VoiceConsentDeletedResourceObject value) + { + return value switch + { + VoiceConsentDeletedResourceObject.AudioVoiceConsent => "audio.voice_consent", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VoiceConsentDeletedResourceObject? ToEnum(string value) + { + return value switch + { + "audio.voice_consent" => VoiceConsentDeletedResourceObject.AudioVoiceConsent, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.Json.g.cs new file mode 100644 index 00000000..6958fcf7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceConsentListResource + { + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceConsentListResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceConsentListResource; + } + + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceConsentListResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceConsentListResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.g.cs new file mode 100644 index 00000000..1f08c610 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResource.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VoiceConsentListResource + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentListResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VoiceConsentListResourceObject Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("first_id")] + public string? FirstId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_id")] + public string? LastId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceConsentListResource( + global::System.Collections.Generic.IList data, + bool hasMore, + global::tryAGI.OpenAI.VoiceConsentListResourceObject @object, + string? firstId, + string? lastId) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.Object = @object; + this.FirstId = firstId; + this.LastId = lastId; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceConsentListResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.Json.g.cs new file mode 100644 index 00000000..ef6bab6a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceConsentListResourceFirstId + { + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResourceFirstId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceConsentListResourceFirstId), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceConsentListResourceFirstId; + } + + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResourceFirstId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceConsentListResourceFirstId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceConsentListResourceFirstId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.g.cs new file mode 100644 index 00000000..dc9122a0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceFirstId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VoiceConsentListResourceFirstId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.Json.g.cs new file mode 100644 index 00000000..6f7af8d0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceConsentListResourceLastId + { + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResourceLastId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceConsentListResourceLastId), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceConsentListResourceLastId; + } + + /// + /// 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::tryAGI.OpenAI.VoiceConsentListResourceLastId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceConsentListResourceLastId), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceConsentListResourceLastId; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.g.cs new file mode 100644 index 00000000..90404254 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceLastId.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class VoiceConsentListResourceLastId + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceObject.g.cs new file mode 100644 index 00000000..d1d10f2a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentListResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public enum VoiceConsentListResourceObject + { + /// + /// + /// + List, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VoiceConsentListResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VoiceConsentListResourceObject value) + { + return value switch + { + VoiceConsentListResourceObject.List => "list", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VoiceConsentListResourceObject? ToEnum(string value) + { + return value switch + { + "list" => VoiceConsentListResourceObject.List, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.Json.g.cs new file mode 100644 index 00000000..7669b522 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceConsentResource + { + /// + /// 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::tryAGI.OpenAI.VoiceConsentResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceConsentResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceConsentResource; + } + + /// + /// 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::tryAGI.OpenAI.VoiceConsentResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceConsentResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceConsentResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.g.cs new file mode 100644 index 00000000..cd97f52a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResource.g.cs @@ -0,0 +1,98 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A consent recording used to authorize creation of a custom voice. + /// + public sealed partial class VoiceConsentResource + { + /// + /// The object type, which is always `audio.voice_consent`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceConsentResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VoiceConsentResourceObject Object { get; set; } + + /// + /// The consent recording identifier.
+ /// Example: cons_1234 + ///
+ /// cons_1234 + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The label provided when the consent recording was uploaded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Language { get; set; } + + /// + /// The Unix timestamp (in seconds) for when the consent recording was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The object type, which is always `audio.voice_consent`. + /// + /// + /// The consent recording identifier.
+ /// Example: cons_1234 + /// + /// + /// The label provided when the consent recording was uploaded. + /// + /// + /// The BCP 47 language tag for the consent phrase (for example, `en-US`). + /// + /// + /// The Unix timestamp (in seconds) for when the consent recording was created. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceConsentResource( + string id, + string name, + string language, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.VoiceConsentResourceObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); + this.CreatedAt = createdAt; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceConsentResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResourceObject.g.cs new file mode 100644 index 00000000..9b3166de --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceConsentResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type, which is always `audio.voice_consent`. + /// + public enum VoiceConsentResourceObject + { + /// + /// + /// + AudioVoiceConsent, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VoiceConsentResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VoiceConsentResourceObject value) + { + return value switch + { + VoiceConsentResourceObject.AudioVoiceConsent => "audio.voice_consent", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VoiceConsentResourceObject? ToEnum(string value) + { + return value switch + { + "audio.voice_consent" => VoiceConsentResourceObject.AudioVoiceConsent, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.Json.g.cs new file mode 100644 index 00000000..9b633d54 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public readonly partial struct VoiceIdsOrCustomVoice + { + /// + /// 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::tryAGI.OpenAI.VoiceIdsOrCustomVoice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoice), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceIdsOrCustomVoice?; + } + + /// + /// 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::tryAGI.OpenAI.VoiceIdsOrCustomVoice? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoice), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceIdsOrCustomVoice?; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.g.cs new file mode 100644 index 00000000..9ef17f69 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoice.g.cs @@ -0,0 +1,221 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A built-in voice name or a custom voice reference. + /// + public readonly partial struct VoiceIdsOrCustomVoice : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.VoiceIdsShared? Value1 { get; init; } +#else + public global::tryAGI.OpenAI.VoiceIdsShared? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// Custom voice reference. + /// +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? 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 VoiceIdsOrCustomVoice(global::tryAGI.OpenAI.VoiceIdsShared value) => new VoiceIdsOrCustomVoice((global::tryAGI.OpenAI.VoiceIdsShared?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.VoiceIdsShared?(VoiceIdsOrCustomVoice @this) => @this.Value1; + + /// + /// + /// + public VoiceIdsOrCustomVoice(global::tryAGI.OpenAI.VoiceIdsShared? value) + { + Value1 = value; + } + + /// + /// + /// + public static implicit operator VoiceIdsOrCustomVoice(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2 value) => new VoiceIdsOrCustomVoice((global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2?)value); + + /// + /// + /// + public static implicit operator global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2?(VoiceIdsOrCustomVoice @this) => @this.Value2; + + /// + /// + /// + public VoiceIdsOrCustomVoice(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public VoiceIdsOrCustomVoice( + global::tryAGI.OpenAI.VoiceIdsShared? value1, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public override string? ToString() => + Value1?.ToString() ?? + Value2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return 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::tryAGI.OpenAI.VoiceIdsShared), + Value2, + typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), + }; + 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(VoiceIdsOrCustomVoice 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 ==(VoiceIdsOrCustomVoice obj1, VoiceIdsOrCustomVoice obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(VoiceIdsOrCustomVoice obj1, VoiceIdsOrCustomVoice obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is VoiceIdsOrCustomVoice o && Equals(o); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.Json.g.cs new file mode 100644 index 00000000..87dd46e3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceIdsOrCustomVoiceVariant2 + { + /// + /// 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::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2; + } + + /// + /// 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::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceIdsOrCustomVoiceVariant2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.g.cs new file mode 100644 index 00000000..cd419f8d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsOrCustomVoiceVariant2.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Custom voice reference. + /// + public sealed partial class VoiceIdsOrCustomVoiceVariant2 + { + /// + /// The custom voice ID, e.g. `voice_1234`.
+ /// Example: voice_1234 + ///
+ /// voice_1234 + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The custom voice ID, e.g. `voice_1234`.
+ /// Example: voice_1234 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceIdsOrCustomVoiceVariant2( + string id) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceIdsOrCustomVoiceVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsShared.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsShared.g.cs index b7d57f06..bdafe2ea 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsShared.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceIdsShared.g.cs @@ -29,37 +29,36 @@ namespace tryAGI.OpenAI /// /// /// - public static implicit operator VoiceIdsShared(string value) => new VoiceIdsShared((string?)value); +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Value2 { get; init; } +#else + public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Value2 { get; } +#endif /// /// /// - public static implicit operator string?(VoiceIdsShared @this) => @this.Value1; - +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; /// /// /// - public VoiceIdsShared(string? value) - { - Value1 = value; - } + public static implicit operator VoiceIdsShared(string value) => new VoiceIdsShared((string?)value); /// /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Value2 { get; init; } -#else - public global::tryAGI.OpenAI.VoiceIdsSharedEnum? Value2 { get; } -#endif + public static implicit operator string?(VoiceIdsShared @this) => @this.Value1; /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; + public VoiceIdsShared(string? value) + { + Value1 = value; + } /// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.Json.g.cs new file mode 100644 index 00000000..4b0c5f9a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class VoiceResource + { + /// + /// 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::tryAGI.OpenAI.VoiceResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.VoiceResource), + jsonSerializerContext) as global::tryAGI.OpenAI.VoiceResource; + } + + /// + /// 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::tryAGI.OpenAI.VoiceResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.VoiceResource), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.VoiceResource; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.g.cs new file mode 100644 index 00000000..3d36ec4b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResource.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A custom voice that can be used for audio output. + /// + public sealed partial class VoiceResource + { + /// + /// The object type, which is always `audio.voice`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.VoiceResourceObjectJsonConverter))] + public global::tryAGI.OpenAI.VoiceResourceObject Object { get; set; } + + /// + /// The voice identifier, which can be referenced in API endpoints. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The name of the voice. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The Unix timestamp (in seconds) for when the voice was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The object type, which is always `audio.voice`. + /// + /// + /// The voice identifier, which can be referenced in API endpoints. + /// + /// + /// The name of the voice. + /// + /// + /// The Unix timestamp (in seconds) for when the voice was created. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public VoiceResource( + string id, + string name, + global::System.DateTimeOffset createdAt, + global::tryAGI.OpenAI.VoiceResourceObject @object) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.CreatedAt = createdAt; + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public VoiceResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResourceObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResourceObject.g.cs new file mode 100644 index 00000000..eeb96c42 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.VoiceResourceObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The object type, which is always `audio.voice`. + /// + public enum VoiceResourceObject + { + /// + /// + /// + AudioVoice, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VoiceResourceObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this VoiceResourceObject value) + { + return value switch + { + VoiceResourceObject.AudioVoice => "audio.voice", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static VoiceResourceObject? ToEnum(string value) + { + return value switch + { + "audio.voice" => VoiceResourceObject.AudioVoice, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.Json.g.cs deleted file mode 100644 index 95a0508a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace tryAGI.OpenAI -{ - public sealed partial class Wait - { - /// - /// 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::tryAGI.OpenAI.Wait? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::tryAGI.OpenAI.Wait), - jsonSerializerContext) as global::tryAGI.OpenAI.Wait; - } - - /// - /// 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::tryAGI.OpenAI.Wait? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::tryAGI.OpenAI.Wait), - jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.Wait; - } - - /// - /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.g.cs deleted file mode 100644 index c73ac792..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Wait.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// A wait action. - /// - public sealed partial class Wait - { - /// - /// Specifies the event type. For a wait action, this property is
- /// always set to `wait`.
- /// Default Value: wait - ///
- /// global::tryAGI.OpenAI.WaitType.Wait - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WaitTypeJsonConverter))] - public global::tryAGI.OpenAI.WaitType Type { get; set; } = global::tryAGI.OpenAI.WaitType.Wait; - - /// - /// 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Specifies the event type. For a wait action, this property is
- /// always set to `wait`.
- /// Default Value: wait - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public Wait( - global::tryAGI.OpenAI.WaitType type = global::tryAGI.OpenAI.WaitType.Wait) - { - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public Wait() - { - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.Json.g.cs new file mode 100644 index 00000000..e6f44085 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WaitParam + { + /// + /// 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::tryAGI.OpenAI.WaitParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WaitParam), + jsonSerializerContext) as global::tryAGI.OpenAI.WaitParam; + } + + /// + /// 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::tryAGI.OpenAI.WaitParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WaitParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WaitParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.g.cs new file mode 100644 index 00000000..f22cfbde --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParam.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// A wait action. + /// + public sealed partial class WaitParam + { + /// + /// Specifies the event type. For a wait action, this property is always set to `wait`.
+ /// Default Value: wait + ///
+ /// global::tryAGI.OpenAI.WaitParamType.Wait + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WaitParamTypeJsonConverter))] + public global::tryAGI.OpenAI.WaitParamType Type { get; set; } = global::tryAGI.OpenAI.WaitParamType.Wait; + + /// + /// 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Specifies the event type. For a wait action, this property is always set to `wait`.
+ /// Default Value: wait + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WaitParam( + global::tryAGI.OpenAI.WaitParamType type = global::tryAGI.OpenAI.WaitParamType.Wait) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public WaitParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParamType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParamType.g.cs new file mode 100644 index 00000000..9734deb6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitParamType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Specifies the event type. For a wait action, this property is always set to `wait`.
+ /// Default Value: wait + ///
+ public enum WaitParamType + { + /// + /// + /// + Wait, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WaitParamTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WaitParamType value) + { + return value switch + { + WaitParamType.Wait => "wait", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WaitParamType? ToEnum(string value) + { + return value switch + { + "wait" => WaitParamType.Wait, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitType.g.cs deleted file mode 100644 index 054dab77..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WaitType.g.cs +++ /dev/null @@ -1,47 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// Specifies the event type. For a wait action, this property is
- /// always set to `wait`.
- /// Default Value: wait - ///
- public enum WaitType - { - /// - /// - /// - Wait, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class WaitTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this WaitType value) - { - return value switch - { - WaitType.Wait => "wait", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static WaitType? ToEnum(string value) - { - return value switch - { - "wait" => WaitType.Wait, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFind.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFind.g.cs index 1b5a41d2..fb317387 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFind.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFind.g.cs @@ -4,17 +4,10 @@ namespace tryAGI.OpenAI { /// - /// Action type "find": Searches for a pattern within a loaded page. + /// Action type "find_in_page": Searches for a pattern within a loaded page. /// public sealed partial class WebSearchActionFind { - /// - /// The pattern or text to search for within the page. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("pattern")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Pattern { get; set; } - /// /// The action type. /// @@ -29,6 +22,13 @@ public sealed partial class WebSearchActionFind [global::System.Text.Json.Serialization.JsonRequired] public required string Url { get; set; } + /// + /// The pattern or text to search for within the page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pattern")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Pattern { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -38,25 +38,25 @@ public sealed partial class WebSearchActionFind /// /// Initializes a new instance of the class. /// - /// - /// The pattern or text to search for within the page. - /// /// /// The action type. /// /// /// The URL of the page searched for the pattern. /// + /// + /// The pattern or text to search for within the page. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchActionFind( - string pattern, string url, + string pattern, global::tryAGI.OpenAI.WebSearchActionFindType type) { - this.Pattern = pattern ?? throw new global::System.ArgumentNullException(nameof(pattern)); this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Pattern = pattern ?? throw new global::System.ArgumentNullException(nameof(pattern)); this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFindType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFindType.g.cs index dbe31058..f1715b2a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFindType.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionFindType.g.cs @@ -11,7 +11,7 @@ public enum WebSearchActionFindType /// /// /// - Find, + FindInPage, } /// @@ -26,7 +26,7 @@ public static string ToValueString(this WebSearchActionFindType value) { return value switch { - WebSearchActionFindType.Find => "find", + WebSearchActionFindType.FindInPage => "find_in_page", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -37,7 +37,7 @@ public static string ToValueString(this WebSearchActionFindType value) { return value switch { - "find" => WebSearchActionFindType.Find, + "find_in_page" => WebSearchActionFindType.FindInPage, _ => null, }; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPage.g.cs index 216a1c3d..7100ba96 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPage.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPage.g.cs @@ -19,8 +19,7 @@ public sealed partial class WebSearchActionOpenPage /// The URL opened by the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } + public string? Url { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -41,11 +40,11 @@ public sealed partial class WebSearchActionOpenPage [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchActionOpenPage( - string url, - global::tryAGI.OpenAI.WebSearchActionOpenPageType type) + global::tryAGI.OpenAI.WebSearchActionOpenPageType type, + string? url) { - this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); this.Type = type; + this.Url = url; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.Json.g.cs new file mode 100644 index 00000000..dde1d031 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchActionOpenPageUrl + { + /// + /// 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::tryAGI.OpenAI.WebSearchActionOpenPageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchActionOpenPageUrl), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchActionOpenPageUrl; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchActionOpenPageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchActionOpenPageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchActionOpenPageUrl; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.g.cs new file mode 100644 index 00000000..a7490543 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionOpenPageUrl.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The URL opened by the model. + /// + public sealed partial class WebSearchActionOpenPageUrl + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionSearch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionSearch.g.cs index 612abb41..36229cb6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionSearch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchActionSearch.g.cs @@ -9,24 +9,30 @@ namespace tryAGI.OpenAI public sealed partial class WebSearchActionSearch { /// - /// The search query. + /// The action type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchTypeJsonConverter))] + public global::tryAGI.OpenAI.WebSearchActionSearchType Type { get; set; } + + /// + /// [DEPRECATED] The search query. /// [global::System.Text.Json.Serialization.JsonPropertyName("query")] [global::System.Text.Json.Serialization.JsonRequired] public required string Query { get; set; } /// - /// The sources used in the search. + /// The search queries. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sources")] - public global::System.Collections.Generic.IList? Sources { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("queries")] + public global::System.Collections.Generic.IList? Queries { get; set; } /// - /// The action type. + /// The sources used in the search. /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchActionSearchTypeJsonConverter))] - public global::tryAGI.OpenAI.WebSearchActionSearchType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("sources")] + public global::System.Collections.Generic.IList? Sources { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,26 +43,31 @@ public sealed partial class WebSearchActionSearch /// /// Initializes a new instance of the class. /// + /// + /// The action type. + /// /// - /// The search query. + /// [DEPRECATED] The search query. + /// + /// + /// The search queries. /// /// /// The sources used in the search. /// - /// - /// The action type. - /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchActionSearch( string query, - global::System.Collections.Generic.IList? sources, - global::tryAGI.OpenAI.WebSearchActionSearchType type) + global::tryAGI.OpenAI.WebSearchActionSearchType type, + global::System.Collections.Generic.IList? queries, + global::System.Collections.Generic.IList? sources) { this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query)); - this.Sources = sources; this.Type = type; + this.Queries = queries; + this.Sources = sources; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocation.g.cs index aaacd8ca..724f21d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocation.g.cs @@ -4,89 +4,15 @@ namespace tryAGI.OpenAI { /// - /// The approximate location of the user. + /// /// public sealed partial class WebSearchApproximateLocation { - /// - /// Free text input for the city of the user, e.g. `San Francisco`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("city")] - public string? City { get; set; } - - /// - /// The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("country")] - public string? Country { get; set; } - - /// - /// Free text input for the region of the user, e.g. `California`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("region")] - public string? Region { get; set; } - - /// - /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("timezone")] - public string? Timezone { get; set; } - - /// - /// The type of location approximation. Always `approximate`.
- /// Default Value: approximate - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationTypeJsonConverter))] - public global::tryAGI.OpenAI.WebSearchApproximateLocationType? 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Free text input for the city of the user, e.g. `San Francisco`. - /// - /// - /// The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. - /// - /// - /// Free text input for the region of the user, e.g. `California`. - /// - /// - /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. - /// - /// - /// The type of location approximation. Always `approximate`.
- /// Default Value: approximate - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public WebSearchApproximateLocation( - string? city, - string? country, - string? region, - string? timezone, - global::tryAGI.OpenAI.WebSearchApproximateLocationType? type) - { - this.City = city; - this.Country = country; - this.Region = region; - this.Timezone = timezone; - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public WebSearchApproximateLocation() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationType.g.cs deleted file mode 100644 index 755ab85a..00000000 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationType.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace tryAGI.OpenAI -{ - /// - /// The type of location approximation. Always `approximate`.
- /// Default Value: approximate - ///
- public enum WebSearchApproximateLocationType - { - /// - /// - /// - Approximate, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class WebSearchApproximateLocationTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this WebSearchApproximateLocationType value) - { - return value switch - { - WebSearchApproximateLocationType.Approximate => "approximate", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static WebSearchApproximateLocationType? ToEnum(string value) - { - return value switch - { - "approximate" => WebSearchApproximateLocationType.Approximate, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.Json.g.cs new file mode 100644 index 00000000..44288fd3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1 + { + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.g.cs new file mode 100644 index 00000000..6fd7a142 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The approximate location of the user. + /// + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1 + { + /// + /// The type of location approximation. Always `approximate`.
+ /// Default Value: approximate + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchApproximateLocationWebSearchApproximateLocation1TypeJsonConverter))] + public global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("country")] + public string? Country { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("region")] + public string? Region { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("city")] + public string? City { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timezone")] + public string? Timezone { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of location approximation. Always `approximate`.
+ /// Default Value: approximate + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebSearchApproximateLocationWebSearchApproximateLocation1( + global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Type? type, + string? country, + string? region, + string? city, + string? timezone) + { + this.Type = type; + this.Country = country; + this.Region = region; + this.City = city; + this.Timezone = timezone; + } + + /// + /// Initializes a new instance of the class. + /// + public WebSearchApproximateLocationWebSearchApproximateLocation1() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.Json.g.cs new file mode 100644 index 00000000..87bfeb1e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1City + { + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1City; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.g.cs new file mode 100644 index 00000000..399f4496 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1City.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1City + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.Json.g.cs new file mode 100644 index 00000000..ead6a754 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Country + { + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Country; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.g.cs new file mode 100644 index 00000000..74d1aeb5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Country.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Country + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.Json.g.cs new file mode 100644 index 00000000..627c4e20 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Region + { + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Region; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.g.cs new file mode 100644 index 00000000..01cc52b2 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Region.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Region + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.Json.g.cs new file mode 100644 index 00000000..4ed53e6b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Timezone + { + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.g.cs new file mode 100644 index 00000000..d43aff53 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Timezone.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchApproximateLocationWebSearchApproximateLocation1Timezone + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs new file mode 100644 index 00000000..292a5f07 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchApproximateLocationWebSearchApproximateLocation1Type.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// The type of location approximation. Always `approximate`.
+ /// Default Value: approximate + ///
+ public enum WebSearchApproximateLocationWebSearchApproximateLocation1Type + { + /// + /// + /// + Approximate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WebSearchApproximateLocationWebSearchApproximateLocation1TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WebSearchApproximateLocationWebSearchApproximateLocation1Type value) + { + return value switch + { + WebSearchApproximateLocationWebSearchApproximateLocation1Type.Approximate => "approximate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WebSearchApproximateLocationWebSearchApproximateLocation1Type? ToEnum(string value) + { + return value switch + { + "approximate" => WebSearchApproximateLocationWebSearchApproximateLocation1Type.Approximate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchLocation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchLocation.g.cs index ad2d590d..f1fc4b16 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchLocation.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchLocation.g.cs @@ -8,12 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class WebSearchLocation { - /// - /// Free text input for the city of the user, e.g. `San Francisco`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("city")] - public string? City { get; set; } - /// /// The two-letter
/// [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,
@@ -28,6 +22,12 @@ public sealed partial class WebSearchLocation [global::System.Text.Json.Serialization.JsonPropertyName("region")] public string? Region { get; set; } + /// + /// Free text input for the city of the user, e.g. `San Francisco`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("city")] + public string? City { get; set; } + /// /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones)
/// of the user, e.g. `America/Los_Angeles`. @@ -44,9 +44,6 @@ public sealed partial class WebSearchLocation /// /// Initializes a new instance of the class. /// - /// - /// Free text input for the city of the user, e.g. `San Francisco`. - /// /// /// The two-letter
/// [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,
@@ -55,6 +52,9 @@ public sealed partial class WebSearchLocation /// /// Free text input for the region of the user, e.g. `California`. /// + /// + /// Free text input for the city of the user, e.g. `San Francisco`. + /// /// /// The [IANA timezone](https://timeapi.io/documentation/iana-timezones)
/// of the user, e.g. `America/Los_Angeles`. @@ -63,14 +63,14 @@ public sealed partial class WebSearchLocation [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchLocation( - string? city, string? country, string? region, + string? city, string? timezone) { - this.City = city; this.Country = country; this.Region = region; + this.City = city; this.Timezone = timezone; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewTool.g.cs index ff93859a..eff5cddb 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewTool.g.cs @@ -8,13 +8,6 @@ namespace tryAGI.OpenAI ///
public sealed partial class WebSearchPreviewTool { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("search_context_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeJsonConverter))] - public global::tryAGI.OpenAI.SearchContextSize? SearchContextSize { get; set; } - /// /// The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
/// Default Value: web_search_preview @@ -29,7 +22,20 @@ public sealed partial class WebSearchPreviewTool /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("user_location")] - public object? UserLocation { get; set; } + public global::tryAGI.OpenAI.ApproximateLocation? UserLocation { get; set; } + + /// + /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_context_size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.SearchContextSizeJsonConverter))] + public global::tryAGI.OpenAI.SearchContextSize? SearchContextSize { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_content_types")] + public global::System.Collections.Generic.IList? SearchContentTypes { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -40,23 +46,28 @@ public sealed partial class WebSearchPreviewTool /// /// Initializes a new instance of the class. /// - /// /// /// The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.
/// Default Value: web_search_preview /// /// + /// + /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchPreviewTool( global::tryAGI.OpenAI.WebSearchPreviewToolType type, + global::tryAGI.OpenAI.ApproximateLocation? userLocation, global::tryAGI.OpenAI.SearchContextSize? searchContextSize, - object? userLocation) + global::System.Collections.Generic.IList? searchContentTypes) { this.Type = type; - this.SearchContextSize = searchContextSize; this.UserLocation = userLocation; + this.SearchContextSize = searchContextSize; + this.SearchContentTypes = searchContentTypes; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.Json.g.cs new file mode 100644 index 00000000..ed4cf818 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchPreviewToolUserLocation + { + /// + /// 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::tryAGI.OpenAI.WebSearchPreviewToolUserLocation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchPreviewToolUserLocation), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchPreviewToolUserLocation; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchPreviewToolUserLocation? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchPreviewToolUserLocation), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchPreviewToolUserLocation; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.g.cs new file mode 100644 index 00000000..6f6788ef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolUserLocation.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchPreviewToolUserLocation + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchTool.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchTool.g.cs index f0f54c50..5dcc3000 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchTool.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchTool.g.cs @@ -5,24 +5,10 @@ namespace tryAGI.OpenAI { /// /// Search the Internet for sources related to the prompt. Learn more about the
- /// [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + /// [web search tool](/docs/guides/tools-web-search). ///
public sealed partial class WebSearchTool { - /// - /// Filters for the search. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filters")] - public global::tryAGI.OpenAI.WebSearchToolFilters? Filters { get; set; } - - /// - /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
- /// Default Value: medium - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("search_context_size")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeJsonConverter))] - public global::tryAGI.OpenAI.WebSearchToolSearchContextSize? SearchContextSize { get; set; } - /// /// The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
/// Default Value: web_search @@ -34,10 +20,24 @@ public sealed partial class WebSearchTool public required global::tryAGI.OpenAI.WebSearchToolType Type { get; set; } = global::tryAGI.OpenAI.WebSearchToolType.WebSearch; /// - /// The approximate location of the user. + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filters")] + public global::tryAGI.OpenAI.WebSearchToolFilters2? Filters { get; set; } + + /// + /// /// [global::System.Text.Json.Serialization.JsonPropertyName("user_location")] - public global::tryAGI.OpenAI.WebSearchApproximateLocation? UserLocation { get; set; } + public global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1? UserLocation { get; set; } + + /// + /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
+ /// Default Value: medium + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("search_context_size")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolSearchContextSizeJsonConverter))] + public global::tryAGI.OpenAI.WebSearchToolSearchContextSize? SearchContextSize { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -48,33 +48,29 @@ public sealed partial class WebSearchTool /// /// Initializes a new instance of the class. /// - /// - /// Filters for the search. - /// - /// - /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
- /// Default Value: medium - /// /// /// The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
/// Default Value: web_search /// - /// - /// The approximate location of the user. + /// + /// + /// + /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.
+ /// Default Value: medium /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchTool( global::tryAGI.OpenAI.WebSearchToolType type, - global::tryAGI.OpenAI.WebSearchToolFilters? filters, - global::tryAGI.OpenAI.WebSearchToolSearchContextSize? searchContextSize, - global::tryAGI.OpenAI.WebSearchApproximateLocation? userLocation) + global::tryAGI.OpenAI.WebSearchToolFilters2? filters, + global::tryAGI.OpenAI.WebSearchApproximateLocationWebSearchApproximateLocation1? userLocation, + global::tryAGI.OpenAI.WebSearchToolSearchContextSize? searchContextSize) { this.Type = type; this.Filters = filters; - this.SearchContextSize = searchContextSize; this.UserLocation = userLocation; + this.SearchContextSize = searchContextSize; } /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCall.g.cs index 074e48c5..396dd1d9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCall.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCall.g.cs @@ -4,20 +4,11 @@ namespace tryAGI.OpenAI { /// - /// The results of a web search tool call. See the
- /// [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + /// The results of a web search tool call. See the
+ /// [web search guide](/docs/guides/tools-web-search) for more information. ///
public sealed partial class WebSearchToolCall { - /// - /// An object describing the specific action taken in this web search call.
- /// Includes details on how the model used the web (search, open_page, find). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("action")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallActionJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebSearchToolCallAction Action { get; set; } - /// /// The unique ID of the web search tool call. /// @@ -25,6 +16,13 @@ public sealed partial class WebSearchToolCall [global::System.Text.Json.Serialization.JsonRequired] public required string Id { get; set; } + /// + /// The type of the web search tool call. Always `web_search_call`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeJsonConverter))] + public global::tryAGI.OpenAI.WebSearchToolCallType Type { get; set; } + /// /// The status of the web search tool call. /// @@ -34,11 +32,13 @@ public sealed partial class WebSearchToolCall public required global::tryAGI.OpenAI.WebSearchToolCallStatus Status { get; set; } /// - /// The type of the web search tool call. Always `web_search_call`. + /// An object describing the specific action taken in this web search call.
+ /// Includes details on how the model used the web (search, open_page, find_in_page). ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallTypeJsonConverter))] - public global::tryAGI.OpenAI.WebSearchToolCallType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WebSearchToolCallActionJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::tryAGI.OpenAI.WebSearchToolCallAction Action { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -49,31 +49,31 @@ public sealed partial class WebSearchToolCall /// /// Initializes a new instance of the class. /// - /// - /// An object describing the specific action taken in this web search call.
- /// Includes details on how the model used the web (search, open_page, find). - /// /// /// The unique ID of the web search tool call. /// + /// + /// The type of the web search tool call. Always `web_search_call`. + /// /// /// The status of the web search tool call. /// - /// - /// The type of the web search tool call. Always `web_search_call`. + /// + /// An object describing the specific action taken in this web search call.
+ /// Includes details on how the model used the web (search, open_page, find_in_page). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebSearchToolCall( - global::tryAGI.OpenAI.WebSearchToolCallAction action, string id, global::tryAGI.OpenAI.WebSearchToolCallStatus status, + global::tryAGI.OpenAI.WebSearchToolCallAction action, global::tryAGI.OpenAI.WebSearchToolCallType type) { - this.Action = action; this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.Status = status; + this.Action = action; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCallAction.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCallAction.g.cs index 434cecc4..cac51c81 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCallAction.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolCallAction.g.cs @@ -6,7 +6,7 @@ namespace tryAGI.OpenAI { /// /// An object describing the specific action taken in this web search call.
- /// Includes details on how the model used the web (search, open_page, find). + /// Includes details on how the model used the web (search, open_page, find_in_page). ///
public readonly partial struct WebSearchToolCallAction : global::System.IEquatable { @@ -14,88 +14,87 @@ namespace tryAGI.OpenAI /// Action type "search" - Performs a web search query. ///
#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchActionSearch? Value1 { get; init; } + public global::tryAGI.OpenAI.WebSearchActionSearch? Search { get; init; } #else - public global::tryAGI.OpenAI.WebSearchActionSearch? Value1 { get; } + public global::tryAGI.OpenAI.WebSearchActionSearch? Search { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Search))] #endif - public bool IsValue1 => Value1 != null; + public bool IsSearch => Search != null; /// - /// - /// - public static implicit operator WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionSearch value) => new WebSearchToolCallAction((global::tryAGI.OpenAI.WebSearchActionSearch?)value); - - /// - /// + /// Action type "open_page" - Opens a specific URL from search results. /// - public static implicit operator global::tryAGI.OpenAI.WebSearchActionSearch?(WebSearchToolCallAction @this) => @this.Value1; +#if NET6_0_OR_GREATER + public global::tryAGI.OpenAI.WebSearchActionOpenPage? OpenPage { get; init; } +#else + public global::tryAGI.OpenAI.WebSearchActionOpenPage? OpenPage { get; } +#endif /// /// /// - public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionSearch? value) - { - Value1 = value; - } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenPage))] +#endif + public bool IsOpenPage => OpenPage != null; /// - /// Action type "open_page" - Opens a specific URL from search results. + /// Action type "find_in_page": Searches for a pattern within a loaded page. /// #if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchActionOpenPage? Value2 { get; init; } + public global::tryAGI.OpenAI.WebSearchActionFind? FindInPage { get; init; } #else - public global::tryAGI.OpenAI.WebSearchActionOpenPage? Value2 { get; } + public global::tryAGI.OpenAI.WebSearchActionFind? FindInPage { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FindInPage))] #endif - public bool IsValue2 => Value2 != null; - + public bool IsFindInPage => FindInPage != null; /// /// /// - public static implicit operator WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionOpenPage value) => new WebSearchToolCallAction((global::tryAGI.OpenAI.WebSearchActionOpenPage?)value); + public static implicit operator WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionSearch value) => new WebSearchToolCallAction((global::tryAGI.OpenAI.WebSearchActionSearch?)value); /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchActionOpenPage?(WebSearchToolCallAction @this) => @this.Value2; + public static implicit operator global::tryAGI.OpenAI.WebSearchActionSearch?(WebSearchToolCallAction @this) => @this.Search; /// /// /// - public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionOpenPage? value) + public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionSearch? value) { - Value2 = value; + Search = value; } /// - /// Action type "find": Searches for a pattern within a loaded page. + /// /// -#if NET6_0_OR_GREATER - public global::tryAGI.OpenAI.WebSearchActionFind? Value3 { get; init; } -#else - public global::tryAGI.OpenAI.WebSearchActionFind? Value3 { get; } -#endif + public static implicit operator WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionOpenPage value) => new WebSearchToolCallAction((global::tryAGI.OpenAI.WebSearchActionOpenPage?)value); /// /// /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; + public static implicit operator global::tryAGI.OpenAI.WebSearchActionOpenPage?(WebSearchToolCallAction @this) => @this.OpenPage; + + /// + /// + /// + public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionOpenPage? value) + { + OpenPage = value; + } /// /// @@ -105,46 +104,46 @@ public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionOpenPage? va /// /// /// - public static implicit operator global::tryAGI.OpenAI.WebSearchActionFind?(WebSearchToolCallAction @this) => @this.Value3; + public static implicit operator global::tryAGI.OpenAI.WebSearchActionFind?(WebSearchToolCallAction @this) => @this.FindInPage; /// /// /// public WebSearchToolCallAction(global::tryAGI.OpenAI.WebSearchActionFind? value) { - Value3 = value; + FindInPage = value; } /// /// /// public WebSearchToolCallAction( - global::tryAGI.OpenAI.WebSearchActionSearch? value1, - global::tryAGI.OpenAI.WebSearchActionOpenPage? value2, - global::tryAGI.OpenAI.WebSearchActionFind? value3 + global::tryAGI.OpenAI.WebSearchActionSearch? search, + global::tryAGI.OpenAI.WebSearchActionOpenPage? openPage, + global::tryAGI.OpenAI.WebSearchActionFind? findInPage ) { - Value1 = value1; - Value2 = value2; - Value3 = value3; + Search = search; + OpenPage = openPage; + FindInPage = findInPage; } /// /// /// public object? Object => - Value3 as object ?? - Value2 as object ?? - Value1 as object + FindInPage as object ?? + OpenPage as object ?? + Search as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() + Search?.ToString() ?? + OpenPage?.ToString() ?? + FindInPage?.ToString() ; /// @@ -152,16 +151,16 @@ Value1 as object /// public bool Validate() { - return IsValue1 || IsValue2 || IsValue3; + return IsSearch && !IsOpenPage && !IsFindInPage || !IsSearch && IsOpenPage && !IsFindInPage || !IsSearch && !IsOpenPage && IsFindInPage; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, + global::System.Func? search = null, + global::System.Func? openPage = null, + global::System.Func? findInPage = null, bool validate = true) { if (validate) @@ -169,17 +168,17 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsSearch && search != null) { - return value1(Value1!); + return search(Search!); } - else if (IsValue2 && value2 != null) + else if (IsOpenPage && openPage != null) { - return value2(Value2!); + return openPage(OpenPage!); } - else if (IsValue3 && value3 != null) + else if (IsFindInPage && findInPage != null) { - return value3(Value3!); + return findInPage(FindInPage!); } return default(TResult); @@ -189,9 +188,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, + global::System.Action? search = null, + global::System.Action? openPage = null, + global::System.Action? findInPage = null, bool validate = true) { if (validate) @@ -199,17 +198,17 @@ public void Match( Validate(); } - if (IsValue1) + if (IsSearch) { - value1?.Invoke(Value1!); + search?.Invoke(Search!); } - else if (IsValue2) + else if (IsOpenPage) { - value2?.Invoke(Value2!); + openPage?.Invoke(OpenPage!); } - else if (IsValue3) + else if (IsFindInPage) { - value3?.Invoke(Value3!); + findInPage?.Invoke(FindInPage!); } } @@ -220,11 +219,11 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Search, typeof(global::tryAGI.OpenAI.WebSearchActionSearch), - Value2, + OpenPage, typeof(global::tryAGI.OpenAI.WebSearchActionOpenPage), - Value3, + FindInPage, typeof(global::tryAGI.OpenAI.WebSearchActionFind), }; const int offset = unchecked((int)2166136261); @@ -242,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(WebSearchToolCallAction 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(Search, other.Search) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenPage, other.OpenPage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FindInPage, other.FindInPage) ; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters.g.cs index ba3741c4..801dde2b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters.g.cs @@ -4,46 +4,15 @@ namespace tryAGI.OpenAI { /// - /// Filters for the search. + /// /// public sealed partial class WebSearchToolFilters { - /// - /// Allowed domains for the search. If not provided, all domains are allowed.
- /// Subdomains of the provided domains are allowed as well.
- /// Example: `["pubmed.ncbi.nlm.nih.gov"]` - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("allowed_domains")] - public global::System.Collections.Generic.IList? AllowedDomains { 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(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Allowed domains for the search. If not provided, all domains are allowed.
- /// Subdomains of the provided domains are allowed as well.
- /// Example: `["pubmed.ncbi.nlm.nih.gov"]` - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public WebSearchToolFilters( - global::System.Collections.Generic.IList? allowedDomains) - { - this.AllowedDomains = allowedDomains; - } - - /// - /// Initializes a new instance of the class. - /// - public WebSearchToolFilters() - { - } } } \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.Json.g.cs new file mode 100644 index 00000000..667ac24b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchToolFilters2 + { + /// + /// 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::tryAGI.OpenAI.WebSearchToolFilters2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchToolFilters2), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchToolFilters2; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchToolFilters2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchToolFilters2), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchToolFilters2; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.g.cs new file mode 100644 index 00000000..5bf87293 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFilters2.g.cs @@ -0,0 +1,43 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Filters for the search. + /// + public sealed partial class WebSearchToolFilters2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_domains")] + public global::System.Collections.Generic.IList? AllowedDomains { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebSearchToolFilters2( + global::System.Collections.Generic.IList? allowedDomains) + { + this.AllowedDomains = allowedDomains; + } + + /// + /// Initializes a new instance of the class. + /// + public WebSearchToolFilters2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.Json.g.cs new file mode 100644 index 00000000..816f7582 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WebSearchToolFiltersAllowedDomains + { + /// + /// 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::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains), + jsonSerializerContext) as global::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains; + } + + /// + /// 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::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WebSearchToolFiltersAllowedDomains; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.g.cs new file mode 100644 index 00000000..0ac0b394 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchToolFiltersAllowedDomains.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// + /// + public sealed partial class WebSearchToolFiltersAllowedDomains + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCancelled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCancelled.g.cs index 33e1b03a..4e4eee8d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCancelled.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCancelled.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookBatchCancelled public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookBatchCancelledData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookBatchCancelledData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookBatchCancelled /// /// The Unix timestamp (in seconds) of when the batch API request was cancelled. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookBatchCancelled #endif public WebhookBatchCancelled( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookBatchCancelledData data, string id, + global::tryAGI.OpenAI.WebhookBatchCancelledData data, global::tryAGI.OpenAI.WebhookBatchCancelledObject? @object, global::tryAGI.OpenAI.WebhookBatchCancelledType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCompleted.g.cs index 29419349..1670fdae 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchCompleted.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookBatchCompleted public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookBatchCompletedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookBatchCompletedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookBatchCompleted /// /// The Unix timestamp (in seconds) of when the batch API request was completed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookBatchCompleted #endif public WebhookBatchCompleted( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookBatchCompletedData data, string id, + global::tryAGI.OpenAI.WebhookBatchCompletedData data, global::tryAGI.OpenAI.WebhookBatchCompletedObject? @object, global::tryAGI.OpenAI.WebhookBatchCompletedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchExpired.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchExpired.g.cs index 6c797562..5af74922 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchExpired.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchExpired.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookBatchExpired public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookBatchExpiredData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookBatchExpiredData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookBatchExpired /// /// The Unix timestamp (in seconds) of when the batch API request expired. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookBatchExpired #endif public WebhookBatchExpired( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookBatchExpiredData data, string id, + global::tryAGI.OpenAI.WebhookBatchExpiredData data, global::tryAGI.OpenAI.WebhookBatchExpiredObject? @object, global::tryAGI.OpenAI.WebhookBatchExpiredType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchFailed.g.cs index 1b5645ad..93c37192 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookBatchFailed.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookBatchFailed public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookBatchFailedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookBatchFailedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookBatchFailed /// /// The Unix timestamp (in seconds) of when the batch API request failed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookBatchFailed #endif public WebhookBatchFailed( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookBatchFailedData data, string id, + global::tryAGI.OpenAI.WebhookBatchFailedData data, global::tryAGI.OpenAI.WebhookBatchFailedObject? @object, global::tryAGI.OpenAI.WebhookBatchFailedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunCanceled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunCanceled.g.cs index 568134b9..986553d3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunCanceled.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunCanceled.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookEvalRunCanceled public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookEvalRunCanceledData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookEvalRunCanceledData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookEvalRunCanceled /// /// The Unix timestamp (in seconds) of when the eval run was canceled. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookEvalRunCanceled #endif public WebhookEvalRunCanceled( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookEvalRunCanceledData data, string id, + global::tryAGI.OpenAI.WebhookEvalRunCanceledData data, global::tryAGI.OpenAI.WebhookEvalRunCanceledObject? @object, global::tryAGI.OpenAI.WebhookEvalRunCanceledType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunFailed.g.cs index 52be14a3..7f59c2a1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunFailed.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookEvalRunFailed public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookEvalRunFailedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookEvalRunFailedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookEvalRunFailed /// /// The Unix timestamp (in seconds) of when the eval run failed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookEvalRunFailed #endif public WebhookEvalRunFailed( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookEvalRunFailedData data, string id, + global::tryAGI.OpenAI.WebhookEvalRunFailedData data, global::tryAGI.OpenAI.WebhookEvalRunFailedObject? @object, global::tryAGI.OpenAI.WebhookEvalRunFailedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunSucceeded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunSucceeded.g.cs index c9d23623..6bd9b341 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunSucceeded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookEvalRunSucceeded.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookEvalRunSucceeded public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookEvalRunSucceededData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookEvalRunSucceededData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookEvalRunSucceeded /// /// The Unix timestamp (in seconds) of when the eval run succeeded. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookEvalRunSucceeded #endif public WebhookEvalRunSucceeded( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookEvalRunSucceededData data, string id, + global::tryAGI.OpenAI.WebhookEvalRunSucceededData data, global::tryAGI.OpenAI.WebhookEvalRunSucceededObject? @object, global::tryAGI.OpenAI.WebhookEvalRunSucceededType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobCancelled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobCancelled.g.cs index bc5b8724..fd2459ec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobCancelled.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobCancelled.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookFineTuningJobCancelled public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookFineTuningJobCancelled /// /// The Unix timestamp (in seconds) of when the fine-tuning job was cancelled. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookFineTuningJobCancelled #endif public WebhookFineTuningJobCancelled( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData data, string id, + global::tryAGI.OpenAI.WebhookFineTuningJobCancelledData data, global::tryAGI.OpenAI.WebhookFineTuningJobCancelledObject? @object, global::tryAGI.OpenAI.WebhookFineTuningJobCancelledType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobFailed.g.cs index a8e73a96..18ae4699 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobFailed.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookFineTuningJobFailed public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookFineTuningJobFailedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookFineTuningJobFailedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookFineTuningJobFailed /// /// The Unix timestamp (in seconds) of when the fine-tuning job failed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookFineTuningJobFailed #endif public WebhookFineTuningJobFailed( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookFineTuningJobFailedData data, string id, + global::tryAGI.OpenAI.WebhookFineTuningJobFailedData data, global::tryAGI.OpenAI.WebhookFineTuningJobFailedObject? @object, global::tryAGI.OpenAI.WebhookFineTuningJobFailedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobSucceeded.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobSucceeded.g.cs index 8b33554b..8df6a646 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobSucceeded.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookFineTuningJobSucceeded.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookFineTuningJobSucceeded public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookFineTuningJobSucceeded /// /// The Unix timestamp (in seconds) of when the fine-tuning job succeeded. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookFineTuningJobSucceeded #endif public WebhookFineTuningJobSucceeded( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData data, string id, + global::tryAGI.OpenAI.WebhookFineTuningJobSucceededData data, global::tryAGI.OpenAI.WebhookFineTuningJobSucceededObject? @object, global::tryAGI.OpenAI.WebhookFineTuningJobSucceededType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookRealtimeCallIncoming.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookRealtimeCallIncoming.g.cs index c3b21a28..4bc75e02 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookRealtimeCallIncoming.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookRealtimeCallIncoming.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookRealtimeCallIncoming public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookRealtimeCallIncoming /// /// The Unix timestamp (in seconds) of when the model response was completed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookRealtimeCallIncoming #endif public WebhookRealtimeCallIncoming( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData data, string id, + global::tryAGI.OpenAI.WebhookRealtimeCallIncomingData data, global::tryAGI.OpenAI.WebhookRealtimeCallIncomingObject? @object, global::tryAGI.OpenAI.WebhookRealtimeCallIncomingType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCancelled.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCancelled.g.cs index 400b18dc..777df3bd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCancelled.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCancelled.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookResponseCancelled public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookResponseCancelledData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookResponseCancelledData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookResponseCancelled /// /// The Unix timestamp (in seconds) of when the model response was cancelled. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookResponseCancelled #endif public WebhookResponseCancelled( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookResponseCancelledData data, string id, + global::tryAGI.OpenAI.WebhookResponseCancelledData data, global::tryAGI.OpenAI.WebhookResponseCancelledObject? @object, global::tryAGI.OpenAI.WebhookResponseCancelledType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCompleted.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCompleted.g.cs index 0a2ea4d1..0e8be0e2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCompleted.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseCompleted.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookResponseCompleted public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookResponseCompletedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookResponseCompletedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookResponseCompleted /// /// The Unix timestamp (in seconds) of when the model response was completed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookResponseCompleted #endif public WebhookResponseCompleted( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookResponseCompletedData data, string id, + global::tryAGI.OpenAI.WebhookResponseCompletedData data, global::tryAGI.OpenAI.WebhookResponseCompletedObject? @object, global::tryAGI.OpenAI.WebhookResponseCompletedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseFailed.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseFailed.g.cs index feddab89..84dc6c3b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseFailed.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseFailed.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookResponseFailed public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookResponseFailedData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookResponseFailedData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookResponseFailed /// /// The Unix timestamp (in seconds) of when the model response failed. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookResponseFailed #endif public WebhookResponseFailed( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookResponseFailedData data, string id, + global::tryAGI.OpenAI.WebhookResponseFailedData data, global::tryAGI.OpenAI.WebhookResponseFailedObject? @object, global::tryAGI.OpenAI.WebhookResponseFailedType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseIncomplete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseIncomplete.g.cs index 12d79328..754099e4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseIncomplete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebhookResponseIncomplete.g.cs @@ -17,18 +17,18 @@ public sealed partial class WebhookResponseIncomplete public required global::System.DateTimeOffset CreatedAt { get; set; } /// - /// Event data payload. + /// The unique ID of the event. /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("id")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::tryAGI.OpenAI.WebhookResponseIncompleteData Data { get; set; } + public required string Id { get; set; } /// - /// The unique ID of the event. + /// Event data payload. /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonPropertyName("data")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } + public required global::tryAGI.OpenAI.WebhookResponseIncompleteData Data { get; set; } /// /// The object of the event. Always `event`. @@ -56,12 +56,12 @@ public sealed partial class WebhookResponseIncomplete /// /// The Unix timestamp (in seconds) of when the model response was interrupted. /// - /// - /// Event data payload. - /// /// /// The unique ID of the event. /// + /// + /// Event data payload. + /// /// /// The object of the event. Always `event`. /// @@ -73,14 +73,14 @@ public sealed partial class WebhookResponseIncomplete #endif public WebhookResponseIncomplete( global::System.DateTimeOffset createdAt, - global::tryAGI.OpenAI.WebhookResponseIncompleteData data, string id, + global::tryAGI.OpenAI.WebhookResponseIncompleteData data, global::tryAGI.OpenAI.WebhookResponseIncompleteObject? @object, global::tryAGI.OpenAI.WebhookResponseIncompleteType type) { this.CreatedAt = createdAt; - this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); this.Object = @object; this.Type = type; } diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.Json.g.cs new file mode 100644 index 00000000..31f3dddf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WidgetMessageItem + { + /// + /// 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::tryAGI.OpenAI.WidgetMessageItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WidgetMessageItem), + jsonSerializerContext) as global::tryAGI.OpenAI.WidgetMessageItem; + } + + /// + /// 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::tryAGI.OpenAI.WidgetMessageItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WidgetMessageItem), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WidgetMessageItem; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.g.cs new file mode 100644 index 00000000..2549f48e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItem.g.cs @@ -0,0 +1,113 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Thread item that renders a widget payload. + /// + public sealed partial class WidgetMessageItem + { + /// + /// Identifier of the thread item. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ /// global::tryAGI.OpenAI.WidgetMessageItemObject.ChatkitThreadItem + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemObjectJsonConverter))] + public global::tryAGI.OpenAI.WidgetMessageItemObject Object { get; set; } = global::tryAGI.OpenAI.WidgetMessageItemObject.ChatkitThreadItem; + + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.UnixTimestampJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTimeOffset CreatedAt { get; set; } + + /// + /// Identifier of the parent thread. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// Type discriminator that is always `chatkit.widget`.
+ /// Default Value: chatkit.widget + ///
+ /// global::tryAGI.OpenAI.WidgetMessageItemType.ChatkitWidget + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.WidgetMessageItemTypeJsonConverter))] + public global::tryAGI.OpenAI.WidgetMessageItemType Type { get; set; } = global::tryAGI.OpenAI.WidgetMessageItemType.ChatkitWidget; + + /// + /// Serialized widget payload rendered in the UI. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("widget")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Widget { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier of the thread item. + /// + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + /// + /// + /// Unix timestamp (in seconds) for when the item was created. + /// + /// + /// Identifier of the parent thread. + /// + /// + /// Type discriminator that is always `chatkit.widget`.
+ /// Default Value: chatkit.widget + /// + /// + /// Serialized widget payload rendered in the UI. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WidgetMessageItem( + string id, + global::System.DateTimeOffset createdAt, + string threadId, + string widget, + global::tryAGI.OpenAI.WidgetMessageItemObject @object = global::tryAGI.OpenAI.WidgetMessageItemObject.ChatkitThreadItem, + global::tryAGI.OpenAI.WidgetMessageItemType type = global::tryAGI.OpenAI.WidgetMessageItemType.ChatkitWidget) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreatedAt = createdAt; + this.ThreadId = threadId ?? throw new global::System.ArgumentNullException(nameof(threadId)); + this.Widget = widget ?? throw new global::System.ArgumentNullException(nameof(widget)); + this.Object = @object; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public WidgetMessageItem() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemObject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemObject.g.cs new file mode 100644 index 00000000..3e528946 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemObject.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.thread_item`.
+ /// Default Value: chatkit.thread_item + ///
+ public enum WidgetMessageItemObject + { + /// + /// + /// + ChatkitThreadItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WidgetMessageItemObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WidgetMessageItemObject value) + { + return value switch + { + WidgetMessageItemObject.ChatkitThreadItem => "chatkit.thread_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WidgetMessageItemObject? ToEnum(string value) + { + return value switch + { + "chatkit.thread_item" => WidgetMessageItemObject.ChatkitThreadItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemType.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemType.g.cs new file mode 100644 index 00000000..172b5979 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WidgetMessageItemType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Type discriminator that is always `chatkit.widget`.
+ /// Default Value: chatkit.widget + ///
+ public enum WidgetMessageItemType + { + /// + /// + /// + ChatkitWidget, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WidgetMessageItemTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WidgetMessageItemType value) + { + return value switch + { + WidgetMessageItemType.ChatkitWidget => "chatkit.widget", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WidgetMessageItemType? ToEnum(string value) + { + return value switch + { + "chatkit.widget" => WidgetMessageItemType.ChatkitWidget, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.Json.g.cs new file mode 100644 index 00000000..9aede748 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WorkflowParam + { + /// + /// 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::tryAGI.OpenAI.WorkflowParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WorkflowParam), + jsonSerializerContext) as global::tryAGI.OpenAI.WorkflowParam; + } + + /// + /// 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::tryAGI.OpenAI.WorkflowParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WorkflowParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WorkflowParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.g.cs new file mode 100644 index 00000000..2c97c757 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParam.g.cs @@ -0,0 +1,79 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Workflow reference and overrides applied to the chat session. + /// + public sealed partial class WorkflowParam + { + /// + /// Identifier for the workflow invoked by the session. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Specific workflow version to run. Defaults to the latest deployed version. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public string? Version { get; set; } + + /// + /// State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("state_variables")] + public object? StateVariables { get; set; } + + /// + /// Optional tracing overrides for the workflow invocation. When omitted, tracing is enabled by default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tracing")] + public global::tryAGI.OpenAI.WorkflowTracingParam? Tracing { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the workflow invoked by the session. + /// + /// + /// Specific workflow version to run. Defaults to the latest deployed version. + /// + /// + /// State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object. + /// + /// + /// Optional tracing overrides for the workflow invocation. When omitted, tracing is enabled by default. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WorkflowParam( + string id, + string? version, + object? stateVariables, + global::tryAGI.OpenAI.WorkflowTracingParam? tracing) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Version = version; + this.StateVariables = stateVariables; + this.Tracing = tracing; + } + + /// + /// Initializes a new instance of the class. + /// + public WorkflowParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.Json.g.cs new file mode 100644 index 00000000..fd5ae568 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WorkflowParamStateVariables + { + /// + /// 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::tryAGI.OpenAI.WorkflowParamStateVariables? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WorkflowParamStateVariables), + jsonSerializerContext) as global::tryAGI.OpenAI.WorkflowParamStateVariables; + } + + /// + /// 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::tryAGI.OpenAI.WorkflowParamStateVariables? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WorkflowParamStateVariables), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WorkflowParamStateVariables; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.g.cs new file mode 100644 index 00000000..a958010f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowParamStateVariables.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object. + /// + public sealed partial class WorkflowParamStateVariables + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.Json.g.cs new file mode 100644 index 00000000..4d33f621 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace tryAGI.OpenAI +{ + public sealed partial class WorkflowTracingParam + { + /// + /// 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::tryAGI.OpenAI.WorkflowTracingParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::tryAGI.OpenAI.WorkflowTracingParam), + jsonSerializerContext) as global::tryAGI.OpenAI.WorkflowTracingParam; + } + + /// + /// 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::tryAGI.OpenAI.WorkflowTracingParam? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::tryAGI.OpenAI.WorkflowTracingParam), + jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.WorkflowTracingParam; + } + + /// + /// Deserializes a JSON stream 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::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.g.cs new file mode 100644 index 00000000..5686e72a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WorkflowTracingParam.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// Controls diagnostic tracing during the session. + /// + public sealed partial class WorkflowTracingParam + { + /// + /// Whether tracing is enabled during the session. Defaults to true. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { 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(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Whether tracing is enabled during the session. Defaults to true. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WorkflowTracingParam( + bool? enabled) + { + this.Enabled = enabled; + } + + /// + /// Initializes a new instance of the class. + /// + public WorkflowTracingParam() + { + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.DeleteModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.DeleteModel.g.cs index e824d6cc..31da42c1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.DeleteModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.DeleteModel.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteModelResponseContent( ref string content); /// - /// Delete a fine-tuned model
/// Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.ListModels.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.ListModels.g.cs index a4e182cc..2c77437b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.ListModels.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.ListModels.g.cs @@ -20,7 +20,6 @@ partial void ProcessListModelsResponseContent( ref string content); /// - /// List models
/// Lists the currently available models, and provides basic information about each one such as the owner and availability. ///
/// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.RetrieveModel.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.RetrieveModel.g.cs index f13f8266..9b13e6fd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.RetrieveModel.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModelsClient.RetrieveModel.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveModelResponseContent( ref string content); /// - /// Retrieve model
/// Retrieves a model instance, providing basic information about the model such as the owner and permissioning. ///
/// @@ -30,7 +29,7 @@ partial void ProcessRetrieveModelResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task RetrieveModelAsync( + public async global::System.Threading.Tasks.Task RetrieveModelAsync( string model, global::System.Threading.CancellationToken cancellationToken = default) { @@ -110,7 +109,7 @@ partial void ProcessRetrieveModelResponseContent( __response.EnsureSuccessStatusCode(); return - global::tryAGI.OpenAI.Model16.FromJson(__content, JsonSerializerContext) ?? + global::tryAGI.OpenAI.Model17.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -141,7 +140,7 @@ partial void ProcessRetrieveModelResponseContent( ).ConfigureAwait(false); return - await global::tryAGI.OpenAI.Model16.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + await global::tryAGI.OpenAI.Model17.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModerationsClient.CreateModeration.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModerationsClient.CreateModeration.g.cs index 475d491f..f2063ade 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModerationsClient.CreateModeration.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ModerationsClient.CreateModeration.g.cs @@ -22,14 +22,14 @@ partial void ProcessCreateModerationResponseContent( ref string content); /// - /// Create moderation
/// Classifies if text and/or image inputs are potentially harmful. Learn
- /// more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + /// more in the [moderation guide](/docs/guides/moderation). ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateModerationAsync( + global::tryAGI.OpenAI.CreateModerationRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,9 +168,8 @@ partial void ProcessCreateModerationResponseContent( } /// - /// Create moderation
/// Classifies if text and/or image inputs are potentially harmful. Learn
- /// more in the [moderation guide](https://platform.openai.com/docs/guides/moderation). + /// more in the [moderation guide](/docs/guides/moderation). ///
/// /// Input (or inputs) to classify. Can be a single string, an array of strings, or
@@ -178,13 +177,15 @@ partial void ProcessCreateModerationResponseContent( /// /// /// The content moderation model you would like to use. Learn more in
- /// [the moderation guide](https://platform.openai.com/docs/guides/moderation), and learn about
- /// available models [here](https://platform.openai.com/docs/models#moderation). + /// [the moderation guide](/docs/guides/moderation), and learn about
+ /// available models [here](/docs/models#moderation).
+ /// Default Value: omni-moderation-latest
+ /// Example: omni-moderation-2024-09-26 /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateModerationAsync( - global::tryAGI.OpenAI.AnyOf, global::System.Collections.Generic.IList> input, + global::tryAGI.OpenAI.OneOf, global::System.Collections.Generic.IList>> input, global::tryAGI.OpenAI.AnyOf? model = default, global::System.Threading.CancellationToken cancellationToken = default) { diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysCreate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysCreate.g.cs index 57b91e97..e89aebf1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysCreate.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysCreate.g.cs @@ -22,13 +22,14 @@ partial void ProcessAdminApiKeysCreateResponseContent( ref string content); /// - /// Create admin API key
- /// Create an organization admin API key + /// Create an organization admin API key
+ /// Create a new admin-level API key for the organization. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task AdminApiKeysCreateAsync( + global::tryAGI.OpenAI.AdminApiKeysCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,8 +168,8 @@ partial void ProcessAdminApiKeysCreateResponseContent( } /// - /// Create admin API key
- /// Create an organization admin API key + /// Create an organization admin API key
+ /// Create a new admin-level API key for the organization. ///
/// /// Example: New Admin Key diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysDelete.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysDelete.g.cs index 1caa29cf..79f591de 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysDelete.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysDelete.g.cs @@ -22,8 +22,8 @@ partial void ProcessAdminApiKeysDeleteResponseContent( ref string content); /// - /// Delete admin API key
- /// Delete an organization admin API key + /// Delete an organization admin API key
+ /// Delete the specified admin API key. ///
/// /// The ID of the API key to be deleted. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysGet.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysGet.g.cs index ecb7e245..8346ba63 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysGet.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysGet.g.cs @@ -22,8 +22,8 @@ partial void ProcessAdminApiKeysGetResponseContent( ref string content); /// - /// Retrieve admin API key
- /// Retrieve a single organization API key + /// Retrieve a single organization API key
+ /// Get details for a specific organization API key by its ID. ///
/// /// The ID of the API key. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysList.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysList.g.cs index 2c322c50..1071c8f7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysList.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.AdminApiKeysList.g.cs @@ -26,8 +26,8 @@ partial void ProcessAdminApiKeysListResponseContent( ref string content); /// - /// List all organization and project API keys.
- /// List organization API keys + /// List organization API keys
+ /// Retrieve a paginated list of organization admin API keys. ///
/// /// Return keys with IDs that come after this ID in the pagination order. @@ -59,9 +59,9 @@ partial void ProcessAdminApiKeysListResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/admin_api_keys", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("after", after) - .AddOptionalParameter("order", order?.ToValueString()) + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CancelChatSessionMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CancelChatSessionMethod.g.cs new file mode 100644 index 00000000..6bb56a6f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CancelChatSessionMethod.g.cs @@ -0,0 +1,163 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareCancelChatSessionMethodArguments( + global::System.Net.Http.HttpClient httpClient, + ref string sessionId); + partial void PrepareCancelChatSessionMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string sessionId); + partial void ProcessCancelChatSessionMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelChatSessionMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Cancel an active ChatKit session and return its most recent metadata.
+ /// Cancelling prevents new requests from using the issued client secret. + ///
+ /// + /// Example: cksess_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CancelChatSessionMethodAsync( + string sessionId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCancelChatSessionMethodArguments( + httpClient: HttpClient, + sessionId: ref sessionId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/chatkit/sessions/{sessionId}/cancel", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCancelChatSessionMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + sessionId: sessionId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCancelChatSessionMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCancelChatSessionMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ChatSessionResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ChatSessionResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Compactconversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Compactconversation.g.cs new file mode 100644 index 00000000..2b0a4a0e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Compactconversation.g.cs @@ -0,0 +1,205 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareCompactconversationArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CompactResponseMethodPublicBody request); + partial void PrepareCompactconversationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CompactResponseMethodPublicBody request); + partial void ProcessCompactconversationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCompactconversationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Compact a conversation. Returns a compacted response object.
+ /// Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced). + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CompactconversationAsync( + + global::tryAGI.OpenAI.CompactResponseMethodPublicBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCompactconversationArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/responses/compact", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCompactconversationRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCompactconversationResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCompactconversationResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.CompactResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.CompactResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Compact a conversation. Returns a compacted response object.
+ /// Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced). + ///
+ /// + /// Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CompactconversationAsync( + global::tryAGI.OpenAI.ModelIdsCompaction model, + global::tryAGI.OpenAI.OneOf>? input = default, + string? previousResponseId = default, + string? instructions = default, + string? promptCacheKey = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CompactResponseMethodPublicBody + { + Model = model, + Input = input, + PreviousResponseId = previousResponseId, + Instructions = instructions, + PromptCacheKey = promptCacheKey, + }; + + return await CompactconversationAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateChatSessionMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateChatSessionMethod.g.cs new file mode 100644 index 00000000..1ab4e610 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateChatSessionMethod.g.cs @@ -0,0 +1,211 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareCreateChatSessionMethodArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateChatSessionBody request); + partial void PrepareCreateChatSessionMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateChatSessionBody request); + partial void ProcessCreateChatSessionMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateChatSessionMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a ChatKit session. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateChatSessionMethodAsync( + + global::tryAGI.OpenAI.CreateChatSessionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateChatSessionMethodArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/chatkit/sessions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateChatSessionMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateChatSessionMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateChatSessionMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ChatSessionResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ChatSessionResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a ChatKit session. + /// + /// + /// Workflow that powers the session. + /// + /// + /// A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope. + /// + /// + /// Optional override for session expiration timing in seconds from creation. Defaults to 10 minutes. + /// + /// + /// Optional override for per-minute request limits. When omitted, defaults to 10. + /// + /// + /// Optional overrides for ChatKit runtime configuration features + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateChatSessionMethodAsync( + global::tryAGI.OpenAI.WorkflowParam workflow, + string user, + global::tryAGI.OpenAI.ExpiresAfterParam? expiresAfter = default, + global::tryAGI.OpenAI.RateLimitsParam? rateLimits = default, + global::tryAGI.OpenAI.ChatkitConfigurationParam? chatkitConfiguration = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateChatSessionBody + { + Workflow = workflow, + User = user, + ExpiresAfter = expiresAfter, + RateLimits = rateLimits, + ChatkitConfiguration = chatkitConfiguration, + }; + + return await CreateChatSessionMethodAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainer.g.cs index 593b2772..73d8d122 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainer.g.cs @@ -22,13 +22,14 @@ partial void ProcessCreateContainerResponseContent( ref string content); /// - /// Create container
- /// Create Container + /// Create Container
+ /// Creates a container. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateContainerAsync( + global::tryAGI.OpenAI.CreateContainerBody request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,31 +168,46 @@ partial void ProcessCreateContainerResponseContent( } /// - /// Create container
- /// Create Container + /// Create Container
+ /// Creates a container. ///
- /// - /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// Name of the container to create. /// /// /// IDs of files to copy to the container. /// - /// - /// Name of the container to create. + /// + /// Container expiration time in seconds relative to the 'anchor' time. + /// + /// + /// An optional list of skills referenced by id or inline data. + /// + /// + /// Optional memory limit for the container. Defaults to "1g". + /// + /// + /// Network access policy for the container. /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateContainerAsync( string name, - global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? expiresAfter = default, global::System.Collections.Generic.IList? fileIds = default, + global::tryAGI.OpenAI.CreateContainerBodyExpiresAfter? expiresAfter = default, + global::System.Collections.Generic.IList? skills = default, + global::tryAGI.OpenAI.CreateContainerBodyMemoryLimit? memoryLimit = default, + global::tryAGI.OpenAI.NetworkPolicy? networkPolicy = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateContainerBody { - ExpiresAfter = expiresAfter, - FileIds = fileIds, Name = name, + FileIds = fileIds, + ExpiresAfter = expiresAfter, + Skills = skills, + MemoryLimit = memoryLimit, + NetworkPolicy = networkPolicy, }; return await CreateContainerAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainerFile.g.cs index aad296a0..436ec773 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.CreateContainerFile.g.cs @@ -24,9 +24,9 @@ partial void ProcessCreateContainerFileResponseContent( ref string content); /// - /// Create container file
/// Create a Container File
- /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID. + /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
+ /// Creates a container file. ///
/// /// @@ -34,6 +34,7 @@ partial void ProcessCreateContainerFileResponseContent( /// public async global::System.Threading.Tasks.Task CreateContainerFileAsync( string containerId, + global::tryAGI.OpenAI.CreateContainerFileBody request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,23 +74,11 @@ partial void ProcessCreateContainerFileResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } - using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{containerId}"), - name: "container_id"); - if (request.File != default) - { - __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), - name: "file", - fileName: request.Filename ?? string.Empty); - } - if (request.FileId != default) - { - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"{request.FileId}"), - name: "file_id"); - } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); __httpRequest.Content = __httpRequestContent; PrepareRequest( @@ -186,34 +175,34 @@ partial void ProcessCreateContainerFileResponseContent( } /// - /// Create container file
/// Create a Container File
- /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID. + /// You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
+ /// Creates a container file. ///
/// + /// + /// Name of the file to create. + /// /// /// The File object (not file name) to be uploaded. /// /// /// The File object (not file name) to be uploaded. /// - /// - /// Name of the file to create. - /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateContainerFileAsync( string containerId, + string? fileId = default, byte[]? file = default, string? filename = default, - string? fileId = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateContainerFileBody { + FileId = fileId, File = file, Filename = filename, - FileId = fileId, }; return await CreateContainerFileAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainer.g.cs index a8958fd1..3cd061f6 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainer.g.cs @@ -17,8 +17,8 @@ partial void ProcessDeleteContainerResponse( global::System.Net.Http.HttpResponseMessage httpResponseMessage); /// - /// Delete a container
- /// Delete Container + /// Delete Container
+ /// Delete a container. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainerFile.g.cs index 5d1d43e7..6371d62b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteContainerFile.g.cs @@ -19,8 +19,8 @@ partial void ProcessDeleteContainerFileResponse( global::System.Net.Http.HttpResponseMessage httpResponseMessage); /// - /// Delete a container file
- /// Delete Container File + /// Delete Container File
+ /// Delete a container file. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteThreadMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteThreadMethod.g.cs new file mode 100644 index 00000000..9fce5f4d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.DeleteThreadMethod.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareDeleteThreadMethodArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId); + partial void PrepareDeleteThreadMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId); + partial void ProcessDeleteThreadMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteThreadMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a ChatKit thread along with its items and stored attachments. + /// + /// + /// Example: cthr_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteThreadMethodAsync( + string threadId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteThreadMethodArguments( + httpClient: HttpClient, + threadId: ref threadId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/chatkit/threads/{threadId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteThreadMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + threadId: threadId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteThreadMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteThreadMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedThreadResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedThreadResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.GetThreadMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.GetThreadMethod.g.cs new file mode 100644 index 00000000..9f83d2fc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.GetThreadMethod.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareGetThreadMethodArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId); + partial void PrepareGetThreadMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId); + partial void ProcessGetThreadMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetThreadMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieve a ChatKit thread by its identifier. + /// + /// + /// Example: cthr_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetThreadMethodAsync( + string threadId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetThreadMethodArguments( + httpClient: HttpClient, + threadId: ref threadId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/chatkit/threads/{threadId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetThreadMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + threadId: threadId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetThreadMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetThreadMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ThreadResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ThreadResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Getinputtokencounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Getinputtokencounts.g.cs new file mode 100644 index 00000000..6e4c612c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.Getinputtokencounts.g.cs @@ -0,0 +1,223 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareGetinputtokencountsArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.TokenCountsBody request); + partial void PrepareGetinputtokencountsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.TokenCountsBody request); + partial void ProcessGetinputtokencountsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetinputtokencountsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Returns input token counts of the request.
+ /// Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetinputtokencountsAsync( + + global::tryAGI.OpenAI.TokenCountsBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareGetinputtokencountsArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/responses/input_tokens", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetinputtokencountsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetinputtokencountsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetinputtokencountsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.TokenCountsResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.TokenCountsResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Returns input token counts of the request.
+ /// Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetinputtokencountsAsync( + string? model = default, + global::tryAGI.OpenAI.OneOf>? input = default, + string? previousResponseId = default, + global::System.Collections.Generic.IList? tools = default, + global::tryAGI.OpenAI.ResponseTextParam? text = default, + global::tryAGI.OpenAI.Reasoning? reasoning = default, + global::tryAGI.OpenAI.TruncationEnum? truncation = default, + string? instructions = default, + global::tryAGI.OpenAI.ConversationParam? conversation = default, + global::tryAGI.OpenAI.ToolChoiceParam? toolChoice = default, + bool? parallelToolCalls = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.TokenCountsBody + { + Model = model, + Input = input, + PreviousResponseId = previousResponseId, + Tools = tools, + Text = text, + Reasoning = reasoning, + Truncation = truncation, + Instructions = instructions, + Conversation = conversation, + ToolChoice = toolChoice, + ParallelToolCalls = parallelToolCalls, + }; + + return await GetinputtokencountsAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainerFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainerFiles.g.cs index a729ee04..3a5ecdad 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainerFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainerFiles.g.cs @@ -28,8 +28,8 @@ partial void ProcessListContainerFilesResponseContent( ref string content); /// - /// List container files
- /// List Container files + /// List Container files
+ /// Lists container files. ///
/// /// @@ -60,9 +60,9 @@ partial void ProcessListContainerFilesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/containers/{containerId}/files", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainers.g.cs index 0a0c002e..0e2117f2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListContainers.g.cs @@ -9,13 +9,15 @@ partial void PrepareListContainersArguments( global::System.Net.Http.HttpClient httpClient, ref int? limit, ref global::tryAGI.OpenAI.ListContainersOrder? order, - ref string? after); + ref string? after, + ref string? name); partial void PrepareListContainersRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, int? limit, global::tryAGI.OpenAI.ListContainersOrder? order, - string? after); + string? after, + string? name); partial void ProcessListContainersResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -26,8 +28,8 @@ partial void ProcessListContainersResponseContent( ref string content); /// - /// List containers
- /// List Containers + /// List Containers
+ /// Lists containers. ///
/// /// Default Value: 20 @@ -36,12 +38,14 @@ partial void ProcessListContainersResponseContent( /// Default Value: desc /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task ListContainersAsync( int? limit = default, global::tryAGI.OpenAI.ListContainersOrder? order = default, string? after = default, + string? name = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -50,15 +54,17 @@ partial void ProcessListContainersResponseContent( httpClient: HttpClient, limit: ref limit, order: ref order, - after: ref after); + after: ref after, + name: ref name); var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/containers", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("name", name) ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( @@ -93,7 +99,8 @@ partial void ProcessListContainersResponseContent( httpRequestMessage: __httpRequest, limit: limit, order: order, - after: after); + after: after, + name: name); using var __response = await HttpClient.SendAsync( request: __httpRequest, diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadItemsMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadItemsMethod.g.cs new file mode 100644 index 00000000..e18f59ad --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadItemsMethod.g.cs @@ -0,0 +1,196 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareListThreadItemsMethodArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref int? limit, + ref global::tryAGI.OpenAI.OrderEnum? order, + ref string? after, + ref string? before); + partial void PrepareListThreadItemsMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + int? limit, + global::tryAGI.OpenAI.OrderEnum? order, + string? after, + string? before); + partial void ProcessListThreadItemsMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListThreadItemsMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List items that belong to a ChatKit thread. + /// + /// + /// Example: cthr_123 + /// + /// + /// + /// + /// List items created after this thread item ID. Defaults to null for the first page. + /// + /// + /// List items created before this thread item ID. Defaults to null for the newest results. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListThreadItemsMethodAsync( + string threadId, + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + string? before = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListThreadItemsMethodArguments( + httpClient: HttpClient, + threadId: ref threadId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/chatkit/threads/{threadId}/items", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListThreadItemsMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + threadId: threadId, + limit: limit, + order: order, + after: after, + before: before); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListThreadItemsMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListThreadItemsMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ThreadItemListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ThreadItemListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadsMethod.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadsMethod.g.cs new file mode 100644 index 00000000..b8f9605e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.ListThreadsMethod.g.cs @@ -0,0 +1,197 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class OpenAiClient + { + partial void PrepareListThreadsMethodArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref global::tryAGI.OpenAI.OrderEnum? order, + ref string? after, + ref string? before, + ref string? user); + partial void PrepareListThreadsMethodRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + global::tryAGI.OpenAI.OrderEnum? order, + string? after, + string? before, + string? user); + partial void ProcessListThreadsMethodResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListThreadsMethodResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List ChatKit threads with optional pagination and user filters. + /// + /// + /// + /// + /// List items created after this thread item ID. Defaults to null for the first page. + /// + /// + /// List items created before this thread item ID. Defaults to null for the newest results. + /// + /// + /// Filter threads that belong to this user identifier. Defaults to null to return all users. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListThreadsMethodAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + string? before = default, + string? user = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListThreadsMethodArguments( + httpClient: HttpClient, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before, + user: ref user); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/chatkit/threads", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + .AddOptionalParameter("user", user) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListThreadsMethodRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + order: order, + after: after, + before: before, + user: user); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListThreadsMethodResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListThreadsMethodResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ThreadListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ThreadListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainer.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainer.g.cs index f9e4d195..29ae1e8b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainer.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainer.g.cs @@ -22,8 +22,8 @@ partial void ProcessRetrieveContainerResponseContent( ref string content); /// - /// Retrieve container
- /// Retrieve Container + /// Retrieve Container
+ /// Retrieves a container. ///
/// /// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFile.g.cs index 7bf1a859..6a60c781 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFile.g.cs @@ -24,8 +24,8 @@ partial void ProcessRetrieveContainerFileResponseContent( ref string content); /// - /// Retrieve container file
- /// Retrieve Container File + /// Retrieve Container File
+ /// Retrieves a container file. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFileContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFileContent.g.cs index 272109ae..e8e3092d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFileContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.RetrieveContainerFileContent.g.cs @@ -19,8 +19,8 @@ partial void ProcessRetrieveContainerFileContentResponse( global::System.Net.Http.HttpResponseMessage httpResponseMessage); /// - /// Retrieve container file content
- /// Retrieve Container File Content + /// Retrieve Container File Content
+ /// Retrieves a container file content. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.g.cs index 3c7cf015..5fc0ea85 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.OpenAiClient.g.cs @@ -199,6 +199,33 @@ public sealed partial class OpenAiClient : global::tryAGI.OpenAI.IOpenAiClient, JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public GroupsClient Groups => new GroupsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public GroupOrganizationRoleAssignmentsClient GroupOrganizationRoleAssignments => new GroupOrganizationRoleAssignmentsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public GroupUsersClient GroupUsers => new GroupUsersClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// @@ -217,6 +244,24 @@ public sealed partial class OpenAiClient : global::tryAGI.OpenAI.IOpenAiClient, JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public ProjectGroupsClient ProjectGroups => new ProjectGroupsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public RolesClient Roles => new RolesClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// @@ -226,6 +271,33 @@ public sealed partial class OpenAiClient : global::tryAGI.OpenAI.IOpenAiClient, JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public UserOrganizationRoleAssignmentsClient UserOrganizationRoleAssignments => new UserOrganizationRoleAssignmentsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public ProjectGroupRoleAssignmentsClient ProjectGroupRoleAssignments => new ProjectGroupRoleAssignmentsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public ProjectUserRoleAssignmentsClient ProjectUserRoleAssignments => new ProjectUserRoleAssignmentsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// @@ -253,6 +325,24 @@ public sealed partial class OpenAiClient : global::tryAGI.OpenAI.IOpenAiClient, JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public VideosClient Videos => new VideosClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + + /// + /// + /// + public SkillsClient Skills => new SkillsClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// Creates a new instance of the OpenAiClient. /// If no httpClient is provided, a new one will be created. diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs new file mode 100644 index 00000000..23c73bd9 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.AssignProjectGroupRole.g.cs @@ -0,0 +1,209 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupRoleAssignmentsClient + { + partial void PrepareAssignProjectGroupRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string groupId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void PrepareAssignProjectGroupRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string groupId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void ProcessAssignProjectGroupRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAssignProjectGroupRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Assigns a project role to a group within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignProjectGroupRoleAsync( + string projectId, + string groupId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAssignProjectGroupRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + groupId: ref groupId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/groups/{groupId}/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAssignProjectGroupRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + groupId: groupId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAssignProjectGroupRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAssignProjectGroupRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.GroupRoleAssignment.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Assigns a project role to a group within a project. + /// + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignProjectGroupRoleAsync( + string projectId, + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody + { + RoleId = roleId, + }; + + return await AssignProjectGroupRoleAsync( + projectId: projectId, + groupId: groupId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs new file mode 100644 index 00000000..1f746036 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.ListProjectGroupRoleAssignments.g.cs @@ -0,0 +1,189 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupRoleAssignmentsClient + { + partial void PrepareListProjectGroupRoleAssignmentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string groupId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? order); + partial void PrepareListProjectGroupRoleAssignmentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string groupId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? order); + partial void ProcessListProjectGroupRoleAssignmentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListProjectGroupRoleAssignmentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the project roles assigned to a group within a project. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListProjectGroupRoleAssignmentsAsync( + string projectId, + string groupId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectGroupRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListProjectGroupRoleAssignmentsArguments( + httpClient: HttpClient, + projectId: ref projectId, + groupId: ref groupId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/groups/{groupId}/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListProjectGroupRoleAssignmentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + groupId: groupId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListProjectGroupRoleAssignmentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListProjectGroupRoleAssignmentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs new file mode 100644 index 00000000..67d96d7f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.UnassignProjectGroupRole.g.cs @@ -0,0 +1,172 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupRoleAssignmentsClient + { + partial void PrepareUnassignProjectGroupRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string groupId, + ref string roleId); + partial void PrepareUnassignProjectGroupRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string groupId, + string roleId); + partial void ProcessUnassignProjectGroupRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUnassignProjectGroupRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Unassigns a project role from a group within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnassignProjectGroupRoleAsync( + string projectId, + string groupId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUnassignProjectGroupRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + groupId: ref groupId, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/groups/{groupId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUnassignProjectGroupRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + groupId: groupId, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUnassignProjectGroupRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUnassignProjectGroupRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..bb459ca0 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupRoleAssignmentsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ProjectGroupRoleAssignmentsClient : global::tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the ProjectGroupRoleAssignmentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public ProjectGroupRoleAssignmentsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.AddProjectGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.AddProjectGroup.g.cs new file mode 100644 index 00000000..56a41305 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.AddProjectGroup.g.cs @@ -0,0 +1,205 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupsClient + { + partial void PrepareAddProjectGroupArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + global::tryAGI.OpenAI.InviteProjectGroupBody request); + partial void PrepareAddProjectGroupRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + global::tryAGI.OpenAI.InviteProjectGroupBody request); + partial void ProcessAddProjectGroupResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAddProjectGroupResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Grants a group access to a project. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddProjectGroupAsync( + string projectId, + + global::tryAGI.OpenAI.InviteProjectGroupBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAddProjectGroupArguments( + httpClient: HttpClient, + projectId: ref projectId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/projects/{projectId}/groups", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAddProjectGroupRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAddProjectGroupResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAddProjectGroupResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ProjectGroup.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ProjectGroup.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Grants a group access to a project. + /// + /// + /// + /// Identifier of the group to add to the project. + /// + /// + /// Identifier of the project role to grant to the group. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddProjectGroupAsync( + string projectId, + string groupId, + string role, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.InviteProjectGroupBody + { + GroupId = groupId, + Role = role, + }; + + return await AddProjectGroupAsync( + projectId: projectId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.ListProjectGroups.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.ListProjectGroups.g.cs new file mode 100644 index 00000000..9c41c900 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.ListProjectGroups.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupsClient + { + partial void PrepareListProjectGroupsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListProjectGroupsOrder? order); + partial void PrepareListProjectGroupsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListProjectGroupsOrder? order); + partial void ProcessListProjectGroupsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListProjectGroupsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the groups that have access to a project. + /// + /// + /// + /// Default Value: 20 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListProjectGroupsAsync( + string projectId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectGroupsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListProjectGroupsArguments( + httpClient: HttpClient, + projectId: ref projectId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/projects/{projectId}/groups", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListProjectGroupsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListProjectGroupsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListProjectGroupsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ProjectGroupListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ProjectGroupListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.RemoveProjectGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.RemoveProjectGroup.g.cs new file mode 100644 index 00000000..0ab3aeef --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.RemoveProjectGroup.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectGroupsClient + { + partial void PrepareRemoveProjectGroupArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string groupId); + partial void PrepareRemoveProjectGroupRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string groupId); + partial void ProcessRemoveProjectGroupResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRemoveProjectGroupResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Revokes a group's access to a project. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveProjectGroupAsync( + string projectId, + string groupId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareRemoveProjectGroupArguments( + httpClient: HttpClient, + projectId: ref projectId, + groupId: ref groupId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/projects/{projectId}/groups/{groupId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareRemoveProjectGroupRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + groupId: groupId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessRemoveProjectGroupResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessRemoveProjectGroupResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.ProjectGroupDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.ProjectGroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.g.cs new file mode 100644 index 00000000..470cdff5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectGroupsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ProjectGroupsClient : global::tryAGI.OpenAI.IProjectGroupsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the ProjectGroupsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public ProjectGroupsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs new file mode 100644 index 00000000..7dfaa0c5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.AssignProjectUserRole.g.cs @@ -0,0 +1,209 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectUserRoleAssignmentsClient + { + partial void PrepareAssignProjectUserRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string userId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void PrepareAssignProjectUserRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string userId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void ProcessAssignProjectUserRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAssignProjectUserRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Assigns a project role to a user within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignProjectUserRoleAsync( + string projectId, + string userId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAssignProjectUserRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + userId: ref userId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/users/{userId}/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAssignProjectUserRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + userId: userId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAssignProjectUserRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAssignProjectUserRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.UserRoleAssignment.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.UserRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Assigns a project role to a user within a project. + /// + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignProjectUserRoleAsync( + string projectId, + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody + { + RoleId = roleId, + }; + + return await AssignProjectUserRoleAsync( + projectId: projectId, + userId: userId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs new file mode 100644 index 00000000..7931f50b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.ListProjectUserRoleAssignments.g.cs @@ -0,0 +1,189 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectUserRoleAssignmentsClient + { + partial void PrepareListProjectUserRoleAssignmentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string userId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? order); + partial void PrepareListProjectUserRoleAssignmentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string userId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? order); + partial void ProcessListProjectUserRoleAssignmentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListProjectUserRoleAssignmentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the project roles assigned to a user within a project. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListProjectUserRoleAssignmentsAsync( + string projectId, + string userId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectUserRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListProjectUserRoleAssignmentsArguments( + httpClient: HttpClient, + projectId: ref projectId, + userId: ref userId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/users/{userId}/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListProjectUserRoleAssignmentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + userId: userId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListProjectUserRoleAssignmentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListProjectUserRoleAssignmentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs new file mode 100644 index 00000000..642bd1d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.UnassignProjectUserRole.g.cs @@ -0,0 +1,172 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ProjectUserRoleAssignmentsClient + { + partial void PrepareUnassignProjectUserRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string userId, + ref string roleId); + partial void PrepareUnassignProjectUserRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string userId, + string roleId); + partial void ProcessUnassignProjectUserRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUnassignProjectUserRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Unassigns a project role from a user within a project. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnassignProjectUserRoleAsync( + string projectId, + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUnassignProjectUserRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + userId: ref userId, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/users/{userId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUnassignProjectUserRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + userId: userId, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUnassignProjectUserRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUnassignProjectUserRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..7db65014 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectUserRoleAssignmentsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ProjectUserRoleAssignmentsClient : global::tryAGI.OpenAI.IProjectUserRoleAssignmentsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the ProjectUserRoleAssignmentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public ProjectUserRoleAssignmentsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ArchiveProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ArchiveProject.g.cs index 5fbf7183..0c927270 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ArchiveProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ArchiveProject.g.cs @@ -22,7 +22,6 @@ partial void ProcessArchiveProjectResponseContent( ref string content); /// - /// Archive project
/// Archives a project in the organization. Archived projects cannot be used or updated. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProject.g.cs index 3c3070b9..0dff9c87 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProject.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateProjectResponseContent( ref string content); /// - /// Create project
/// Create a new project in the organization. Projects can be created and archived, but cannot be deleted. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateProjectAsync( + global::tryAGI.OpenAI.ProjectCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,21 +167,25 @@ partial void ProcessCreateProjectResponseContent( } /// - /// Create project
/// Create a new project in the organization. Projects can be created and archived, but cannot be deleted. ///
/// /// The friendly name of the project, this name appears in reports. /// + /// + /// Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See [data residency controls](/docs/guides/your-data#data-residency-controls) to review the functionality and limitations of setting this field. + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateProjectAsync( string name, + global::tryAGI.OpenAI.ProjectCreateRequestGeography? geography = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.ProjectCreateRequest { Name = name, + Geography = geography, }; return await CreateProjectAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs index 3c614606..3d553c19 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs @@ -24,7 +24,6 @@ partial void ProcessCreateProjectServiceAccountResponseContent( ref string content); /// - /// Create project service account
/// Creates a new service account in the project. This also returns an unredacted API key for the service account. ///
/// @@ -33,6 +32,7 @@ partial void ProcessCreateProjectServiceAccountResponseContent( /// public async global::System.Threading.Tasks.Task CreateProjectServiceAccountAsync( string projectId, + global::tryAGI.OpenAI.ProjectServiceAccountCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -210,7 +210,6 @@ partial void ProcessCreateProjectServiceAccountResponseContent( } /// - /// Create project service account
/// Creates a new service account in the project. This also returns an unredacted API key for the service account. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectUser.g.cs index 6f83c861..5aed0679 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.CreateProjectUser.g.cs @@ -24,7 +24,6 @@ partial void ProcessCreateProjectUserResponseContent( ref string content); /// - /// Create project user
/// Adds a user to the project. Users must already be members of the organization to be added to a project. ///
/// @@ -33,6 +32,7 @@ partial void ProcessCreateProjectUserResponseContent( /// public async global::System.Threading.Tasks.Task CreateProjectUserAsync( string projectId, + global::tryAGI.OpenAI.ProjectUserCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -210,28 +210,27 @@ partial void ProcessCreateProjectUserResponseContent( } /// - /// Create project user
/// Adds a user to the project. Users must already be members of the organization to be added to a project. ///
/// - /// - /// `owner` or `member` - /// /// /// The ID of the user. /// + /// + /// `owner` or `member` + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateProjectUserAsync( string projectId, - global::tryAGI.OpenAI.ProjectUserCreateRequestRole role, string userId, + global::tryAGI.OpenAI.ProjectUserCreateRequestRole role, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.ProjectUserCreateRequest { - Role = role, UserId = userId, + Role = role, }; return await CreateProjectUserAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs index d65fd445..35880675 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs @@ -24,8 +24,9 @@ partial void ProcessDeleteProjectApiKeyResponseContent( ref string content); /// - /// Delete project API key
- /// Deletes an API key from the project. + /// Deletes an API key from the project.
+ /// Returns confirmation of the key deletion, or an error if the key belonged to
+ /// a service account. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs index 22ccbb3f..2553dbec 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs @@ -24,8 +24,9 @@ partial void ProcessDeleteProjectServiceAccountResponseContent( ref string content); /// - /// Delete project service account
- /// Deletes a service account from the project. + /// Deletes a service account from the project.
+ /// Returns confirmation of service account deletion, or an error if the project
+ /// is archived (archived projects have no service accounts). ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectUser.g.cs index 15d7ba9a..617ac067 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.DeleteProjectUser.g.cs @@ -24,8 +24,9 @@ partial void ProcessDeleteProjectUserResponseContent( ref string content); /// - /// Delete project user
- /// Deletes a user from the project. + /// Deletes a user from the project.
+ /// Returns confirmation of project user deletion, or an error if the project is
+ /// archived (archived projects have no users). ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectApiKeys.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectApiKeys.g.cs index 2846a874..a5075b2c 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectApiKeys.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectApiKeys.g.cs @@ -26,7 +26,6 @@ partial void ProcessListProjectApiKeysResponseContent( ref string content); /// - /// List project API keys
/// Returns a list of API keys in the project. ///
/// @@ -53,8 +52,8 @@ partial void ProcessListProjectApiKeysResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/projects/{projectId}/api_keys", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectRateLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectRateLimits.g.cs index fe782004..ada850bc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectRateLimits.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectRateLimits.g.cs @@ -28,7 +28,6 @@ partial void ProcessListProjectRateLimitsResponseContent( ref string content); /// - /// List project rate limits
/// Returns the rate limits per model for a project. ///
/// @@ -58,9 +57,9 @@ partial void ProcessListProjectRateLimitsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/projects/{projectId}/rate_limits", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("before", before) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs index 1bfb7329..32354b57 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs @@ -26,7 +26,6 @@ partial void ProcessListProjectServiceAccountsResponseContent( ref string content); /// - /// List project service accounts
/// Returns a list of service accounts in the project. ///
/// @@ -53,8 +52,8 @@ partial void ProcessListProjectServiceAccountsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/projects/{projectId}/service_accounts", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectUsers.g.cs index a5014fe9..cf32030b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectUsers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjectUsers.g.cs @@ -26,7 +26,6 @@ partial void ProcessListProjectUsersResponseContent( ref string content); /// - /// List project users
/// Returns a list of users in the project. ///
/// @@ -53,8 +52,8 @@ partial void ProcessListProjectUsersResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/organization/projects/{projectId}/users", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("after", after) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjects.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjects.g.cs index 0d9ad986..348971e8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjects.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ListProjects.g.cs @@ -26,7 +26,6 @@ partial void ProcessListProjectsResponseContent( ref string content); /// - /// List projects
/// Returns a list of projects. ///
/// @@ -55,9 +54,9 @@ partial void ProcessListProjectsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/projects", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("include_archived", includeArchived?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProject.g.cs index e8a4b68b..14e3b06f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProject.g.cs @@ -24,7 +24,6 @@ partial void ProcessModifyProjectResponseContent( ref string content); /// - /// Modify project
/// Modifies a project in the organization. ///
/// @@ -33,6 +32,7 @@ partial void ProcessModifyProjectResponseContent( /// public async global::System.Threading.Tasks.Task ModifyProjectAsync( string projectId, + global::tryAGI.OpenAI.ProjectUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -210,7 +210,6 @@ partial void ProcessModifyProjectResponseContent( } /// - /// Modify project
/// Modifies a project in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProjectUser.g.cs index a46e08f3..2d71dc9e 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.ModifyProjectUser.g.cs @@ -26,7 +26,6 @@ partial void ProcessModifyProjectUserResponseContent( ref string content); /// - /// Modify project user
/// Modifies a user's role in the project. ///
/// @@ -37,6 +36,7 @@ partial void ProcessModifyProjectUserResponseContent( public async global::System.Threading.Tasks.Task ModifyProjectUserAsync( string projectId, string userId, + global::tryAGI.OpenAI.ProjectUserUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -216,7 +216,6 @@ partial void ProcessModifyProjectUserResponseContent( } /// - /// Modify project user
/// Modifies a user's role in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProject.g.cs index c6c3dca6..148af42a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProject.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProject.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveProjectResponseContent( ref string content); /// - /// Retrieve project
/// Retrieves a project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs index 5352df28..37861e64 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs @@ -24,7 +24,6 @@ partial void ProcessRetrieveProjectApiKeyResponseContent( ref string content); /// - /// Retrieve project API key
/// Retrieves an API key in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs index 54ba3f3b..9daa4403 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs @@ -24,7 +24,6 @@ partial void ProcessRetrieveProjectServiceAccountResponseContent( ref string content); /// - /// Retrieve project service account
/// Retrieves a service account in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectUser.g.cs index 7bf87c34..b4aa68cf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.RetrieveProjectUser.g.cs @@ -24,7 +24,6 @@ partial void ProcessRetrieveProjectUserResponseContent( ref string content); /// - /// Retrieve project user
/// Retrieves a user in the project. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.UpdateProjectRateLimits.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.UpdateProjectRateLimits.g.cs index 5ac6ca40..f4231ee4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.UpdateProjectRateLimits.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ProjectsClient.UpdateProjectRateLimits.g.cs @@ -26,7 +26,6 @@ partial void ProcessUpdateProjectRateLimitsResponseContent( ref string content); /// - /// Modify project rate limit
/// Updates a project rate limit. ///
/// @@ -37,6 +36,7 @@ partial void ProcessUpdateProjectRateLimitsResponseContent( public async global::System.Threading.Tasks.Task UpdateProjectRateLimitsAsync( string projectId, string rateLimitId, + global::tryAGI.OpenAI.ProjectRateLimitUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -216,50 +216,49 @@ partial void ProcessUpdateProjectRateLimitsResponseContent( } /// - /// Modify project rate limit
/// Updates a project rate limit. ///
/// /// - /// - /// The maximum batch input tokens per day. Only relevant for certain models. + /// + /// The maximum requests per minute. /// - /// - /// The maximum audio megabytes per minute. Only relevant for certain models. + /// + /// The maximum tokens per minute. /// /// /// The maximum images per minute. Only relevant for certain models. /// + /// + /// The maximum audio megabytes per minute. Only relevant for certain models. + /// /// /// The maximum requests per day. Only relevant for certain models. /// - /// - /// The maximum requests per minute. - /// - /// - /// The maximum tokens per minute. + /// + /// The maximum batch input tokens per day. Only relevant for certain models. /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateProjectRateLimitsAsync( string projectId, string rateLimitId, - int? batch1DayMaxInputTokens = default, - int? maxAudioMegabytesPer1Minute = default, - int? maxImagesPer1Minute = default, - int? maxRequestsPer1Day = default, int? maxRequestsPer1Minute = default, int? maxTokensPer1Minute = default, + int? maxImagesPer1Minute = default, + int? maxAudioMegabytesPer1Minute = default, + int? maxRequestsPer1Day = default, + int? batch1DayMaxInputTokens = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.ProjectRateLimitUpdateRequest { - Batch1DayMaxInputTokens = batch1DayMaxInputTokens, - MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute, - MaxImagesPer1Minute = maxImagesPer1Minute, - MaxRequestsPer1Day = maxRequestsPer1Day, MaxRequestsPer1Minute = maxRequestsPer1Minute, MaxTokensPer1Minute = maxTokensPer1Minute, + MaxImagesPer1Minute = maxImagesPer1Minute, + MaxAudioMegabytesPer1Minute = maxAudioMegabytesPer1Minute, + MaxRequestsPer1Day = maxRequestsPer1Day, + Batch1DayMaxInputTokens = batch1DayMaxInputTokens, }; return await UpdateProjectRateLimitsAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.AcceptRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.AcceptRealtimeCall.g.cs new file mode 100644 index 00000000..6a9dc038 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.AcceptRealtimeCall.g.cs @@ -0,0 +1,257 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RealtimeClient + { + partial void PrepareAcceptRealtimeCallArguments( + global::System.Net.Http.HttpClient httpClient, + ref string callId, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA request); + partial void PrepareAcceptRealtimeCallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string callId, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA request); + partial void ProcessAcceptRealtimeCallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Accept an incoming SIP call and configure the realtime session that will
+ /// handle it. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AcceptRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAcceptRealtimeCallArguments( + httpClient: HttpClient, + callId: ref callId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/realtime/calls/{callId}/accept", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAcceptRealtimeCallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + callId: callId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAcceptRealtimeCallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Accept an incoming SIP call and configure the realtime session that will
+ /// handle it. + ///
+ /// + /// + /// The type of session to create. Always `realtime` for the Realtime API. + /// + /// + /// The set of modalities the model can respond with. It defaults to `["audio"]`, indicating
+ /// that the model will respond with audio plus a transcript. `["text"]` can be used to make
+ /// the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
+ /// Default Value: [audio] + /// + /// + /// The Realtime model used for this session. + /// + /// + /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
+ /// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. + /// + /// + /// Configuration for input and output audio. + /// + /// + /// Additional fields to include in server outputs.
+ /// `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription. + /// + /// + /// Realtime API can write session traces to the [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
+ /// tracing is enabled for a session, the configuration cannot be modified.
+ /// `auto` will create a trace for the session with default values for the
+ /// workflow name, group id, and metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Tools available to the model. + /// + /// + /// How the model chooses tools. Provide one of the string modes or force a specific
+ /// function/MCP tool.
+ /// Default Value: auto + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. + /// + /// + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AcceptRealtimeCallAsync( + string callId, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAType type = default, + global::System.Collections.Generic.IList? outputModalities = default, + global::tryAGI.OpenAI.AnyOf? model = default, + string? instructions = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGAAudio? audio = default, + global::System.Collections.Generic.IList? include = default, + global::tryAGI.OpenAI.OneOf? tracing = default, + global::System.Collections.Generic.IList>? tools = default, + global::tryAGI.OpenAI.OneOf? toolChoice = default, + global::tryAGI.OpenAI.OneOf? maxOutputTokens = default, + global::tryAGI.OpenAI.RealtimeTruncation? truncation = default, + global::tryAGI.OpenAI.PromptVariant1? prompt = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA + { + Type = type, + OutputModalities = outputModalities, + Model = model, + Instructions = instructions, + Audio = audio, + Include = include, + Tracing = tracing, + Tools = tools, + ToolChoice = toolChoice, + MaxOutputTokens = maxOutputTokens, + Truncation = truncation, + Prompt = prompt, + }; + + await AcceptRealtimeCallAsync( + callId: callId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeCall.g.cs new file mode 100644 index 00000000..d8bf9ddf --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeCall.g.cs @@ -0,0 +1,202 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RealtimeClient + { + partial void PrepareCreateRealtimeCallArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.RealtimeCallCreateRequest request); + partial void PrepareCreateRealtimeCallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.RealtimeCallCreateRequest request); + partial void ProcessCreateRealtimeCallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateRealtimeCallResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a new Realtime API call over WebRTC and receive the SDP answer needed
+ /// to complete the peer connection. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateRealtimeCallAsync( + + global::tryAGI.OpenAI.RealtimeCallCreateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateRealtimeCallArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/realtime/calls", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Sdp}"), + name: "\"sdp\""); + if (request.Session != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Session}"), + name: "\"session\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRealtimeCallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateRealtimeCallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateRealtimeCallResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a new Realtime API call over WebRTC and receive the SDP answer needed
+ /// to complete the peer connection. + ///
+ /// + /// WebRTC Session Description Protocol (SDP) offer generated by the caller. + /// + /// + /// Optional session configuration to apply before the realtime session is
+ /// created. Use the same parameters you would send in a [`create client secret`](/docs/api-reference/realtime-sessions/create-realtime-client-secret)
+ /// request. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateRealtimeCallAsync( + string sdp, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestGA? session = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.RealtimeCallCreateRequest + { + Sdp = sdp, + Session = session, + }; + + return await CreateRealtimeCallAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeClientSecret.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeClientSecret.g.cs index a32c711c..63f7e0b5 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeClientSecret.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeClientSecret.g.cs @@ -22,13 +22,21 @@ partial void ProcessCreateRealtimeClientSecretResponseContent( ref string content); /// - /// Create client secret
- /// Create a Realtime client secret with an associated session configuration. + /// Create a Realtime client secret with an associated session configuration.
+ /// Client secrets are short-lived tokens that can be passed to a client app,
+ /// such as a web frontend or mobile client, which grants access to the Realtime API without
+ /// leaking your main API key. You can configure a custom TTL for each client secret.
+ /// You can also attach session configuration options to the client secret, which will be
+ /// applied to any sessions created using that client secret, but these can also be overridden
+ /// by the client connection.
+ /// [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
+ /// Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateRealtimeClientSecretAsync( + global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,8 +175,15 @@ partial void ProcessCreateRealtimeClientSecretResponseContent( } /// - /// Create client secret
- /// Create a Realtime client secret with an associated session configuration. + /// Create a Realtime client secret with an associated session configuration.
+ /// Client secrets are short-lived tokens that can be passed to a client app,
+ /// such as a web frontend or mobile client, which grants access to the Realtime API without
+ /// leaking your main API key. You can configure a custom TTL for each client secret.
+ /// You can also attach session configuration options to the client secret, which will be
+ /// applied to any sessions created using that client secret, but these can also be overridden
+ /// by the client connection.
+ /// [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
+ /// Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. ///
/// /// Configuration for the client secret expiration. Expiration refers to the time after which
@@ -184,7 +199,7 @@ partial void ProcessCreateRealtimeClientSecretResponseContent( /// public async global::System.Threading.Tasks.Task CreateRealtimeClientSecretAsync( global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? expiresAfter = default, - global::tryAGI.OpenAI.Session? session = default, + global::tryAGI.OpenAI.OneOf? session = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeSession.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeSession.g.cs index 851c2921..eaf4e357 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeSession.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeSession.g.cs @@ -22,18 +22,19 @@ partial void ProcessCreateRealtimeSessionResponseContent( ref string content); /// - /// Create session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API. Can be configured with the same session parameters as the
/// `session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime session object, plus an ephemeral key. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateRealtimeSessionAsync( + global::tryAGI.OpenAI.RealtimeSessionCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -172,47 +173,44 @@ partial void ProcessCreateRealtimeSessionResponseContent( } /// - /// Create session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API. Can be configured with the same session parameters as the
/// `session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime session object, plus an ephemeral key. ///
/// /// Ephemeral key returned by the API. /// - /// - /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. - /// - /// - /// Configuration for input audio transcription, defaults to off and can be
- /// set to `null` to turn off once on. Input audio transcription is not native
- /// to the model, since the model consumes audio directly. Transcription runs
- /// asynchronously and should be treated as rough guidance
- /// rather than the representation understood by the model. + /// + /// The set of modalities the model can respond with. To disable audio,
+ /// set this to ["text"]. /// /// /// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.
/// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session. /// - /// - /// Maximum number of output tokens for a single assistant response,
- /// inclusive of tool calls. Provide an integer between 1 and 4096 to
- /// limit output tokens, or `inf` for the maximum available tokens for a
- /// given model. Defaults to `inf`. + /// + /// The voice the model uses to respond. Supported built-in voices are
+ /// `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,
+ /// `marin`, and `cedar`. You may also provide a custom voice object with an
+ /// `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
+ /// the session once the model has responded with audio at least once. /// - /// - /// The set of modalities the model can respond with. To disable audio,
- /// set this to ["text"]. + /// + /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// /// /// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. /// - /// - /// Reference to a prompt template and its variables.
- /// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + /// + /// Configuration for input audio transcription, defaults to off and can be
+ /// set to `null` to turn off once on. Input audio transcription is not native
+ /// to the model, since the model consumes audio directly. Transcription runs
+ /// asynchronously and should be treated as rough guidance
+ /// rather than the representation understood by the model. /// /// /// The speed of the model's spoken response. 1.0 is the default speed. 0.25 is
@@ -220,73 +218,79 @@ partial void ProcessCreateRealtimeSessionResponseContent( /// in between model turns, not while a response is in progress.
/// Default Value: 1 /// - /// - /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. - /// - /// - /// How the model chooses tools. Options are `auto`, `none`, `required`, or
- /// specify a function. - /// - /// - /// Tools (functions) available to the model. - /// /// /// Configuration options for tracing. Set to null to disable tracing. Once
/// tracing is enabled for a session, the configuration cannot be modified.
/// `auto` will create a trace for the session with default values for the
/// workflow name, group id, and metadata. /// - /// - /// Controls how the realtime conversation is truncated prior to model inference.
- /// The default is `auto`. - /// /// /// Configuration for turn detection. Can be set to `null` to turn off. Server
/// VAD means that the model will detect the start and end of speech based on
/// audio volume and respond at the end of user speech. /// - /// - /// Example: ash + /// + /// Tools (functions) available to the model. + /// + /// + /// How the model chooses tools. Options are `auto`, `none`, `required`, or
+ /// specify a function. + /// + /// + /// Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. + /// + /// + /// Maximum number of output tokens for a single assistant response,
+ /// inclusive of tool calls. Provide an integer between 1 and 4096 to
+ /// limit output tokens, or `inf` for the maximum available tokens for a
+ /// given model. Defaults to `inf`. /// + /// + /// When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.
+ /// Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.
+ /// Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.
+ /// Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit. + /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateRealtimeSessionAsync( global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret clientSecret, - string? inputAudioFormat = default, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default, - string? instructions = default, - global::tryAGI.OpenAI.AnyOf? maxResponseOutputTokens = default, global::System.Collections.Generic.IList? modalities = default, + string? instructions = default, + global::tryAGI.OpenAI.VoiceIdsOrCustomVoice? voice = default, + string? inputAudioFormat = default, string? outputAudioFormat = default, - global::tryAGI.OpenAI.Prompt2? prompt = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default, double? speed = default, - double? temperature = default, - string? toolChoice = default, + global::tryAGI.OpenAI.OneOf? tracing = default, + global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection = default, global::System.Collections.Generic.IList? tools = default, - global::tryAGI.OpenAI.AnyOf? tracing = default, + string? toolChoice = default, + double? temperature = default, + global::tryAGI.OpenAI.OneOf? maxResponseOutputTokens = default, global::tryAGI.OpenAI.RealtimeTruncation? truncation = default, - global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection = default, - global::tryAGI.OpenAI.VoiceIdsShared? voice = default, + global::tryAGI.OpenAI.PromptVariant1? prompt = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.RealtimeSessionCreateRequest { ClientSecret = clientSecret, - InputAudioFormat = inputAudioFormat, - InputAudioTranscription = inputAudioTranscription, - Instructions = instructions, - MaxResponseOutputTokens = maxResponseOutputTokens, Modalities = modalities, + Instructions = instructions, + Voice = voice, + InputAudioFormat = inputAudioFormat, OutputAudioFormat = outputAudioFormat, - Prompt = prompt, + InputAudioTranscription = inputAudioTranscription, Speed = speed, - Temperature = temperature, - ToolChoice = toolChoice, - Tools = tools, Tracing = tracing, - Truncation = truncation, TurnDetection = turnDetection, - Voice = voice, + Tools = tools, + ToolChoice = toolChoice, + Temperature = temperature, + MaxResponseOutputTokens = maxResponseOutputTokens, + Truncation = truncation, + Prompt = prompt, }; return await CreateRealtimeSessionAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeTranscriptionSession.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeTranscriptionSession.g.cs index fa25649a..941410f1 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeTranscriptionSession.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.CreateRealtimeTranscriptionSession.g.cs @@ -22,18 +22,19 @@ partial void ProcessCreateRealtimeTranscriptionSessionResponseContent( ref string content); /// - /// Create transcription session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API specifically for realtime transcriptions.
/// Can be configured with the same session parameters as the `transcription_session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime transcription session object, plus an ephemeral key. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateRealtimeTranscriptionSessionAsync( + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -172,17 +173,22 @@ partial void ProcessCreateRealtimeTranscriptionSessionResponseContent( } /// - /// Create transcription session
/// Create an ephemeral API token for use in client-side applications with the
/// Realtime API specifically for realtime transcriptions.
/// Can be configured with the same session parameters as the `transcription_session.update` client event.
/// It responds with a session object, plus a `client_secret` key which contains
/// a usable ephemeral API token that can be used to authenticate browser clients
- /// for the Realtime API. + /// for the Realtime API.
+ /// Returns the created Realtime transcription session object, plus an ephemeral key. ///
- /// - /// The set of items to include in the transcription. Current available items are:
- /// `item.input_audio_transcription.logprobs` + /// + /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// + /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
+ /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
+ /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
@@ -190,32 +196,30 @@ partial void ProcessCreateRealtimeTranscriptionSessionResponseContent( /// single channel (mono), and little-endian byte order.
/// Default Value: pcm16 /// - /// - /// Configuration for input audio noise reduction. This can be set to `null` to turn off.
- /// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
- /// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio. + /// + /// Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service. /// - /// - /// - /// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. + /// + /// The set of items to include in the transcription. Current available items are:
+ /// `item.input_audio_transcription.logprobs` /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateRealtimeTranscriptionSessionAsync( - global::System.Collections.Generic.IList? include = default, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat = default, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection = default, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? inputAudioNoiseReduction = default, + global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat = default, global::tryAGI.OpenAI.AudioTranscription? inputAudioTranscription = default, - global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequest { - Include = include, - InputAudioFormat = inputAudioFormat, + TurnDetection = turnDetection, InputAudioNoiseReduction = inputAudioNoiseReduction, + InputAudioFormat = inputAudioFormat, InputAudioTranscription = inputAudioTranscription, - TurnDetection = turnDetection, + Include = include, }; return await CreateRealtimeTranscriptionSessionAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.HangupRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.HangupRealtimeCall.g.cs new file mode 100644 index 00000000..865fbb72 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.HangupRealtimeCall.g.cs @@ -0,0 +1,146 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RealtimeClient + { + partial void PrepareHangupRealtimeCallArguments( + global::System.Net.Http.HttpClient httpClient, + ref string callId); + partial void PrepareHangupRealtimeCallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string callId); + partial void ProcessHangupRealtimeCallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// End an active Realtime API call, whether it was initiated over SIP or
+ /// WebRTC. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task HangupRealtimeCallAsync( + string callId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareHangupRealtimeCallArguments( + httpClient: HttpClient, + callId: ref callId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/realtime/calls/{callId}/hangup", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareHangupRealtimeCallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + callId: callId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessHangupRealtimeCallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.ReferRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.ReferRealtimeCall.g.cs new file mode 100644 index 00000000..890a2ef3 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.ReferRealtimeCall.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RealtimeClient + { + partial void PrepareReferRealtimeCallArguments( + global::System.Net.Http.HttpClient httpClient, + ref string callId, + global::tryAGI.OpenAI.RealtimeCallReferRequest request); + partial void PrepareReferRealtimeCallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string callId, + global::tryAGI.OpenAI.RealtimeCallReferRequest request); + partial void ProcessReferRealtimeCallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Transfer an active SIP call to a new destination using the SIP REFER verb. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ReferRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeCallReferRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareReferRealtimeCallArguments( + httpClient: HttpClient, + callId: ref callId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/realtime/calls/{callId}/refer", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareReferRealtimeCallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + callId: callId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessReferRealtimeCallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Transfer an active SIP call to a new destination using the SIP REFER verb. + /// + /// + /// + /// URI that should appear in the SIP Refer-To header. Supports values like
+ /// `tel:+14155550123` or `sip:agent@example.com`.
+ /// Example: tel:+14155550123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ReferRealtimeCallAsync( + string callId, + string targetUri, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.RealtimeCallReferRequest + { + TargetUri = targetUri, + }; + + await ReferRealtimeCallAsync( + callId: callId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.RejectRealtimeCall.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.RejectRealtimeCall.g.cs new file mode 100644 index 00000000..9097c0d6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RealtimeClient.RejectRealtimeCall.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RealtimeClient + { + partial void PrepareRejectRealtimeCallArguments( + global::System.Net.Http.HttpClient httpClient, + ref string callId, + global::tryAGI.OpenAI.RealtimeCallRejectRequest request); + partial void PrepareRejectRealtimeCallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string callId, + global::tryAGI.OpenAI.RealtimeCallRejectRequest request); + partial void ProcessRejectRealtimeCallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Decline an incoming SIP call by returning a SIP status code to the caller. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RejectRealtimeCallAsync( + string callId, + + global::tryAGI.OpenAI.RealtimeCallRejectRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareRejectRealtimeCallArguments( + httpClient: HttpClient, + callId: ref callId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/realtime/calls/{callId}/reject", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareRejectRealtimeCallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + callId: callId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessRejectRealtimeCallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Decline an incoming SIP call by returning a SIP status code to the caller. + /// + /// + /// + /// SIP response code to send back to the caller. Defaults to `603` (Decline)
+ /// when omitted.
+ /// Example: 486 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RejectRealtimeCallAsync( + string callId, + int? statusCode = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.RealtimeCallRejectRequest + { + StatusCode = statusCode, + }; + + await RejectRealtimeCallAsync( + callId: callId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CancelResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CancelResponse.g.cs index 0d804736..d394c792 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CancelResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CancelResponse.g.cs @@ -22,10 +22,9 @@ partial void ProcessCancelResponseResponseContent( ref string content); /// - /// Cancel a response
/// Cancels a model response with the given ID. Only responses created with
/// the `background` parameter set to `true` can be cancelled.
- /// [Learn more](https://platform.openai.com/docs/guides/background). + /// [Learn more](/docs/guides/background). ///
/// /// Example: resp_677efb5139a88190b512bc3fef8e535d diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponse.g.cs index 1b5094c8..be8b5c55 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponse.g.cs @@ -22,19 +22,19 @@ partial void ProcessCreateResponseResponseContent( ref string content); /// - /// Create a model response
- /// Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or
- /// [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)
- /// or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call
- /// your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in
- /// [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data
+ /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
/// as input for the model's response. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateResponseAsync( + global::tryAGI.OpenAI.CreateResponse request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -171,13 +171,12 @@ partial void ProcessCreateResponseResponseContent( } /// - /// Create a model response
- /// Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or
- /// [image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)
- /// or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call
- /// your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in
- /// [tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)
- /// or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data
+ /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
/// as input for the model's response. ///
/// The token to cancel the operation with diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponseAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponseAsStream.g.cs new file mode 100644 index 00000000..0bc1f06a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.CreateResponseAsStream.g.cs @@ -0,0 +1,164 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class ResponsesClient + { + partial void PrepareCreateResponseAsStreamArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateResponse request); + partial void PrepareCreateResponseAsStreamRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateResponse request); + partial void ProcessCreateResponseAsStreamResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
+ /// as input for the model's response. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateResponseAsStreamAsync( + + global::tryAGI.OpenAI.CreateResponse request, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCreateResponseAsStreamArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/responses", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateResponseAsStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateResponseAsStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(cancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::tryAGI.OpenAI.ResponseStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + + yield return __streamedResponse; + } + } + + /// + /// Creates a model response. Provide [text](/docs/guides/text) or
+ /// [image](/docs/guides/images) inputs to generate [text](/docs/guides/text)
+ /// or [JSON](/docs/guides/structured-outputs) outputs. Have the model call
+ /// your own [custom code](/docs/guides/function-calling) or use built-in
+ /// [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search)
+ /// or [file search](/docs/guides/tools-file-search) to use your own data
+ /// as input for the model's response. + ///
+ /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable CreateResponseAsStreamAsync( + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateResponse + { + }; + + var __enumerable = CreateResponseAsStreamAsync( + request: __request, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.DeleteResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.DeleteResponse.g.cs index e3282c2e..35b7eb79 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.DeleteResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.DeleteResponse.g.cs @@ -17,7 +17,6 @@ partial void ProcessDeleteResponseResponse( global::System.Net.Http.HttpResponseMessage httpResponseMessage); /// - /// Delete a model response
/// Deletes a model response with the given ID. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.GetResponse.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.GetResponse.g.cs index 18ae34f1..221fd2e2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.GetResponse.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.GetResponse.g.cs @@ -8,7 +8,7 @@ public partial class ResponsesClient partial void PrepareGetResponseArguments( global::System.Net.Http.HttpClient httpClient, ref string responseId, - global::System.Collections.Generic.IList? include, + global::System.Collections.Generic.IList? include, ref bool? stream, ref int? startingAfter, ref bool? includeObfuscation); @@ -16,7 +16,7 @@ partial void PrepareGetResponseRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string responseId, - global::System.Collections.Generic.IList? include, + global::System.Collections.Generic.IList? include, bool? stream, int? startingAfter, bool? includeObfuscation); @@ -30,7 +30,6 @@ partial void ProcessGetResponseResponseContent( ref string content); /// - /// Get a model response
/// Retrieves a model response with the given ID. ///
/// @@ -44,7 +43,7 @@ partial void ProcessGetResponseResponseContent( /// public async global::System.Threading.Tasks.Task GetResponseAsync( string responseId, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, bool? stream = default, int? startingAfter = default, bool? includeObfuscation = default, @@ -63,10 +62,10 @@ partial void ProcessGetResponseResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/responses/{responseId}", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("stream", stream?.ToString()) - .AddOptionalParameter("starting_after", startingAfter?.ToString()) + __pathBuilder + .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("stream", stream?.ToString()) + .AddOptionalParameter("starting_after", startingAfter?.ToString()) .AddOptionalParameter("include_obfuscation", includeObfuscation?.ToString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.ListInputItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.ListInputItems.g.cs index 1a229759..2817afe2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.ListInputItems.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ResponsesClient.ListInputItems.g.cs @@ -11,7 +11,7 @@ partial void PrepareListInputItemsArguments( ref int? limit, ref global::tryAGI.OpenAI.ListInputItemsOrder? order, ref string? after, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void PrepareListInputItemsRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, @@ -19,7 +19,7 @@ partial void PrepareListInputItemsRequest( int? limit, global::tryAGI.OpenAI.ListInputItemsOrder? order, string? after, - global::System.Collections.Generic.IList? include); + global::System.Collections.Generic.IList? include); partial void ProcessListInputItemsResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -30,7 +30,6 @@ partial void ProcessListInputItemsResponseContent( ref string content); /// - /// List input items
/// Returns a list of input items for a given response. ///
/// @@ -47,7 +46,7 @@ partial void ProcessListInputItemsResponseContent( int? limit = default, global::tryAGI.OpenAI.ListInputItemsOrder? order = default, string? after = default, - global::System.Collections.Generic.IList? include = default, + global::System.Collections.Generic.IList? include = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -63,10 +62,10 @@ partial void ProcessListInputItemsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/responses/{responseId}/input_items", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("include", include, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateProjectRole.g.cs new file mode 100644 index 00000000..0a462cc4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateProjectRole.g.cs @@ -0,0 +1,210 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareCreateProjectRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request); + partial void PrepareCreateProjectRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request); + partial void ProcessCreateProjectRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateProjectRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a custom role for a project. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateProjectRoleAsync( + string projectId, + + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateProjectRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateProjectRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateProjectRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateProjectRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.Role.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.Role.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Creates a custom role for a project. + /// + /// + /// + /// Unique name for the role. + /// + /// + /// Permissions to grant to the role. + /// + /// + /// Optional description of the role. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateProjectRoleAsync( + string projectId, + string roleName, + global::System.Collections.Generic.IList permissions, + string? description = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody + { + RoleName = roleName, + Permissions = permissions, + Description = description, + }; + + return await CreateProjectRoleAsync( + projectId: projectId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateRole.g.cs new file mode 100644 index 00000000..5a2fc8c4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.CreateRole.g.cs @@ -0,0 +1,201 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareCreateRoleArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request); + partial void PrepareCreateRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request); + partial void ProcessCreateRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a custom role for the organization. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateRoleAsync( + + global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateRoleArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/organization/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.Role.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.Role.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Creates a custom role for the organization. + /// + /// + /// Unique name for the role. + /// + /// + /// Permissions to grant to the role. + /// + /// + /// Optional description of the role. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateRoleAsync( + string roleName, + global::System.Collections.Generic.IList permissions, + string? description = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicCreateOrganizationRoleBody + { + RoleName = roleName, + Permissions = permissions, + Description = description, + }; + + return await CreateRoleAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteProjectRole.g.cs new file mode 100644 index 00000000..d6f1b60e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteProjectRole.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareDeleteProjectRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string roleId); + partial void PrepareDeleteProjectRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string roleId); + partial void ProcessDeleteProjectRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteProjectRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a custom role from a project. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteProjectRoleAsync( + string projectId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteProjectRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteProjectRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteProjectRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteProjectRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteRole.g.cs new file mode 100644 index 00000000..c609d110 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.DeleteRole.g.cs @@ -0,0 +1,160 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareDeleteRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string roleId); + partial void PrepareDeleteRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string roleId); + partial void ProcessDeleteRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a custom role from the organization. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteRoleAsync( + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteRoleArguments( + httpClient: HttpClient, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleDeletedResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListProjectRoles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListProjectRoles.g.cs new file mode 100644 index 00000000..db38eaba --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListProjectRoles.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareListProjectRolesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListProjectRolesOrder? order); + partial void PrepareListProjectRolesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListProjectRolesOrder? order); + partial void ProcessListProjectRolesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListProjectRolesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the roles configured for a project. + /// + /// + /// + /// Default Value: 1000 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListProjectRolesAsync( + string projectId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListProjectRolesOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListProjectRolesArguments( + httpClient: HttpClient, + projectId: ref projectId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListProjectRolesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListProjectRolesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListProjectRolesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.PublicRoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.PublicRoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListRoles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListRoles.g.cs new file mode 100644 index 00000000..f6517bc7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.ListRoles.g.cs @@ -0,0 +1,181 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareListRolesArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListRolesOrder? order); + partial void PrepareListRolesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + string? after, + global::tryAGI.OpenAI.ListRolesOrder? order); + partial void ProcessListRolesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListRolesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the roles configured for the organization. + /// + /// + /// Default Value: 1000 + /// + /// + /// + /// Default Value: asc + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListRolesAsync( + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListRolesOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListRolesArguments( + httpClient: HttpClient, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/organization/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListRolesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListRolesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListRolesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.PublicRoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.PublicRoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateProjectRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateProjectRole.g.cs new file mode 100644 index 00000000..72612874 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateProjectRole.g.cs @@ -0,0 +1,219 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareUpdateProjectRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string roleId, + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request); + partial void PrepareUpdateProjectRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string roleId, + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request); + partial void ProcessUpdateProjectRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateProjectRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates an existing project role. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateProjectRoleAsync( + string projectId, + string roleId, + + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateProjectRoleArguments( + httpClient: HttpClient, + projectId: ref projectId, + roleId: ref roleId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/projects/{projectId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateProjectRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId, + roleId: roleId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateProjectRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateProjectRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.Role.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.Role.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Updates an existing project role. + /// + /// + /// + /// + /// Updated set of permissions for the role. + /// + /// + /// New description for the role. + /// + /// + /// New name for the role. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateProjectRoleAsync( + string projectId, + string roleId, + global::System.Collections.Generic.IList? permissions = default, + string? description = default, + string? roleName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody + { + Permissions = permissions, + Description = description, + RoleName = roleName, + }; + + return await UpdateProjectRoleAsync( + projectId: projectId, + roleId: roleId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateRole.g.cs new file mode 100644 index 00000000..26e67822 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.UpdateRole.g.cs @@ -0,0 +1,210 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class RolesClient + { + partial void PrepareUpdateRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string roleId, + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request); + partial void PrepareUpdateRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string roleId, + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request); + partial void ProcessUpdateRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates an existing organization role. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateRoleAsync( + string roleId, + + global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateRoleArguments( + httpClient: HttpClient, + roleId: ref roleId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + roleId: roleId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.Role.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.Role.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Updates an existing organization role. + /// + /// + /// + /// Updated set of permissions for the role. + /// + /// + /// New description for the role. + /// + /// + /// New name for the role. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateRoleAsync( + string roleId, + global::System.Collections.Generic.IList? permissions = default, + string? description = default, + string? roleName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicUpdateOrganizationRoleBody + { + Permissions = permissions, + Description = description, + RoleName = roleName, + }; + + return await UpdateRoleAsync( + roleId: roleId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.g.cs new file mode 100644 index 00000000..6e37f72a --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.RolesClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class RolesClient : global::tryAGI.OpenAI.IRolesClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the RolesClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public RolesClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkill.g.cs new file mode 100644 index 00000000..019bca95 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkill.g.cs @@ -0,0 +1,188 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareCreateSkillArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateSkillBody request); + partial void PrepareCreateSkillRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateSkillBody request); + partial void ProcessCreateSkillResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateSkillResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a new skill. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateSkillAsync( + + global::tryAGI.OpenAI.CreateSkillBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateSkillArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/skills", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), + name: "\"files\""); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateSkillRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateSkillResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateSkillResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a new skill. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateSkillAsync( + global::tryAGI.OpenAI.OneOf, byte[]> files, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateSkillBody + { + Files = files, + }; + + return await CreateSkillAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkillVersion.g.cs new file mode 100644 index 00000000..cb5cab57 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.CreateSkillVersion.g.cs @@ -0,0 +1,216 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareCreateSkillVersionArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + global::tryAGI.OpenAI.CreateSkillVersionBody request); + partial void PrepareCreateSkillVersionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + global::tryAGI.OpenAI.CreateSkillVersionBody request); + partial void ProcessCreateSkillVersionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateSkillVersionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a new immutable skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateSkillVersionAsync( + string skillId, + + global::tryAGI.OpenAI.CreateSkillVersionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateSkillVersionArguments( + httpClient: HttpClient, + skillId: ref skillId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/versions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{skillId}"), + name: "\"skill_id\""); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), + name: "\"files\""); + if (request.Default != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Default}"), + name: "\"default\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateSkillVersionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateSkillVersionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateSkillVersionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillVersionResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillVersionResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a new immutable skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// + /// Whether to set this version as the default. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateSkillVersionAsync( + string skillId, + global::tryAGI.OpenAI.OneOf, byte[]> files, + bool? @default = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateSkillVersionBody + { + Files = files, + Default = @default, + }; + + return await CreateSkillVersionAsync( + skillId: skillId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkill.g.cs new file mode 100644 index 00000000..80f83c64 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkill.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareDeleteSkillArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId); + partial void PrepareDeleteSkillRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId); + partial void ProcessDeleteSkillResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteSkillResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a skill by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteSkillAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteSkillArguments( + httpClient: HttpClient, + skillId: ref skillId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteSkillRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteSkillResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteSkillResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedSkillResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedSkillResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkillVersion.g.cs new file mode 100644 index 00000000..3c33e326 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.DeleteSkillVersion.g.cs @@ -0,0 +1,170 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareDeleteSkillVersionArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + ref string version); + partial void PrepareDeleteSkillVersionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + string version); + partial void ProcessDeleteSkillVersionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteSkillVersionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteSkillVersionAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteSkillVersionArguments( + httpClient: HttpClient, + skillId: ref skillId, + version: ref version); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/versions/{version}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteSkillVersionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + version: version); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteSkillVersionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteSkillVersionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedSkillVersionResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedSkillVersionResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkill.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkill.g.cs new file mode 100644 index 00000000..687b93e7 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkill.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareGetSkillArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId); + partial void PrepareGetSkillRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId); + partial void ProcessGetSkillResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSkillResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a skill by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSkillAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSkillArguments( + httpClient: HttpClient, + skillId: ref skillId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSkillRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetSkillResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSkillResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillContent.g.cs new file mode 100644 index 00000000..55851dbc --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillContent.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareGetSkillContentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId); + partial void PrepareGetSkillContentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId); + partial void ProcessGetSkillContentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSkillContentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Download a skill zip bundle by its ID. + /// + /// + /// Example: skill_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSkillContentAsync( + string skillId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSkillContentArguments( + httpClient: HttpClient, + skillId: ref skillId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/content", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSkillContentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetSkillContentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSkillContentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(byte[]), JsonSerializerContext) as byte[] ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(byte[]), JsonSerializerContext).ConfigureAwait(false) as byte[] ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersion.g.cs new file mode 100644 index 00000000..52ef6c16 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersion.g.cs @@ -0,0 +1,170 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareGetSkillVersionArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + ref string version); + partial void PrepareGetSkillVersionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + string version); + partial void ProcessGetSkillVersionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSkillVersionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a specific skill version. + /// + /// + /// Example: skill_123 + /// + /// + /// The version number to retrieve. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSkillVersionAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSkillVersionArguments( + httpClient: HttpClient, + skillId: ref skillId, + version: ref version); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/versions/{version}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSkillVersionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + version: version); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetSkillVersionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSkillVersionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillVersionResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillVersionResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersionContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersionContent.g.cs new file mode 100644 index 00000000..1fe138a1 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.GetSkillVersionContent.g.cs @@ -0,0 +1,170 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareGetSkillVersionContentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + ref string version); + partial void PrepareGetSkillVersionContentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + string version); + partial void ProcessGetSkillVersionContentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSkillVersionContentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Download a skill version zip bundle. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetSkillVersionContentAsync( + string skillId, + string version, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSkillVersionContentArguments( + httpClient: HttpClient, + skillId: ref skillId, + version: ref version); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/versions/{version}/content", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSkillVersionContentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + version: version); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetSkillVersionContentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSkillVersionContentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(byte[]), JsonSerializerContext) as byte[] ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(byte[]), JsonSerializerContext).ConfigureAwait(false) as byte[] ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkillVersions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkillVersions.g.cs new file mode 100644 index 00000000..3ecc3d7e --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkillVersions.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareListSkillVersionsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + ref int? limit, + ref global::tryAGI.OpenAI.OrderEnum? order, + ref string? after); + partial void PrepareListSkillVersionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + int? limit, + global::tryAGI.OpenAI.OrderEnum? order, + string? after); + partial void ProcessListSkillVersionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListSkillVersionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List skill versions for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// + /// + /// Example: skillver_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListSkillVersionsAsync( + string skillId, + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListSkillVersionsArguments( + httpClient: HttpClient, + skillId: ref skillId, + limit: ref limit, + order: ref order, + after: ref after); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}/versions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListSkillVersionsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + limit: limit, + order: order, + after: after); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListSkillVersionsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListSkillVersionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillVersionListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillVersionListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkills.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkills.g.cs new file mode 100644 index 00000000..68346656 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.ListSkills.g.cs @@ -0,0 +1,179 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareListSkillsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref global::tryAGI.OpenAI.OrderEnum? order, + ref string? after); + partial void PrepareListSkillsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + global::tryAGI.OpenAI.OrderEnum? order, + string? after); + partial void ProcessListSkillsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListSkillsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List all skills for the current project. + /// + /// + /// + /// + /// Identifier for the last item from the previous pagination request + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListSkillsAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListSkillsArguments( + httpClient: HttpClient, + limit: ref limit, + order: ref order, + after: ref after); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/skills", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListSkillsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + order: order, + after: after); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListSkillsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListSkillsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.UpdateSkillDefaultVersion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.UpdateSkillDefaultVersion.g.cs new file mode 100644 index 00000000..60473885 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.UpdateSkillDefaultVersion.g.cs @@ -0,0 +1,204 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class SkillsClient + { + partial void PrepareUpdateSkillDefaultVersionArguments( + global::System.Net.Http.HttpClient httpClient, + ref string skillId, + global::tryAGI.OpenAI.SetDefaultSkillVersionBody request); + partial void PrepareUpdateSkillDefaultVersionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string skillId, + global::tryAGI.OpenAI.SetDefaultSkillVersionBody request); + partial void ProcessUpdateSkillDefaultVersionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateSkillDefaultVersionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update the default version pointer for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateSkillDefaultVersionAsync( + string skillId, + + global::tryAGI.OpenAI.SetDefaultSkillVersionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateSkillDefaultVersionArguments( + httpClient: HttpClient, + skillId: ref skillId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/skills/{skillId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateSkillDefaultVersionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + skillId: skillId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUpdateSkillDefaultVersionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateSkillDefaultVersionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.SkillResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.SkillResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Update the default version pointer for a skill. + /// + /// + /// Example: skill_123 + /// + /// + /// The skill version number to set as default. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateSkillDefaultVersionAsync( + string skillId, + string defaultVersion, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.SetDefaultSkillVersionBody + { + DefaultVersion = defaultVersion, + }; + + return await UpdateSkillDefaultVersionAsync( + skillId: skillId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.g.cs new file mode 100644 index 00000000..963f64a4 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.SkillsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class SkillsClient : global::tryAGI.OpenAI.ISkillsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the SkillsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SkillsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.AddUploadPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.AddUploadPart.g.cs index 68373669..7b28f0a2 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.AddUploadPart.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.AddUploadPart.g.cs @@ -24,10 +24,9 @@ partial void ProcessAddUploadPartResponseContent( ref string content); /// - /// Add upload part
- /// Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
+ /// Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
/// Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
- /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete). ///
/// /// Example: upload_abc123 @@ -37,6 +36,7 @@ partial void ProcessAddUploadPartResponseContent( /// public async global::System.Threading.Tasks.Task AddUploadPartAsync( string uploadId, + global::tryAGI.OpenAI.AddUploadPartRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -79,11 +79,16 @@ partial void ProcessAddUploadPartResponseContent( using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{uploadId}"), - name: "upload_id"); + name: "\"upload_id\""); + var __contentData = new global::System.Net.Http.ByteArrayContent(request.Data ?? global::System.Array.Empty()); __httpRequestContent.Add( - content: new global::System.Net.Http.ByteArrayContent(request.Data ?? global::System.Array.Empty()), - name: "data", - fileName: request.Dataname ?? string.Empty); + content: __contentData, + name: "\"data\"", + fileName: request.Dataname != null ? $"\"{request.Dataname}\"" : string.Empty); + if (__contentData.Headers.ContentDisposition != null) + { + __contentData.Headers.ContentDisposition.FileNameStar = null; + } __httpRequest.Content = __httpRequestContent; PrepareRequest( @@ -180,10 +185,9 @@ partial void ProcessAddUploadPartResponseContent( } /// - /// Add upload part
- /// Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
+ /// Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
/// Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
- /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete). + /// It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete). ///
/// /// Example: upload_abc123 diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CancelUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CancelUpload.g.cs index fbfc07ae..97c0121a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CancelUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CancelUpload.g.cs @@ -22,8 +22,8 @@ partial void ProcessCancelUploadResponseContent( ref string content); /// - /// Cancel upload
- /// Cancels the Upload. No Parts may be added after an Upload is cancelled. + /// Cancels the Upload. No Parts may be added after an Upload is cancelled.
+ /// Returns the Upload object with status `cancelled`. ///
/// /// Example: upload_abc123 diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CompleteUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CompleteUpload.g.cs index 16580acd..2a1f72e9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CompleteUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CompleteUpload.g.cs @@ -24,11 +24,11 @@ partial void ProcessCompleteUploadResponseContent( ref string content); /// - /// Complete upload
- /// Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
- /// Within the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
+ /// Completes the [Upload](/docs/api-reference/uploads/object).
+ /// Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
/// You can specify the order of the Parts by passing in an ordered list of the Part IDs.
- /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
+ /// Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. ///
/// /// Example: upload_abc123 @@ -38,6 +38,7 @@ partial void ProcessCompleteUploadResponseContent( /// public async global::System.Threading.Tasks.Task CompleteUploadAsync( string uploadId, + global::tryAGI.OpenAI.CompleteUploadRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -178,21 +179,21 @@ partial void ProcessCompleteUploadResponseContent( } /// - /// Complete upload
- /// Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object).
- /// Within the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
+ /// Completes the [Upload](/docs/api-reference/uploads/object).
+ /// Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform.
/// You can specify the order of the Parts by passing in an ordered list of the Part IDs.
- /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed. + /// The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
+ /// Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object. ///
/// /// Example: upload_abc123 /// - /// - /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. - /// /// /// The ordered list of Part IDs. /// + /// + /// The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CompleteUploadAsync( @@ -203,8 +204,8 @@ partial void ProcessCompleteUploadResponseContent( { var __request = new global::tryAGI.OpenAI.CompleteUploadRequest { - Md5 = md5, PartIds = partIds, + Md5 = md5, }; return await CompleteUploadAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CreateUpload.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CreateUpload.g.cs index de4b11ec..1f41d32f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CreateUpload.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UploadsClient.CreateUpload.g.cs @@ -22,26 +22,27 @@ partial void ProcessCreateUploadResponseContent( ref string content); /// - /// Create upload
- /// Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
- /// that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
+ /// Creates an intermediate [Upload](/docs/api-reference/uploads/object) object
+ /// that you can add [Parts](/docs/api-reference/uploads/part-object) to.
/// Currently, an Upload can accept at most 8 GB in total and expires after an
/// hour after you create it.
/// Once you complete the Upload, we will create a
- /// [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts
+ /// [File](/docs/api-reference/files/object) object that contains all the parts
/// you uploaded. This File is usable in the rest of our platform as a regular
/// File object.
/// For certain `purpose` values, the correct `mime_type` must be specified.
/// Please refer to documentation for the
- /// [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
+ /// [supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files).
/// For guidance on the proper filename extensions for each purpose, please
/// follow the documentation on [creating a
- /// File](https://platform.openai.com/docs/api-reference/files/create). + /// File](/docs/api-reference/files/create).
+ /// Returns the Upload object with status `pending`. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateUploadAsync( + global::tryAGI.OpenAI.CreateUploadRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -180,56 +181,58 @@ partial void ProcessCreateUploadResponseContent( } /// - /// Create upload
- /// Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
- /// that you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
+ /// Creates an intermediate [Upload](/docs/api-reference/uploads/object) object
+ /// that you can add [Parts](/docs/api-reference/uploads/part-object) to.
/// Currently, an Upload can accept at most 8 GB in total and expires after an
/// hour after you create it.
/// Once you complete the Upload, we will create a
- /// [File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts
+ /// [File](/docs/api-reference/files/object) object that contains all the parts
/// you uploaded. This File is usable in the rest of our platform as a regular
/// File object.
/// For certain `purpose` values, the correct `mime_type` must be specified.
/// Please refer to documentation for the
- /// [supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).
+ /// [supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files).
/// For guidance on the proper filename extensions for each purpose, please
/// follow the documentation on [creating a
- /// File](https://platform.openai.com/docs/api-reference/files/create). + /// File](/docs/api-reference/files/create).
+ /// Returns the Upload object with status `pending`. ///
- /// - /// The number of bytes in the file you are uploading. - /// - /// - /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. - /// /// /// The name of the file to upload. /// + /// + /// The intended purpose of the uploaded file.
+ /// See the [documentation on File
+ /// purposes](/docs/api-reference/files/create#files-create-purpose). + /// + /// + /// The number of bytes in the file you are uploading. + /// /// /// The MIME type of the file.
- /// This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. + /// This must fall within the supported MIME types for your file purpose. See
+ /// the supported MIME types for assistants and vision. /// - /// - /// The intended purpose of the uploaded file.
- /// See the [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose). + /// + /// The expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted. /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateUploadAsync( - int bytes, string filename, - string mimeType, global::tryAGI.OpenAI.CreateUploadRequestPurpose purpose, + int bytes, + string mimeType, global::tryAGI.OpenAI.FileExpirationAfter? expiresAfter = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateUploadRequest { - Bytes = bytes, - ExpiresAfter = expiresAfter, Filename = filename, - MimeType = mimeType, Purpose = purpose, + Bytes = bytes, + MimeType = mimeType, + ExpiresAfter = expiresAfter, }; return await CreateUploadAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioSpeeches.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioSpeeches.g.cs index c13e4321..b62129af 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioSpeeches.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioSpeeches.g.cs @@ -40,7 +40,6 @@ partial void ProcessUsageAudioSpeechesResponseContent( ref string content); /// - /// Audio speeches
/// Get audio speeches usage details for the organization. ///
/// @@ -88,16 +87,16 @@ partial void ProcessUsageAudioSpeechesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/audio_speeches", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioTranscriptions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioTranscriptions.g.cs index 34f50997..8a7d3be7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioTranscriptions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageAudioTranscriptions.g.cs @@ -40,7 +40,6 @@ partial void ProcessUsageAudioTranscriptionsResponseContent( ref string content); /// - /// Audio transcriptions
/// Get audio transcriptions usage details for the organization. ///
/// @@ -88,16 +87,16 @@ partial void ProcessUsageAudioTranscriptionsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/audio_transcriptions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs index 2db65ffe..2dca542d 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs @@ -34,7 +34,6 @@ partial void ProcessUsageCodeInterpreterSessionsResponseContent( ref string content); /// - /// Code interpreter sessions
/// Get code interpreter sessions usage details for the organization. ///
/// @@ -73,13 +72,13 @@ partial void ProcessUsageCodeInterpreterSessionsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/code_interpreter_sessions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCompletions.g.cs index 962ad882..05a31147 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCompletions.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCompletions.g.cs @@ -42,7 +42,6 @@ partial void ProcessUsageCompletionsResponseContent( ref string content); /// - /// Completions
/// Get completions usage details for the organization. ///
/// @@ -93,17 +92,17 @@ partial void ProcessUsageCompletionsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/completions", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("batch", batch?.ToString()) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("batch", batch?.ToString()) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCosts.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCosts.g.cs index 7bde06ab..0339adcc 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCosts.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageCosts.g.cs @@ -34,7 +34,6 @@ partial void ProcessUsageCostsResponseContent( ref string content); /// - /// Costs
/// Get costs details for the organization. ///
/// @@ -75,13 +74,13 @@ partial void ProcessUsageCostsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/costs", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageEmbeddings.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageEmbeddings.g.cs index d3ea6314..5b72a959 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageEmbeddings.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageEmbeddings.g.cs @@ -40,7 +40,6 @@ partial void ProcessUsageEmbeddingsResponseContent( ref string content); /// - /// Embeddings
/// Get embeddings usage details for the organization. ///
/// @@ -88,16 +87,16 @@ partial void ProcessUsageEmbeddingsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/embeddings", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageImages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageImages.g.cs index 57c50b55..c6703621 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageImages.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageImages.g.cs @@ -44,7 +44,6 @@ partial void ProcessUsageImagesResponseContent( ref string content); /// - /// Images
/// Get images usage details for the organization. ///
/// @@ -98,18 +97,18 @@ partial void ProcessUsageImagesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/images", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("sources", sources, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("sizes", sizes, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("sources", sources, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("sizes", sizes, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageModerations.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageModerations.g.cs index 25f3c696..ae586320 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageModerations.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageModerations.g.cs @@ -40,7 +40,6 @@ partial void ProcessUsageModerationsResponseContent( ref string content); /// - /// Moderations
/// Get moderations usage details for the organization. ///
/// @@ -88,16 +87,16 @@ partial void ProcessUsageModerationsResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/moderations", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) - .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) - .AddOptionalParameter("models", models, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageVectorStores.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageVectorStores.g.cs index 1c798fd3..70e4bdcf 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageVectorStores.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsageClient.UsageVectorStores.g.cs @@ -34,7 +34,6 @@ partial void ProcessUsageVectorStoresResponseContent( ref string content); /// - /// Vector stores
/// Get vector stores usage details for the organization. ///
/// @@ -73,13 +72,13 @@ partial void ProcessUsageVectorStoresResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/usage/vector_stores", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddRequiredParameter("start_time", startTime.ToString()) - .AddOptionalParameter("end_time", endTime?.ToString()) - .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) - .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) - .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) - .AddOptionalParameter("limit", limit?.ToString()) + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("group_by", groupBy, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page", page) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs new file mode 100644 index 00000000..43e8fb7b --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.AssignUserRole.g.cs @@ -0,0 +1,200 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class UserOrganizationRoleAssignmentsClient + { + partial void PrepareAssignUserRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void PrepareAssignUserRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId, + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request); + partial void ProcessAssignUserRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAssignUserRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Assigns an organization role to a user within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignUserRoleAsync( + string userId, + + global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAssignUserRoleArguments( + httpClient: HttpClient, + userId: ref userId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/users/{userId}/roles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAssignUserRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + userId: userId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAssignUserRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAssignUserRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.UserRoleAssignment.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.UserRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Assigns an organization role to a user within the organization. + /// + /// + /// + /// Identifier of the role to assign. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AssignUserRoleAsync( + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.PublicAssignOrganizationGroupRoleBody + { + RoleId = roleId, + }; + + return await AssignUserRoleAsync( + userId: userId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs new file mode 100644 index 00000000..1e951de6 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.ListUserRoleAssignments.g.cs @@ -0,0 +1,183 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class UserOrganizationRoleAssignmentsClient + { + partial void PrepareListUserRoleAssignmentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId, + ref int? limit, + ref string? after, + ref global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? order); + partial void PrepareListUserRoleAssignmentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId, + int? limit, + string? after, + global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? order); + partial void ProcessListUserRoleAssignmentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListUserRoleAssignmentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists the organization roles assigned to a user within the organization. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListUserRoleAssignmentsAsync( + string userId, + int? limit = default, + string? after = default, + global::tryAGI.OpenAI.ListUserRoleAssignmentsOrder? order = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListUserRoleAssignmentsArguments( + httpClient: HttpClient, + userId: ref userId, + limit: ref limit, + after: ref after, + order: ref order); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/users/{userId}/roles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("order", order?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListUserRoleAssignmentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + userId: userId, + limit: limit, + after: after, + order: order); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListUserRoleAssignmentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListUserRoleAssignmentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs new file mode 100644 index 00000000..a4298a16 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.UnassignUserRole.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class UserOrganizationRoleAssignmentsClient + { + partial void PrepareUnassignUserRoleArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId, + ref string roleId); + partial void PrepareUnassignUserRoleRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId, + string roleId); + partial void ProcessUnassignUserRoleResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUnassignUserRoleResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Unassigns an organization role from a user within the organization. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnassignUserRoleAsync( + string userId, + string roleId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUnassignUserRoleArguments( + httpClient: HttpClient, + userId: ref userId, + roleId: ref roleId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/organization/users/{userId}/roles/{roleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUnassignUserRoleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + userId: userId, + roleId: roleId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUnassignUserRoleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUnassignUserRoleResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.g.cs new file mode 100644 index 00000000..57caad4c --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UserOrganizationRoleAssignmentsClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class UserOrganizationRoleAssignmentsClient : global::tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the UserOrganizationRoleAssignmentsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public UserOrganizationRoleAssignmentsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.DeleteUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.DeleteUser.g.cs index e91da150..58c4126f 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.DeleteUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.DeleteUser.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteUserResponseContent( ref string content); /// - /// Delete user
/// Deletes a user from the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ListUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ListUsers.g.cs index 9839e8be..45fa00f9 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ListUsers.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ListUsers.g.cs @@ -26,7 +26,6 @@ partial void ProcessListUsersResponseContent( ref string content); /// - /// List users
/// Lists all of the users in the organization. ///
/// @@ -53,9 +52,9 @@ partial void ProcessListUsersResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/organization/users", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("emails", emails, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ModifyUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ModifyUser.g.cs index 186d39a5..5218485b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ModifyUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.ModifyUser.g.cs @@ -24,7 +24,6 @@ partial void ProcessModifyUserResponseContent( ref string content); /// - /// Modify user
/// Modifies a user's role in the organization. ///
/// @@ -33,6 +32,7 @@ partial void ProcessModifyUserResponseContent( /// public async global::System.Threading.Tasks.Task ModifyUserAsync( string userId, + global::tryAGI.OpenAI.UserRoleUpdateRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -173,7 +173,6 @@ partial void ProcessModifyUserResponseContent( } /// - /// Modify user
/// Modifies a user's role in the organization. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.RetrieveUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.RetrieveUser.g.cs index 2edb3753..62044ec7 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.RetrieveUser.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.UsersClient.RetrieveUser.g.cs @@ -22,7 +22,6 @@ partial void ProcessRetrieveUserResponseContent( ref string content); /// - /// Retrieve user
/// Retrieves a user by their identifier. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs index e1838696..719214b8 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs @@ -24,7 +24,6 @@ partial void ProcessCancelVectorStoreFileBatchResponseContent( ref string content); /// - /// Cancel vector store file batch
/// Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStore.g.cs index 59c1b7e2..9257dd86 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStore.g.cs @@ -22,13 +22,13 @@ partial void ProcessCreateVectorStoreResponseContent( ref string content); /// - /// Create vector store
/// Create a vector store. ///
/// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateVectorStoreAsync( + global::tryAGI.OpenAI.CreateVectorStoreRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,45 +167,43 @@ partial void ProcessCreateVectorStoreResponseContent( } /// - /// Create vector store
/// Create a vector store. ///
- /// - /// 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. - /// - /// - /// The expiration policy for a vector store. - /// /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. /// /// /// The name of the vector store. /// + /// + /// A description for the vector store. Can be used to describe the vector store's purpose. + /// + /// + /// The expiration policy for a vector store. + /// + /// + /// 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. + /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateVectorStoreAsync( - global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, global::System.Collections.Generic.IList? fileIds = default, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + string? description = default, + global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, + global::tryAGI.OpenAI.OneOf? chunkingStrategy = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateVectorStoreRequest { - ChunkingStrategy = chunkingStrategy, - ExpiresAfter = expiresAfter, FileIds = fileIds, - Metadata = metadata, Name = name, + Description = description, + ExpiresAfter = expiresAfter, + ChunkingStrategy = chunkingStrategy, + Metadata = metadata, }; return await CreateVectorStoreAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs index 9a60b66c..2a4cbfe4 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs @@ -24,8 +24,7 @@ partial void ProcessCreateVectorStoreFileResponseContent( ref string content); /// - /// Create vector store file
- /// Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + /// Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). ///
/// /// Example: vs_abc123 @@ -35,6 +34,7 @@ partial void ProcessCreateVectorStoreFileResponseContent( /// public async global::System.Threading.Tasks.Task CreateVectorStoreFileAsync( string vectorStoreId, + global::tryAGI.OpenAI.CreateVectorStoreFileRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -175,39 +175,32 @@ partial void ProcessCreateVectorStoreFileResponseContent( } /// - /// Create vector store file
- /// Create a vector store file by attaching a [File](https://platform.openai.com/docs/api-reference/files) to a [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object). + /// Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). ///
/// /// Example: vs_abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A [File](/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. /// /// - /// 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. - /// - /// - /// A [File](https://platform.openai.com/docs/api-reference/files) ID that the vector store should use. Useful for tools like `file_search` that can access files. + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateVectorStoreFileAsync( string vectorStoreId, string fileId, - object? attributes = default, global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, + object? attributes = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateVectorStoreFileRequest { - Attributes = attributes, - ChunkingStrategy = chunkingStrategy, FileId = fileId, + ChunkingStrategy = chunkingStrategy, + Attributes = attributes, }; return await CreateVectorStoreFileAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs index 73e2454c..3e18f567 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs @@ -24,8 +24,8 @@ partial void ProcessCreateVectorStoreFileBatchResponseContent( ref string content); /// - /// Create vector store file batch
- /// Create a vector store file batch. + /// Create a vector store file batch.
+ /// The maximum number of files in a single batch request is 2000. ///
/// /// Example: vs_abc123 @@ -35,6 +35,7 @@ partial void ProcessCreateVectorStoreFileBatchResponseContent( /// public async global::System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync( string vectorStoreId, + global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -175,39 +176,38 @@ partial void ProcessCreateVectorStoreFileBatchResponseContent( } /// - /// Create vector store file batch
- /// Create a vector store file batch. + /// Create a vector store file batch.
+ /// The maximum number of files in a single batch request is 2000. ///
/// /// Example: vs_abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. + /// + /// A list of [File](/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. If `attributes` or `chunking_strategy` are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. /// - /// - /// 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. + /// + /// A list of objects that each include a `file_id` plus optional `attributes` or `chunking_strategy`. Use this when you need to override metadata for specific files. The global `attributes` or `chunking_strategy` will be ignored and must be specified for each file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. /// - /// - /// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector store should use. Useful for tools like `file_search` that can access files. + /// + /// The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync( string vectorStoreId, - global::System.Collections.Generic.IList fileIds, - object? attributes = default, + global::System.Collections.Generic.IList? fileIds = default, + global::System.Collections.Generic.IList? files = default, global::tryAGI.OpenAI.ChunkingStrategyRequestParam? chunkingStrategy = default, + object? attributes = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.CreateVectorStoreFileBatchRequest { - Attributes = attributes, - ChunkingStrategy = chunkingStrategy, FileIds = fileIds, + Files = files, + ChunkingStrategy = chunkingStrategy, + Attributes = attributes, }; return await CreateVectorStoreFileBatchAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStore.g.cs index fd67f32c..a3223c50 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStore.g.cs @@ -22,7 +22,6 @@ partial void ProcessDeleteVectorStoreResponseContent( ref string content); /// - /// Delete vector store
/// Delete a vector store. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs index fd4891fb..40b883dd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs @@ -24,8 +24,7 @@ partial void ProcessDeleteVectorStoreFileResponseContent( ref string content); /// - /// Delete vector store file
- /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](https://platform.openai.com/docs/api-reference/files/delete) endpoint. + /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint. ///
/// /// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStore.g.cs index 65205a8f..3ec84d04 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStore.g.cs @@ -22,7 +22,6 @@ partial void ProcessGetVectorStoreResponseContent( ref string content); /// - /// Retrieve vector store
/// Retrieves a vector store. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs index 82b2a029..5bac7967 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs @@ -24,7 +24,6 @@ partial void ProcessGetVectorStoreFileResponseContent( ref string content); /// - /// Retrieve vector store file
/// Retrieves a vector store file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs index d906c938..3a13d81a 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs @@ -24,7 +24,6 @@ partial void ProcessGetVectorStoreFileBatchResponseContent( ref string content); /// - /// Retrieve vector store file batch
/// Retrieves a vector store file batch. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs index 1a6fe1cc..757ed2ee 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs @@ -34,7 +34,6 @@ partial void ProcessListFilesInVectorStoreBatchResponseContent( ref string content); /// - /// List vector store files in a batch
/// Returns a list of vector store files in a batch. ///
/// @@ -75,11 +74,11 @@ partial void ProcessListFilesInVectorStoreBatchResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/vector_stores/{vectorStoreId}/file_batches/{batchId}/files", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("before", before) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) .AddOptionalParameter("filter", filter?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs index 58978565..be12d3dd 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs @@ -32,7 +32,6 @@ partial void ProcessListVectorStoreFilesResponseContent( ref string content); /// - /// List vector store files
/// Returns a list of vector store files. ///
/// @@ -70,11 +69,11 @@ partial void ProcessListVectorStoreFilesResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: $"/vector_stores/{vectorStoreId}/files", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) - .AddOptionalParameter("before", before) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) .AddOptionalParameter("filter", filter?.ToValueString()) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStores.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStores.g.cs index 29f038d7..5f23063b 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStores.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ListVectorStores.g.cs @@ -28,7 +28,6 @@ partial void ProcessListVectorStoresResponseContent( ref string content); /// - /// List vector stores
/// Returns a list of vector stores. ///
/// @@ -60,10 +59,10 @@ partial void ProcessListVectorStoresResponseContent( var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( path: "/vector_stores", baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("order", order?.ToValueString()) - .AddOptionalParameter("after", after) + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) .AddOptionalParameter("before", before) ; var __path = __pathBuilder.ToString(); diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ModifyVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ModifyVectorStore.g.cs index 2c0b9668..4098ec07 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ModifyVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.ModifyVectorStore.g.cs @@ -24,7 +24,6 @@ partial void ProcessModifyVectorStoreResponseContent( ref string content); /// - /// Modify vector store
/// Modifies a vector store. ///
/// @@ -33,6 +32,7 @@ partial void ProcessModifyVectorStoreResponseContent( /// public async global::System.Threading.Tasks.Task ModifyVectorStoreAsync( string vectorStoreId, + global::tryAGI.OpenAI.UpdateVectorStoreRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -173,37 +173,28 @@ partial void ProcessModifyVectorStoreResponseContent( } /// - /// Modify vector store
/// Modifies a vector store. ///
/// - /// - /// The expiration policy for a vector store. - /// - /// - /// 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, and querying for objects via API or the dashboard.
- /// Keys are strings with a maximum length of 64 characters. Values are strings
- /// with a maximum length of 512 characters. - /// /// /// The name of the vector store. /// + /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task ModifyVectorStoreAsync( string vectorStoreId, - global::tryAGI.OpenAI.VectorStoreExpirationAfter? expiresAfter = default, - global::System.Collections.Generic.Dictionary? metadata = default, string? name = default, + global::tryAGI.OpenAI.AllOf? expiresAfter = default, + global::System.Collections.Generic.Dictionary? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.UpdateVectorStoreRequest { + Name = name, ExpiresAfter = expiresAfter, Metadata = metadata, - Name = name, }; return await ModifyVectorStoreAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.RetrieveVectorStoreFileContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.RetrieveVectorStoreFileContent.g.cs index 917c99eb..06c4c039 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.RetrieveVectorStoreFileContent.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.RetrieveVectorStoreFileContent.g.cs @@ -24,7 +24,6 @@ partial void ProcessRetrieveVectorStoreFileContentResponseContent( ref string content); /// - /// Retrieve vector store file content
/// Retrieve the parsed contents of a vector store file. ///
/// diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.SearchVectorStore.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.SearchVectorStore.g.cs index c8f68801..c43c0fb3 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.SearchVectorStore.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.SearchVectorStore.g.cs @@ -24,7 +24,6 @@ partial void ProcessSearchVectorStoreResponseContent( ref string content); /// - /// Search vector store
/// Search a vector store for relevant chunks based on a query and file attributes filter. ///
/// @@ -35,6 +34,7 @@ partial void ProcessSearchVectorStoreResponseContent( /// public async global::System.Threading.Tasks.Task SearchVectorStoreAsync( string vectorStoreId, + global::tryAGI.OpenAI.VectorStoreSearchRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -175,47 +175,46 @@ partial void ProcessSearchVectorStoreResponseContent( } /// - /// Search vector store
/// Search a vector store for relevant chunks based on a query and file attributes filter. ///
/// /// Example: vs_abc123 /// - /// - /// A filter to apply based on file attributes. + /// + /// A query string for a search + /// + /// + /// Whether to rewrite the natural language query for vector search.
+ /// Default Value: false /// /// /// The maximum number of results to return. This number should be between 1 and 50 inclusive.
/// Default Value: 10 /// - /// - /// A query string for a search + /// + /// A filter to apply based on file attributes. /// /// /// Ranking options for search. /// - /// - /// Whether to rewrite the natural language query for vector search.
- /// Default Value: false - /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task SearchVectorStoreAsync( string vectorStoreId, - global::tryAGI.OpenAI.AnyOf> query, - global::tryAGI.OpenAI.AnyOf? filters = default, + global::tryAGI.OpenAI.OneOf> query, + bool? rewriteQuery = default, int? maxNumResults = default, + global::tryAGI.OpenAI.OneOf? filters = default, global::tryAGI.OpenAI.VectorStoreSearchRequestRankingOptions? rankingOptions = default, - bool? rewriteQuery = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::tryAGI.OpenAI.VectorStoreSearchRequest { - Filters = filters, - MaxNumResults = maxNumResults, Query = query, - RankingOptions = rankingOptions, RewriteQuery = rewriteQuery, + MaxNumResults = maxNumResults, + Filters = filters, + RankingOptions = rankingOptions, }; return await SearchVectorStoreAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.UpdateVectorStoreFileAttributes.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.UpdateVectorStoreFileAttributes.g.cs index 6b4d7929..75207082 100644 --- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.UpdateVectorStoreFileAttributes.g.cs +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VectorStoresClient.UpdateVectorStoreFileAttributes.g.cs @@ -26,7 +26,6 @@ partial void ProcessUpdateVectorStoreFileAttributesResponseContent( ref string content); /// - /// Update vector store file attributes
/// Update attributes on a vector store file. ///
/// @@ -41,6 +40,7 @@ partial void ProcessUpdateVectorStoreFileAttributesResponseContent( public async global::System.Threading.Tasks.Task UpdateVectorStoreFileAttributesAsync( string vectorStoreId, string fileId, + global::tryAGI.OpenAI.UpdateVectorStoreFileAttributesRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -183,7 +183,6 @@ partial void ProcessUpdateVectorStoreFileAttributesResponseContent( } /// - /// Update vector store file attributes
/// Update attributes on a vector store file. ///
/// @@ -192,13 +191,7 @@ partial void ProcessUpdateVectorStoreFileAttributesResponseContent( /// /// Example: file-abc123 /// - /// - /// 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, and querying for objects via API or the dashboard. Keys are strings
- /// with a maximum length of 64 characters. Values are strings with a maximum
- /// length of 512 characters, booleans, or numbers. - /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateVectorStoreFileAttributesAsync( diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideo.g.cs new file mode 100644 index 00000000..5d70be9d --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideo.g.cs @@ -0,0 +1,261 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareCreateVideoArguments( + global::System.Net.Http.HttpClient httpClient, + global::tryAGI.OpenAI.CreateVideoBody request); + partial void PrepareCreateVideoRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::tryAGI.OpenAI.CreateVideoBody request); + partial void ProcessCreateVideoResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVideoResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a new video generation job from a prompt and optional reference assets. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVideoAsync( + + global::tryAGI.OpenAI.CreateVideoBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateVideoArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/videos", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (request.Model != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model?.ToString() ?? string.Empty), + name: "\"model\""); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + if (request.InputReference != default) + { + + var __contentInputReference = new global::System.Net.Http.ByteArrayContent(request.InputReference ?? global::System.Array.Empty()); + __httpRequestContent.Add( + content: __contentInputReference, + name: "\"input_reference\"", + fileName: request.InputReferencename != null ? $"\"{request.InputReferencename}\"" : string.Empty); + if (__contentInputReference.Headers.ContentDisposition != null) + { + __contentInputReference.Headers.ContentDisposition.FileNameStar = null; + } + } + if (request.ImageReference != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ImageReference}"), + name: "\"image_reference\""); + } + if (request.Seconds != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Seconds?.ToValueString()}"), + name: "\"seconds\""); + } + if (request.Size != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Size?.ToValueString()}"), + name: "\"size\""); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateVideoRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateVideoResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateVideoResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VideoResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VideoResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a new video generation job from a prompt and optional reference assets. + /// + /// + /// The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to `sora-2`. + /// + /// + /// Text prompt that describes the video to generate. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional multipart reference asset that guides generation. + /// + /// + /// Optional JSON-safe image reference that guides generation. Provide exactly one of `image_url` or `file_id`. + /// + /// + /// Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds. + /// + /// + /// Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVideoAsync( + string prompt, + global::tryAGI.OpenAI.VideoModel? model = default, + byte[]? inputReference = default, + string? inputReferencename = default, + global::tryAGI.OpenAI.ImageRefParam2? imageReference = default, + global::tryAGI.OpenAI.VideoSeconds? seconds = default, + global::tryAGI.OpenAI.VideoSize? size = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateVideoBody + { + Model = model, + Prompt = prompt, + InputReference = inputReference, + InputReferencename = inputReferencename, + ImageReference = imageReference, + Seconds = seconds, + Size = size, + }; + + return await CreateVideoAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideoRemix.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideoRemix.g.cs new file mode 100644 index 00000000..dff3eff8 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.CreateVideoRemix.g.cs @@ -0,0 +1,206 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareCreateVideoRemixArguments( + global::System.Net.Http.HttpClient httpClient, + ref string videoId, + global::tryAGI.OpenAI.CreateVideoRemixBody request); + partial void PrepareCreateVideoRemixRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string videoId, + global::tryAGI.OpenAI.CreateVideoRemixBody request); + partial void ProcessCreateVideoRemixResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVideoRemixResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a remix of a completed video using a refreshed prompt. + /// + /// + /// Example: video_123 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVideoRemixAsync( + string videoId, + + global::tryAGI.OpenAI.CreateVideoRemixBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateVideoRemixArguments( + httpClient: HttpClient, + videoId: ref videoId, + request: request); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/videos/{videoId}/remix", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{videoId}"), + name: "\"video_id\""); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "\"prompt\""); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateVideoRemixRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + videoId: videoId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateVideoRemixResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateVideoRemixResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VideoResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VideoResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create a remix of a completed video using a refreshed prompt. + /// + /// + /// Example: video_123 + /// + /// + /// Updated text prompt that directs the remix generation. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateVideoRemixAsync( + string videoId, + string prompt, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::tryAGI.OpenAI.CreateVideoRemixBody + { + Prompt = prompt, + }; + + return await CreateVideoRemixAsync( + videoId: videoId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.DeleteVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.DeleteVideo.g.cs new file mode 100644 index 00000000..7e80ca2f --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.DeleteVideo.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareDeleteVideoArguments( + global::System.Net.Http.HttpClient httpClient, + ref string videoId); + partial void PrepareDeleteVideoRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string videoId); + partial void ProcessDeleteVideoResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteVideoResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Permanently delete a completed or failed video and its stored assets. + /// + /// + /// Example: video_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteVideoAsync( + string videoId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteVideoArguments( + httpClient: HttpClient, + videoId: ref videoId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/videos/{videoId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteVideoRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + videoId: videoId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteVideoResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteVideoResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.DeletedVideoResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.DeletedVideoResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.GetVideo.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.GetVideo.g.cs new file mode 100644 index 00000000..0b305188 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.GetVideo.g.cs @@ -0,0 +1,162 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareGetVideoArguments( + global::System.Net.Http.HttpClient httpClient, + ref string videoId); + partial void PrepareGetVideoRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string videoId); + partial void ProcessGetVideoResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVideoResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Fetch the latest metadata for a generated video. + /// + /// + /// Example: video_123 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetVideoAsync( + string videoId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetVideoArguments( + httpClient: HttpClient, + videoId: ref videoId); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/videos/{videoId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetVideoRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + videoId: videoId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetVideoResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetVideoResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VideoResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VideoResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.ListVideos.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.ListVideos.g.cs new file mode 100644 index 00000000..5312bcb5 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.ListVideos.g.cs @@ -0,0 +1,179 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareListVideosArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? limit, + ref global::tryAGI.OpenAI.OrderEnum? order, + ref string? after); + partial void PrepareListVideosRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? limit, + global::tryAGI.OpenAI.OrderEnum? order, + string? after); + partial void ProcessListVideosResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListVideosResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List recently generated videos for the current project. + /// + /// + /// + /// + /// Identifier for the last item from the previous pagination request + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListVideosAsync( + int? limit = default, + global::tryAGI.OpenAI.OrderEnum? order = default, + string? after = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListVideosArguments( + httpClient: HttpClient, + limit: ref limit, + order: ref order, + after: ref after); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: "/videos", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListVideosRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + limit: limit, + order: order, + after: after); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListVideosResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListVideosResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::tryAGI.OpenAI.VideoListResource.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::tryAGI.OpenAI.VideoListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.RetrieveVideoContent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.RetrieveVideoContent.g.cs new file mode 100644 index 00000000..4dd95d67 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.RetrieveVideoContent.g.cs @@ -0,0 +1,172 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + public partial class VideosClient + { + partial void PrepareRetrieveVideoContentArguments( + global::System.Net.Http.HttpClient httpClient, + ref string videoId, + ref global::tryAGI.OpenAI.VideoContentVariant? variant); + partial void PrepareRetrieveVideoContentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string videoId, + global::tryAGI.OpenAI.VideoContentVariant? variant); + partial void ProcessRetrieveVideoContentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRetrieveVideoContentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Download the generated video bytes or a derived preview asset.
+ /// Streams the rendered video content for the specified video job. + ///
+ /// + /// Example: video_123 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RetrieveVideoContentAsync( + string videoId, + global::tryAGI.OpenAI.VideoContentVariant? variant = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareRetrieveVideoContentArguments( + httpClient: HttpClient, + videoId: ref videoId, + variant: ref variant); + + var __pathBuilder = new global::tryAGI.OpenAI.PathBuilder( + path: $"/videos/{videoId}/content", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("variant", variant?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareRetrieveVideoContentRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + videoId: videoId, + variant: variant); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessRetrieveVideoContentResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessRetrieveVideoContentResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(byte[]), JsonSerializerContext) as byte[] ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(byte[]), JsonSerializerContext).ConfigureAwait(false) as byte[] ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::tryAGI.OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.g.cs new file mode 100644 index 00000000..487d6084 --- /dev/null +++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.VideosClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace tryAGI.OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class VideosClient : global::tryAGI.OpenAI.IVideosClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the VideosClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public VideosClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/tryAGI.OpenAI/openapi.yaml b/src/libs/tryAGI.OpenAI/openapi.yaml index 7680906a..3b60e0af 100644 --- a/src/libs/tryAGI.OpenAI/openapi.yaml +++ b/src/libs/tryAGI.OpenAI/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.4 +openapi: '3.2.0' info: title: OpenAI API description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details. @@ -17,8 +17,7 @@ paths: get: tags: - Assistants - summary: List assistants - description: Returns a list of assistants. + summary: Returns a list of assistants. operationId: listAssistants parameters: - name: limit @@ -53,25 +52,24 @@ paths: application/json: schema: $ref: '#/components/schemas/ListAssistantsResponse' + deprecated: true x-oaiMeta: - beta: true + name: List assistants + group: assistants examples: request: curl: "curl \"https://api.openai.com/v1/assistants?order=desc&limit=20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Beta.Assistants.List(context.TODO(), openai.BetaAssistantListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.beta.assistants.list()\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistants = await openai.beta.assistants.list({\n order: \"desc\",\n limit: \"20\",\n });\n\n console.log(myAssistants.data);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const assistant of client.beta.assistants.list()) {\n console.log(assistant.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Beta.Assistants.List(context.TODO(), openai.BetaAssistantListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.AssistantListPage;\nimport com.openai.models.beta.assistants.AssistantListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantListPage page = client.beta().assistants().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const assistant of client.beta.assistants.list()) {\n console.log(assistant.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.beta.assistants.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.beta.assistants.list\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698982736,\n \"name\": \"Coding Tutor\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n },\n {\n \"id\": \"asst_abc456\",\n \"object\": \"assistant\",\n \"created_at\": 1698982718,\n \"name\": \"My Assistant\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n },\n {\n \"id\": \"asst_abc789\",\n \"object\": \"assistant\",\n \"created_at\": 1698982643,\n \"name\": null,\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n }\n ],\n \"first_id\": \"asst_abc123\",\n \"last_id\": \"asst_abc789\",\n \"has_more\": false\n}\n" - group: assistants - name: List assistants - returns: 'A list of [assistant](https://platform.openai.com/docs/api-reference/assistants/object) objects.' post: tags: - Assistants - summary: Create assistant - description: Create an assistant with a model and instructions. + summary: Create an assistant with a model and instructions. operationId: createAssistant requestBody: content: @@ -86,61 +84,36 @@ paths: application/json: schema: $ref: '#/components/schemas/AssistantObject' + deprecated: true x-oaiMeta: - beta: true - example: - request: - curl: "curl \"https://api.openai.com/v1/assistants\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"name\": \"Math Tutor\",\n \"tools\": [{\"type\": \"code_interpreter\"}],\n \"model\": \"gpt-4o\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n assistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n Model: shared.ChatModelGPT5,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantCreateParams params = AssistantCreateParams.builder()\n .model(ChatModel.GPT_5)\n .build();\n Assistant assistant = client.beta().assistants().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\nconsole.log(assistant.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nassistant = client.beta.assistants.create(\n model=\"gpt-4o\",\n)\nprint(assistant.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.create(model: :\"gpt-5\")\n\nputs(assistant)" - response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" - title: Code Interpreter - group: assistants name: Create assistant - returns: 'An [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object.' - '/assistants/{assistant_id}': - delete: - tags: - - Assistants - summary: Delete assistant - description: Delete an assistant. - operationId: deleteAssistant - parameters: - - name: assistant_id - in: path - description: The ID of the assistant to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteAssistantResponse' - x-oaiMeta: - beta: true - examples: - request: - curl: "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X DELETE\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n assistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), \"assistant_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", assistantDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.AssistantDeleteParams;\nimport com.openai.models.beta.assistants.AssistantDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantDeleted assistantDeleted = client.beta().assistants().delete(\"assistant_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst assistantDeleted = await client.beta.assistants.delete('assistant_id');\n\nconsole.log(assistantDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nassistant_deleted = client.beta.assistants.delete(\n \"assistant_id\",\n)\nprint(assistant_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant_deleted = openai.beta.assistants.delete(\"assistant_id\")\n\nputs(assistant_deleted)" - response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant.deleted\",\n \"deleted\": true\n}\n" group: assistants - name: Delete assistant - returns: Deletion status + examples: + - title: Code Interpreter + request: + curl: "curl \"https://api.openai.com/v1/assistants\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"name\": \"Math Tutor\",\n \"tools\": [{\"type\": \"code_interpreter\"}],\n \"model\": \"gpt-4o\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.create(\n model=\"gpt-4o\",\n)\nprint(assistant.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n name: \"Math Tutor\",\n tools: [{ type: \"code_interpreter\" }],\n model: \"gpt-4o\",\n });\n\n console.log(myAssistant);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\nconsole.log(assistant.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n\t\tModel: shared.ChatModelGPT4o,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantCreateParams params = AssistantCreateParams.builder()\n .model(ChatModel.GPT_4O)\n .build();\n Assistant assistant = client.beta().assistants().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.create(model: :\"gpt-4o\")\n\nputs(assistant)" + response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + - title: Files + request: + curl: "curl https://api.openai.com/v1/assistants \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [{\"type\": \"file_search\"}],\n \"tool_resources\": {\"file_search\": {\"vector_store_ids\": [\"vs_123\"]}},\n \"model\": \"gpt-4o\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.create(\n model=\"gpt-4o\",\n)\nprint(assistant.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n name: \"HR Helper\",\n tools: [{ type: \"file_search\" }],\n tool_resources: {\n file_search: {\n vector_store_ids: [\"vs_123\"]\n }\n },\n model: \"gpt-4o\"\n });\n\n console.log(myAssistant);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.create({ model: 'gpt-4o' });\n\nconsole.log(assistant.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.New(context.TODO(), openai.BetaAssistantNewParams{\n\t\tModel: shared.ChatModelGPT4o,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantCreateParams params = AssistantCreateParams.builder()\n .model(ChatModel.GPT_4O)\n .build();\n Assistant assistant = client.beta().assistants().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.create(model: :\"gpt-4o\")\n\nputs(assistant)" + response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009403,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"tool_resources\": {\n \"file_search\": {\n \"vector_store_ids\": [\"vs_123\"]\n }\n },\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + '/assistants/{assistant_id}': get: tags: - Assistants - summary: Retrieve assistant - description: Retrieves an assistant. + summary: Retrieves an assistant. operationId: getAssistant parameters: - name: assistant_id @@ -156,25 +129,24 @@ paths: application/json: schema: $ref: '#/components/schemas/AssistantObject' + deprecated: true x-oaiMeta: - beta: true + name: Retrieve assistant + group: assistants examples: request: curl: "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n assistant, err := client.Beta.Assistants.Get(context.TODO(), \"assistant_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.retrieve(\n \"assistant_id\",\n)\nprint(assistant.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.retrieve(\n \"asst_abc123\"\n );\n\n console.log(myAssistant);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.retrieve('assistant_id');\n\nconsole.log(assistant.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.Get(context.TODO(), \"assistant_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Assistant assistant = client.beta().assistants().retrieve(\"assistant_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst assistant = await client.beta.assistants.retrieve('assistant_id');\n\nconsole.log(assistant.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nassistant = client.beta.assistants.retrieve(\n \"assistant_id\",\n)\nprint(assistant.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.retrieve(\"assistant_id\")\n\nputs(assistant)" response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" - group: assistants - name: Retrieve assistant - returns: 'The [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object matching the specified ID.' post: tags: - Assistants - summary: Modify assistant - description: Modifies an assistant. + summary: Modifies an assistant. operationId: modifyAssistant parameters: - name: assistant_id @@ -196,26 +168,58 @@ paths: application/json: schema: $ref: '#/components/schemas/AssistantObject' + deprecated: true x-oaiMeta: - beta: true + name: Modify assistant + group: assistants examples: request: curl: "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [{\"type\": \"file_search\"}],\n \"model\": \"gpt-4o\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n assistant, err := client.Beta.Assistants.Update(\n context.TODO(),\n \"assistant_id\",\n openai.BetaAssistantUpdateParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant = client.beta.assistants.update(\n assistant_id=\"assistant_id\",\n)\nprint(assistant.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myUpdatedAssistant = await openai.beta.assistants.update(\n \"asst_abc123\",\n {\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n name: \"HR Helper\",\n tools: [{ type: \"file_search\" }],\n model: \"gpt-4o\"\n }\n );\n\n console.log(myUpdatedAssistant);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistant = await client.beta.assistants.update('assistant_id');\n\nconsole.log(assistant.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistant, err := client.Beta.Assistants.Update(\n\t\tcontext.TODO(),\n\t\t\"assistant_id\",\n\t\topenai.BetaAssistantUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistant.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.Assistant;\nimport com.openai.models.beta.assistants.AssistantUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Assistant assistant = client.beta().assistants().update(\"assistant_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst assistant = await client.beta.assistants.update('assistant_id');\n\nconsole.log(assistant.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nassistant = client.beta.assistants.update(\n assistant_id=\"assistant_id\",\n)\nprint(assistant.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant = openai.beta.assistants.update(\"assistant_id\")\n\nputs(assistant)" response: "{\n \"id\": \"asst_123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"tool_resources\": {\n \"file_search\": {\n \"vector_store_ids\": []\n }\n },\n \"metadata\": {},\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"response_format\": \"auto\"\n}\n" + delete: + tags: + - Assistants + summary: Delete an assistant. + operationId: deleteAssistant + parameters: + - name: assistant_id + in: path + description: The ID of the assistant to delete. + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAssistantResponse' + deprecated: true + x-oaiMeta: + name: Delete assistant group: assistants - name: Modify assistant - returns: 'The modified [assistant](https://platform.openai.com/docs/api-reference/assistants/object) object.' + examples: + request: + curl: "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X DELETE\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nassistant_deleted = client.beta.assistants.delete(\n \"assistant_id\",\n)\nprint(assistant_deleted.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.beta.assistants.delete(\"asst_abc123\");\n\n console.log(response);\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst assistantDeleted = await client.beta.assistants.delete('assistant_id');\n\nconsole.log(assistantDeleted.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tassistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), \"assistant_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", assistantDeleted.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.assistants.AssistantDeleteParams;\nimport com.openai.models.beta.assistants.AssistantDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n AssistantDeleted assistantDeleted = client.beta().assistants().delete(\"assistant_id\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nassistant_deleted = openai.beta.assistants.delete(\"assistant_id\")\n\nputs(assistant_deleted)" + response: "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant.deleted\",\n \"deleted\": true\n}\n" /audio/speech: post: tags: - Audio - summary: Create speech - description: Generates audio from the input text. + summary: "Generates audio from the input text.\n\nReturns the audio file content, or a stream of audio events.\n" operationId: createSpeech requestBody: content: @@ -240,26 +244,32 @@ paths: schema: $ref: '#/components/schemas/CreateSpeechResponseStreamEvent' x-oaiMeta: - example: - request: - csharp: "using System;\nusing System.IO;\n\nusing OpenAI.Audio;\n\nAudioClient client = new(\n model: \"gpt-4o-mini-tts\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nBinaryData speech = client.GenerateSpeech(\n text: \"The quick brown fox jumped over the lazy dog.\",\n voice: GeneratedSpeechVoice.Alloy\n);\n\nusing FileStream stream = File.OpenWrite(\"speech.mp3\");\nspeech.ToStream().CopyTo(stream);\n" - curl: "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4o-mini-tts\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\"\n }' \\\n --output speech.mp3\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n speech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n Input: \"input\",\n Model: openai.SpeechModelTTS1,\n Voice: openai.AudioSpeechNewParamsVoiceAlloy,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", speech)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.audio.speech.SpeechCreateParams;\nimport com.openai.models.audio.speech.SpeechModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SpeechCreateParams params = SpeechCreateParams.builder()\n .input(\"input\")\n .model(SpeechModel.TTS_1)\n .voice(SpeechCreateParams.Voice.ALLOY)\n .build();\n HttpResponse speech = client.audio().speech().create(params);\n }\n}" - javascript: "import fs from \"fs\";\nimport path from \"path\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speechFile = path.resolve(\"./speech.mp3\");\n\nasync function main() {\n const mp3 = await openai.audio.speech.create({\n model: \"gpt-4o-mini-tts\",\n voice: \"alloy\",\n input: \"Today is a wonderful day to build something people love!\",\n });\n console.log(speechFile);\n const buffer = Buffer.from(await mp3.arrayBuffer());\n await fs.promises.writeFile(speechFile, buffer);\n}\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst speech = await client.audio.speech.create({ input: 'input', model: 'string', voice: 'ash' });\n\nconsole.log(speech);\n\nconst content = await speech.blob();\nconsole.log(content);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nspeech = client.audio.speech.create(\n input=\"input\",\n model=\"string\",\n voice=\"ash\",\n)\nprint(speech)\ncontent = speech.read()\nprint(content)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nspeech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :alloy)\n\nputs(speech)" - title: Default - group: audio name: Create speech - returns: 'The audio file content or a [stream of audio events](https://platform.openai.com/docs/api-reference/audio/speech-audio-delta-event).' + group: audio + examples: + - title: Default + request: + curl: "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4o-mini-tts\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\"\n }' \\\n --output speech.mp3\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nspeech = client.audio.speech.create(\n input=\"input\",\n model=\"string\",\n voice=\"ash\",\n)\nprint(speech)\ncontent = speech.read()\nprint(content)" + javascript: "import fs from \"fs\";\nimport path from \"path\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speechFile = path.resolve(\"./speech.mp3\");\n\nasync function main() {\n const mp3 = await openai.audio.speech.create({\n model: \"gpt-4o-mini-tts\",\n voice: \"alloy\",\n input: \"Today is a wonderful day to build something people love!\",\n });\n console.log(speechFile);\n const buffer = Buffer.from(await mp3.arrayBuffer());\n await fs.promises.writeFile(speechFile, buffer);\n}\nmain();\n" + csharp: "using System;\nusing System.IO;\n\nusing OpenAI.Audio;\n\nAudioClient client = new(\n model: \"gpt-4o-mini-tts\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nBinaryData speech = client.GenerateSpeech(\n text: \"The quick brown fox jumped over the lazy dog.\",\n voice: GeneratedSpeechVoice.Alloy\n);\n\nusing FileStream stream = File.OpenWrite(\"speech.mp3\");\nspeech.ToStream().CopyTo(stream);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst speech = await client.audio.speech.create({\n input: 'input',\n model: 'string',\n voice: 'ash',\n});\n\nconsole.log(speech);\n\nconst content = await speech.blob();\nconsole.log(content);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tspeech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n\t\tInput: \"input\",\n\t\tModel: openai.SpeechModelTTS1,\n\t\tVoice: openai.AudioSpeechNewParamsVoiceAsh,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", speech)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.audio.speech.SpeechCreateParams;\nimport com.openai.models.audio.speech.SpeechModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SpeechCreateParams params = SpeechCreateParams.builder()\n .input(\"input\")\n .model(SpeechModel.TTS_1)\n .voice(SpeechCreateParams.Voice.ASH)\n .build();\n HttpResponse speech = client.audio().speech().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nspeech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :ash)\n\nputs(speech)" + - title: SSE Stream Format + request: + curl: "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-4o-mini-tts\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\",\n \"stream_format\": \"sse\"\n }'\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst speech = await client.audio.speech.create({\n input: 'input',\n model: 'string',\n voice: 'ash',\n});\n\nconsole.log(speech);\n\nconst content = await speech.blob();\nconsole.log(content);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nspeech = client.audio.speech.create(\n input=\"input\",\n model=\"string\",\n voice=\"ash\",\n)\nprint(speech)\ncontent = speech.read()\nprint(content)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tspeech, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n\t\tInput: \"input\",\n\t\tModel: openai.SpeechModelTTS1,\n\t\tVoice: openai.AudioSpeechNewParamsVoiceAsh,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", speech)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.audio.speech.SpeechCreateParams;\nimport com.openai.models.audio.speech.SpeechModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n SpeechCreateParams params = SpeechCreateParams.builder()\n .input(\"input\")\n .model(SpeechModel.TTS_1)\n .voice(SpeechCreateParams.Voice.ASH)\n .build();\n HttpResponse speech = client.audio().speech().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nspeech = openai.audio.speech.create(input: \"input\", model: :\"tts-1\", voice: :ash)\n\nputs(speech)" /audio/transcriptions: post: tags: - Audio - summary: Create transcription - description: Transcribes audio into the input language. + summary: "Transcribes audio into the input language.\n\nReturns a transcription object in `json`, `diarized_json`, or `verbose_json`\nformat, or a stream of transcript events.\n" operationId: createTranscription requestBody: content: @@ -273,34 +283,85 @@ paths: content: application/json: schema: - anyOf: + oneOf: - $ref: '#/components/schemas/CreateTranscriptionResponseJson' + - $ref: '#/components/schemas/CreateTranscriptionResponseDiarizedJson' - $ref: '#/components/schemas/CreateTranscriptionResponseVerboseJson' text/event-stream: schema: $ref: '#/components/schemas/CreateTranscriptionResponseStreamEvent' x-oaiMeta: - example: - request: - csharp: "using System;\n\nusing OpenAI.Audio;\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"gpt-4o-transcribe\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" - curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"gpt-4o-transcribe\"\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n transcription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n Model: openai.AudioModelWhisper1,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", transcription)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"some content\".getBytes()))\n .model(AudioModel.WHISPER_1)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" - javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-transcribe\",\n });\n\n console.log(transcription.text);\n}\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ntranscription = client.audio.transcriptions.create(\n file=b\"raw file contents\",\n model=\"gpt-4o-transcribe\",\n)\nprint(transcription)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: Pathname(__FILE__), model: :\"whisper-1\")\n\nputs(transcription)" - response: "{\n \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n \"usage\": {\n \"type\": \"tokens\",\n \"input_tokens\": 14,\n \"input_token_details\": {\n \"text_tokens\": 0,\n \"audio_tokens\": 14\n },\n \"output_tokens\": 45,\n \"total_tokens\": 59\n }\n}\n" - title: Default - group: audio name: Create transcription - returns: 'The [transcription object](https://platform.openai.com/docs/api-reference/audio/json-object), a [verbose transcription object](https://platform.openai.com/docs/api-reference/audio/verbose-json-object) or a [stream of transcript events](https://platform.openai.com/docs/api-reference/audio/transcript-text-delta-event).' + group: audio + examples: + - title: Default + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"gpt-4o-transcribe\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-transcribe\",\n });\n\n console.log(transcription.text);\n}\nmain();\n" + csharp: "using System;\n\nusing OpenAI.Audio;\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"gpt-4o-transcribe\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "{\n \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\",\n \"usage\": {\n \"type\": \"tokens\",\n \"input_tokens\": 14,\n \"input_token_details\": {\n \"text_tokens\": 0,\n \"audio_tokens\": 14\n },\n \"output_tokens\": 45,\n \"total_tokens\": 59\n }\n}\n" + - title: Diarization + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/meeting.wav\" \\\n -F model=\"gpt-4o-transcribe-diarize\" \\\n -F response_format=\"diarized_json\" \\\n -F chunking_strategy=auto \\\n -F 'known_speaker_names[]=agent' \\\n -F 'known_speaker_references[]=data:audio/wav;base64,AAA...'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speakerRef = fs.readFileSync(\"agent.wav\").toString(\"base64\");\n\nconst transcript = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"meeting.wav\"),\n model: \"gpt-4o-transcribe-diarize\",\n response_format: \"diarized_json\",\n chunking_strategy: \"auto\",\n extra_body: {\n known_speaker_names: [\"agent\"],\n known_speaker_references: [`data:audio/wav;base64,${speakerRef}`],\n },\n});\n\nconsole.log(transcript.segments);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "{\n \"task\": \"transcribe\",\n \"duration\": 27.4,\n \"text\": \"Agent: Thanks for calling OpenAI support.\\nA: Hi, I'm trying to enable diarization.\\nAgent: Happy to walk you through the steps.\",\n \"segments\": [\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_001\",\n \"start\": 0.0,\n \"end\": 4.7,\n \"text\": \"Thanks for calling OpenAI support.\",\n \"speaker\": \"agent\"\n },\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_002\",\n \"start\": 4.7,\n \"end\": 11.8,\n \"text\": \"Hi, I'm trying to enable diarization.\",\n \"speaker\": \"A\"\n },\n {\n \"type\": \"transcript.text.segment\",\n \"id\": \"seg_003\",\n \"start\": 12.1,\n \"end\": 18.5,\n \"text\": \"Happy to walk you through the steps.\",\n \"speaker\": \"agent\"\n }\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 27\n }\n}\n" + - title: Streaming + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"gpt-4o-mini-transcribe\" \\\n -F stream=true\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst stream = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-mini-transcribe\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "data: {\"type\":\"transcript.text.delta\",\"delta\":\"I\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" see\",\"logprobs\":[{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" skies\",\"logprobs\":[{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" blue\",\"logprobs\":[{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" clouds\",\"logprobs\":[{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" of\",\"logprobs\":[{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" white\",\"logprobs\":[{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" bright\",\"logprobs\":[{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" blessed\",\"logprobs\":[{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" days\",\"logprobs\":[{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" the\",\"logprobs\":[{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" dark\",\"logprobs\":[{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" sacred\",\"logprobs\":[{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" nights\",\"logprobs\":[{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" and\",\"logprobs\":[{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" I\",\"logprobs\":[{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" think\",\"logprobs\":[{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" to\",\"logprobs\":[{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" myself\",\"logprobs\":[{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\",\",\"logprobs\":[{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" what\",\"logprobs\":[{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" a\",\"logprobs\":[{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" wonderful\",\"logprobs\":[{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\" world\",\"logprobs\":[{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]}]}\n\ndata: {\"type\":\"transcript.text.delta\",\"delta\":\".\",\"logprobs\":[{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}]}\n\ndata: {\"type\":\"transcript.text.done\",\"text\":\"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.\",\"logprobs\":[{\"token\":\"I\",\"logprob\":-0.00007588794,\"bytes\":[73]},{\"token\":\" see\",\"logprob\":-3.1281633e-7,\"bytes\":[32,115,101,101]},{\"token\":\" skies\",\"logprob\":-2.3392786e-6,\"bytes\":[32,115,107,105,101,115]},{\"token\":\" of\",\"logprob\":-3.1281633e-7,\"bytes\":[32,111,102]},{\"token\":\" blue\",\"logprob\":-1.0280384e-6,\"bytes\":[32,98,108,117,101]},{\"token\":\" and\",\"logprob\":-0.0005108566,\"bytes\":[32,97,110,100]},{\"token\":\" clouds\",\"logprob\":-1.9361265e-7,\"bytes\":[32,99,108,111,117,100,115]},{\"token\":\" of\",\"logprob\":-1.9361265e-7,\"bytes\":[32,111,102]},{\"token\":\" white\",\"logprob\":-7.89631e-7,\"bytes\":[32,119,104,105,116,101]},{\"token\":\",\",\"logprob\":-0.0014890312,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0110956915,\"bytes\":[32,116,104,101]},{\"token\":\" bright\",\"logprob\":0.0,\"bytes\":[32,98,114,105,103,104,116]},{\"token\":\" blessed\",\"logprob\":-0.000045848617,\"bytes\":[32,98,108,101,115,115,101,100]},{\"token\":\" days\",\"logprob\":-0.000010802739,\"bytes\":[32,100,97,121,115]},{\"token\":\",\",\"logprob\":-0.00001700133,\"bytes\":[44]},{\"token\":\" the\",\"logprob\":-0.0000118755715,\"bytes\":[32,116,104,101]},{\"token\":\" dark\",\"logprob\":-5.5122365e-7,\"bytes\":[32,100,97,114,107]},{\"token\":\" sacred\",\"logprob\":-5.4385737e-6,\"bytes\":[32,115,97,99,114,101,100]},{\"token\":\" nights\",\"logprob\":-4.00813e-6,\"bytes\":[32,110,105,103,104,116,115]},{\"token\":\",\",\"logprob\":-0.0036910512,\"bytes\":[44]},{\"token\":\" and\",\"logprob\":-0.0031903093,\"bytes\":[32,97,110,100]},{\"token\":\" I\",\"logprob\":-1.504853e-6,\"bytes\":[32,73]},{\"token\":\" think\",\"logprob\":-4.3202e-7,\"bytes\":[32,116,104,105,110,107]},{\"token\":\" to\",\"logprob\":-1.9361265e-7,\"bytes\":[32,116,111]},{\"token\":\" myself\",\"logprob\":-1.7432603e-6,\"bytes\":[32,109,121,115,101,108,102]},{\"token\":\",\",\"logprob\":-0.29254505,\"bytes\":[44]},{\"token\":\" what\",\"logprob\":-0.016815351,\"bytes\":[32,119,104,97,116]},{\"token\":\" a\",\"logprob\":-3.1281633e-7,\"bytes\":[32,97]},{\"token\":\" wonderful\",\"logprob\":-2.1008714e-6,\"bytes\":[32,119,111,110,100,101,114,102,117,108]},{\"token\":\" world\",\"logprob\":-8.180258e-6,\"bytes\":[32,119,111,114,108,100]},{\"token\":\".\",\"logprob\":-0.014231676,\"bytes\":[46]}],\"usage\":{\"input_tokens\":14,\"input_token_details\":{\"text_tokens\":0,\"audio_tokens\":14},\"output_tokens\":45,\"total_tokens\":59}}\n" + - title: Logprobs + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"include[]=logprobs\" \\\n -F model=\"gpt-4o-transcribe\" \\\n -F response_format=\"json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"gpt-4o-transcribe\",\n response_format: \"json\",\n include: [\"logprobs\"]\n });\n\n console.log(transcription);\n}\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "{\n \"text\": \"Hey, my knee is hurting and I want to see the doctor tomorrow ideally.\",\n \"logprobs\": [\n { \"token\": \"Hey\", \"logprob\": -1.0415299, \"bytes\": [72, 101, 121] },\n { \"token\": \",\", \"logprob\": -9.805982e-5, \"bytes\": [44] },\n { \"token\": \" my\", \"logprob\": -0.00229799, \"bytes\": [32, 109, 121] },\n {\n \"token\": \" knee\",\n \"logprob\": -4.7159858e-5,\n \"bytes\": [32, 107, 110, 101, 101]\n },\n { \"token\": \" is\", \"logprob\": -0.043909557, \"bytes\": [32, 105, 115] },\n {\n \"token\": \" hurting\",\n \"logprob\": -1.1041146e-5,\n \"bytes\": [32, 104, 117, 114, 116, 105, 110, 103]\n },\n { \"token\": \" and\", \"logprob\": -0.011076359, \"bytes\": [32, 97, 110, 100] },\n { \"token\": \" I\", \"logprob\": -5.3193703e-6, \"bytes\": [32, 73] },\n {\n \"token\": \" want\",\n \"logprob\": -0.0017156356,\n \"bytes\": [32, 119, 97, 110, 116]\n },\n { \"token\": \" to\", \"logprob\": -7.89631e-7, \"bytes\": [32, 116, 111] },\n { \"token\": \" see\", \"logprob\": -5.5122365e-7, \"bytes\": [32, 115, 101, 101] },\n { \"token\": \" the\", \"logprob\": -0.0040786397, \"bytes\": [32, 116, 104, 101] },\n {\n \"token\": \" doctor\",\n \"logprob\": -2.3392786e-6,\n \"bytes\": [32, 100, 111, 99, 116, 111, 114]\n },\n {\n \"token\": \" tomorrow\",\n \"logprob\": -7.89631e-7,\n \"bytes\": [32, 116, 111, 109, 111, 114, 114, 111, 119]\n },\n {\n \"token\": \" ideally\",\n \"logprob\": -0.5800861,\n \"bytes\": [32, 105, 100, 101, 97, 108, 108, 121]\n },\n { \"token\": \".\", \"logprob\": -0.00011093382, \"bytes\": [46] }\n ],\n \"usage\": {\n \"type\": \"tokens\",\n \"input_tokens\": 14,\n \"input_token_details\": {\n \"text_tokens\": 0,\n \"audio_tokens\": 14\n },\n \"output_tokens\": 45,\n \"total_tokens\": 59\n }\n}\n" + - title: Word timestamps + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"timestamp_granularities[]=word\" \\\n -F model=\"whisper-1\" \\\n -F response_format=\"verbose_json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"whisper-1\",\n response_format: \"verbose_json\",\n timestamp_granularities: [\"word\"]\n });\n\n console.log(transcription.text);\n}\nmain();\n" + csharp: "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscriptionOptions options = new()\n{\n ResponseFormat = AudioTranscriptionFormat.Verbose,\n TimestampGranularities = AudioTimestampGranularities.Word,\n};\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "{\n \"task\": \"transcribe\",\n \"language\": \"english\",\n \"duration\": 8.470000267028809,\n \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n \"words\": [\n {\n \"word\": \"The\",\n \"start\": 0.0,\n \"end\": 0.23999999463558197\n },\n ...\n {\n \"word\": \"volleyball\",\n \"start\": 7.400000095367432,\n \"end\": 7.900000095367432\n }\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 9\n }\n}\n" + - title: Segment timestamps + request: + curl: "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F \"timestamp_granularities[]=segment\" \\\n -F model=\"whisper-1\" \\\n -F response_format=\"verbose_json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor transcription in client.audio.transcriptions.create(\n file=b\"Example data\",\n model=\"gpt-4o-transcribe\",\n):\n print(transcription)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"whisper-1\",\n response_format: \"verbose_json\",\n timestamp_granularities: [\"segment\"]\n });\n\n console.log(transcription.text);\n}\nmain();\n" + csharp: "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscriptionOptions options = new()\n{\n ResponseFormat = AudioTranscriptionFormat.Verbose,\n TimestampGranularities = AudioTimestampGranularities.Segment,\n};\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath, options);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst transcription = await client.audio.transcriptions.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'gpt-4o-transcribe',\n});\n\nconsole.log(transcription);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranscription, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelGPT4oTranscribe,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", transcription)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateParams;\nimport com.openai.models.audio.transcriptions.TranscriptionCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranscriptionCreateParams params = TranscriptionCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.GPT_4O_TRANSCRIBE)\n .build();\n TranscriptionCreateResponse transcription = client.audio().transcriptions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranscription = openai.audio.transcriptions.create(file: StringIO.new(\"Example data\"), model: :\"gpt-4o-transcribe\")\n\nputs(transcription)" + response: "{\n \"task\": \"transcribe\",\n \"language\": \"english\",\n \"duration\": 8.470000267028809,\n \"text\": \"The beach was a popular spot on a hot summer day. People were swimming in the ocean, building sandcastles, and playing beach volleyball.\",\n \"segments\": [\n {\n \"id\": 0,\n \"seek\": 0,\n \"start\": 0.0,\n \"end\": 3.319999933242798,\n \"text\": \" The beach was a popular spot on a hot summer day.\",\n \"tokens\": [\n 50364, 440, 7534, 390, 257, 3743, 4008, 322, 257, 2368, 4266, 786, 13, 50530\n ],\n \"temperature\": 0.0,\n \"avg_logprob\": -0.2860786020755768,\n \"compression_ratio\": 1.2363636493682861,\n \"no_speech_prob\": 0.00985979475080967\n },\n ...\n ],\n \"usage\": {\n \"type\": \"duration\",\n \"seconds\": 9\n }\n}\n" /audio/translations: post: tags: - Audio - summary: Create translation - description: Translates audio into English. + summary: Translates audio into English. operationId: createTranslation requestBody: content: @@ -314,31 +375,56 @@ paths: content: application/json: schema: - anyOf: + oneOf: - $ref: '#/components/schemas/CreateTranslationResponseJson' - $ref: '#/components/schemas/CreateTranslationResponseVerboseJson' x-oaiMeta: + name: Create translation + group: audio examples: request: - csharp: "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" curl: "curl https://api.openai.com/v1/audio/translations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/german.m4a\" \\\n -F model=\"whisper-1\"\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n translation, err := client.Audio.Translations.New(context.TODO(), openai.AudioTranslationNewParams{\n File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n Model: openai.AudioModelWhisper1,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", translation)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.translations.TranslationCreateParams;\nimport com.openai.models.audio.translations.TranslationCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranslationCreateParams params = TranslationCreateParams.builder()\n .file(ByteArrayInputStream(\"some content\".getBytes()))\n .model(AudioModel.WHISPER_1)\n .build();\n TranslationCreateResponse translation = client.audio().translations().create(params);\n }\n}" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ntranslation = client.audio.translations.create(\n file=b\"Example data\",\n model=\"whisper-1\",\n)\nprint(translation)" javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const translation = await openai.audio.translations.create({\n file: fs.createReadStream(\"speech.mp3\"),\n model: \"whisper-1\",\n });\n\n console.log(translation.text);\n}\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst translation = await client.audio.translations.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'whisper-1',\n});\n\nconsole.log(translation);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ntranslation = client.audio.translations.create(\n file=b\"raw file contents\",\n model=\"whisper-1\",\n)\nprint(translation)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranslation = openai.audio.translations.create(file: Pathname(__FILE__), model: :\"whisper-1\")\n\nputs(translation)" + csharp: "using System;\n\nusing OpenAI.Audio;\n\nstring audioFilePath = \"audio.mp3\";\n\nAudioClient client = new(\n model: \"whisper-1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nAudioTranscription transcription = client.TranscribeAudio(audioFilePath);\n\nConsole.WriteLine($\"{transcription.Text}\");\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst translation = await client.audio.translations.create({\n file: fs.createReadStream('speech.mp3'),\n model: 'whisper-1',\n});\n\nconsole.log(translation);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttranslation, err := client.Audio.Translations.New(context.TODO(), openai.AudioTranslationNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tModel: openai.AudioModelWhisper1,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", translation)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.audio.AudioModel;\nimport com.openai.models.audio.translations.TranslationCreateParams;\nimport com.openai.models.audio.translations.TranslationCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n TranslationCreateParams params = TranslationCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .model(AudioModel.WHISPER_1)\n .build();\n TranslationCreateResponse translation = client.audio().translations().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ntranslation = openai.audio.translations.create(file: StringIO.new(\"Example data\"), model: :\"whisper-1\")\n\nputs(translation)" response: "{\n \"text\": \"Hello, my name is Wolfgang and I come from Germany. Where are you heading today?\"\n}\n" + /audio/voice_consents: + post: + tags: + - Audio + summary: Upload a voice consent recording. + description: "Upload a consent recording that authorizes creation of a custom voice.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.\n" + operationId: createVoiceConsent + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateVoiceConsentRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VoiceConsentResource' + x-oaiMeta: + name: Create voice consent group: audio - name: Create translation - returns: The translated text. - /batches: + examples: + request: + curl: "curl https://api.openai.com/v1/audio/voice_consents \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"name=John Doe\" \\\n -F \"language=en-US\" \\\n -F \"recording=@$HOME/consent_recording.wav;type=audio/x-wav\"\n" + response: '' get: tags: - - Batch - summary: List batch - description: List your organization's batches. - operationId: listBatches + - Audio + summary: Returns a list of voice consent recordings. + description: "List consent recordings available to your organization for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n" + operationId: listVoiceConsents parameters: - name: after in: query @@ -353,30 +439,138 @@ paths: default: 20 responses: '200': - description: Batch listed successfully. + description: OK content: application/json: schema: - $ref: '#/components/schemas/ListBatchesResponse' + $ref: '#/components/schemas/VoiceConsentListResource' x-oaiMeta: + name: List voice consents + group: audio examples: request: - curl: "curl https://api.openai.com/v1/batches?limit=2 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Batches.List(context.TODO(), openai.BatchListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.BatchListPage;\nimport com.openai.models.batches.BatchListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n BatchListPage page = client.batches().list();\n }\n}" - node: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.batches.list();\n\n for await (const batch of list) {\n console.log(batch);\n }\n}\n\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const batch of client.batches.list()) {\n console.log(batch.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.batches.list()\npage = page.data[0]\nprint(page.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.batches.list\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"completed\",\n \"output_file_id\": \"file-cvaTdG\",\n \"error_file_id\": \"file-HOWS94\",\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": 1711493133,\n \"completed_at\": 1711493163,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 95,\n \"failed\": 5\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly job\",\n }\n },\n { ... },\n ],\n \"first_id\": \"batch_abc123\",\n \"last_id\": \"batch_abc456\",\n \"has_more\": true\n}\n" - group: batch - name: List batch - returns: 'A list of paginated [Batch](https://platform.openai.com/docs/api-reference/batch/object) objects.' + curl: "curl https://api.openai.com/v1/audio/voice_consents?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + response: '' + '/audio/voice_consents/{consent_id}': + get: + tags: + - Audio + summary: Retrieves a voice consent recording. + description: "Retrieve consent recording metadata used for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n" + operationId: getVoiceConsent + parameters: + - name: consent_id + in: path + description: The ID of the consent recording to retrieve. + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VoiceConsentResource' + x-oaiMeta: + name: Retrieve voice consent + group: audio + examples: + request: + curl: "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + response: '' + post: + tags: + - Audio + summary: Updates a voice consent recording (metadata only). + description: "Update consent recording metadata used for creating custom voices. This endpoint updates metadata only and does not replace the underlying audio.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n" + operationId: updateVoiceConsent + parameters: + - name: consent_id + in: path + description: The ID of the consent recording to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateVoiceConsentRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VoiceConsentResource' + x-oaiMeta: + name: Update voice consent + group: audio + examples: + request: + curl: "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"John Doe\"\n }'\n" + response: '' + delete: + tags: + - Audio + summary: Deletes a voice consent recording. + description: "Delete a consent recording that was uploaded for creating custom voices.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices). Custom voices are limited to eligible customers.\n" + operationId: deleteVoiceConsent + parameters: + - name: consent_id + in: path + description: The ID of the consent recording to delete. + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VoiceConsentDeletedResource' + x-oaiMeta: + name: Delete voice consent + group: audio + examples: + request: + curl: "curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + response: '' + /audio/voices: + post: + tags: + - Audio + summary: Creates a custom voice. + description: "Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.\n\nSee the [custom voices guide](/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.\n" + operationId: createVoice + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateVoiceRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/VoiceResource' + x-oaiMeta: + name: Create voice + group: audio + examples: + request: + curl: "curl https://api.openai.com/v1/audio/voices \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"name=My new voice\" \\\n -F \"consent=cons_1234\" \\\n -F \"audio_sample=@$HOME/audio_sample.wav;type=audio/x-wav\"\n" + response: '' + /batches: post: tags: - Batch - summary: Create batch - description: Creates and executes a batch from an uploaded file of requests + summary: Creates and executes a batch from an uploaded file of requests operationId: createBatch requestBody: content: @@ -388,22 +582,25 @@ paths: - completion_window type: object properties: - completion_window: - enum: - - 24h + input_file_id: type: string - description: The time frame within which the batch should be processed. Currently only `24h` is supported. + description: "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n" endpoint: enum: - /v1/responses - /v1/chat/completions - /v1/embeddings - /v1/completions + - /v1/moderations + - /v1/images/generations + - /v1/images/edits type: string - description: 'The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.' - input_file_id: + description: 'The endpoint to be used for all requests in the batch. Currently `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`, `/v1/moderations`, `/v1/images/generations`, and `/v1/images/edits` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.' + completion_window: + enum: + - 24h type: string - description: "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](https://platform.openai.com/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n" + description: The time frame within which the batch should be processed. Currently only `24h` is supported. metadata: $ref: '#/components/schemas/Metadata' output_expires_after: @@ -417,25 +614,60 @@ paths: schema: $ref: '#/components/schemas/Batch' x-oaiMeta: + name: Create batch + group: batch examples: request: curl: "curl https://api.openai.com/v1/batches \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input_file_id\": \"file-abc123\",\n \"endpoint\": \"/v1/chat/completions\",\n \"completion_window\": \"24h\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n batch, err := client.Batches.New(context.TODO(), openai.BatchNewParams{\n CompletionWindow: openai.BatchNewParamsCompletionWindow24h,\n Endpoint: openai.BatchNewParamsEndpointV1Responses,\n InputFileID: \"input_file_id\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", batch.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.create(\n completion_window=\"24h\",\n endpoint=\"/v1/responses\",\n input_file_id=\"input_file_id\",\n)\nprint(batch.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.create({\n input_file_id: \"file-abc123\",\n endpoint: \"/v1/chat/completions\",\n completion_window: \"24h\"\n });\n\n console.log(batch);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.create({\n completion_window: '24h',\n endpoint: '/v1/responses',\n input_file_id: 'input_file_id',\n});\n\nconsole.log(batch.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.New(context.TODO(), openai.BatchNewParams{\n\t\tCompletionWindow: openai.BatchNewParamsCompletionWindow24h,\n\t\tEndpoint: openai.BatchNewParamsEndpointV1Responses,\n\t\tInputFileID: \"input_file_id\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n BatchCreateParams params = BatchCreateParams.builder()\n .completionWindow(BatchCreateParams.CompletionWindow._24H)\n .endpoint(BatchCreateParams.Endpoint.V1_RESPONSES)\n .inputFileId(\"input_file_id\")\n .build();\n Batch batch = client.batches().create(params);\n }\n}" - node: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.create({\n input_file_id: \"file-abc123\",\n endpoint: \"/v1/chat/completions\",\n completion_window: \"24h\"\n });\n\n console.log(batch);\n}\n\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst batch = await client.batches.create({\n completion_window: '24h',\n endpoint: '/v1/responses',\n input_file_id: 'input_file_id',\n});\n\nconsole.log(batch.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nbatch = client.batches.create(\n completion_window=\"24h\",\n endpoint=\"/v1/responses\",\n input_file_id=\"input_file_id\",\n)\nprint(batch.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.create(\n completion_window: :\"24h\",\n endpoint: :\"/v1/responses\",\n input_file_id: \"input_file_id\"\n)\n\nputs(batch)" response: "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"validating\",\n \"output_file_id\": null,\n \"error_file_id\": null,\n \"created_at\": 1711471533,\n \"in_progress_at\": null,\n \"expires_at\": null,\n \"finalizing_at\": null,\n \"completed_at\": null,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 0,\n \"completed\": 0,\n \"failed\": 0\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" + get: + tags: + - Batch + summary: List your organization's batches. + operationId: listBatches + parameters: + - name: after + in: query + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + schema: + type: string + - name: limit + in: query + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + schema: + type: integer + default: 20 + responses: + '200': + description: Batch listed successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBatchesResponse' + x-oaiMeta: + name: List batches group: batch - name: Create batch - returns: 'The created [Batch](https://platform.openai.com/docs/api-reference/batch/object) object.' + examples: + request: + curl: "curl https://api.openai.com/v1/batches?limit=2 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.batches.list()\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.batches.list();\n\n for await (const batch of list) {\n console.log(batch);\n }\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const batch of client.batches.list()) {\n console.log(batch.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Batches.List(context.TODO(), openai.BatchListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.BatchListPage;\nimport com.openai.models.batches.BatchListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n BatchListPage page = client.batches().list();\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.batches.list\n\nputs(page)" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"completed\",\n \"output_file_id\": \"file-cvaTdG\",\n \"error_file_id\": \"file-HOWS94\",\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": 1711493133,\n \"completed_at\": 1711493163,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 95,\n \"failed\": 5\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly job\",\n }\n },\n { ... },\n ],\n \"first_id\": \"batch_abc123\",\n \"last_id\": \"batch_abc456\",\n \"has_more\": true\n}\n" '/batches/{batch_id}': get: tags: - Batch - summary: Retrieve batch - description: Retrieves a batch. + summary: Retrieves a batch. operationId: retrieveBatch parameters: - name: batch_id @@ -452,25 +684,23 @@ paths: schema: $ref: '#/components/schemas/Batch' x-oaiMeta: + name: Retrieve batch + group: batch examples: request: curl: "curl https://api.openai.com/v1/batches/batch_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n batch, err := client.Batches.Get(context.TODO(), \"batch_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", batch.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.retrieve(\n \"batch_id\",\n)\nprint(batch.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.retrieve(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.retrieve('batch_id');\n\nconsole.log(batch.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.Get(context.TODO(), \"batch_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Batch batch = client.batches().retrieve(\"batch_id\");\n }\n}" - node: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.retrieve(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst batch = await client.batches.retrieve('batch_id');\n\nconsole.log(batch.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nbatch = client.batches.retrieve(\n \"batch_id\",\n)\nprint(batch.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.retrieve(\"batch_id\")\n\nputs(batch)" response: "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"completed\",\n \"output_file_id\": \"file-cvaTdG\",\n \"error_file_id\": \"file-HOWS94\",\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": 1711493133,\n \"completed_at\": 1711493163,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": null,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 95,\n \"failed\": 5\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" - group: batch - name: Retrieve batch - returns: 'The [Batch](https://platform.openai.com/docs/api-reference/batch/object) object matching the specified ID.' '/batches/{batch_id}/cancel': post: tags: - Batch - summary: Cancel batch - description: 'Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.' + summary: 'Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.' operationId: cancelBatch parameters: - name: batch_id @@ -487,25 +717,23 @@ paths: schema: $ref: '#/components/schemas/Batch' x-oaiMeta: + name: Cancel batch + group: batch examples: request: curl: "curl https://api.openai.com/v1/batches/batch_abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -X POST\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n batch, err := client.Batches.Cancel(context.TODO(), \"batch_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", batch.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nbatch = client.batches.cancel(\n \"batch_id\",\n)\nprint(batch.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.cancel(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.cancel('batch_id');\n\nconsole.log(batch.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tbatch, err := client.Batches.Cancel(context.TODO(), \"batch_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", batch.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.batches.Batch;\nimport com.openai.models.batches.BatchCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Batch batch = client.batches().cancel(\"batch_id\");\n }\n}" - node: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const batch = await openai.batches.cancel(\"batch_abc123\");\n\n console.log(batch);\n}\n\nmain();\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst batch = await client.batches.cancel('batch_id');\n\nconsole.log(batch.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nbatch = client.batches.cancel(\n \"batch_id\",\n)\nprint(batch.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nbatch = openai.batches.cancel(\"batch_id\")\n\nputs(batch)" response: "{\n \"id\": \"batch_abc123\",\n \"object\": \"batch\",\n \"endpoint\": \"/v1/chat/completions\",\n \"errors\": null,\n \"input_file_id\": \"file-abc123\",\n \"completion_window\": \"24h\",\n \"status\": \"cancelling\",\n \"output_file_id\": null,\n \"error_file_id\": null,\n \"created_at\": 1711471533,\n \"in_progress_at\": 1711471538,\n \"expires_at\": 1711557933,\n \"finalizing_at\": null,\n \"completed_at\": null,\n \"failed_at\": null,\n \"expired_at\": null,\n \"cancelling_at\": 1711475133,\n \"cancelled_at\": null,\n \"request_counts\": {\n \"total\": 100,\n \"completed\": 23,\n \"failed\": 1\n },\n \"metadata\": {\n \"customer_id\": \"user_123456789\",\n \"batch_description\": \"Nightly eval job\",\n }\n}\n" - group: batch - name: Cancel batch - returns: 'The [Batch](https://platform.openai.com/docs/api-reference/batch/object) object matching the specified ID.' /chat/completions: get: tags: - Chat - summary: List Chat Completions - description: "List stored Chat Completions. Only Chat Completions that have been stored\nwith the `store` parameter set to `true` will be returned.\n" + summary: "List stored Chat Completions. Only Chat Completions that have been stored\nwith the `store` parameter set to `true` will be returned.\n" operationId: listChatCompletions parameters: - name: model @@ -546,24 +774,22 @@ paths: schema: $ref: '#/components/schemas/ChatCompletionList' x-oaiMeta: + name: List Chat Completions + group: chat + path: list examples: request: curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Chat.Completions.List(context.TODO(), openai.ChatCompletionListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.chat.completions.list()\npage = page.data[0]\nprint(page.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletion of client.chat.completions.list()) {\n console.log(chatCompletion.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Chat.Completions.List(context.TODO(), openai.ChatCompletionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionListPage;\nimport com.openai.models.chat.completions.ChatCompletionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionListPage page = client.chat().completions().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletion of client.chat.completions.list()) {\n console.log(chatCompletion.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.chat.completions.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.chat.completions.list\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"model\": \"gpt-4.1-2025-04-14\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {},\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n }\n ],\n \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"has_more\": false\n}\n" - group: chat - name: List Chat Completions - path: list - returns: 'A list of [Chat Completions](https://platform.openai.com/docs/api-reference/chat/list-object) matching the specified filters.' + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"model\": \"gpt-5.4\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {},\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n }\n ],\n \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"has_more\": false\n}\n" post: tags: - Chat - summary: Create chat completion - description: "**Starting a new project?** We recommend trying [Responses](https://platform.openai.com/docs/api-reference/responses) \nto take advantage of the latest OpenAI platform features. Compare\n[Chat Completions with Responses](https://platform.openai.com/docs/guides/responses-vs-chat-completions?api-mode=responses).\n\n---\n\nCreates a model response for the given chat conversation. Learn more in the\n[text generation](https://platform.openai.com/docs/guides/text-generation), [vision](https://platform.openai.com/docs/guides/vision),\nand [audio](https://platform.openai.com/docs/guides/audio) guides.\n\nParameter support can differ depending on the model used to generate the\nresponse, particularly for newer reasoning models. Parameters that are only\nsupported for reasoning models are noted below. For the current state of \nunsupported parameters in reasoning models, \n[refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning).\n" + summary: "**Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses)\nto take advantage of the latest OpenAI platform features. Compare\n[Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses).\n\n---\n\nCreates a model response for the given chat conversation. Learn more in the\n[text generation](/docs/guides/text-generation), [vision](/docs/guides/vision),\nand [audio](/docs/guides/audio) guides.\n\nParameter support can differ depending on the model used to generate the\nresponse, particularly for newer reasoning models. Parameters that are only\nsupported for reasoning models are noted below. For the current state of\nunsupported parameters in reasoning models,\n[refer to the reasoning guide](/docs/guides/reasoning).\n\nReturns a chat completion object, or a streamed sequence of chat completion\nchunk objects if the request is streamed.\n" operationId: createChatCompletion requestBody: content: @@ -582,60 +808,70 @@ paths: schema: $ref: '#/components/schemas/CreateChatCompletionStreamResponse' x-oaiMeta: - example: - request: - csharp: "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-4.1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new SystemChatMessage(\"You are a helpful assistant.\"),\n new UserChatMessage(\"Hello!\")\n];\n\nChatCompletion completion = client.CompleteChat(messages);\n\nConsole.WriteLine(completion.Content[0].Text);\n" - curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"developer\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n Messages: []openai.ChatCompletionMessageParamUnion{openai.ChatCompletionMessageParamUnion{\n OfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n Content: openai.ChatCompletionDeveloperMessageParamContentUnion{\n OfString: openai.String(\"string\"),\n },\n },\n }},\n Model: shared.ChatModelGPT5,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-4o',\n});\n\nconsole.log(chatCompletion);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nchat_completion = client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-4o\",\n)\nprint(chat_completion)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5\")\n\nputs(chat_completion)" - response: "{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 19,\n \"completion_tokens\": 10,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\"\n}\n" - title: Default - group: chat name: Create chat completion + group: chat path: create - returns: "Returns a [chat completion](https://platform.openai.com/docs/api-reference/chat/object) object, or a streamed sequence of [chat completion chunk](https://platform.openai.com/docs/api-reference/chat/streaming) objects if the request is streamed.\n" - '/chat/completions/{completion_id}': - delete: - tags: - - Chat - summary: Delete chat completion - description: "Delete a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be deleted.\n" - operationId: deleteChatCompletion - parameters: - - name: completion_id - in: path - description: The ID of the chat completion to delete. - required: true - schema: - type: string - responses: - '200': - description: The chat completion was deleted successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/ChatCompletionDeleted' - x-oaiMeta: examples: - request: - curl: "curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n chatCompletionDeleted, err := client.Chat.Completions.Delete(context.TODO(), \"completion_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", chatCompletionDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionDeleteParams;\nimport com.openai.models.chat.completions.ChatCompletionDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionDeleted chatCompletionDeleted = client.chat().completions().delete(\"completion_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst chatCompletionDeleted = await client.chat.completions.delete('completion_id');\n\nconsole.log(chatCompletionDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nchat_completion_deleted = client.chat.completions.delete(\n \"completion_id\",\n)\nprint(chat_completion_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion_deleted = openai.chat.completions.delete(\"completion_id\")\n\nputs(chat_completion_deleted)" - response: "{\n \"object\": \"chat.completion.deleted\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"deleted\": true\n}\n" - group: chat - name: Delete chat completion - returns: A deletion confirmation object. + - title: Default + request: + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"developer\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"developer\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_chat_model_id\",\n store: true,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();\n" + csharp: "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new SystemChatMessage(\"You are a helpful assistant.\"),\n new UserChatMessage(\"Hello!\")\n];\n\nChatCompletion completion = client.CompleteChat(messages);\n\nConsole.WriteLine(completion.Content[0].Text);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + response: "{\n \"id\": \"chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT\",\n \"object\": \"chat.completion\",\n \"created\": 1741569952,\n \"model\": \"gpt-5.4\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 19,\n \"completion_tokens\": 10,\n \"total_tokens\": 29,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\"\n}\n" + - title: Image input + request: + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"What is in this image?\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"\n }\n }\n ]\n }\n ],\n \"max_tokens\": 300\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.chat.completions.create({\n model: \"gpt-5.4\",\n messages: [\n {\n role: \"user\",\n content: [\n { type: \"text\", text: \"What's in this image?\" },\n {\n type: \"image_url\",\n image_url: {\n \"url\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\",\n },\n }\n ],\n },\n ],\n });\n console.log(response.choices[0]);\n}\nmain();\n" + csharp: "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new UserChatMessage(\n [\n ChatMessageContentPart.CreateTextPart(\"What's in this image?\"),\n ChatMessageContentPart.CreateImagePart(new Uri(\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg\"))\n ])\n];\n\nChatCompletion completion = client.CompleteChat(messages);\n\nConsole.WriteLine(completion.Content[0].Text);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + response: "{\n \"id\": \"chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG\",\n \"object\": \"chat.completion\",\n \"created\": 1741570283,\n \"model\": \"gpt-5.4\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The image shows a wooden boardwalk path running through a lush green field or meadow. The sky is bright blue with some scattered clouds, giving the scene a serene and peaceful atmosphere. Trees and shrubs are visible in the background.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1117,\n \"completion_tokens\": 46,\n \"total_tokens\": 1163,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\"\n}\n" + - title: Streaming + request: + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"developer\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"stream\": true\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n model: \"VAR_chat_model_id\",\n messages: [\n {\"role\": \"developer\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream: true,\n });\n\n for await (const chunk of completion) {\n console.log(chunk.choices[0].delta.content);\n }\n}\n\nmain();\n" + csharp: "using System;\nusing System.ClientModel;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new SystemChatMessage(\"You are a helpful assistant.\"),\n new UserChatMessage(\"Hello!\")\n];\n\nAsyncCollectionResult completionUpdates = client.CompleteChatStreamingAsync(messages);\n\nawait foreach (StreamingChatCompletionUpdate completionUpdate in completionUpdates)\n{\n if (completionUpdate.ContentUpdate.Count > 0)\n {\n Console.Write(completionUpdate.ContentUpdate[0].Text);\n }\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + response: "{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n" + - title: Functions + request: + curl: "curl https://api.openai.com/v1/chat/completions \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-d '{\n \"model\": \"gpt-5.4\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is the weather like in Boston today?\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\"celsius\", \"fahrenheit\"]\n }\n },\n \"required\": [\"location\"]\n }\n }\n }\n ],\n \"tool_choice\": \"auto\"\n}'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const messages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}];\n const tools = [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n }\n ];\n\n const response = await openai.chat.completions.create({\n model: \"gpt-5.4\",\n messages: messages,\n tools: tools,\n tool_choice: \"auto\",\n });\n\n console.log(response);\n}\n\nmain();\n" + csharp: "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nChatTool getCurrentWeatherTool = ChatTool.CreateFunctionTool(\n functionName: \"get_current_weather\",\n functionDescription: \"Get the current weather in a given location\",\n functionParameters: BinaryData.FromString(\"\"\"\n {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [ \"celsius\", \"fahrenheit\" ]\n }\n },\n \"required\": [ \"location\" ]\n }\n \"\"\")\n);\n\nList messages =\n[\n new UserChatMessage(\"What's the weather like in Boston today?\"),\n];\n\nChatCompletionOptions options = new()\n{\n Tools =\n {\n getCurrentWeatherTool\n },\n ToolChoice = ChatToolChoice.CreateAutoChoice(),\n};\n\nChatCompletion completion = client.CompleteChat(messages, options);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + response: "{\n \"id\": \"chatcmpl-abc123\",\n \"object\": \"chat.completion\",\n \"created\": 1699896916,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_abc123\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\n\\\"location\\\": \\\"Boston, MA\\\"\\n}\"\n }\n }\n ]\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 82,\n \"completion_tokens\": 17,\n \"total_tokens\": 99,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n }\n}\n" + - title: Logprobs + request: + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"logprobs\": true,\n \"top_logprobs\": 2\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.chat.completions.create(\n messages=[{\n \"content\": \"string\",\n \"role\": \"developer\",\n }],\n model=\"gpt-5.4\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"user\", content: \"Hello!\" }],\n model: \"VAR_chat_model_id\",\n logprobs: true,\n top_logprobs: 2,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();\n" + csharp: "using System;\nusing System.Collections.Generic;\n\nusing OpenAI.Chat;\n\nChatClient client = new(\n model: \"gpt-5.4\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nList messages =\n[\n new UserChatMessage(\"Hello!\")\n];\n\nChatCompletionOptions options = new()\n{\n IncludeLogProbabilities = true,\n TopLogProbabilityCount = 2\n};\n\nChatCompletion completion = client.CompleteChat(messages, options);\n\nConsole.WriteLine(completion.Content[0].Text);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.create({\n messages: [{ content: 'string', role: 'developer' }],\n model: 'gpt-5.4',\n});\n\nconsole.log(chatCompletion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{{\n\t\t\tOfDeveloper: &openai.ChatCompletionDeveloperMessageParam{\n\t\t\t\tContent: openai.ChatCompletionDeveloperMessageParamContentUnion{\n\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\tModel: shared.ChatModelGPT5_4,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.ChatModel;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()\n .addDeveloperMessage(\"string\")\n .model(ChatModel.GPT_5_4)\n .build();\n ChatCompletion chatCompletion = client.chat().completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.create(messages: [{content: \"string\", role: :developer}], model: :\"gpt-5.4\")\n\nputs(chat_completion)" + response: "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1702685778,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\"\n },\n \"logprobs\": {\n \"content\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111],\n \"top_logprobs\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111]\n },\n {\n \"token\": \"Hi\",\n \"logprob\": -1.3190403,\n \"bytes\": [72, 105]\n }\n ]\n },\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [\n 33\n ],\n \"top_logprobs\": [\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [33]\n },\n {\n \"token\": \" there\",\n \"logprob\": -3.787621,\n \"bytes\": [32, 116, 104, 101, 114, 101]\n }\n ]\n },\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119],\n \"top_logprobs\": [\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119]\n },\n {\n \"token\": \"<|end|>\",\n \"logprob\": -10.953937,\n \"bytes\": null\n }\n ]\n },\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110],\n \"top_logprobs\": [\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110]\n },\n {\n \"token\": \" may\",\n \"logprob\": -4.161023,\n \"bytes\": [32, 109, 97, 121]\n }\n ]\n },\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [\n 32,\n 73\n ],\n \"top_logprobs\": [\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [32, 73]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -13.596657,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n }\n ]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116],\n \"top_logprobs\": [\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n },\n {\n \"token\": \" help\",\n \"logprob\": -3.1089056,\n \"bytes\": [32, 104, 101, 108, 112]\n }\n ]\n },\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117],\n \"top_logprobs\": [\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117]\n },\n {\n \"token\": \" today\",\n \"logprob\": -12.807695,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n }\n ]\n },\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121],\n \"top_logprobs\": [\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n },\n {\n \"token\": \"?\",\n \"logprob\": -5.5247097,\n \"bytes\": [63]\n }\n ]\n },\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63],\n \"top_logprobs\": [\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63]\n },\n {\n \"token\": \"?\\n\",\n \"logprob\": -7.184561,\n \"bytes\": [63, 10]\n }\n ]\n }\n ]\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 9,\n \"total_tokens\": 18,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": null\n}\n" + '/chat/completions/{completion_id}': get: tags: - Chat - summary: Get chat completion - description: "Get a stored chat completion. Only Chat Completions that have been created\nwith the `store` parameter set to `true` will be returned.\n" + summary: "Get a stored chat completion. Only Chat Completions that have been created\nwith the `store` parameter set to `true` will be returned.\n" operationId: getChatCompletion parameters: - name: completion_id @@ -652,23 +888,21 @@ paths: schema: $ref: '#/components/schemas/CreateChatCompletionResponse' x-oaiMeta: + name: Get chat completion + group: chat examples: request: curl: "curl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n chatCompletion, err := client.Chat.Completions.Get(context.TODO(), \"completion_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion = client.chat.completions.retrieve(\n \"completion_id\",\n)\nprint(chat_completion.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.retrieve('completion_id');\n\nconsole.log(chatCompletion.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.Get(context.TODO(), \"completion_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletion chatCompletion = client.chat().completions().retrieve(\"completion_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst chatCompletion = await client.chat.completions.retrieve('completion_id');\n\nconsole.log(chatCompletion.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nchat_completion = client.chat.completions.retrieve(\n \"completion_id\",\n)\nprint(chat_completion.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.retrieve(\"completion_id\")\n\nputs(chat_completion)" response: "{\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-abc123\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {},\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n}\n" - group: chat - name: Get chat completion - returns: 'The [ChatCompletion](https://platform.openai.com/docs/api-reference/chat/object) object matching the specified ID.' post: tags: - Chat - summary: Update chat completion - description: "Modify a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be modified. Currently,\nthe only supported modification is to update the `metadata` field.\n" + summary: "Modify a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be modified. Currently,\nthe only supported modification is to update the `metadata` field.\n" operationId: updateChatCompletion parameters: - name: completion_id @@ -696,24 +930,53 @@ paths: schema: $ref: '#/components/schemas/CreateChatCompletionResponse' x-oaiMeta: + name: Update chat completion + group: chat examples: request: curl: "curl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"metadata\": {\"foo\": \"bar\"}}'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n chatCompletion, err := client.Chat.Completions.Update(\n context.TODO(),\n \"completion_id\",\n openai.ChatCompletionUpdateParams{\n Metadata: shared.Metadata{\n \"foo\": \"string\",\n },\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion = client.chat.completions.update(\n completion_id=\"completion_id\",\n metadata={\n \"foo\": \"string\"\n },\n)\nprint(chat_completion.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletion = await client.chat.completions.update('completion_id', {\n metadata: { foo: 'string' },\n});\n\nconsole.log(chatCompletion.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletion, err := client.Chat.Completions.Update(\n\t\tcontext.TODO(),\n\t\t\"completion_id\",\n\t\topenai.ChatCompletionUpdateParams{\n\t\t\tMetadata: shared.Metadata{\n\t\t\t\t\"foo\": \"string\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletion.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.chat.completions.ChatCompletion;\nimport com.openai.models.chat.completions.ChatCompletionUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionUpdateParams params = ChatCompletionUpdateParams.builder()\n .completionId(\"completion_id\")\n .metadata(ChatCompletionUpdateParams.Metadata.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n .build())\n .build();\n ChatCompletion chatCompletion = client.chat().completions().update(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst chatCompletion = await client.chat.completions.update('completion_id', { metadata: { foo: 'string' } });\n\nconsole.log(chatCompletion.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nchat_completion = client.chat.completions.update(\n completion_id=\"completion_id\",\n metadata={\n \"foo\": \"string\"\n },\n)\nprint(chat_completion.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion = openai.chat.completions.update(\"completion_id\", metadata: {foo: \"string\"})\n\nputs(chat_completion)" response: "{\n \"object\": \"chat.completion\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"created\": 1738960610,\n \"request_id\": \"req_ded8ab984ec4bf840f37566c1011c417\",\n \"tool_choice\": null,\n \"usage\": {\n \"total_tokens\": 31,\n \"completion_tokens\": 18,\n \"prompt_tokens\": 13\n },\n \"seed\": 4944116822809979520,\n \"top_p\": 1.0,\n \"temperature\": 1.0,\n \"presence_penalty\": 0.0,\n \"frequency_penalty\": 0.0,\n \"system_fingerprint\": \"fp_50cad350e4\",\n \"input_user\": null,\n \"service_tier\": \"default\",\n \"tools\": null,\n \"metadata\": {\n \"foo\": \"bar\"\n },\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"content\": \"Mind of circuits hum, \\nLearning patterns in silence— \\nFuture's quiet spark.\",\n \"role\": \"assistant\",\n \"tool_calls\": null,\n \"function_call\": null\n },\n \"finish_reason\": \"stop\",\n \"logprobs\": null\n }\n ],\n \"response_format\": null\n}\n" + delete: + tags: + - Chat + summary: "Delete a stored chat completion. Only Chat Completions that have been\ncreated with the `store` parameter set to `true` can be deleted.\n" + operationId: deleteChatCompletion + parameters: + - name: completion_id + in: path + description: The ID of the chat completion to delete. + required: true + schema: + type: string + responses: + '200': + description: The chat completion was deleted successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ChatCompletionDeleted' + x-oaiMeta: + name: Delete chat completion group: chat - name: Update chat completion - returns: 'The [ChatCompletion](https://platform.openai.com/docs/api-reference/chat/object) object matching the specified ID.' + examples: + request: + curl: "curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nchat_completion_deleted = client.chat.completions.delete(\n \"completion_id\",\n)\nprint(chat_completion_deleted.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatCompletionDeleted = await client.chat.completions.delete('completion_id');\n\nconsole.log(chatCompletionDeleted.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchatCompletionDeleted, err := client.Chat.Completions.Delete(context.TODO(), \"completion_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chatCompletionDeleted.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionDeleteParams;\nimport com.openai.models.chat.completions.ChatCompletionDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ChatCompletionDeleted chatCompletionDeleted = client.chat().completions().delete(\"completion_id\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nchat_completion_deleted = openai.chat.completions.delete(\"completion_id\")\n\nputs(chat_completion_deleted)" + response: "{\n \"object\": \"chat.completion.deleted\",\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2\",\n \"deleted\": true\n}\n" '/chat/completions/{completion_id}/messages': get: tags: - Chat - summary: Get chat messages - description: "Get the messages in a stored chat completion. Only Chat Completions that\nhave been created with the `store` parameter set to `true` will be\nreturned.\n" + summary: "Get the messages in a stored chat completion. Only Chat Completions that\nhave been created with the `store` parameter set to `true` will be\nreturned.\n" operationId: getChatCompletionMessages parameters: - name: completion_id @@ -750,24 +1013,22 @@ paths: schema: $ref: '#/components/schemas/ChatCompletionMessageList' x-oaiMeta: + name: Get chat messages + group: chat examples: request: curl: "curl https://api.openai.com/v1/chat/completions/chat_abc123/messages \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Chat.Completions.Messages.List(\n context.TODO(),\n \"completion_id\",\n openai.ChatCompletionMessageListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.chat.completions.messages.list(\n completion_id=\"completion_id\",\n)\npage = page.data[0]\nprint(page)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletionStoreMessage of client.chat.completions.messages.list(\n 'completion_id',\n)) {\n console.log(chatCompletionStoreMessage);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Chat.Completions.Messages.List(\n\t\tcontext.TODO(),\n\t\t\"completion_id\",\n\t\topenai.ChatCompletionMessageListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.messages.MessageListPage;\nimport com.openai.models.chat.completions.messages.MessageListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageListPage page = client.chat().completions().messages().list(\"completion_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatCompletionStoreMessage of client.chat.completions.messages.list('completion_id')) {\n console.log(chatCompletionStoreMessage);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.chat.completions.messages.list(\n completion_id=\"completion_id\",\n)\npage = page.data[0]\nprint(page)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.chat.completions.messages.list(\"completion_id\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"role\": \"user\",\n \"content\": \"write a haiku about ai\",\n \"name\": null,\n \"content_parts\": null\n }\n ],\n \"first_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"last_id\": \"chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0\",\n \"has_more\": false\n}\n" - group: chat - name: Get chat messages - returns: 'A list of [messages](https://platform.openai.com/docs/api-reference/chat/message-list) for the specified chat completion.' /completions: post: tags: - Completions - summary: Create completion - description: Creates a completion for the provided prompt and parameters. + summary: "Creates a completion for the provided prompt and parameters.\n\nReturns a completion object, or a sequence of completion objects if the request is streamed.\n" operationId: createCompletion requestBody: content: @@ -783,24 +1044,34 @@ paths: schema: $ref: '#/components/schemas/CreateCompletionResponse' x-oaiMeta: - example: - request: - curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n completion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n Model: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n Prompt: openai.CompletionNewParamsPromptUnion{\n OfString: openai.String(\"This is a test.\"),\n },\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", completion)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.completions.Completion;\nimport com.openai.models.completions.CompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CompletionCreateParams params = CompletionCreateParams.builder()\n .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n .prompt(\"This is a test.\")\n .build();\n Completion completion = client.completions().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst completion = await client.completions.create({ model: 'string', prompt: 'This is a test.' });\n\nconsole.log(completion);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ncompletion = client.completions.create(\n model=\"string\",\n prompt=\"This is a test.\",\n)\nprint(completion)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncompletion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a test.\")\n\nputs(completion)" - response: "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_completion_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n" - title: No streaming + name: Create completion group: completions legacy: true - name: Create completion - returns: "Returns a [completion](https://platform.openai.com/docs/api-reference/completions/object) object, or a sequence of completion objects if the request is streamed.\n" + examples: + - title: No streaming + request: + curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.completions.create(\n model=\"string\",\n prompt=\"This is a test.\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n max_tokens: 7,\n temperature: 0,\n });\n\n console.log(completion);\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.completions.create({ model: 'string', prompt: 'This is a test.' });\n\nconsole.log(completion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcompletion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n\t\tModel: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n\t\tPrompt: openai.CompletionNewParamsPromptUnion{\n\t\t\tOfString: openai.String(\"This is a test.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", completion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.completions.Completion;\nimport com.openai.models.completions.CompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CompletionCreateParams params = CompletionCreateParams.builder()\n .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n .prompt(\"This is a test.\")\n .build();\n Completion completion = client.completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncompletion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a test.\")\n\nputs(completion)" + response: "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_completion_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n" + - title: Streaming + request: + curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0,\n \"stream\": true\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor completion in client.completions.create(\n model=\"string\",\n prompt=\"This is a test.\",\n):\n print(completion)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const stream = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n stream: true,\n });\n\n for await (const chunk of stream) {\n console.log(chunk.choices[0].text)\n }\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst completion = await client.completions.create({ model: 'string', prompt: 'This is a test.' });\n\nconsole.log(completion);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcompletion, err := client.Completions.New(context.TODO(), openai.CompletionNewParams{\n\t\tModel: openai.CompletionNewParamsModelGPT3_5TurboInstruct,\n\t\tPrompt: openai.CompletionNewParamsPromptUnion{\n\t\t\tOfString: openai.String(\"This is a test.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", completion)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.completions.Completion;\nimport com.openai.models.completions.CompletionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CompletionCreateParams params = CompletionCreateParams.builder()\n .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)\n .prompt(\"This is a test.\")\n .build();\n Completion completion = client.completions().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncompletion = openai.completions.create(model: :\"gpt-3.5-turbo-instruct\", prompt: \"This is a test.\")\n\nputs(completion)" + response: "{\n \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\",\n \"object\": \"text_completion\",\n \"created\": 1690759702,\n \"choices\": [\n {\n \"text\": \"This\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": null\n }\n ],\n \"model\": \"gpt-3.5-turbo-instruct\"\n \"system_fingerprint\": \"fp_44709d6fcb\",\n}\n" /containers: get: - summary: List containers - description: List Containers + summary: List Containers + description: Lists containers. operationId: ListContainers parameters: - name: limit @@ -823,6 +1094,11 @@ paths: description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string + - name: name + in: query + description: Filter results by container name. + schema: + type: string responses: '200': description: Success @@ -831,22 +1107,21 @@ paths: schema: $ref: '#/components/schemas/ContainerListResource' x-oaiMeta: + name: List containers + group: containers + path: get examples: request: curl: "curl https://api.openai.com/v1/containers \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Containers.List(context.TODO(), openai.ContainerListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const containerListResponse of client.containers.list()) {\n console.log(containerListResponse.id);\n}" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.containers.list()\npage = page.data[0]\nprint(page.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Containers.List(context.TODO(), openai.ContainerListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerListPage;\nimport com.openai.models.containers.ContainerListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerListPage page = client.containers().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const containerListResponse of client.containers.list()) {\n console.log(containerListResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.containers.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.containers.list\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"name\": \"My Container\"\n }\n ],\n \"first_id\": \"container_123\",\n \"last_id\": \"container_123\",\n \"has_more\": false\n}\n" - group: containers - name: List containers - path: get - returns: 'a list of [container](https://platform.openai.com/docs/api-reference/containers/object) objects.' + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n }\n ],\n \"first_id\": \"container_123\",\n \"last_id\": \"container_123\",\n \"has_more\": false\n}\n" post: - summary: Create container - description: Create Container + summary: Create Container + description: Creates a container. operationId: CreateContainer requestBody: content: @@ -861,23 +1136,52 @@ paths: schema: $ref: '#/components/schemas/ContainerResource' x-oaiMeta: + name: Create container + group: containers + path: post examples: request: - curl: "curl https://api.openai.com/v1/containers \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"My Container\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n container, err := client.Containers.New(context.TODO(), openai.ContainerNewParams{\n Name: \"name\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", container.ID)\n}\n" + curl: "curl https://api.openai.com/v1/containers \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"My Container\",\n \"memory_limit\": \"4g\",\n \"skills\": [\n {\n \"type\": \"skill_reference\",\n \"skill_id\": \"skill_4db6f1a2c9e73508b41f9da06e2c7b5f\"\n },\n {\n \"type\": \"skill_reference\",\n \"skill_id\": \"openai-spreadsheets\",\n \"version\": \"latest\"\n }\n ],\n \"network_policy\": {\n \"type\": \"allowlist\",\n \"allowed_domains\": [\"api.buildkite.com\"]\n }\n }'\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst container = await client.containers.create({ name: 'name' });\n\nconsole.log(container.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontainer = client.containers.create(\n name=\"name\",\n)\nprint(container.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontainer, err := client.Containers.New(context.TODO(), openai.ContainerNewParams{\n\t\tName: \"name\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", container.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerCreateParams;\nimport com.openai.models.containers.ContainerCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerCreateParams params = ContainerCreateParams.builder()\n .name(\"name\")\n .build();\n ContainerCreateResponse container = client.containers().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst container = await client.containers.create({ name: 'name' });\n\nconsole.log(container.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ncontainer = client.containers.create(\n name=\"name\",\n)\nprint(container.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontainer = openai.containers.create(name: \"name\")\n\nputs(container)" - response: "{\n \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\",\n \"object\": \"container\",\n \"created_at\": 1747857508,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747857508,\n \"name\": \"My Container\"\n}\n" - group: containers - name: Create container - path: post - returns: 'The created [container](https://platform.openai.com/docs/api-reference/containers/object) object.' + response: "{\n \"id\": \"cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591\",\n \"object\": \"container\",\n \"created_at\": 1747857508,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747857508,\n \"network_policy\": {\n \"type\": \"allowlist\",\n \"allowed_domains\": [\"api.buildkite.com\"]\n },\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n}\n" '/containers/{container_id}': + get: + summary: Retrieve Container + description: Retrieves a container. + operationId: RetrieveContainer + parameters: + - name: container_id + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ContainerResource' + x-oaiMeta: + name: Retrieve container + group: containers + path: get + examples: + request: + curl: "curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst container = await client.containers.retrieve('container_id');\n\nconsole.log(container.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontainer = client.containers.retrieve(\n \"container_id\",\n)\nprint(container.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontainer, err := client.Containers.Get(context.TODO(), \"container_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", container.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerRetrieveParams;\nimport com.openai.models.containers.ContainerRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerRetrieveResponse container = client.containers().retrieve(\"container_id\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontainer = openai.containers.retrieve(\"container_id\")\n\nputs(container)" + response: "{\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"memory_limit\": \"4g\",\n \"name\": \"My Container\"\n}\n" delete: - summary: Delete a container - description: Delete Container + summary: Delete Container + description: Delete a container. operationId: DeleteContainer parameters: - name: container_id @@ -890,54 +1194,61 @@ paths: '200': description: OK x-oaiMeta: + name: Delete a container + group: containers + path: delete examples: request: curl: "curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n err := client.Containers.Delete(context.TODO(), \"container_id\")\n if err != nil {\n panic(err.Error())\n }\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.containers.delete('container_id');" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nclient.containers.delete(\n \"container_id\",\n)" + go: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Containers.Delete(context.TODO(), \"container_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n client.containers().delete(\"container_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nawait client.containers.delete('container_id');" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nclient.containers.delete(\n \"container_id\",\n)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresult = openai.containers.delete(\"container_id\")\n\nputs(result)" response: "{\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container.deleted\",\n \"deleted\": true\n}\n" - group: containers - name: Delete a container - path: delete - returns: Deletion Status - get: - summary: Retrieve container - description: Retrieve Container - operationId: RetrieveContainer + '/containers/{container_id}/files': + post: + summary: "Create a Container File\n\nYou can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.\n" + description: "Creates a container file.\n" + operationId: CreateContainerFile parameters: - name: container_id in: path required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateContainerFileBody' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateContainerFileBody' + required: true responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ContainerResource' + $ref: '#/components/schemas/ContainerFileResource' x-oaiMeta: + name: Create container file + group: containers + path: post examples: request: - curl: "curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n container, err := client.Containers.Get(context.TODO(), \"container_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", container.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.ContainerRetrieveParams;\nimport com.openai.models.containers.ContainerRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContainerRetrieveResponse container = client.containers().retrieve(\"container_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst container = await client.containers.retrieve('container_id');\n\nconsole.log(container.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ncontainer = client.containers.retrieve(\n \"container_id\",\n)\nprint(container.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontainer = openai.containers.retrieve(\"container_id\")\n\nputs(container)" - response: "{\n \"id\": \"cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863\",\n \"object\": \"container\",\n \"created_at\": 1747844794,\n \"status\": \"running\",\n \"expires_after\": {\n \"anchor\": \"last_active_at\",\n \"minutes\": 20\n },\n \"last_active_at\": 1747844794,\n \"name\": \"My Container\"\n}\n" - group: containers - name: Retrieve container - path: get - returns: 'The [container](https://platform.openai.com/docs/api-reference/containers/object) object.' - '/containers/{container_id}/files': + curl: "curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F file=\"@example.txt\"\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.containers.files.create('container_id');\n\nconsole.log(file.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile = client.containers.files.create(\n container_id=\"container_id\",\n)\nprint(file.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfile, err := client.Containers.Files.New(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\topenai.ContainerFileNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", file.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileCreateParams;\nimport com.openai.models.containers.files.FileCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateResponse file = client.containers().files().create(\"container_id\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.create(\"container_id\")\n\nputs(file)" + response: "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" get: - summary: List container files - description: List Container files + summary: List Container files + description: Lists container files. operationId: ListContainerFiles parameters: - name: container_id @@ -973,35 +1284,34 @@ paths: schema: $ref: '#/components/schemas/ContainerFileListResource' x-oaiMeta: + name: List container files + group: containers + path: get examples: request: curl: "curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Containers.Files.List(\n context.TODO(),\n \"container_id\",\n openai.ContainerFileListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.containers.files.list('container_id')) {\n console.log(fileListResponse.id);\n}" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.containers.files.list(\n container_id=\"container_id\",\n)\npage = page.data[0]\nprint(page.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Containers.Files.List(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\topenai.ContainerFileListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileListPage;\nimport com.openai.models.containers.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileListPage page = client.containers().files().list(\"container_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.containers.files.list('container_id')) {\n console.log(fileListResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.containers.files.list(\n container_id=\"container_id\",\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.containers.files.list(\"container_id\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n }\n ],\n \"first_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"has_more\": false,\n \"last_id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\"\n}\n" - group: containers - name: List container files - path: get - returns: 'a list of [container file](https://platform.openai.com/docs/api-reference/container-files/object) objects.' - post: - summary: Create container file - description: "Create a Container File\n\nYou can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.\n" - operationId: CreateContainerFile + '/containers/{container_id}/files/{file_id}': + get: + summary: Retrieve Container File + description: Retrieves a container file. + operationId: RetrieveContainerFile parameters: - name: container_id in: path required: true schema: type: string - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateContainerFileBody' - required: true + - name: file_id + in: path + required: true + schema: + type: string responses: '200': description: Success @@ -1010,23 +1320,21 @@ paths: schema: $ref: '#/components/schemas/ContainerFileResource' x-oaiMeta: + name: Retrieve container file + group: containers + path: get examples: request: - curl: "curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F file=\"@example.txt\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n file, err := client.Containers.Files.New(\n context.TODO(),\n \"container_id\",\n openai.ContainerFileNewParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", file.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileCreateParams;\nimport com.openai.models.containers.files.FileCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateResponse file = client.containers().files().create(\"container_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst file = await client.containers.files.create('container_id');\n\nconsole.log(file.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfile = client.containers.files.create(\n container_id=\"container_id\",\n)\nprint(file.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.create(\"container_id\")\n\nputs(file)" - response: "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" - group: containers - name: Create container file - path: post - returns: 'The created [container file](https://platform.openai.com/docs/api-reference/container-files/object) object.' - '/containers/{container_id}/files/{file_id}': + curl: "curl https://api.openai.com/v1/containers/container_123/files/file_456 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.containers.files.retrieve('file_id', { container_id: 'container_id' });\n\nconsole.log(file.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile = client.containers.files.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(file.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfile, err := client.Containers.Files.Get(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", file.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileRetrieveParams;\nimport com.openai.models.containers.files.FileRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileRetrieveParams params = FileRetrieveParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n FileRetrieveResponse file = client.containers().files().retrieve(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.retrieve(\"file_id\", container_id: \"container_id\")\n\nputs(file)" + response: "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" delete: - summary: Delete a container file - description: Delete Container File + summary: Delete Container File + description: Delete a container file. operationId: DeleteContainerFile parameters: - name: container_id @@ -1043,59 +1351,22 @@ paths: '200': description: OK x-oaiMeta: + name: Delete a container file + group: containers + path: delete examples: request: curl: "curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n err := client.Containers.Files.Delete(\n context.TODO(),\n \"container_id\",\n \"file_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.containers.files.delete('file_id', { container_id: 'container_id' });" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nclient.containers.files.delete(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)" + go: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Containers.Files.Delete(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileDeleteParams params = FileDeleteParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n client.containers().files().delete(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nawait client.containers.files.delete('file_id', { container_id: 'container_id' });" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nclient.containers.files.delete(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresult = openai.containers.files.delete(\"file_id\", container_id: \"container_id\")\n\nputs(result)" response: "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file.deleted\",\n \"deleted\": true\n}\n" - group: containers - name: Delete a container file - path: delete - returns: Deletion Status - get: - summary: Retrieve container file - description: Retrieve Container File - operationId: RetrieveContainerFile - parameters: - - name: container_id - in: path - required: true - schema: - type: string - - name: file_id - in: path - required: true - schema: - type: string - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ContainerFileResource' - x-oaiMeta: - examples: - request: - curl: "curl https://api.openai.com/v1/containers/container_123/files/file_456 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n file, err := client.Containers.Files.Get(\n context.TODO(),\n \"container_id\",\n \"file_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", file.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.containers.files.FileRetrieveParams;\nimport com.openai.models.containers.files.FileRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileRetrieveParams params = FileRetrieveParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n FileRetrieveResponse file = client.containers().files().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst file = await client.containers.files.retrieve('file_id', { container_id: 'container_id' });\n\nconsole.log(file.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfile = client.containers.files.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(file.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile = openai.containers.files.retrieve(\"file_id\", container_id: \"container_id\")\n\nputs(file)" - response: "{\n \"id\": \"cfile_682e0e8a43c88191a7978f477a09bdf5\",\n \"object\": \"container.file\",\n \"created_at\": 1747848842,\n \"bytes\": 880,\n \"container_id\": \"cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04\",\n \"path\": \"/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json\",\n \"source\": \"user\"\n}\n" - group: containers - name: Retrieve container file - path: get - returns: 'The [container file](https://platform.openai.com/docs/api-reference/container-files/object) object.' '/containers/{container_id}/files/{file_id}/content': get: - summary: Retrieve container file content - description: Retrieve Container File Content + summary: Retrieve Container File Content + description: Retrieves a container file content. operationId: RetrieveContainerFileContent parameters: - name: container_id @@ -1112,181 +1383,79 @@ paths: '200': description: Success x-oaiMeta: + name: Retrieve container file content + group: containers + path: get examples: request: curl: "curl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n content, err := client.Containers.Files.Content.Get(\n context.TODO(),\n \"container_id\",\n \"file_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", content)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst content = await client.containers.files.content.retrieve('file_id', {\n container_id: 'container_id',\n});\n\nconsole.log(content);\n\nconst data = await content.blob();\nconsole.log(data);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncontent = client.containers.files.content.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(content)\ndata = content.read()\nprint(data)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontent, err := client.Containers.Files.Content.Get(\n\t\tcontext.TODO(),\n\t\t\"container_id\",\n\t\t\"file_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", content)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.containers.files.content.ContentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ContentRetrieveParams params = ContentRetrieveParams.builder()\n .containerId(\"container_id\")\n .fileId(\"file_id\")\n .build();\n HttpResponse content = client.containers().files().content().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst content = await client.containers.files.content.retrieve('file_id', { container_id: 'container_id' });\n\nconsole.log(content);\n\nconst data = await content.blob();\nconsole.log(data);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ncontent = client.containers.files.content.retrieve(\n file_id=\"file_id\",\n container_id=\"container_id\",\n)\nprint(content)\ndata = content.read()\nprint(data)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncontent = openai.containers.files.content.retrieve(\"file_id\", container_id: \"container_id\")\n\nputs(content)" response: "\n" - group: containers - name: Retrieve container file content - path: get - returns: The contents of the container file. - /conversations: + '/conversations/{conversation_id}/items': post: tags: - Conversations - summary: Create a conversation - description: Create a conversation. - operationId: createConversation + summary: Create items in a conversation with the given ID. + operationId: createConversationItems + parameters: + - name: conversation_id + in: path + description: The ID of the conversation to add the item to. + required: true + schema: + type: string + example: conv_123 + - name: include + in: query + description: "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" + schema: + type: array + items: + $ref: '#/components/schemas/IncludeEnum' requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateConversationBody' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationResource' - x-oaiMeta: - example: - request: - csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.CreateConversation(\n new CreateConversationOptions\n {\n Metadata = new Dictionary\n {\n { \"topic\", \"demo\" }\n },\n Items =\n {\n new ConversationMessageInput\n {\n Role = \"user\",\n Content = \"Hello!\",\n }\n }\n }\n);\nConsole.WriteLine(conversation.Id);\n" - curl: "curl https://api.openai.com/v1/conversations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"metadata\": {\"topic\": \"demo\"},\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.New(context.TODO(), conversations.ConversationNewParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Conversation conversation = client.conversations().create();\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.create({\n metadata: { topic: \"demo\" },\n items: [\n { type: \"message\", role: \"user\", content: \"Hello!\" }\n ],\n});\nconsole.log(conversation);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversation = await client.conversations.create();\n\nconsole.log(conversation.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation = client.conversations.create()\nprint(conversation.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation = openai.conversations.create\n\nputs(conversation)" - response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" - title: Create a conversation. - group: conversations - name: Create a conversation - path: create - returns: "Returns a [Conversation](https://platform.openai.com/docs/api-reference/conversations/object) object.\n" - '/conversations/{conversation_id}': - delete: - tags: - - Conversations - summary: Delete a conversation - description: Delete a conversation. Items in the conversation will not be deleted. - operationId: deleteConversation - parameters: - - name: conversation_id - in: path - description: The ID of the conversation to delete. - required: true - schema: - type: string - example: conv_123 - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/DeletedConversationResource' - x-oaiMeta: - example: - request: - csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nDeletedConversation deleted = client.DeleteConversation(\"conv_123\");\nConsole.WriteLine(deleted.Id);\n" - curl: "curl -X DELETE https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationDeletedResource, err := client.Conversations.Delete(context.TODO(), \"conv_123\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationDeletedResource.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.ConversationDeleteParams;\nimport com.openai.models.conversations.ConversationDeletedResource;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ConversationDeletedResource conversationDeletedResource = client.conversations().delete(\"conv_123\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst deleted = await client.conversations.delete(\"conv_123\");\nconsole.log(deleted);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationDeletedResource = await client.conversations.delete('conv_123');\n\nconsole.log(conversationDeletedResource.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_deleted_resource = client.conversations.delete(\n \"conv_123\",\n)\nprint(conversation_deleted_resource.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_deleted_resource = openai.conversations.delete(\"conv_123\")\n\nputs(conversation_deleted_resource)" - response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation.deleted\",\n \"deleted\": true\n}\n" - title: Delete a conversation - group: conversations - name: Delete a conversation - path: delete - returns: "A success message.\n" - get: - tags: - - Conversations - summary: Retrieve a conversation - description: Get a conversation - operationId: getConversation - parameters: - - name: conversation_id - in: path - description: The ID of the conversation to retrieve. - required: true - schema: - type: string - example: conv_123 + required: + - items + properties: + items: + maxItems: 20 + type: array + items: + $ref: '#/components/schemas/InputItem' + description: "The items to add to the conversation. You may add up to 20 items at a time.\n" + required: true responses: '200': - description: Success + description: OK content: application/json: schema: - $ref: '#/components/schemas/ConversationResource' + $ref: '#/components/schemas/ConversationItemList' x-oaiMeta: - example: - request: - csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.GetConversation(\"conv_123\");\nConsole.WriteLine(conversation.Id);\n" - curl: "curl https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.Get(context.TODO(), \"conv_123\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Conversation conversation = client.conversations().retrieve(\"conv_123\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.retrieve(\"conv_123\");\nconsole.log(conversation);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversation = await client.conversations.retrieve('conv_123');\n\nconsole.log(conversation.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation = client.conversations.retrieve(\n \"conv_123\",\n)\nprint(conversation.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation = openai.conversations.retrieve(\"conv_123\")\n\nputs(conversation)" - response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" - title: Retrieve a conversation + name: Create items group: conversations - name: Retrieve a conversation - path: retrieve - returns: "Returns a [Conversation](https://platform.openai.com/docs/api-reference/conversations/object) object.\n" - post: - tags: - - Conversations - summary: Update a conversation - description: Update a conversation - operationId: updateConversation - parameters: - - name: conversation_id - in: path - description: The ID of the conversation to update. - required: true - schema: - type: string - example: conv_123 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateConversationBody' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationResource' - x-oaiMeta: - example: + path: create-item + examples: request: - csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation updated = client.UpdateConversation(\n conversationId: \"conv_123\",\n new UpdateConversationOptions\n {\n Metadata = new Dictionary\n {\n { \"topic\", \"project-x\" }\n }\n }\n);\nConsole.WriteLine(updated.Id);\n" - curl: "curl https://api.openai.com/v1/conversations/conv_123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"metadata\": {\"topic\": \"project-x\"}\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/shared\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.Update(\n context.TODO(),\n \"conv_123\",\n conversations.ConversationUpdateParams{\n Metadata: shared.Metadata{\n \"foo\": \"string\",\n },\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.ConversationUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ConversationUpdateParams params = ConversationUpdateParams.builder()\n .conversationId(\"conv_123\")\n .metadata(ConversationUpdateParams.Metadata.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"string\"))\n .build())\n .build();\n Conversation conversation = client.conversations().update(params);\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst updated = await client.conversations.update(\n \"conv_123\",\n { metadata: { topic: \"project-x\" } }\n);\nconsole.log(updated);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversation = await client.conversations.update('conv_123', { metadata: { foo: 'string' } });\n\nconsole.log(conversation.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation = client.conversations.update(\n conversation_id=\"conv_123\",\n metadata={\n \"foo\": \"string\"\n },\n)\nprint(conversation.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation = openai.conversations.update(\"conv_123\", metadata: {foo: \"string\"})\n\nputs(conversation)" - response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"project-x\"}\n}\n" - title: Update conversation metadata - group: conversations - name: Update a conversation - path: update - returns: "Returns the updated [Conversation](https://platform.openai.com/docs/api-reference/conversations/object) object.\n" - '/conversations/{conversation_id}/items': + curl: "curl https://api.openai.com/v1/conversations/conv_123/items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ]\n }'\n" + javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)" + csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList created = client.ConversationItems.Create(\n conversationId: \"conv_123\",\n new CreateConversationItemsOptions\n {\n Items = new List\n {\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"Hello!\" }\n }\n },\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"How are you?\" }\n }\n }\n }\n }\n);\nConsole.WriteLine(created.Data.Count);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [\n {\n content: 'string',\n role: 'user',\n type: 'message',\n },\n ],\n});\n\nconsole.log(conversationItemList.first_id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n\t\"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItemList, err := client.Conversations.Items.New(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemNewParams{\n\t\t\tItems: []responses.ResponseInputItemUnionParam{{\n\t\t\t\tOfMessage: &responses.EasyInputMessageParam{\n\t\t\t\t\tContent: responses.EasyInputMessageContentUnionParam{\n\t\t\t\t\t\tOfString: openai.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\tRole: responses.EasyInputMessageRoleUser,\n\t\t\t\t\tType: responses.EasyInputMessageTypeMessage,\n\t\t\t\t},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"id\": \"msg_def\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_def\",\n \"has_more\": false\n}\n" get: tags: - Conversations - summary: List items - description: List all items for a conversation with the given ID. + summary: List all items for a conversation with the given ID. operationId: listConversationItems parameters: - name: conversation_id @@ -1317,11 +1486,11 @@ paths: type: string - name: include in: query - description: "Specify additional output data to include in the model response. Currently\nsupported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution\n in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of\n the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning\n tokens in reasoning item outputs. This enables reasoning items to be used in\n multi-turn conversations when using the Responses API statelessly (like\n when the `store` parameter is set to `false`, or when an organization is\n enrolled in the zero data retention program).\n" + description: "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)." schema: type: array items: - $ref: '#/components/schemas/Includable' + $ref: '#/components/schemas/IncludeEnum' responses: '200': description: OK @@ -1330,87 +1499,74 @@ paths: schema: $ref: '#/components/schemas/ConversationItemList' x-oaiMeta: - example: + name: List items + group: conversations + path: list-items + examples: request: - csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList items = client.ConversationItems.List(\n conversationId: \"conv_123\",\n new ListConversationItemsOptions { Limit = 10 }\n);\nConsole.WriteLine(items.Data.Count);\n" curl: "curl \"https://api.openai.com/v1/conversations/conv_123/items?limit=10\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Conversations.Items.List(\n context.TODO(),\n \"conv_123\",\n conversations.ItemListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ItemListPage;\nimport com.openai.models.conversations.items.ItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemListPage page = client.conversations().items().list(\"conv_123\");\n }\n}" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.list(\"conv_123\", { limit: 10 });\nconsole.log(items.data);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const conversationItem of client.conversations.items.list('conv_123')) {\n console.log(conversationItem);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.conversations.items.list(\n conversation_id=\"conv_123\",\n)\npage = page.data[0]\nprint(page)" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.conversations.items.list(\n conversation_id=\"conv_123\",\n)\npage = page.data[0]\nprint(page)" + csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList items = client.ConversationItems.List(\n conversationId: \"conv_123\",\n new ListConversationItemsOptions { Limit = 10 }\n);\nConsole.WriteLine(items.Data.Count);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const conversationItem of client.conversations.items.list('conv_123')) {\n console.log(conversationItem);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Conversations.Items.List(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\tconversations.ItemListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ItemListPage;\nimport com.openai.models.conversations.items.ItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemListPage page = client.conversations().items().list(\"conv_123\");\n }\n}" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.conversations.items.list(\"conv_123\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_abc\",\n \"has_more\": false\n}\n" - title: List items in a conversation - group: conversations - name: List items - path: list-items - returns: "Returns a [list object](https://platform.openai.com/docs/api-reference/conversations/list-items-object) containing Conversation items.\n" - post: + '/conversations/{conversation_id}/items/{item_id}': + get: tags: - Conversations - summary: Create items - description: Create items in a conversation with the given ID. - operationId: createConversationItems + summary: Get a single item from a conversation with the given IDs. + operationId: getConversationItem parameters: - name: conversation_id in: path - description: The ID of the conversation to add the item to. + description: The ID of the conversation that contains the item. required: true schema: type: string example: conv_123 + - name: item_id + in: path + description: The ID of the item to retrieve. + required: true + schema: + type: string + example: msg_abc - name: include in: query - description: "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" + description: "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" schema: type: array items: - $ref: '#/components/schemas/Includable' - requestBody: - content: - application/json: - schema: - required: - - items - properties: - items: - maxItems: 20 - type: array - items: - $ref: '#/components/schemas/InputItem' - description: "The items to add to the conversation. You may add up to 20 items at a time.\n" - required: true + $ref: '#/components/schemas/IncludeEnum' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ConversationItemList' + $ref: '#/components/schemas/ConversationItem' x-oaiMeta: - example: - request: - csharp: "using System;\nusing System.Collections.Generic;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItemList created = client.ConversationItems.Create(\n conversationId: \"conv_123\",\n new CreateConversationItemsOptions\n {\n Items = new List\n {\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"Hello!\" }\n }\n },\n new ConversationMessage\n {\n Role = \"user\",\n Content =\n {\n new ConversationInputText { Text = \"How are you?\" }\n }\n }\n }\n }\n);\nConsole.WriteLine(created.Data.Count);\n" - curl: "curl https://api.openai.com/v1/conversations/conv_123/items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"items\": [\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ]\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItemList, err := client.Conversations.Items.New(\n context.TODO(),\n \"conv_123\",\n conversations.ItemNewParams{\n Items: []responses.ResponseInputItemUnionParam{responses.ResponseInputItemUnionParam{\n OfMessage: &responses.EasyInputMessageParam{\n Content: responses.EasyInputMessageContentUnionParam{\n OfString: openai.String(\"string\"),\n },\n Role: responses.EasyInputMessageRoleUser,\n Type: responses.EasyInputMessageTypeMessage,\n },\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user', type: 'message' }],\n});\n\nconsole.log(conversationItemList.first_id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n },\n {\n \"type\": \"message\",\n \"id\": \"msg_def\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"How are you?\"}\n ]\n }\n ],\n \"first_id\": \"msg_abc\",\n \"last_id\": \"msg_def\",\n \"has_more\": false\n}\n" - title: Add a user message to a conversation + name: Retrieve an item group: conversations - name: Create items - path: create-item - returns: "Returns the list of added [items](https://platform.openai.com/docs/api-reference/conversations/list-items-object).\n" - '/conversations/{conversation_id}/items/{item_id}': + path: get-item + examples: + request: + curl: "curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst item = await client.conversations.items.retrieve(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(item);\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation_item = client.conversations.items.retrieve(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation_item)" + csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItem item = client.ConversationItems.Get(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(item.Id);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationItem = await client.conversations.items.retrieve('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversationItem);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/conversations\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversationItem, err := client.Conversations.Items.Get(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t\tconversations.ItemGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversationItem)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItem;\nimport com.openai.models.conversations.items.ItemRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemRetrieveParams params = ItemRetrieveParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n ConversationItem conversationItem = client.conversations().items().retrieve(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item = openai.conversations.items.retrieve(\"msg_abc\", conversation_id: \"conv_123\")\n\nputs(conversation_item)" + response: "{\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n}\n" delete: tags: - Conversations - summary: Delete an item - description: Delete an item from a conversation with the given IDs. + summary: Delete an item from a conversation with the given IDs. operationId: deleteConversationItem parameters: - name: conversation_id @@ -1435,80 +1591,25 @@ paths: schema: $ref: '#/components/schemas/ConversationResource' x-oaiMeta: - example: + name: Delete an item + group: conversations + path: delete-item + examples: request: - csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.ConversationItems.Delete(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(conversation.Id);\n" curl: "curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversation, err := client.Conversations.Items.Delete(\n context.TODO(),\n \"conv_123\",\n \"msg_abc\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.items.ItemDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemDeleteParams params = ItemDeleteParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n Conversation conversation = client.conversations().items().delete(params);\n }\n}" javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst conversation = await client.conversations.items.delete(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(conversation);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversation = await client.conversations.items.delete('msg_abc', { conversation_id: 'conv_123' });\n\nconsole.log(conversation.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation = client.conversations.items.delete(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation.id)" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nconversation = client.conversations.items.delete(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation.id)" + csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversation conversation = client.ConversationItems.Delete(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(conversation.Id);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversation = await client.conversations.items.delete('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversation.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tconversation, err := client.Conversations.Items.Delete(\n\t\tcontext.TODO(),\n\t\t\"conv_123\",\n\t\t\"msg_abc\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", conversation.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.Conversation;\nimport com.openai.models.conversations.items.ItemDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemDeleteParams params = ItemDeleteParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n Conversation conversation = client.conversations().items().delete(params);\n }\n}" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation = openai.conversations.items.delete(\"msg_abc\", conversation_id: \"conv_123\")\n\nputs(conversation)" response: "{\n \"id\": \"conv_123\",\n \"object\": \"conversation\",\n \"created_at\": 1741900000,\n \"metadata\": {\"topic\": \"demo\"}\n}\n" - title: Delete an item - group: conversations - name: Delete an item - path: delete-item - returns: "Returns the updated [Conversation](https://platform.openai.com/docs/api-reference/conversations/object) object.\n" - get: - tags: - - Conversations - summary: Retrieve an item - description: Get a single item from a conversation with the given IDs. - operationId: getConversationItem - parameters: - - name: conversation_id - in: path - description: The ID of the conversation that contains the item. - required: true - schema: - type: string - example: conv_123 - - name: item_id - in: path - description: The ID of the item to retrieve. - required: true - schema: - type: string - example: msg_abc - - name: include - in: query - description: "Additional fields to include in the response. See the `include`\nparameter for [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include) for more information.\n" - schema: - type: array - items: - $ref: '#/components/schemas/Includable' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ConversationItem' - x-oaiMeta: - example: - request: - csharp: "using System;\nusing OpenAI.Conversations;\n\nOpenAIConversationClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nConversationItem item = client.ConversationItems.Get(\n conversationId: \"conv_123\",\n itemId: \"msg_abc\"\n);\nConsole.WriteLine(item.Id);\n" - curl: "curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItem, err := client.Conversations.Items.Get(\n context.TODO(),\n \"conv_123\",\n \"msg_abc\",\n conversations.ItemGetParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItem)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItem;\nimport com.openai.models.conversations.items.ItemRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemRetrieveParams params = ItemRetrieveParams.builder()\n .conversationId(\"conv_123\")\n .itemId(\"msg_abc\")\n .build();\n ConversationItem conversationItem = client.conversations().items().retrieve(params);\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst item = await client.conversations.items.retrieve(\n \"conv_123\",\n \"msg_abc\"\n);\nconsole.log(item);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItem = await client.conversations.items.retrieve('msg_abc', {\n conversation_id: 'conv_123',\n});\n\nconsole.log(conversationItem);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item = client.conversations.items.retrieve(\n item_id=\"msg_abc\",\n conversation_id=\"conv_123\",\n)\nprint(conversation_item)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item = openai.conversations.items.retrieve(\"msg_abc\", conversation_id: \"conv_123\")\n\nputs(conversation_item)" - response: "{\n \"type\": \"message\",\n \"id\": \"msg_abc\",\n \"status\": \"completed\",\n \"role\": \"user\",\n \"content\": [\n {\"type\": \"input_text\", \"text\": \"Hello!\"}\n ]\n}\n" - title: Retrieve an item - group: conversations - name: Retrieve an item - path: get-item - returns: "Returns a [Conversation Item](https://platform.openai.com/docs/api-reference/conversations/item-object).\n" /embeddings: post: tags: - Embeddings - summary: Create embeddings - description: Creates an embedding vector representing the input text. + summary: Creates an embedding vector representing the input text. operationId: createEmbedding requestBody: content: @@ -1524,25 +1625,24 @@ paths: schema: $ref: '#/components/schemas/CreateEmbeddingResponse' x-oaiMeta: + name: Create embeddings + group: embeddings examples: request: - csharp: "using System;\n\nusing OpenAI.Embeddings;\n\nEmbeddingClient client = new(\n model: \"text-embedding-3-small\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nOpenAIEmbedding embedding = client.GenerateEmbedding(input: \"The quick brown fox jumped over the lazy dog\");\nReadOnlyMemory vector = embedding.ToFloats();\n\nfor (int i = 0; i < vector.Length; i++)\n{\n Console.WriteLine($\" [{i,4}] = {vector.Span[i]}\");\n}\n" curl: "curl https://api.openai.com/v1/embeddings \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input\": \"The food was delicious and the waiter...\",\n \"model\": \"text-embedding-ada-002\",\n \"encoding_format\": \"float\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n createEmbeddingResponse, err := client.Embeddings.New(context.TODO(), openai.EmbeddingNewParams{\n Input: openai.EmbeddingNewParamsInputUnion{\n OfString: openai.String(\"The quick brown fox jumped over the lazy dog\"),\n },\n Model: openai.EmbeddingModelTextEmbeddingAda002,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", createEmbeddingResponse.Data)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.embeddings.CreateEmbeddingResponse;\nimport com.openai.models.embeddings.EmbeddingCreateParams;\nimport com.openai.models.embeddings.EmbeddingModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EmbeddingCreateParams params = EmbeddingCreateParams.builder()\n .input(\"The quick brown fox jumped over the lazy dog\")\n .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)\n .build();\n CreateEmbeddingResponse createEmbeddingResponse = client.embeddings().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst createEmbeddingResponse = await client.embeddings.create({\n input: 'The quick brown fox jumped over the lazy dog',\n model: 'text-embedding-3-small',\n});\n\nconsole.log(createEmbeddingResponse.data);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\ncreate_embedding_response = client.embeddings.create(\n input=\"The quick brown fox jumped over the lazy dog\",\n model=\"text-embedding-3-small\",\n)\nprint(create_embedding_response.data)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncreate_embedding_response = openai.embeddings.create(\n input: \"The quick brown fox jumped over the lazy dog\",\n model: :\"text-embedding-ada-002\"\n)\n\nputs(create_embedding_response)" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\ncreate_embedding_response = client.embeddings.create(\n input=\"The quick brown fox jumped over the lazy dog\",\n model=\"text-embedding-3-small\",\n)\nprint(create_embedding_response.data)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const embedding = await openai.embeddings.create({\n model: \"text-embedding-ada-002\",\n input: \"The quick brown fox jumped over the lazy dog\",\n encoding_format: \"float\",\n });\n\n console.log(embedding);\n}\n\nmain();\n" + csharp: "using System;\n\nusing OpenAI.Embeddings;\n\nEmbeddingClient client = new(\n model: \"text-embedding-3-small\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nOpenAIEmbedding embedding = client.GenerateEmbedding(input: \"The quick brown fox jumped over the lazy dog\");\nReadOnlyMemory vector = embedding.ToFloats();\n\nfor (int i = 0; i < vector.Length; i++)\n{\n Console.WriteLine($\" [{i,4}] = {vector.Span[i]}\");\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst createEmbeddingResponse = await client.embeddings.create({\n input: 'The quick brown fox jumped over the lazy dog',\n model: 'text-embedding-3-small',\n});\n\nconsole.log(createEmbeddingResponse.data);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcreateEmbeddingResponse, err := client.Embeddings.New(context.TODO(), openai.EmbeddingNewParams{\n\t\tInput: openai.EmbeddingNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"The quick brown fox jumped over the lazy dog\"),\n\t\t},\n\t\tModel: openai.EmbeddingModelTextEmbedding3Small,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", createEmbeddingResponse.Data)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.embeddings.CreateEmbeddingResponse;\nimport com.openai.models.embeddings.EmbeddingCreateParams;\nimport com.openai.models.embeddings.EmbeddingModel;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EmbeddingCreateParams params = EmbeddingCreateParams.builder()\n .input(\"The quick brown fox jumped over the lazy dog\")\n .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)\n .build();\n CreateEmbeddingResponse createEmbeddingResponse = client.embeddings().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\ncreate_embedding_response = openai.embeddings.create(\n input: \"The quick brown fox jumped over the lazy dog\",\n model: :\"text-embedding-3-small\"\n)\n\nputs(create_embedding_response)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222,\n ],\n \"index\": 0\n }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n" - group: embeddings - name: Create embeddings - returns: 'A list of [embedding](https://platform.openai.com/docs/api-reference/embeddings/object) objects.' /evals: get: tags: - Evals - summary: List evals - description: "List evaluations for a project.\n" + summary: "List evaluations for a project.\n" operationId: listEvals parameters: - name: after @@ -1582,23 +1682,22 @@ paths: schema: $ref: '#/components/schemas/EvalList' x-oaiMeta: + name: List evals + group: evals + path: list examples: request: curl: "curl https://api.openai.com/v1/evals?limit=1 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.list()\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evals = await openai.evals.list({ limit: 1 });\nconsole.log(evals);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evalListResponse of client.evals.list()) {\n console.log(evalListResponse.id);\n}" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalListPage;\nimport com.openai.models.evals.EvalListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalListPage page = client.evals().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const evalListResponse of client.evals.list()) {\n console.log(evalListResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.evals.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.list\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"object\": \"eval\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"push_notifications_summarizer\"\n },\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\"\n },\n \"sample\": {\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"item\",\n \"sample\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"Push Notification Summary Grader\",\n \"id\": \"Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673\",\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\nLabel the following push notification summary as either correct or incorrect.\\nThe push notification and the summary will be provided below.\\nA good push notificiation summary is concise and snappy.\\nIf it is good, then label it as correct, if not, then incorrect.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\nPush notifications: {{item.input}}\\nSummary: {{sample.output_text}}\\n\"\n }\n }\n ],\n \"passing_labels\": [\n \"correct\"\n ],\n \"labels\": [\n \"correct\",\n \"incorrect\"\n ],\n \"sampling_params\": null\n }\n ],\n \"name\": \"Push Notification Summary Grader\",\n \"created_at\": 1739314509,\n \"metadata\": {\n \"description\": \"A stored completions eval for push notification summaries\"\n }\n }\n ],\n \"first_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"last_id\": \"eval_67aa884cf6688190b58f657d4441c8b7\",\n \"has_more\": true\n}\n" - group: evals - name: List evals - path: list - returns: 'A list of [evals](https://platform.openai.com/docs/api-reference/evals/object) matching the specified filters.' post: tags: - Evals - summary: Create eval - description: "Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals).\n" + summary: "Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](/docs/guides/evals).\n" operationId: createEval requestBody: content: @@ -1614,76 +1713,23 @@ paths: schema: $ref: '#/components/schemas/Eval' x-oaiMeta: + name: Create eval + group: evals + path: post examples: request: curl: "curl https://api.openai.com/v1/evals \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Sentiment\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"chatbot\"\n }\n },\n \"testing_criteria\": [\n {\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Statement: {{item.input}}\"\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ],\n \"name\": \"Example label grader\"\n }\n ]\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.create(\n data_source_config={\n \"item_schema\": {\n \"foo\": \"bar\"\n },\n \"type\": \"custom\",\n },\n testing_criteria=[{\n \"input\": [{\n \"content\": \"content\",\n \"role\": \"role\",\n }],\n \"labels\": [\"string\"],\n \"model\": \"model\",\n \"name\": \"name\",\n \"passing_labels\": [\"string\"],\n \"type\": \"label_model\",\n }],\n)\nprint(eval.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evalObj = await openai.evals.create({\n name: \"Sentiment\",\n data_source_config: {\n type: \"stored_completions\",\n metadata: { usecase: \"chatbot\" }\n },\n testing_criteria: [\n {\n type: \"label_model\",\n model: \"o3-mini\",\n input: [\n { role: \"developer\", content: \"Classify the sentiment of the following statement as one of 'positive', 'neutral', or 'negative'\" },\n { role: \"user\", content: \"Statement: {{item.input}}\" }\n ],\n passing_labels: [\"positive\"],\n labels: [\"positive\", \"neutral\", \"negative\"],\n name: \"Example label grader\"\n }\n ]\n});\nconsole.log(evalObj);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.create({\n data_source_config: {\n item_schema: { foo: 'bar' },\n type: 'custom',\n },\n testing_criteria: [\n {\n input: [{ content: 'content', role: 'role' }],\n labels: ['string'],\n model: 'model',\n name: 'name',\n passing_labels: ['string'],\n type: 'label_model',\n },\n ],\n});\n\nconsole.log(_eval.id);" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.evals.EvalCreateParams;\nimport com.openai.models.evals.EvalCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalCreateParams params = EvalCreateParams.builder()\n .customDataSourceConfig(EvalCreateParams.DataSourceConfig.Custom.ItemSchema.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n .build())\n .addTestingCriterion(EvalCreateParams.TestingCriterion.LabelModel.builder()\n .addInput(EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage.builder()\n .content(\"content\")\n .role(\"role\")\n .build())\n .addLabel(\"string\")\n .model(\"model\")\n .name(\"name\")\n .addPassingLabel(\"string\")\n .build())\n .build();\n EvalCreateResponse eval = client.evals().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst _eval = await client.evals.create({\n data_source_config: { item_schema: { foo: 'bar' }, type: 'custom' },\n testing_criteria: [\n {\n input: [{ content: 'content', role: 'role' }],\n labels: ['string'],\n model: 'model',\n name: 'name',\n passing_labels: ['string'],\n type: 'label_model',\n },\n ],\n});\n\nconsole.log(_eval.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\neval = client.evals.create(\n data_source_config={\n \"item_schema\": {\n \"foo\": \"bar\"\n },\n \"type\": \"custom\",\n },\n testing_criteria=[{\n \"input\": [{\n \"content\": \"content\",\n \"role\": \"role\",\n }],\n \"labels\": [\"string\"],\n \"model\": \"model\",\n \"name\": \"name\",\n \"passing_labels\": [\"string\"],\n \"type\": \"label_model\",\n }],\n)\nprint(eval.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.create(\n data_source_config: {item_schema: {foo: \"bar\"}, type: :custom},\n testing_criteria: [\n {\n input: [{content: \"content\", role: \"role\"}],\n labels: [\"string\"],\n model: \"model\",\n name: \"name\",\n passing_labels: [\"string\"],\n type: :label_model\n }\n ]\n)\n\nputs(eval_)" response: "{\n \"object\": \"eval\",\n \"id\": \"eval_67b7fa9a81a88190ab4aa417e397ea21\",\n \"data_source_config\": {\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"usecase\": \"chatbot\"\n },\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\"\n },\n \"sample\": {\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"item\",\n \"sample\"\n ]\n },\n \"testing_criteria\": [\n {\n \"name\": \"Example label grader\",\n \"type\": \"label_model\",\n \"model\": \"o3-mini\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Statement: {{item.input}}\"\n }\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ]\n }\n ],\n \"name\": \"Sentiment\",\n \"created_at\": 1740110490,\n \"metadata\": {\n \"description\": \"An eval for sentiment analysis\"\n }\n}\n" - group: evals - name: Create eval - path: post - returns: 'The created [Eval](https://platform.openai.com/docs/api-reference/evals/object) object.' '/evals/{eval_id}': - delete: - tags: - - Evals - summary: Delete an eval - description: "Delete an evaluation.\n" - operationId: deleteEval - parameters: - - name: eval_id - in: path - description: The ID of the evaluation to delete. - required: true - schema: - type: string - responses: - '200': - description: Successfully deleted the evaluation. - content: - application/json: - schema: - required: - - object - - deleted - - eval_id - type: object - properties: - deleted: - type: boolean - example: true - eval_id: - type: string - example: eval_abc123 - object: - type: string - example: eval.deleted - '404': - description: Evaluation not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - x-oaiMeta: - examples: - request: - curl: "curl https://api.openai.com/v1/evals/eval_abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalDeleteParams;\nimport com.openai.models.evals.EvalDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalDeleteResponse eval = client.evals().delete(\"eval_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst _eval = await client.evals.delete('eval_id');\n\nconsole.log(_eval.eval_id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\neval = client.evals.delete(\n \"eval_id\",\n)\nprint(eval.eval_id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.delete(\"eval_id\")\n\nputs(eval_)" - response: "{\n \"object\": \"eval.deleted\",\n \"deleted\": true,\n \"eval_id\": \"eval_abc123\"\n}\n" - group: evals - name: Delete an eval - returns: A deletion confirmation object. get: tags: - Evals - summary: Get an eval - description: "Get an evaluation by ID.\n" + summary: "Get an evaluation by ID.\n" operationId: getEval parameters: - name: eval_id @@ -1700,23 +1746,22 @@ paths: schema: $ref: '#/components/schemas/Eval' x-oaiMeta: + name: Get an eval + group: evals + path: get examples: request: curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.retrieve(\n \"eval_id\",\n)\nprint(eval.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst evalObj = await openai.evals.retrieve(\"eval_67abd54d9b0081909a86353f6fb9317a\");\nconsole.log(evalObj);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.retrieve('eval_id');\n\nconsole.log(_eval.id);" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalRetrieveParams;\nimport com.openai.models.evals.EvalRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalRetrieveResponse eval = client.evals().retrieve(\"eval_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst _eval = await client.evals.retrieve('eval_id');\n\nconsole.log(_eval.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\neval = client.evals.retrieve(\n \"eval_id\",\n)\nprint(eval.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.retrieve(\"eval_id\")\n\nputs(eval_)" response: "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\",\n \"properties\": {\n \"input\": {\n \"type\": \"string\"\n },\n \"ground_truth\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"input\",\n \"ground_truth\"\n ]\n }\n },\n \"required\": [\n \"item\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"String check\",\n \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n \"type\": \"string_check\",\n \"input\": \"{{item.input}}\",\n \"reference\": \"{{item.ground_truth}}\",\n \"operation\": \"eq\"\n }\n ],\n \"name\": \"External Data Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {},\n}\n" - group: evals - name: Get an eval - path: get - returns: 'The [Eval](https://platform.openai.com/docs/api-reference/evals/object) object matching the specified ID.' post: tags: - Evals - summary: Update an eval - description: "Update certain properties of an evaluation.\n" + summary: "Update certain properties of an evaluation.\n" operationId: updateEval parameters: - name: eval_id @@ -1732,11 +1777,11 @@ paths: schema: type: object properties: - metadata: - $ref: '#/components/schemas/Metadata' name: type: string description: Rename the evaluation. + metadata: + $ref: '#/components/schemas/Metadata' required: true responses: '200': @@ -1746,24 +1791,74 @@ paths: schema: $ref: '#/components/schemas/Eval' x-oaiMeta: + name: Update an eval + group: evals + path: update examples: request: curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"Updated Eval\", \"metadata\": {\"description\": \"Updated description\"}}'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.update(\n eval_id=\"eval_id\",\n)\nprint(eval.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst updatedEval = await openai.evals.update(\n \"eval_67abd54d9b0081909a86353f6fb9317a\",\n {\n name: \"Updated Eval\",\n metadata: { description: \"Updated description\" }\n }\n);\nconsole.log(updatedEval);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.update('eval_id');\n\nconsole.log(_eval.id);" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalUpdateParams;\nimport com.openai.models.evals.EvalUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalUpdateResponse eval = client.evals().update(\"eval_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst _eval = await client.evals.update('eval_id');\n\nconsole.log(_eval.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\neval = client.evals.update(\n eval_id=\"eval_id\",\n)\nprint(eval.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.update(\"eval_id\")\n\nputs(eval_)" response: "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"item\": {\n \"type\": \"object\",\n \"properties\": {\n \"input\": {\n \"type\": \"string\"\n },\n \"ground_truth\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"input\",\n \"ground_truth\"\n ]\n }\n },\n \"required\": [\n \"item\"\n ]\n }\n },\n \"testing_criteria\": [\n {\n \"name\": \"String check\",\n \"id\": \"String check-2eaf2d8d-d649-4335-8148-9535a7ca73c2\",\n \"type\": \"string_check\",\n \"input\": \"{{item.input}}\",\n \"reference\": \"{{item.ground_truth}}\",\n \"operation\": \"eq\"\n }\n ],\n \"name\": \"Updated Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {\"description\": \"Updated description\"},\n}\n" + delete: + tags: + - Evals + summary: "Delete an evaluation.\n" + operationId: deleteEval + parameters: + - name: eval_id + in: path + description: The ID of the evaluation to delete. + required: true + schema: + type: string + responses: + '200': + description: Successfully deleted the evaluation. + content: + application/json: + schema: + required: + - object + - deleted + - eval_id + type: object + properties: + object: + type: string + example: eval.deleted + deleted: + type: boolean + example: true + eval_id: + type: string + example: eval_abc123 + '404': + description: Evaluation not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-oaiMeta: + name: Delete an eval group: evals - name: Update an eval - path: update - returns: 'The [Eval](https://platform.openai.com/docs/api-reference/evals/object) object matching the updated version.' + examples: + request: + curl: "curl https://api.openai.com/v1/evals/eval_abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\neval = client.evals.delete(\n \"eval_id\",\n)\nprint(eval.eval_id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst deleted = await openai.evals.delete(\"eval_abc123\");\nconsole.log(deleted);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst _eval = await client.evals.delete('eval_id');\n\nconsole.log(_eval.eval_id);" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.EvalDeleteParams;\nimport com.openai.models.evals.EvalDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n EvalDeleteResponse eval = client.evals().delete(\"eval_id\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\neval_ = openai.evals.delete(\"eval_id\")\n\nputs(eval_)" + response: "{\n \"object\": \"eval.deleted\",\n \"deleted\": true,\n \"eval_id\": \"eval_abc123\"\n}\n" '/evals/{eval_id}/runs': get: tags: - Evals - summary: Get eval runs - description: "Get a list of runs for an evaluation.\n" + summary: "Get a list of runs for an evaluation.\n" operationId: getEvalRuns parameters: - name: eval_id @@ -1811,23 +1906,22 @@ paths: schema: $ref: '#/components/schemas/EvalRunList' x-oaiMeta: + name: Get eval runs + group: evals + path: get-runs examples: request: curl: "curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.runs.list(\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst runs = await openai.evals.runs.list(\"egroup_67abd54d9b0081909a86353f6fb9317a\");\nconsole.log(runs);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const runListResponse of client.evals.runs.list('eval_id')) {\n console.log(runListResponse.id);\n}" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunListPage;\nimport com.openai.models.evals.runs.RunListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunListPage page = client.evals().runs().list(\"eval_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const runListResponse of client.evals.runs.list('eval_id')) {\n console.log(runListResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.evals.runs.list(\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.runs.list(\"eval_id\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"eval_id\": \"eval_67e0c726d560819083f19a957c4c640b\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b\",\n \"status\": \"completed\",\n \"model\": \"o3-mini\",\n \"name\": \"bulk_with_negative_examples_o3-mini\",\n \"created_at\": 1742784467,\n \"result_counts\": {\n \"total\": 1,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 1\n },\n \"per_model_usage\": [\n {\n \"model_name\": \"o3-mini\",\n \"invocation_count\": 1,\n \"prompt_tokens\": 563,\n \"completion_tokens\": 874,\n \"total_tokens\": 1437,\n \"cached_tokens\": 0\n }\n ],\n \"per_testing_criteria_results\": [\n {\n \"testing_criteria\": \"Push Notification Summary Grader-1808cd0b-eeec-4e0b-a519-337e79f4f5d1\",\n \"passed\": 1,\n \"failed\": 0\n }\n ],\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"notifications\": \"\\n- New message from Sarah: \\\"Can you call me later?\\\"\\n- Your package has been delivered!\\n- Flash sale: 20% off electronics for the next 2 hours!\\n\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"\\n\\n\\n\\nYou are a helpful assistant that takes in an array of push notifications and returns a collapsed summary of them.\\nThe push notification will be provided as follows:\\n\\n...notificationlist...\\n\\n\\nYou should return just the summary and nothing else.\\n\\n\\nYou should return a summary that is concise and snappy.\\n\\n\\nHere is an example of a good summary:\\n\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n\\n\\nTraffic alert, package expected by 5pm, suggestion for new friend (Emily).\\n\\n\\n\\nHere is an example of a bad summary:\\n\\n- Traffic alert: Accident reported on Main Street.- Package out for delivery: Expected by 5 PM.- New friend suggestion: Connect with Emma.\\n\\n\\nTraffic alert reported on main street. You have a package that will arrive by 5pm, Emily is a new friend suggested for you.\\n\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.notifications}}\"\n }\n }\n ]\n },\n \"model\": \"o3-mini\",\n \"sampling_params\": null\n },\n \"error\": null,\n \"metadata\": {}\n }\n ],\n \"first_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"last_id\": \"evalrun_67e0c7d31560819090d60c0780591042\",\n \"has_more\": true\n}\n" - group: evals - name: Get eval runs - path: get-runs - returns: 'A list of [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) objects matching the specified ID.' post: tags: - Evals - summary: Create eval run - description: "Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.\n" + summary: "Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.\n" operationId: createEvalRun parameters: - name: eval_id @@ -1856,157 +1950,153 @@ paths: schema: $ref: '#/components/schemas/Error' x-oaiMeta: + name: Create eval run + group: evals examples: request: curl: "curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\":\"gpt-4o-mini\",\"data_source\":{\"type\":\"completions\",\"input_messages\":{\"type\":\"template\",\"template\":[{\"role\":\"developer\",\"content\":\"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"} , {\"role\":\"user\",\"content\":\"{{item.input}}\"}]} ,\"sampling_params\":{\"temperature\":1,\"max_completions_tokens\":2048,\"top_p\":1,\"seed\":42},\"model\":\"gpt-4o-mini\",\"source\":{\"type\":\"file_content\",\"content\":[{\"item\":{\"input\":\"Tech Company Launches Advanced Artificial Intelligence Platform\",\"ground_truth\":\"Technology\"}}]}}'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.create(\n eval_id=\"eval_id\",\n data_source={\n \"source\": {\n \"content\": [{\n \"item\": {\n \"foo\": \"bar\"\n }\n }],\n \"type\": \"file_content\",\n },\n \"type\": \"jsonl\",\n },\n)\nprint(run.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst run = await openai.evals.runs.create(\n \"eval_67e579652b548190aaa83ada4b125f47\",\n {\n name: \"gpt-4o-mini\",\n data_source: {\n type: \"completions\",\n input_messages: {\n type: \"template\",\n template: [\n {\n role: \"developer\",\n content: \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n },\n {\n role: \"user\",\n content: \"{{item.input}}\"\n }\n ]\n },\n sampling_params: {\n temperature: 1,\n max_completions_tokens: 2048,\n top_p: 1,\n seed: 42\n },\n model: \"gpt-4o-mini\",\n source: {\n type: \"file_content\",\n content: [\n {\n item: {\n input: \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n ground_truth: \"Technology\"\n }\n }\n ]\n }\n }\n }\n);\nconsole.log(run);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.create('eval_id', {\n data_source: {\n source: { content: [{ item: { foo: 'bar' } }], type: 'file_content' },\n type: 'jsonl',\n },\n});\n\nconsole.log(run.id);" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.JsonValue;\nimport com.openai.models.evals.runs.CreateEvalJsonlRunDataSource;\nimport com.openai.models.evals.runs.RunCreateParams;\nimport com.openai.models.evals.runs.RunCreateResponse;\nimport java.util.List;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCreateParams params = RunCreateParams.builder()\n .evalId(\"eval_id\")\n .dataSource(CreateEvalJsonlRunDataSource.builder()\n .fileContentSource(List.of(CreateEvalJsonlRunDataSource.Source.FileContent.Content.builder()\n .item(CreateEvalJsonlRunDataSource.Source.FileContent.Content.Item.builder()\n .putAdditionalProperty(\"foo\", JsonValue.from(\"bar\"))\n .build())\n .build()))\n .build())\n .build();\n RunCreateResponse run = client.evals().runs().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.evals.runs.create('eval_id', {\n data_source: { source: { content: [{ item: { foo: 'bar' } }], type: 'file_content' }, type: 'jsonl' },\n});\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.evals.runs.create(\n eval_id=\"eval_id\",\n data_source={\n \"source\": {\n \"content\": [{\n \"item\": {\n \"foo\": \"bar\"\n }\n }],\n \"type\": \"file_content\",\n },\n \"type\": \"jsonl\",\n },\n)\nprint(run.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.create(\n \"eval_id\",\n data_source: {source: {content: [{item: {foo: \"bar\"}}], type: :file_content}, type: :jsonl}\n)\n\nputs(run)" response: "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" - group: evals - name: Create eval run - returns: 'The [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object matching the specified ID.' '/evals/{eval_id}/runs/{run_id}': - delete: + get: tags: - Evals - summary: Delete eval run - description: "Delete an eval run.\n" - operationId: deleteEvalRun + summary: "Get an evaluation run by ID.\n" + operationId: getEvalRun parameters: - name: eval_id in: path - description: The ID of the evaluation to delete the run from. + description: The ID of the evaluation to retrieve runs for. required: true schema: type: string - name: run_id in: path - description: The ID of the run to delete. + description: The ID of the run to retrieve. required: true schema: type: string responses: '200': - description: Successfully deleted the eval run - content: - application/json: - schema: - type: object - properties: - deleted: - type: boolean - example: true - object: - type: string - example: eval.run.deleted - run_id: - type: string - example: evalrun_677469f564d48190807532a852da3afb - '404': - description: Run not found + description: The evaluation run content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/EvalRun' x-oaiMeta: + name: Get an eval run + group: evals + path: get examples: request: - curl: "curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunDeleteParams;\nimport com.openai.models.evals.runs.RunDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunDeleteParams params = RunDeleteParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunDeleteResponse run = client.evals().runs().delete(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.evals.runs.delete('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.run_id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.evals.runs.delete(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.run_id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.delete(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" - response: "{\n \"object\": \"eval.run.deleted\",\n \"deleted\": true,\n \"run_id\": \"evalrun_abc456\"\n}\n" - group: evals - name: Delete eval run - path: delete - returns: An object containing the status of the delete operation. - get: + curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.retrieve(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst run = await openai.evals.runs.retrieve(\n \"evalrun_67abd54d60ec8190832b46859da808f7\",\n { eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\" }\n);\nconsole.log(run);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.retrieve('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.id);" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunRetrieveParams;\nimport com.openai.models.evals.runs.RunRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunRetrieveParams params = RunRetrieveParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunRetrieveResponse run = client.evals().runs().retrieve(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.retrieve(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" + response: "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + post: tags: - Evals - summary: Get an eval run - description: "Get an evaluation run by ID.\n" - operationId: getEvalRun + summary: "Cancel an ongoing evaluation run.\n" + operationId: cancelEvalRun parameters: - name: eval_id in: path - description: The ID of the evaluation to retrieve runs for. + description: The ID of the evaluation whose run you want to cancel. required: true schema: type: string - name: run_id in: path - description: The ID of the run to retrieve. + description: The ID of the run to cancel. required: true schema: type: string responses: '200': - description: The evaluation run + description: The canceled eval run object content: application/json: schema: $ref: '#/components/schemas/EvalRun' x-oaiMeta: + name: Cancel eval run + group: evals + path: post examples: request: - curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunRetrieveParams;\nimport com.openai.models.evals.runs.RunRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunRetrieveParams params = RunRetrieveParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunRetrieveResponse run = client.evals().runs().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.evals.runs.retrieve('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.evals.runs.retrieve(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.retrieve(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" - response: "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" - group: evals - name: Get an eval run - path: get - returns: 'The [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object matching the specified ID.' - post: + curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.evals.runs.cancel(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(response.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst canceledRun = await openai.evals.runs.cancel(\n \"evalrun_67abd54d60ec8190832b46859da808f7\",\n { eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\" }\n);\nconsole.log(canceledRun);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.evals.runs.cancel('run_id', { eval_id: 'eval_id' });\n\nconsole.log(response.id);" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunCancelParams;\nimport com.openai.models.evals.runs.RunCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCancelParams params = RunCancelParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunCancelResponse response = client.evals().runs().cancel(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.evals.runs.cancel(\"run_id\", eval_id: \"eval_id\")\n\nputs(response)" + response: "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"canceled\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + delete: tags: - Evals - summary: Cancel eval run - description: "Cancel an ongoing evaluation run.\n" - operationId: cancelEvalRun + summary: "Delete an eval run.\n" + operationId: deleteEvalRun parameters: - name: eval_id in: path - description: The ID of the evaluation whose run you want to cancel. + description: The ID of the evaluation to delete the run from. required: true schema: type: string - name: run_id in: path - description: The ID of the run to cancel. + description: The ID of the run to delete. required: true schema: type: string responses: '200': - description: The canceled eval run object + description: Successfully deleted the eval run content: application/json: schema: - $ref: '#/components/schemas/EvalRun' + type: object + properties: + object: + type: string + example: eval.run.deleted + deleted: + type: boolean + example: true + run_id: + type: string + example: evalrun_677469f564d48190807532a852da3afb + '404': + description: Run not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' x-oaiMeta: + name: Delete eval run + group: evals + path: delete examples: request: - curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \\\n -X POST \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunCancelParams;\nimport com.openai.models.evals.runs.RunCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCancelParams params = RunCancelParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunCancelResponse response = client.evals().runs().cancel(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.evals.runs.cancel('run_id', { eval_id: 'eval_id' });\n\nconsole.log(response.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.evals.runs.cancel(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(response.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.evals.runs.cancel(\"run_id\", eval_id: \"eval_id\")\n\nputs(response)" - response: "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7\",\n \"status\": \"canceled\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" - group: evals - name: Cancel eval run - path: post - returns: 'The updated [EvalRun](https://platform.openai.com/docs/api-reference/evals/run-object) object reflecting that the run is canceled.' + curl: "curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nrun = client.evals.runs.delete(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\nprint(run.run_id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst deleted = await openai.evals.runs.delete(\n \"eval_123abc\",\n \"evalrun_abc456\"\n);\nconsole.log(deleted);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst run = await client.evals.runs.delete('run_id', { eval_id: 'eval_id' });\n\nconsole.log(run.run_id);" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.RunDeleteParams;\nimport com.openai.models.evals.runs.RunDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunDeleteParams params = RunDeleteParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n RunDeleteResponse run = client.evals().runs().delete(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.evals.runs.delete(\"run_id\", eval_id: \"eval_id\")\n\nputs(run)" + response: "{\n \"object\": \"eval.run.deleted\",\n \"deleted\": true,\n \"run_id\": \"evalrun_abc456\"\n}\n" '/evals/{eval_id}/runs/{run_id}/output_items': get: tags: - Evals - summary: Get eval run output items - description: "Get a list of output items for an evaluation run.\n" + summary: "Get a list of output items for an evaluation run.\n" operationId: getEvalRunOutputItems parameters: - name: eval_id @@ -2057,24 +2147,23 @@ paths: schema: $ref: '#/components/schemas/EvalRunOutputItemList' x-oaiMeta: + name: Get eval run output items + group: evals + path: get examples: request: curl: "curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.evals.runs.output_items.list(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst outputItems = await openai.evals.runs.outputItems.list(\n \"egroup_67abd54d9b0081909a86353f6fb9317a\",\n \"erun_67abd54d60ec8190832b46859da808f7\"\n);\nconsole.log(outputItems);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const outputItemListResponse of client.evals.runs.outputItems.list('run_id', {\n eval_id: 'eval_id',\n})) {\n console.log(outputItemListResponse.id);\n}" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.outputitems.OutputItemListPage;\nimport com.openai.models.evals.runs.outputitems.OutputItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OutputItemListParams params = OutputItemListParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .build();\n OutputItemListPage page = client.evals().runs().outputItems().list(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const outputItemListResponse of client.evals.runs.outputItems.list('run_id', {\n eval_id: 'eval_id',\n})) {\n console.log(outputItemListResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.evals.runs.output_items.list(\n run_id=\"run_id\",\n eval_id=\"eval_id\",\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.evals.runs.output_items.list(\"run_id\", eval_id: \"eval_id\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"created_at\": 1743092076,\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"status\": \"pass\",\n \"datasource_item_id\": 5,\n \"datasource_item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n },\n \"results\": [\n {\n \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n \"sample\": null,\n \"passed\": true,\n \"score\": 1.0\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n },\n {\n \"role\": \"user\",\n \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Markets\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"usage\": {\n \"total_tokens\": 325,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 323,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n }\n ],\n \"first_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"last_id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"has_more\": true\n}\n" - group: evals - name: Get eval run output items - path: get - returns: 'A list of [EvalRunOutputItem](https://platform.openai.com/docs/api-reference/evals/run-output-item-object) objects matching the specified ID.' '/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}': get: tags: - Evals - summary: Get an output item of an eval run - description: "Get an evaluation run output item by ID.\n" + summary: "Get an evaluation run output item by ID.\n" operationId: getEvalRunOutputItem parameters: - name: eval_id @@ -2103,24 +2192,23 @@ paths: schema: $ref: '#/components/schemas/EvalRunOutputItem' x-oaiMeta: + name: Get an output item of an eval run + group: evals + path: get examples: request: curl: "curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\noutput_item = client.evals.runs.output_items.retrieve(\n output_item_id=\"output_item_id\",\n eval_id=\"eval_id\",\n run_id=\"run_id\",\n)\nprint(output_item.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst outputItem = await openai.evals.runs.outputItems.retrieve(\n \"outputitem_67abd55eb6548190bb580745d5644a33\",\n {\n eval_id: \"eval_67abd54d9b0081909a86353f6fb9317a\",\n run_id: \"evalrun_67abd54d60ec8190832b46859da808f7\",\n }\n);\nconsole.log(outputItem);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst outputItem = await client.evals.runs.outputItems.retrieve('output_item_id', {\n eval_id: 'eval_id',\n run_id: 'run_id',\n});\n\nconsole.log(outputItem.id);" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.evals.runs.outputitems.OutputItemRetrieveParams;\nimport com.openai.models.evals.runs.outputitems.OutputItemRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n OutputItemRetrieveParams params = OutputItemRetrieveParams.builder()\n .evalId(\"eval_id\")\n .runId(\"run_id\")\n .outputItemId(\"output_item_id\")\n .build();\n OutputItemRetrieveResponse outputItem = client.evals().runs().outputItems().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst outputItem = await client.evals.runs.outputItems.retrieve('output_item_id', {\n eval_id: 'eval_id',\n run_id: 'run_id',\n});\n\nconsole.log(outputItem.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\noutput_item = client.evals.runs.output_items.retrieve(\n output_item_id=\"output_item_id\",\n eval_id=\"eval_id\",\n run_id=\"run_id\",\n)\nprint(output_item.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\noutput_item = openai.evals.runs.output_items.retrieve(\"output_item_id\", eval_id: \"eval_id\", run_id: \"run_id\")\n\nputs(output_item)" response: "{\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67e5796c28e081909917bf79f6e6214d\",\n \"created_at\": 1743092076,\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"status\": \"pass\",\n \"datasource_item_id\": 5,\n \"datasource_item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n },\n \"results\": [\n {\n \"name\": \"String check-a2486074-d803-4445-b431-ad2262e85d47\",\n \"sample\": null,\n \"passed\": true,\n \"score\": 1.0\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"developer\",\n \"content\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\\n\\n# Steps\\n\\n1. Analyze the content of the news headline to understand its primary focus.\\n2. Extract the subject matter, identifying any key indicators or keywords.\\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\\n4. Ensure only one category is selected per headline.\\n\\n# Output Format\\n\\nRespond with the chosen category as a single word. For instance: \\\"Technology\\\", \\\"Markets\\\", \\\"World\\\", \\\"Business\\\", or \\\"Sports\\\".\\n\\n# Examples\\n\\n**Input**: \\\"Apple Unveils New iPhone Model, Featuring Advanced AI Features\\\" \\n**Output**: \\\"Technology\\\"\\n\\n**Input**: \\\"Global Stocks Mixed as Investors Await Central Bank Decisions\\\" \\n**Output**: \\\"Markets\\\"\\n\\n**Input**: \\\"War in Ukraine: Latest Updates on Negotiation Status\\\" \\n**Output**: \\\"World\\\"\\n\\n**Input**: \\\"Microsoft in Talks to Acquire Gaming Company for $2 Billion\\\" \\n**Output**: \\\"Business\\\"\\n\\n**Input**: \\\"Manchester United Secures Win in Premier League Football Match\\\" \\n**Output**: \\\"Sports\\\" \\n\\n# Notes\\n\\n- If the headline appears to fit into more than one category, choose the most dominant theme.\\n- Keywords or phrases such as \\\"stocks\\\", \\\"company acquisition\\\", \\\"match\\\", or technological brands can be good indicators for classification.\\n\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n },\n {\n \"role\": \"user\",\n \"content\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"Markets\",\n \"tool_call_id\": null,\n \"tool_calls\": null,\n \"function_call\": null\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"usage\": {\n \"total_tokens\": 325,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 323,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n}\n" - group: evals - name: Get an output item of an eval run - path: get - returns: 'The [EvalRunOutputItem](https://platform.openai.com/docs/api-reference/evals/run-output-item-object) object matching the specified ID.' /files: get: tags: - Files - summary: List files - description: Returns a list of files. + summary: Returns a list of files. operationId: listFiles parameters: - name: purpose @@ -2156,23 +2244,22 @@ paths: schema: $ref: '#/components/schemas/ListFilesResponse' x-oaiMeta: + name: List files + group: files examples: request: curl: "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Files.List(context.TODO(), openai.FileListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.files.list()\npage = page.data[0]\nprint(page)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.files.list();\n\n for await (const file of list) {\n console.log(file);\n }\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileObject of client.files.list()) {\n console.log(fileObject);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Files.List(context.TODO(), openai.FileListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileListPage;\nimport com.openai.models.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileListPage page = client.files().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileObject of client.files.list()) {\n console.log(fileObject);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.files.list()\npage = page.data[0]\nprint(page)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.files.list\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 175,\n \"created_at\": 1613677385,\n \"expires_at\": 1677614202,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n },\n {\n \"id\": \"file-abc456\",\n \"object\": \"file\",\n \"bytes\": 140,\n \"created_at\": 1613779121,\n \"expires_at\": 1677614202,\n \"filename\": \"puppy.jsonl\",\n \"purpose\": \"fine-tune\",\n }\n ],\n \"first_id\": \"file-abc123\",\n \"last_id\": \"file-abc456\",\n \"has_more\": false\n}\n" - group: files - name: List files - returns: 'A list of [File](https://platform.openai.com/docs/api-reference/files/object) objects.' post: tags: - Files - summary: Upload file - description: "Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.\n\nThe Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for details.\n\nThe Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input) models.\n\nThe Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](https://platform.openai.com/docs/api-reference/batch/request-input).\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.\n" + summary: "Upload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and each project can store up to 2.5 TB of files in\ntotal. There is no organization-wide storage limit.\n\n- The Assistants API supports files up to 2 million tokens and of specific\n file types. See the [Assistants Tools guide](/docs/assistants/tools) for\n details.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\n certain required formats for fine-tuning\n [chat](/docs/api-reference/fine-tuning/chat-input) or\n [completions](/docs/api-reference/fine-tuning/completions-input) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\n also has a specific required\n [format](/docs/api-reference/batch/request-input).\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n" operationId: createFile requestBody: content: @@ -2188,24 +2275,23 @@ paths: schema: $ref: '#/components/schemas/OpenAIFile' x-oaiMeta: + name: Upload file + group: files examples: request: curl: "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F purpose=\"fine-tune\" \\\n -F file=\"@mydata.jsonl\"\n -F expires_after[anchor]=\"created_at\"\n -F expires_after[seconds]=2592000\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fileObject, err := client.Files.New(context.TODO(), openai.FileNewParams{\n File: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n Purpose: openai.FilePurposeAssistants,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FileObject;\nimport com.openai.models.files.FilePurpose;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateParams params = FileCreateParams.builder()\n .file(ByteArrayInputStream(\"some content\".getBytes()))\n .purpose(FilePurpose.ASSISTANTS)\n .build();\n FileObject fileObject = client.files().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fileObject = await client.files.create({\n file: fs.createReadStream('fine-tune.jsonl'),\n purpose: 'assistants',\n});\n\nconsole.log(fileObject.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfile_object = client.files.create(\n file=b\"raw file contents\",\n purpose=\"assistants\",\n)\nprint(file_object.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_object = openai.files.create(file: Pathname(__FILE__), purpose: :assistants)\n\nputs(file_object)" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_object = client.files.create(\n file=b\"Example data\",\n purpose=\"assistants\",\n)\nprint(file_object.id)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.create({\n file: fs.createReadStream(\"mydata.jsonl\"),\n purpose: \"fine-tune\",\n expires_after: {\n anchor: \"created_at\",\n seconds: 2592000\n }\n });\n\n console.log(file);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileObject = await client.files.create({\n file: fs.createReadStream('fine-tune.jsonl'),\n purpose: 'assistants',\n});\n\nconsole.log(fileObject.id);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileObject, err := client.Files.New(context.TODO(), openai.FileNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\tPurpose: openai.FilePurposeAssistants,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FileObject;\nimport com.openai.models.files.FilePurpose;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileCreateParams params = FileCreateParams.builder()\n .file(ByteArrayInputStream(\"Example data\".getBytes()))\n .purpose(FilePurpose.ASSISTANTS)\n .build();\n FileObject fileObject = client.files().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_object = openai.files.create(file: StringIO.new(\"Example data\"), purpose: :assistants)\n\nputs(file_object)" response: "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1677614202,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" - group: files - name: Upload file - returns: 'The uploaded [File](https://platform.openai.com/docs/api-reference/files/object) object.' '/files/{file_id}': delete: tags: - Files - summary: Delete file - description: Delete a file. + summary: Delete a file and remove it from all vector stores. operationId: deleteFile parameters: - name: file_id @@ -2222,23 +2308,22 @@ paths: schema: $ref: '#/components/schemas/DeleteFileResponse' x-oaiMeta: + name: Delete file + group: files examples: request: curl: "curl https://api.openai.com/v1/files/file-abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fileDeleted, err := client.Files.Delete(context.TODO(), \"file_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fileDeleted.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_deleted = client.files.delete(\n \"file_id\",\n)\nprint(file_deleted.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.delete(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileDeleted = await client.files.delete('file_id');\n\nconsole.log(fileDeleted.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileDeleted, err := client.Files.Delete(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileDeleted.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileDeleteParams;\nimport com.openai.models.files.FileDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileDeleted fileDeleted = client.files().delete(\"file_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fileDeleted = await client.files.delete('file_id');\n\nconsole.log(fileDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfile_deleted = client.files.delete(\n \"file_id\",\n)\nprint(file_deleted.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_deleted = openai.files.delete(\"file_id\")\n\nputs(file_deleted)" response: "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"deleted\": true\n}\n" - group: files - name: Delete file - returns: Deletion status. get: tags: - Files - summary: Retrieve file - description: Returns information about a specific file. + summary: Returns information about a specific file. operationId: retrieveFile parameters: - name: file_id @@ -2255,24 +2340,23 @@ paths: schema: $ref: '#/components/schemas/OpenAIFile' x-oaiMeta: + name: Retrieve file + group: files examples: request: curl: "curl https://api.openai.com/v1/files/file-abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fileObject, err := client.Files.Get(context.TODO(), \"file_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfile_object = client.files.retrieve(\n \"file_id\",\n)\nprint(file_object.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.retrieve(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fileObject = await client.files.retrieve('file_id');\n\nconsole.log(fileObject.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfileObject, err := client.Files.Get(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fileObject.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileObject;\nimport com.openai.models.files.FileRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FileObject fileObject = client.files().retrieve(\"file_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fileObject = await client.files.retrieve('file_id');\n\nconsole.log(fileObject.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfile_object = client.files.retrieve(\n \"file_id\",\n)\nprint(file_object.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfile_object = openai.files.retrieve(\"file_id\")\n\nputs(file_object)" response: "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"expires_at\": 1677614202,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" - group: files - name: Retrieve file - returns: 'The [File](https://platform.openai.com/docs/api-reference/files/object) object matching the specified ID.' '/files/{file_id}/content': get: tags: - Files - summary: Retrieve file content - description: Returns the contents of the specified file. + summary: Returns the contents of the specified file. operationId: downloadFile parameters: - name: file_id @@ -2290,24 +2374,23 @@ paths: type: string format: binary x-oaiMeta: - examples: + name: Retrieve file content + group: files + examples: request: curl: "curl https://api.openai.com/v1/files/file-abc123/content \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" > file.jsonl\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.Files.Content(context.TODO(), \"file_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.files.content(\n \"file_id\",\n)\nprint(response)\ncontent = response.read()\nprint(content)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.content(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.files.content('file_id');\n\nconsole.log(response);\n\nconst content = await response.blob();\nconsole.log(content);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Files.Content(context.TODO(), \"file_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.core.http.HttpResponse;\nimport com.openai.models.files.FileContentParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n HttpResponse response = client.files().content(\"file_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.files.content('file_id');\n\nconsole.log(response);\n\nconst content = await response.blob();\nconsole.log(content);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.files.content(\n \"file_id\",\n)\nprint(response)\ncontent = response.read()\nprint(content)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.files.content(\"file_id\")\n\nputs(response)" response: '' - group: files - name: Retrieve file content - returns: The file content. /fine_tuning/alpha/graders/run: post: tags: - Fine-tuning - summary: Run grader - description: "Run a grader.\n" + summary: "Run a grader.\n" operationId: runGrader requestBody: content: @@ -2323,25 +2406,41 @@ paths: schema: $ref: '#/components/schemas/RunGraderResponse' x-oaiMeta: + name: Run grader beta: true - examples: - request: - curl: "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"Score how close the reference answer is to the model\nanswer. Score 1.0 if they are the same and 0.0 if they are different. Return just a floating point score\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\"\n }\n ],\n \"model\": \"gpt-4o-2024-08-06\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42\n }\n },\n \"item\": {\n \"reference_answer\": \"fuzzy wuzzy was a bear\"\n },\n \"model_sample\": \"fuzzy wuzzy was a bear\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n Grader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n OfStringCheck: &openai.StringCheckGraderParam{\n Input: \"input\",\n Name: \"name\",\n Operation: openai.StringCheckGraderOperationEq,\n Reference: \"reference\",\n },\n },\n ModelSample: \"model_sample\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response.Metadata)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: { input: 'input', name: 'name', operation: 'eq', reference: 'reference', type: 'string_check' },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" - response: "{\n \"reward\": 1.0,\n \"metadata\": {\n \"name\": \"Example score model grader\",\n \"type\": \"score_model\",\n \"errors\": {\n \"formula_parse_error\": false,\n \"sample_parse_error\": false,\n \"truncated_observation_error\": false,\n \"unresponsive_reward_error\": false,\n \"invalid_variable_error\": false,\n \"other_error\": false,\n \"python_grader_server_error\": false,\n \"python_grader_server_error_type\": null,\n \"python_grader_runtime_error\": false,\n \"python_grader_runtime_error_details\": null,\n \"model_grader_server_error\": false,\n \"model_grader_refusal_error\": false,\n \"model_grader_parse_error\": false,\n \"model_grader_server_error_details\": null\n },\n \"execution_time\": 4.365238428115845,\n \"scores\": {},\n \"token_usage\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n },\n \"sampled_model_name\": \"gpt-4o-2024-08-06\"\n },\n \"sub_rewards\": {},\n \"model_grader_token_usage_per_model\": {\n \"gpt-4o-2024-08-06\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n }\n }\n}\n" group: graders - name: Run grader - returns: The results from the grader run. + examples: + - title: Score text alignment + request: + curl: "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Score how close the reference answer is to the model answer on a 0-1 scale. Return only the score.\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\"\n }\n ]\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42\n }\n },\n \"item\": {\n \"reference_answer\": \"fuzzy wuzzy was a bear\"\n },\n \"model_sample\": \"fuzzy wuzzy was a bear\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst result = await openai.fineTuning.alpha.graders.run({\n grader: {\n type: \"score_model\",\n name: \"Example score model grader\",\n input: [\n {\n role: \"user\",\n content: [\n {\n type: \"input_text\",\n text: \"Score how close the reference answer is to the model answer on a 0-1 scale. Return only the score.\\n\\nReference answer: {{item.reference_answer}}\\n\\nModel answer: {{sample.output_text}}\",\n },\n ],\n },\n ],\n model: \"gpt-5-mini\",\n sampling_params: { temperature: 1, top_p: 1, seed: 42 },\n },\n item: { reference_answer: \"fuzzy wuzzy was a bear\" },\n model_sample: \"fuzzy wuzzy was a bear\",\n});\nconsole.log(result);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" + response: "{\n \"reward\": 1.0,\n \"metadata\": {\n \"name\": \"Example score model grader\",\n \"type\": \"score_model\",\n \"errors\": {\n \"formula_parse_error\": false,\n \"sample_parse_error\": false,\n \"truncated_observation_error\": false,\n \"unresponsive_reward_error\": false,\n \"invalid_variable_error\": false,\n \"other_error\": false,\n \"python_grader_server_error\": false,\n \"python_grader_server_error_type\": null,\n \"python_grader_runtime_error\": false,\n \"python_grader_runtime_error_details\": null,\n \"model_grader_server_error\": false,\n \"model_grader_refusal_error\": false,\n \"model_grader_parse_error\": false,\n \"model_grader_server_error_details\": null\n },\n \"execution_time\": 4.365238428115845,\n \"scores\": {},\n \"token_usage\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n },\n \"sampled_model_name\": \"gpt-4o-2024-08-06\"\n },\n \"sub_rewards\": {},\n \"model_grader_token_usage_per_model\": {\n \"gpt-4o-2024-08-06\": {\n \"prompt_tokens\": 190,\n \"total_tokens\": 324,\n \"completion_tokens\": 134,\n \"cached_tokens\": 0\n }\n }\n}\n" + - title: Score an image caption + request: + curl: "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Image caption grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Score how well the provided caption matches the image on a 0-1 scale. Only return the score.\\n\\nCaption: {{sample.output_text}}\"\n },\n {\n \"type\": \"input_image\",\n \"image_url\": \"https://example.com/dog-catching-ball.png\",\n \"file_id\": null,\n \"detail\": \"high\"\n }\n ]\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 0.2\n }\n },\n \"item\": {\n \"expected_caption\": \"A golden retriever jumps to catch a tennis ball\"\n },\n \"model_sample\": \"A dog leaps to grab a tennis ball mid-air\"\n }'\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" + - title: Score an audio response + request: + curl: "curl -X POST https://api.openai.com/v1/fine_tuning/alpha/graders/run \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"grader\": {\n \"type\": \"score_model\",\n \"name\": \"Audio clarity grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Listen to the clip and return a confidence score from 0 to 1 that the speaker said: {{item.target_phrase}}\"\n },\n {\n \"type\": \"input_audio\",\n \"input_audio\": {\n \"data\": \"{{item.audio_clip_b64}}\",\n \"format\": \"mp3\"\n }\n }\n ]\n }\n ],\n \"model\": \"gpt-audio\",\n \"sampling_params\": {\n \"temperature\": 0.2,\n \"top_p\": 1,\n \"seed\": 123\n }\n },\n \"item\": {\n \"target_phrase\": \"Please deliver the package on Tuesday\",\n \"audio_clip_b64\": \"\"\n },\n \"model_sample\": \"Please deliver the package on Tuesday\"\n }'\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.run({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n model_sample: 'model_sample',\n});\n\nconsole.log(response.metadata);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.run(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n model_sample=\"model_sample\",\n)\nprint(response.metadata)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Run(context.TODO(), openai.FineTuningAlphaGraderRunParams{\n\t\tGrader: openai.FineTuningAlphaGraderRunParamsGraderUnion{\n\t\t\tOfStringCheck: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t\tModelSample: \"model_sample\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Metadata)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderRunParams;\nimport com.openai.models.finetuning.alpha.graders.GraderRunResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderRunParams params = GraderRunParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .modelSample(\"model_sample\")\n .build();\n GraderRunResponse response = client.fineTuning().alpha().graders().run(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.run(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check},\n model_sample: \"model_sample\"\n)\n\nputs(response)" /fine_tuning/alpha/graders/validate: post: tags: - Fine-tuning - summary: Validate grader - description: "Validate a grader.\n" + summary: "Validate a grader.\n" operationId: validateGrader requestBody: content: @@ -2357,25 +2456,23 @@ paths: schema: $ref: '#/components/schemas/ValidateGraderResponse' x-oaiMeta: + name: Validate grader beta: true + group: graders examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.FineTuning.Alpha.Graders.Validate(context.TODO(), openai.FineTuningAlphaGraderValidateParams{\n Grader: openai.FineTuningAlphaGraderValidateParamsGraderUnion{\n OfStringCheckGrader: &openai.StringCheckGraderParam{\n Input: \"input\",\n Name: \"name\",\n Operation: openai.StringCheckGraderOperationEq,\n Reference: \"reference\",\n },\n },\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response.Grader)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.fineTuning.alpha.graders.validate({\n grader: {\n input: 'input',\n name: 'name',\n operation: 'eq',\n reference: 'reference',\n type: 'string_check',\n },\n});\n\nconsole.log(response.grader);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nresponse = client.fine_tuning.alpha.graders.validate(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n)\nprint(response.grader)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.FineTuning.Alpha.Graders.Validate(context.TODO(), openai.FineTuningAlphaGraderValidateParams{\n\t\tGrader: openai.FineTuningAlphaGraderValidateParamsGraderUnion{\n\t\t\tOfStringCheckGrader: &openai.StringCheckGraderParam{\n\t\t\t\tInput: \"input\",\n\t\t\t\tName: \"name\",\n\t\t\t\tOperation: openai.StringCheckGraderOperationEq,\n\t\t\t\tReference: \"reference\",\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Grader)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.alpha.graders.GraderValidateParams;\nimport com.openai.models.finetuning.alpha.graders.GraderValidateResponse;\nimport com.openai.models.graders.gradermodels.StringCheckGrader;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n GraderValidateParams params = GraderValidateParams.builder()\n .grader(StringCheckGrader.builder()\n .input(\"input\")\n .name(\"name\")\n .operation(StringCheckGrader.Operation.EQ)\n .reference(\"reference\")\n .build())\n .build();\n GraderValidateResponse response = client.fineTuning().alpha().graders().validate(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.fineTuning.alpha.graders.validate({\n grader: { input: 'input', name: 'name', operation: 'eq', reference: 'reference', type: 'string_check' },\n});\n\nconsole.log(response.grader);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.fine_tuning.alpha.graders.validate(\n grader={\n \"input\": \"input\",\n \"name\": \"name\",\n \"operation\": \"eq\",\n \"reference\": \"reference\",\n \"type\": \"string_check\",\n },\n)\nprint(response.grader)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.fine_tuning.alpha.graders.validate(\n grader: {input: \"input\", name: \"name\", operation: :eq, reference: \"reference\", type: :string_check}\n)\n\nputs(response)" response: "{\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n}\n" - group: graders - name: Validate grader - returns: The validated grader object. '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions': get: tags: - Fine-tuning - summary: List checkpoint permissions - description: "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.\n" + summary: "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.\n" operationId: listFineTuningCheckpointPermissions parameters: - name: fine_tuned_model_checkpoint @@ -2418,23 +2515,21 @@ paths: schema: $ref: '#/components/schemas/ListFineTuningCheckpointPermissionResponse' x-oaiMeta: + name: List checkpoint permissions + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n permission, err := client.FineTuning.Checkpoints.Permissions.Get(\n context.TODO(),\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n openai.FineTuningCheckpointPermissionGetParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", permission.FirstID)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.retrieve(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n);\n\nconsole.log(permission.first_id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npermission = client.fine_tuning.checkpoints.permissions.retrieve(\n fine_tuned_model_checkpoint=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(permission.first_id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpermission, err := client.FineTuning.Checkpoints.Permissions.Get(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningCheckpointPermissionGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", permission.FirstID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveParams;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionRetrieveResponse permission = client.fineTuning().checkpoints().permissions().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(permission.first_id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npermission = client.fine_tuning.checkpoints.permissions.retrieve(\n fine_tuned_model_checkpoint=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(permission.first_id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npermission = openai.fine_tuning.checkpoints.permissions.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(permission)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n },\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n \"created_at\": 1721764800,\n \"project_id\": \"proj_iqGMw1llN8IrBb6SvvY5A1oF\"\n },\n ],\n \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"cp_enQCFmOTGj3syEpYVhBRLTSy\",\n \"has_more\": false\n}\n" - group: fine-tuning - name: List checkpoint permissions - returns: 'A list of fine-tuned model checkpoint [permission objects](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object) for a fine-tuned model checkpoint.' post: tags: - Fine-tuning - summary: Create checkpoint permissions - description: "**NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n\nThis enables organization owners to share fine-tuned models with other projects in their organization.\n" + summary: "**NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).\n\nThis enables organization owners to share fine-tuned models with other projects in their organization.\n" operationId: createFineTuningCheckpointPermission parameters: - name: fine_tuned_model_checkpoint @@ -2458,24 +2553,22 @@ paths: schema: $ref: '#/components/schemas/ListFineTuningCheckpointPermissionResponse' x-oaiMeta: + name: Create checkpoint permissions + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n -d '{\"project_ids\": [\"proj_abGMw1llN8IrBb6SvvY5A1iH\"]}'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.FineTuning.Checkpoints.Permissions.New(\n context.TODO(),\n \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n openai.FineTuningCheckpointPermissionNewParams{\n ProjectIDs: []string{\"string\"},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(\n 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n { project_ids: ['string'] },\n)) {\n console.log(permissionCreateResponse.id);\n}" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.checkpoints.permissions.create(\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n project_ids=[\"string\"],\n)\npage = page.data[0]\nprint(page.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Checkpoints.Permissions.New(\n\t\tcontext.TODO(),\n\t\t\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n\t\topenai.FineTuningCheckpointPermissionNewParams{\n\t\t\tProjectIDs: []string{\"string\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionCreatePage;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionCreateParams params = PermissionCreateParams.builder()\n .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n .addProjectId(\"string\")\n .build();\n PermissionCreatePage page = client.fineTuning().checkpoints().permissions().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create(\n 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n { project_ids: ['string'] },\n)) {\n console.log(permissionCreateResponse.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.fine_tuning.checkpoints.permissions.create(\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n project_ids=[\"string\"],\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.checkpoints.permissions.create(\n \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n project_ids: [\"string\"]\n)\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"project_id\": \"proj_abGMw1llN8IrBb6SvvY5A1iH\"\n }\n ],\n \"first_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"has_more\": false\n}\n" - group: fine-tuning - name: Create checkpoint permissions - returns: 'A list of fine-tuned model checkpoint [permission objects](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object) for a fine-tuned model checkpoint.' '/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}': delete: tags: - Fine-tuning - summary: Delete checkpoint permission - description: "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.\n" + summary: "**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).\n\nOrganization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.\n" operationId: deleteFineTuningCheckpointPermission parameters: - name: fine_tuned_model_checkpoint @@ -2500,24 +2593,101 @@ paths: schema: $ref: '#/components/schemas/DeleteFineTuningCheckpointPermissionResponse' x-oaiMeta: + name: Delete checkpoint permission + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n permission, err := client.FineTuning.Checkpoints.Permissions.Delete(\n context.TODO(),\n \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", permission.ID)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.delete(\n 'cp_zc4Q7MP6XxulcVzj4MZdwsAB',\n { fine_tuned_model_checkpoint: 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd' },\n);\n\nconsole.log(permission.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npermission = client.fine_tuning.checkpoints.permissions.delete(\n permission_id=\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n)\nprint(permission.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpermission, err := client.FineTuning.Checkpoints.Permissions.Delete(\n\t\tcontext.TODO(),\n\t\t\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n\t\t\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", permission.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteParams;\nimport com.openai.models.finetuning.checkpoints.permissions.PermissionDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PermissionDeleteParams params = PermissionDeleteParams.builder()\n .fineTunedModelCheckpoint(\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\")\n .permissionId(\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\")\n .build();\n PermissionDeleteResponse permission = client.fineTuning().checkpoints().permissions().delete(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst permission = await client.fineTuning.checkpoints.permissions.delete('cp_zc4Q7MP6XxulcVzj4MZdwsAB', {\n fine_tuned_model_checkpoint: 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd',\n});\n\nconsole.log(permission.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npermission = client.fine_tuning.checkpoints.permissions.delete(\n permission_id=\"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n fine_tuned_model_checkpoint=\"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\",\n)\nprint(permission.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npermission = openai.fine_tuning.checkpoints.permissions.delete(\n \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n fine_tuned_model_checkpoint: \"ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd\"\n)\n\nputs(permission)" response: "{\n \"object\": \"checkpoint.permission\",\n \"id\": \"cp_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"deleted\": true\n}\n" - group: fine-tuning - name: Delete checkpoint permission - returns: 'The deletion status of the fine-tuned model checkpoint [permission object](https://platform.openai.com/docs/api-reference/fine-tuning/permission-object).' /fine_tuning/jobs: + post: + tags: + - Fine-tuning + summary: "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/model-optimization)\n" + operationId: createFineTuningJob + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFineTuningJobRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FineTuningJob' + x-oaiMeta: + name: Create fine-tuning job + group: fine-tuning + examples: + - title: Default + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"model\": \"gpt-4o-mini\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" + - title: Epochs + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 2\n }\n }\n }\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\nimport { SupervisedMethod, SupervisedHyperparameters } from \"openai/resources/fine-tuning/methods\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n model: \"gpt-4o-mini\",\n method: {\n type: \"supervised\",\n supervised: {\n hyperparameters: {\n n_epochs: 2\n }\n }\n }\n });\n\n console.log(fineTune);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": 2\n },\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": 2\n }\n }\n },\n \"metadata\": null,\n \"error\": {\n \"code\": null,\n \"message\": null,\n \"param\": null\n },\n \"finished_at\": null,\n \"seed\": 683058546,\n \"trained_tokens\": null,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"user_provided_suffix\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n" + - title: DPO + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"method\": {\n \"type\": \"dpo\",\n \"dpo\": {\n \"hyperparameters\": {\n \"beta\": 0.1\n }\n }\n }\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc\",\n \"model\": \"gpt-4o-mini\",\n \"created_at\": 1746130590,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-abc\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-123\",\n \"training_file\": \"file-abc\",\n \"method\": {\n \"type\": \"dpo\",\n \"dpo\": {\n \"hyperparameters\": {\n \"beta\": 0.1,\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\"\n }\n }\n },\n \"metadata\": null,\n \"error\": {\n \"code\": null,\n \"message\": null,\n \"param\": null\n },\n \"finished_at\": null,\n \"hyperparameters\": null,\n \"seed\": 1036326793,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"user_provided_suffix\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n" + - title: Reinforcement + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc\",\n \"validation_file\": \"file-123\",\n \"model\": \"o4-mini\",\n \"method\": {\n \"type\": \"reinforcement\",\n \"reinforcement\": {\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n },\n \"hyperparameters\": {\n \"reasoning_effort\": \"medium\"\n }\n }\n }\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"o4-mini\",\n \"created_at\": 1721764800,\n \"finished_at\": null,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"validating_files\",\n \"validation_file\": \"file-123\",\n \"training_file\": \"file-abc\",\n \"trained_tokens\": null,\n \"error\": {},\n \"user_provided_suffix\": null,\n \"seed\": 950189191,\n \"estimated_finish\": null,\n \"integrations\": [],\n \"method\": {\n \"type\": \"reinforcement\",\n \"reinforcement\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n \"eval_interval\": \"auto\",\n \"eval_samples\": \"auto\",\n \"compute_multiplier\": \"auto\",\n \"reasoning_effort\": \"medium\"\n },\n \"grader\": {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n },\n \"response_format\": null\n }\n },\n \"metadata\": null,\n \"usage_metrics\": null,\n \"shared_with_openai\": false\n}\n \n" + - title: Validation file + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n validation_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" + - title: W&B Integration + request: + curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-4o-mini\",\n \"integrations\": [\n {\n \"type\": \"wandb\",\n \"wandb\": {\n \"project\": \"my-wandb-project\",\n \"name\": \"ft-run-display-name\"\n \"tags\": [\n \"first-experiment\", \"v2\"\n ]\n }\n }\n ]\n }'\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n\t\tModel: openai.FineTuningJobNewParamsModelGPT4oMini,\n\t\tTrainingFile: \"file-abc123\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.GPT_4O_MINI)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"gpt-4o-mini\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" + response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\",\n \"integrations\": [\n {\n \"type\": \"wandb\",\n \"wandb\": {\n \"project\": \"my-wandb-project\",\n \"entity\": None,\n \"run_id\": \"ftjob-abc123\"\n }\n }\n ],\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" get: tags: - Fine-tuning - summary: List fine-tuning jobs - description: "List your organization's fine-tuning jobs\n" + summary: "List your organization's fine-tuning jobs\n" operationId: listPaginatedFineTuningJobs parameters: - name: after @@ -2537,10 +2707,11 @@ paths: style: deepObject explode: true schema: - type: object + type: + - 'null' + - object additionalProperties: type: string - nullable: true responses: '200': description: OK @@ -2549,57 +2720,23 @@ paths: schema: $ref: '#/components/schemas/ListPaginatedFineTuningJobsResponse' x-oaiMeta: + name: List fine-tuning jobs + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.FineTuning.Jobs.List(context.TODO(), openai.FineTuningJobListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.list()\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.jobs.list();\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJob of client.fineTuning.jobs.list()) {\n console.log(fineTuningJob.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.List(context.TODO(), openai.FineTuningJobListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.JobListPage;\nimport com.openai.models.finetuning.jobs.JobListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobListPage page = client.fineTuning().jobs().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJob of client.fineTuning.jobs.list()) {\n console.log(fineTuningJob.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.fine_tuning.jobs.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.list\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"metadata\": {\n \"key\": \"value\"\n }\n },\n { ... },\n { ... }\n ], \"has_more\": true\n}\n" - group: fine-tuning - name: List fine-tuning jobs - returns: 'A list of paginated [fine-tuning job](https://platform.openai.com/docs/api-reference/fine-tuning/object) objects.' - post: - tags: - - Fine-tuning - summary: Create fine-tuning job - description: "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n" - operationId: createFineTuningJob - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFineTuningJobRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/FineTuningJob' - x-oaiMeta: - example: - request: - curl: "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"model\": \"gpt-4o-mini\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fineTuningJob, err := client.FineTuning.Jobs.New(context.TODO(), openai.FineTuningJobNewParams{\n Model: openai.FineTuningJobNewParamsModelBabbage002,\n TrainingFile: \"file-abc123\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .model(JobCreateParams.Model.BABBAGE_002)\n .trainingFile(\"file-abc123\")\n .build();\n FineTuningJob fineTuningJob = client.fineTuning().jobs().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.create({\n model: 'gpt-4o-mini',\n training_file: 'file-abc123',\n});\n\nconsole.log(fineTuningJob.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfine_tuning_job = client.fine_tuning.jobs.create(\n model=\"gpt-4o-mini\",\n training_file=\"file-abc123\",\n)\nprint(fine_tuning_job.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.create(model: :\"babbage-002\", training_file: \"file-abc123\")\n\nputs(fine_tuning_job)" - response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"batch_size\": \"auto\",\n \"learning_rate_multiplier\": \"auto\",\n \"n_epochs\": \"auto\",\n }\n }\n },\n \"metadata\": null\n}\n" - title: Default - group: fine-tuning - name: Create fine-tuning job - returns: 'A [fine-tuning.job](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.' '/fine_tuning/jobs/{fine_tuning_job_id}': get: tags: - Fine-tuning - summary: Retrieve fine-tuning job - description: "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/model-optimization)\n" + summary: "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/model-optimization)\n" operationId: retrieveFineTuningJob parameters: - name: fine_tuning_job_id @@ -2617,24 +2754,23 @@ paths: schema: $ref: '#/components/schemas/FineTuningJob' x-oaiMeta: + name: Retrieve fine-tuning job + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fineTuningJob, err := client.FineTuning.Jobs.Get(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.retrieve(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.retrieve(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\n\nmain();\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Get(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.retrieve('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfine_tuning_job = client.fine_tuning.jobs.retrieve(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n },\n \"trained_tokens\": 5768,\n \"integrations\": [],\n \"seed\": 0,\n \"estimated_finish\": 0,\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n }\n }\n }\n}\n" - group: fine-tuning - name: Retrieve fine-tuning job - returns: 'The [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object with the given ID.' '/fine_tuning/jobs/{fine_tuning_job_id}/cancel': post: tags: - Fine-tuning - summary: Cancel fine-tuning - description: "Immediately cancel a fine-tune job.\n" + summary: "Immediately cancel a fine-tune job.\n" operationId: cancelFineTuningJob parameters: - name: fine_tuning_job_id @@ -2652,24 +2788,23 @@ paths: schema: $ref: '#/components/schemas/FineTuningJob' x-oaiMeta: + name: Cancel fine-tuning + group: fine-tuning examples: request: curl: "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fineTuningJob, err := client.FineTuning.Jobs.Cancel(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.cancel(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.cancel(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.cancel('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Cancel(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.cancel('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfine_tuning_job = client.fine_tuning.jobs.cancel(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"cancelled\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" - group: fine-tuning - name: Cancel fine-tuning - returns: 'The cancelled [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.' '/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints': get: tags: - Fine-tuning - summary: List fine-tuning checkpoints - description: "List checkpoints for a fine-tuning job.\n" + summary: "List checkpoints for a fine-tuning job.\n" operationId: listFineTuningJobCheckpoints parameters: - name: fine_tuning_job_id @@ -2698,24 +2833,22 @@ paths: schema: $ref: '#/components/schemas/ListFineTuningJobCheckpointsResponse' x-oaiMeta: + name: List fine-tuning checkpoints + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.FineTuning.Jobs.Checkpoints.List(\n context.TODO(),\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n openai.FineTuningJobCheckpointListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n)) {\n console.log(fineTuningJobCheckpoint.id);\n}" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.checkpoints.list(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.Checkpoints.List(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningJobCheckpointListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.checkpoints.CheckpointListPage;\nimport com.openai.models.finetuning.jobs.checkpoints.CheckpointListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n CheckpointListPage page = client.fineTuning().jobs().checkpoints().list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n)) {\n console.log(fineTuningJobCheckpoint.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.fine_tuning.jobs.checkpoints.list(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.checkpoints.list(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"created_at\": 1721764867,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000\",\n \"metrics\": {\n \"full_valid_loss\": 0.134,\n \"full_valid_mean_token_accuracy\": 0.874\n },\n \"fine_tuning_job_id\": \"ftjob-abc123\",\n \"step_number\": 2000\n },\n {\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n \"created_at\": 1721764800,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000\",\n \"metrics\": {\n \"full_valid_loss\": 0.167,\n \"full_valid_mean_token_accuracy\": 0.781\n },\n \"fine_tuning_job_id\": \"ftjob-abc123\",\n \"step_number\": 1000\n }\n ],\n \"first_id\": \"ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB\",\n \"last_id\": \"ftckpt_enQCFmOTGj3syEpYVhBRLTSy\",\n \"has_more\": true\n}\n" - group: fine-tuning - name: List fine-tuning checkpoints - returns: 'A list of fine-tuning [checkpoint objects](https://platform.openai.com/docs/api-reference/fine-tuning/checkpoint-object) for a fine-tuning job.' '/fine_tuning/jobs/{fine_tuning_job_id}/events': get: tags: - Fine-tuning - summary: List fine-tuning events - description: "Get status updates for a fine-tuning job.\n" + summary: "Get status updates for a fine-tuning job.\n" operationId: listFineTuningEvents parameters: - name: fine_tuning_job_id @@ -2744,24 +2877,23 @@ paths: schema: $ref: '#/components/schemas/ListFineTuningJobEventsResponse' x-oaiMeta: + name: List fine-tuning events + group: fine-tuning examples: request: curl: "curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.FineTuning.Jobs.ListEvents(\n context.TODO(),\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n openai.FineTuningJobListEventsParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.fine_tuning.jobs.list_events(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.list_events(id=\"ftjob-abc123\", limit=2);\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobEvent of client.fineTuning.jobs.listEvents(\n 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',\n)) {\n console.log(fineTuningJobEvent.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.FineTuning.Jobs.ListEvents(\n\t\tcontext.TODO(),\n\t\t\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n\t\topenai.FineTuningJobListEventsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.JobListEventsPage;\nimport com.openai.models.finetuning.jobs.JobListEventsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n JobListEventsPage page = client.fineTuning().jobs().listEvents(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fineTuningJobEvent of client.fineTuning.jobs.listEvents('ft-AF1WoRqd3aJAHsqc9NY7iL8F')) {\n console.log(fineTuningJobEvent.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.fine_tuning.jobs.list_events(\n fine_tuning_job_id=\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.fine_tuning.jobs.list_events(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(page)" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-ddTJfwuMVpfLXseO0Am0Gqjm\",\n \"created_at\": 1721764800,\n \"level\": \"info\",\n \"message\": \"Fine tuning job successfully completed\",\n \"data\": null,\n \"type\": \"message\"\n },\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-tyiGuB72evQncpH87xe505Sv\",\n \"created_at\": 1721764800,\n \"level\": \"info\",\n \"message\": \"New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel\",\n \"data\": null,\n \"type\": \"message\"\n }\n ],\n \"has_more\": true\n}\n" - group: fine-tuning - name: List fine-tuning events - returns: A list of fine-tuning event objects. '/fine_tuning/jobs/{fine_tuning_job_id}/pause': post: tags: - Fine-tuning - summary: Pause fine-tuning - description: "Pause a fine-tune job.\n" + summary: "Pause a fine-tune job.\n" operationId: pauseFineTuningJob parameters: - name: fine_tuning_job_id @@ -2779,24 +2911,23 @@ paths: schema: $ref: '#/components/schemas/FineTuningJob' x-oaiMeta: + name: Pause fine-tuning + group: fine-tuning examples: request: curl: "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fineTuningJob, err := client.FineTuning.Jobs.Pause(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.pause(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.pause(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.pause('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Pause(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobPauseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.pause('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfine_tuning_job = client.fine_tuning.jobs.pause(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.pause(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"paused\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" - group: fine-tuning - name: Pause fine-tuning - returns: 'The paused [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.' '/fine_tuning/jobs/{fine_tuning_job_id}/resume': post: tags: - Fine-tuning - summary: Resume fine-tuning - description: "Resume a fine-tune job.\n" + summary: "Resume a fine-tune job.\n" operationId: resumeFineTuningJob parameters: - name: fine_tuning_job_id @@ -2814,30 +2945,63 @@ paths: schema: $ref: '#/components/schemas/FineTuningJob' x-oaiMeta: + name: Resume fine-tuning + group: fine-tuning examples: request: curl: "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n fineTuningJob, err := client.FineTuning.Jobs.Resume(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfine_tuning_job = client.fine_tuning.jobs.resume(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.resume(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.resume('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfineTuningJob, err := client.FineTuning.Jobs.Resume(context.TODO(), \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", fineTuningJob.ID)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.finetuning.jobs.FineTuningJob;\nimport com.openai.models.finetuning.jobs.JobResumeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n FineTuningJob fineTuningJob = client.fineTuning().jobs().resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst fineTuningJob = await client.fineTuning.jobs.resume('ft-AF1WoRqd3aJAHsqc9NY7iL8F');\n\nconsole.log(fineTuningJob.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nfine_tuning_job = client.fine_tuning.jobs.resume(\n \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n)\nprint(fine_tuning_job.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nfine_tuning_job = openai.fine_tuning.jobs.resume(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\")\n\nputs(fine_tuning_job)" response: "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"created_at\": 1721764800,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" - group: fine-tuning - name: Resume fine-tuning - returns: 'The resumed [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning/object) object.' /images/edits: post: tags: - Images - summary: Create image edit - description: Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. + summary: 'Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`.' + description: "You can call this endpoint with either:\n\n- `multipart/form-data`: use binary uploads via `image` (and optional `mask`).\n- `application/json`: use `images` (and optional `mask`) as references with either `image_url` or `file_id`.\n\nNote that JSON requests use `images` (array) instead of the multipart `image` field.\n" operationId: createImageEdit requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/CreateImageEditRequest' + examples: + multipart_edit: + summary: Multipart form upload (binary image + prompt) + value: + model: gpt-image-1.5 + prompt: Add a watercolor effect to this image + image: + size: 1024x1024 + quality: high + application/json: + schema: + $ref: '#/components/schemas/EditImageBodyJsonParam' + examples: + json_with_url: + summary: JSON request with image URL + value: + model: gpt-image-1.5 + prompt: Add a watercolor effect to this image + images: + - image_url: https://example.com/source-image.png + size: 1024x1024 + quality: high + json_with_file_id: + summary: JSON request with uploaded file id + value: + model: gpt-image-1.5 + prompt: Replace the background with a snowy mountain scene + images: + - file_id: file-abc123 + mask: + file_id: file-mask123 + output_format: png + output_compression: 100 required: true responses: '200': @@ -2850,24 +3014,33 @@ paths: schema: $ref: '#/components/schemas/ImageEditStreamEvent' x-oaiMeta: - example: - request: - curl: "curl -s -D >(grep -i x-request-id >&2) \\\n -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \\\n -X POST \"https://api.openai.com/v1/images/edits\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"model=gpt-image-1\" \\\n -F \"image[]=@body-lotion.png\" \\\n -F \"image[]=@bath-bomb.png\" \\\n -F \"image[]=@incense-kit.png\" \\\n -F \"image[]=@soap.png\" \\\n -F 'prompt=Create a lovely gift basket with these four items in it'\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n imagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n Image: openai.ImageEditParamsImageUnion{\n OfFile: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n },\n Prompt: \"A cute baby sea otter wearing a beret\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageEditParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\nimport java.io.InputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageEditParams params = ImageEditParams.builder()\n .image(ByteArrayInputStream(\"some content\".getBytes()))\n .prompt(\"A cute baby sea otter wearing a beret\")\n .build();\n ImagesResponse imagesResponse = client.images().edit(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst imagesResponse = await client.images.edit({\n image: fs.createReadStream('path/to/file'),\n prompt: 'A cute baby sea otter wearing a beret',\n});\n\nconsole.log(imagesResponse);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nimages_response = client.images.edit(\n image=b\"raw file contents\",\n prompt=\"A cute baby sea otter wearing a beret\",\n)\nprint(images_response)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.edit(image: Pathname(__FILE__), prompt: \"A cute baby sea otter wearing a beret\")\n\nputs(images_response)" - title: Edit image - group: images name: Create image edit - returns: 'Returns an [image](https://platform.openai.com/docs/api-reference/images/object) object.' + group: images + examples: + - title: Edit image + request: + curl: "curl -s -D >(grep -i x-request-id >&2) \\\n -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \\\n -X POST \"https://api.openai.com/v1/images/edits\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"model=gpt-image-1.5\" \\\n -F \"image[]=@body-lotion.png\" \\\n -F \"image[]=@bath-bomb.png\" \\\n -F \"image[]=@incense-kit.png\" \\\n -F \"image[]=@soap.png\" \\\n -F 'prompt=Create a lovely gift basket with these four items in it'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.edit(\n image=b\"Example data\",\n prompt=\"A cute baby sea otter wearing a beret\",\n):\n print(image)" + javascript: "import fs from \"fs\";\nimport OpenAI, { toFile } from \"openai\";\n\nconst client = new OpenAI();\n\nconst imageFiles = [\n \"bath-bomb.png\",\n \"body-lotion.png\",\n \"incense-kit.png\",\n \"soap.png\",\n];\n\nconst images = await Promise.all(\n imageFiles.map(async (file) =>\n await toFile(fs.createReadStream(file), null, {\n type: \"image/png\",\n })\n ),\n);\n\nconst rsp = await client.images.edit({\n model: \"gpt-image-1.5\",\n image: images,\n prompt: \"Create a lovely gift basket with these four items in it\",\n});\n\n// Save the image to a file\nconst image_base64 = rsp.data[0].b64_json;\nconst image_bytes = Buffer.from(image_base64, \"base64\");\nfs.writeFileSync(\"basket.png\", image_bytes);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.edit({\n image: fs.createReadStream('path/to/file'),\n prompt: 'A cute baby sea otter wearing a beret',\n});\n\nconsole.log(imagesResponse);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n\t\tImage: openai.ImageEditParamsImageUnion{\n\t\t\tOfFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t\tPrompt: \"A cute baby sea otter wearing a beret\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageEditParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\nimport java.io.InputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageEditParams params = ImageEditParams.builder()\n .image(ByteArrayInputStream(\"Example data\".getBytes()))\n .prompt(\"A cute baby sea otter wearing a beret\")\n .build();\n ImagesResponse imagesResponse = client.images().edit(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.edit(image: StringIO.new(\"Example data\"), prompt: \"A cute baby sea otter wearing a beret\")\n\nputs(images_response)" + - title: Streaming + request: + curl: "curl -s -N -X POST \"https://api.openai.com/v1/images/edits\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"model=gpt-image-1.5\" \\\n -F \"image[]=@body-lotion.png\" \\\n -F \"image[]=@bath-bomb.png\" \\\n -F \"image[]=@incense-kit.png\" \\\n -F \"image[]=@soap.png\" \\\n -F 'prompt=Create a lovely gift basket with these four items in it' \\\n -F \"stream=true\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.edit(\n image=b\"Example data\",\n prompt=\"A cute baby sea otter wearing a beret\",\n):\n print(image)" + javascript: "import fs from \"fs\";\nimport OpenAI, { toFile } from \"openai\";\n\nconst client = new OpenAI();\n\nconst imageFiles = [\n \"bath-bomb.png\",\n \"body-lotion.png\",\n \"incense-kit.png\",\n \"soap.png\",\n];\n\nconst images = await Promise.all(\n imageFiles.map(async (file) =>\n await toFile(fs.createReadStream(file), null, {\n type: \"image/png\",\n })\n ),\n);\n\nconst stream = await client.images.edit({\n model: \"gpt-image-1.5\",\n image: images,\n prompt: \"Create a lovely gift basket with these four items in it\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.edit({\n image: fs.createReadStream('path/to/file'),\n prompt: 'A cute baby sea otter wearing a beret',\n});\n\nconsole.log(imagesResponse);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{\n\t\tImage: openai.ImageEditParamsImageUnion{\n\t\t\tOfFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t\tPrompt: \"A cute baby sea otter wearing a beret\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageEditParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\nimport java.io.InputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageEditParams params = ImageEditParams.builder()\n .image(ByteArrayInputStream(\"Example data\".getBytes()))\n .prompt(\"A cute baby sea otter wearing a beret\")\n .build();\n ImagesResponse imagesResponse = client.images().edit(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.edit(image: StringIO.new(\"Example data\"), prompt: \"A cute baby sea otter wearing a beret\")\n\nputs(images_response)" + response: "event: image_edit.partial_image\ndata: {\"type\":\"image_edit.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\nevent: image_edit.completed\ndata: {\"type\":\"image_edit.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n" /images/generations: post: tags: - Images - summary: Create image - description: "Creates an image given a prompt. [Learn more](https://platform.openai.com/docs/guides/images).\n" + summary: "Creates an image given a prompt. [Learn more](/docs/guides/images).\n" operationId: createImage requestBody: content: @@ -2886,25 +3059,34 @@ paths: schema: $ref: '#/components/schemas/ImageGenStreamEvent' x-oaiMeta: - example: - request: - curl: "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-image-1\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n imagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n Prompt: \"A cute baby sea otter\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageGenerateParams;\nimport com.openai.models.images.ImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageGenerateParams params = ImageGenerateParams.builder()\n .prompt(\"A cute baby sea otter\")\n .build();\n ImagesResponse imagesResponse = client.images().generate(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\nconsole.log(imagesResponse);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nimages_response = client.images.generate(\n prompt=\"A cute baby sea otter\",\n)\nprint(images_response)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\nputs(images_response)" - response: "{\n \"created\": 1713833628,\n \"data\": [\n {\n \"b64_json\": \"...\"\n }\n ],\n \"usage\": {\n \"total_tokens\": 100,\n \"input_tokens\": 50,\n \"output_tokens\": 50,\n \"input_tokens_details\": {\n \"text_tokens\": 10,\n \"image_tokens\": 40\n }\n }\n}\n" - title: Generate image - group: images name: Create image - returns: 'Returns an [image](https://platform.openai.com/docs/api-reference/images/object) object.' + group: images + examples: + - title: Generate image + request: + curl: "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.generate(\n prompt=\"A cute baby sea otter\",\n):\n print(image)" + javascript: "import OpenAI from \"openai\";\nimport { writeFile } from \"fs/promises\";\n\nconst client = new OpenAI();\n\nconst img = await client.images.generate({\n model: \"gpt-image-1.5\",\n prompt: \"A cute baby sea otter\",\n n: 1,\n size: \"1024x1024\"\n});\n\nconst imageBuffer = Buffer.from(img.data[0].b64_json, \"base64\");\nawait writeFile(\"output.png\", imageBuffer);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\nconsole.log(imagesResponse);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n\t\tPrompt: \"A cute baby sea otter\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageGenerateParams;\nimport com.openai.models.images.ImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageGenerateParams params = ImageGenerateParams.builder()\n .prompt(\"A cute baby sea otter\")\n .build();\n ImagesResponse imagesResponse = client.images().generate(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\nputs(images_response)" + response: "{\n \"created\": 1713833628,\n \"data\": [\n {\n \"b64_json\": \"...\"\n }\n ],\n \"usage\": {\n \"total_tokens\": 100,\n \"input_tokens\": 50,\n \"output_tokens\": 50,\n \"input_tokens_details\": {\n \"text_tokens\": 10,\n \"image_tokens\": 40\n }\n }\n}\n" + - title: Streaming + request: + curl: "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\",\n \"stream\": true\n }' \\\n --no-buffer\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nfor image in client.images.generate(\n prompt=\"A cute baby sea otter\",\n):\n print(image)" + javascript: "import OpenAI from \"openai\";\n\nconst client = new OpenAI();\n\nconst stream = await client.images.generate({\n model: \"gpt-image-1.5\",\n prompt: \"A cute baby sea otter\",\n n: 1,\n size: \"1024x1024\",\n stream: true,\n});\n\nfor await (const event of stream) {\n console.log(event);\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.generate({ prompt: 'A cute baby sea otter' });\n\nconsole.log(imagesResponse);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n\t\tPrompt: \"A cute baby sea otter\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageGenerateParams;\nimport com.openai.models.images.ImagesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageGenerateParams params = ImageGenerateParams.builder()\n .prompt(\"A cute baby sea otter\")\n .build();\n ImagesResponse imagesResponse = client.images().generate(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.generate(prompt: \"A cute baby sea otter\")\n\nputs(images_response)" + response: "event: image_generation.partial_image\ndata: {\"type\":\"image_generation.partial_image\",\"b64_json\":\"...\",\"partial_image_index\":0}\n\nevent: image_generation.completed\ndata: {\"type\":\"image_generation.completed\",\"b64_json\":\"...\",\"usage\":{\"total_tokens\":100,\"input_tokens\":50,\"output_tokens\":50,\"input_tokens_details\":{\"text_tokens\":10,\"image_tokens\":40}}}\n" /images/variations: post: tags: - Images - summary: Create image variation - description: Creates a variation of a given image. This endpoint only supports `dall-e-2`. + summary: Creates a variation of a given image. This endpoint only supports `dall-e-2`. operationId: createImageVariation requestBody: content: @@ -2920,25 +3102,24 @@ paths: schema: $ref: '#/components/schemas/ImagesResponse' x-oaiMeta: + name: Create image variation + group: images examples: request: - csharp: "using System;\n\nusing OpenAI.Images;\n\nImageClient client = new(\n model: \"dall-e-2\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nGeneratedImage image = client.GenerateImageVariation(imageFilePath: \"otter.png\");\n\nConsole.WriteLine(image.ImageUri);\n" curl: "curl https://api.openai.com/v1/images/variations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F image=\"@otter.png\" \\\n -F n=2 \\\n -F size=\"1024x1024\"\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n imagesResponse, err := client.Images.NewVariation(context.TODO(), openai.ImageNewVariationParams{\n Image: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", imagesResponse.Created)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageCreateVariationParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageCreateVariationParams params = ImageCreateVariationParams.builder()\n .image(ByteArrayInputStream(\"some content\".getBytes()))\n .build();\n ImagesResponse imagesResponse = client.images().createVariation(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst imagesResponse = await client.images.createVariation({ image: fs.createReadStream('otter.png') });\n\nconsole.log(imagesResponse.created);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nimages_response = client.images.create_variation(\n image=b\"raw file contents\",\n)\nprint(images_response.created)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.create_variation(image: Pathname(__FILE__))\n\nputs(images_response)" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nimages_response = client.images.create_variation(\n image=b\"Example data\",\n)\nprint(images_response.created)" + javascript: "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const image = await openai.images.createVariation({\n image: fs.createReadStream(\"otter.png\"),\n });\n\n console.log(image.data);\n}\nmain();" + csharp: "using System;\n\nusing OpenAI.Images;\n\nImageClient client = new(\n model: \"dall-e-2\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nGeneratedImage image = client.GenerateImageVariation(imageFilePath: \"otter.png\");\n\nConsole.WriteLine(image.ImageUri);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst imagesResponse = await client.images.createVariation({\n image: fs.createReadStream('otter.png'),\n});\n\nconsole.log(imagesResponse.created);" + go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\timagesResponse, err := client.Images.NewVariation(context.TODO(), openai.ImageNewVariationParams{\n\t\tImage: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", imagesResponse.Created)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.images.ImageCreateVariationParams;\nimport com.openai.models.images.ImagesResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ImageCreateVariationParams params = ImageCreateVariationParams.builder()\n .image(ByteArrayInputStream(\"Example data\".getBytes()))\n .build();\n ImagesResponse imagesResponse = client.images().createVariation(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nimages_response = openai.images.create_variation(image: StringIO.new(\"Example data\"))\n\nputs(images_response)" response: "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}\n" - group: images - name: Create image variation - returns: 'Returns a list of [image](https://platform.openai.com/docs/api-reference/images/object) objects.' /models: get: tags: - Models - summary: List models - description: 'Lists the currently available models, and provides basic information about each one such as the owner and availability.' + summary: 'Lists the currently available models, and provides basic information about each one such as the owner and availability.' operationId: listModels responses: '200': @@ -2948,96 +3129,93 @@ paths: schema: $ref: '#/components/schemas/ListModelsResponse' x-oaiMeta: + name: List models + group: models examples: request: - csharp: "using System;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nforeach (var model in client.GetModels().Value)\n{\n Console.WriteLine(model.Id);\n}\n" curl: "curl https://api.openai.com/v1/models \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Models.List(context.TODO())\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\npage = client.models.list()\npage = page.data[0]\nprint(page.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.models.list();\n\n for await (const model of list) {\n console.log(model);\n }\n}\nmain();" + csharp: "using System;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nforeach (var model in client.GetModels().Value)\n{\n Console.WriteLine(model.Id);\n}\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const model of client.models.list()) {\n console.log(model.id);\n}" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpage, err := client.Models.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n" java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.ModelListPage;\nimport com.openai.models.models.ModelListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModelListPage page = client.models().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const model of client.models.list()) {\n console.log(model.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.models.list()\npage = page.data[0]\nprint(page.id)" ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.models.list\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"model-id-0\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\"\n },\n {\n \"id\": \"model-id-1\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\",\n },\n {\n \"id\": \"model-id-2\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n },\n ],\n \"object\": \"list\"\n}\n" - group: models - name: List models - returns: 'A list of [model](https://platform.openai.com/docs/api-reference/models/object) objects.' + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"model-id-0\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\"\n },\n {\n \"id\": \"model-id-1\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\",\n },\n {\n \"id\": \"model-id-2\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n },\n ]\n}\n" '/models/{model}': - delete: + get: tags: - Models - summary: Delete a fine-tuned model - description: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. - operationId: deleteModel + summary: 'Retrieves a model instance, providing basic information about the model such as the owner and permissioning.' + operationId: retrieveModel parameters: - name: model in: path - description: The model to delete + description: The ID of the model to use for this request required: true schema: type: string - example: ft:gpt-4o-mini:acemeco:suffix:abc123 + example: gpt-4o-mini responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/DeleteModelResponse' + $ref: '#/components/schemas/Model' x-oaiMeta: + name: Retrieve model + group: models examples: request: - csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult success = client.DeleteModel(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\nConsole.WriteLine(success);\n" - curl: "curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n modelDeleted, err := client.Models.Delete(context.TODO(), \"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", modelDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.ModelDeleteParams;\nimport com.openai.models.models.ModelDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModelDeleted modelDeleted = client.models().delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst modelDeleted = await client.models.delete('ft:gpt-4o-mini:acemeco:suffix:abc123');\n\nconsole.log(modelDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmodel_deleted = client.models.delete(\n \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n)\nprint(model_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel_deleted = openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\nputs(model_deleted)" - response: "{\n \"id\": \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n \"object\": \"model\",\n \"deleted\": true\n}\n" - group: models - name: Delete a fine-tuned model - returns: Deletion status. - get: + curl: "curl https://api.openai.com/v1/models/VAR_chat_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmodel = client.models.retrieve(\n \"gpt-4o-mini\",\n)\nprint(model.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.retrieve(\"VAR_chat_model_id\");\n\n console.log(model);\n}\n\nmain();" + csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\n OpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult model = client.GetModel(\"babbage-002\");\nConsole.WriteLine(model.Value.Id);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst model = await client.models.retrieve('gpt-4o-mini');\n\nconsole.log(model.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmodel, err := client.Models.Get(context.TODO(), \"gpt-4o-mini\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", model.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.Model;\nimport com.openai.models.models.ModelRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Model model = client.models().retrieve(\"gpt-4o-mini\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel = openai.models.retrieve(\"gpt-4o-mini\")\n\nputs(model)" + response: "{\n \"id\": \"VAR_chat_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" + delete: tags: - Models - summary: Retrieve model - description: 'Retrieves a model instance, providing basic information about the model such as the owner and permissioning.' - operationId: retrieveModel + summary: Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. + operationId: deleteModel parameters: - name: model in: path - description: The ID of the model to use for this request + description: The model to delete required: true schema: type: string - example: gpt-4o-mini + example: ft:gpt-4o-mini:acemeco:suffix:abc123 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Model' + $ref: '#/components/schemas/DeleteModelResponse' x-oaiMeta: + name: Delete a fine-tuned model + group: models examples: request: - csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\n OpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult model = client.GetModel(\"babbage-002\");\nConsole.WriteLine(model.Value.Id);\n" - curl: "curl https://api.openai.com/v1/models/VAR_chat_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n model, err := client.Models.Get(context.TODO(), \"gpt-4o-mini\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", model.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.Model;\nimport com.openai.models.models.ModelRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Model model = client.models().retrieve(\"gpt-4o-mini\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst model = await client.models.retrieve('gpt-4o-mini');\n\nconsole.log(model.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmodel = client.models.retrieve(\n \"gpt-4o-mini\",\n)\nprint(model.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel = openai.models.retrieve(\"gpt-4o-mini\")\n\nputs(model)" - response: "{\n \"id\": \"VAR_chat_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" - group: models - name: Retrieve model - returns: 'The [model](https://platform.openai.com/docs/api-reference/models/object) object matching the specified ID.' + curl: "curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmodel_deleted = client.models.delete(\n \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n)\nprint(model_deleted.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n \n console.log(model);\n}\nmain();" + csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Models;\n\nOpenAIModelClient client = new(\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult success = client.DeleteModel(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\nConsole.WriteLine(success);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst modelDeleted = await client.models.delete('ft:gpt-4o-mini:acemeco:suffix:abc123');\n\nconsole.log(modelDeleted.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmodelDeleted, err := client.Models.Delete(context.TODO(), \"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", modelDeleted.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.models.ModelDeleteParams;\nimport com.openai.models.models.ModelDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModelDeleted modelDeleted = client.models().delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\");\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmodel_deleted = openai.models.delete(\"ft:gpt-4o-mini:acemeco:suffix:abc123\")\n\nputs(model_deleted)" + response: "{\n \"id\": \"ft:gpt-4o-mini:acemeco:suffix:abc123\",\n \"object\": \"model\",\n \"deleted\": true\n}\n" /moderations: post: tags: - Moderations - summary: Create moderation - description: "Classifies if text and/or image inputs are potentially harmful. Learn\nmore in the [moderation guide](https://platform.openai.com/docs/guides/moderation).\n" + summary: "Classifies if text and/or image inputs are potentially harmful. Learn\nmore in the [moderation guide](/docs/guides/moderation).\n" operationId: createModeration requestBody: content: @@ -3053,32 +3231,43 @@ paths: schema: $ref: '#/components/schemas/CreateModerationResponse' x-oaiMeta: - example: - request: - csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Moderations;\n\nModerationClient client = new(\n model: \"omni-moderation-latest\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult moderation = client.ClassifyText(\"I want to kill them.\");\n" - curl: "curl https://api.openai.com/v1/moderations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"input\": \"I want to kill them.\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n moderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n Input: openai.ModerationNewParamsInputUnion{\n OfString: openai.String(\"I want to kill them.\"),\n },\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", moderation.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.moderations.ModerationCreateParams;\nimport com.openai.models.moderations.ModerationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModerationCreateParams params = ModerationCreateParams.builder()\n .input(\"I want to kill them.\")\n .build();\n ModerationCreateResponse moderation = client.moderations().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\nconsole.log(moderation.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmoderation = client.moderations.create(\n input=\"I want to kill them.\",\n)\nprint(moderation.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmoderation = openai.moderations.create(input: \"I want to kill them.\")\n\nputs(moderation)" - response: "{\n \"id\": \"modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR\",\n \"model\": \"text-moderation-007\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"sexual\": false,\n \"hate\": false,\n \"harassment\": true,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"hate/threatening\": false,\n \"violence/graphic\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"harassment/threatening\": true,\n \"violence\": true\n },\n \"category_scores\": {\n \"sexual\": 0.000011726012417057063,\n \"hate\": 0.22706663608551025,\n \"harassment\": 0.5215635299682617,\n \"self-harm\": 2.227119921371923e-6,\n \"sexual/minors\": 7.107352217872176e-8,\n \"hate/threatening\": 0.023547329008579254,\n \"violence/graphic\": 0.00003391829886822961,\n \"self-harm/intent\": 1.646940972932498e-6,\n \"self-harm/instructions\": 1.1198755256458526e-9,\n \"harassment/threatening\": 0.5694745779037476,\n \"violence\": 0.9971134662628174\n }\n }\n ]\n}\n" - title: Single string - group: moderations name: Create moderation - returns: 'A [moderation](https://platform.openai.com/docs/api-reference/moderations/object) object.' + group: moderations + examples: + - title: Single string + request: + curl: "curl https://api.openai.com/v1/moderations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"input\": \"I want to kill them.\"\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmoderation = client.moderations.create(\n input=\"I want to kill them.\",\n)\nprint(moderation.id)" + javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const moderation = await openai.moderations.create({ input: \"I want to kill them.\" });\n\n console.log(moderation);\n}\nmain();\n" + csharp: "using System;\nusing System.ClientModel;\n\nusing OpenAI.Moderations;\n\nModerationClient client = new(\n model: \"omni-moderation-latest\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nClientResult moderation = client.ClassifyText(\"I want to kill them.\");\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\nconsole.log(moderation.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmoderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n\t\tInput: openai.ModerationNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"I want to kill them.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", moderation.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.moderations.ModerationCreateParams;\nimport com.openai.models.moderations.ModerationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModerationCreateParams params = ModerationCreateParams.builder()\n .input(\"I want to kill them.\")\n .build();\n ModerationCreateResponse moderation = client.moderations().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmoderation = openai.moderations.create(input: \"I want to kill them.\")\n\nputs(moderation)" + response: "{\n \"id\": \"modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR\",\n \"model\": \"text-moderation-007\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"sexual\": false,\n \"hate\": false,\n \"harassment\": true,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"hate/threatening\": false,\n \"violence/graphic\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"harassment/threatening\": true,\n \"violence\": true\n },\n \"category_scores\": {\n \"sexual\": 0.000011726012417057063,\n \"hate\": 0.22706663608551025,\n \"harassment\": 0.5215635299682617,\n \"self-harm\": 2.227119921371923e-6,\n \"sexual/minors\": 7.107352217872176e-8,\n \"hate/threatening\": 0.023547329008579254,\n \"violence/graphic\": 0.00003391829886822961,\n \"self-harm/intent\": 1.646940972932498e-6,\n \"self-harm/instructions\": 1.1198755256458526e-9,\n \"harassment/threatening\": 0.5694745779037476,\n \"violence\": 0.9971134662628174\n }\n }\n ]\n}\n" + - title: Image and text + request: + curl: "curl https://api.openai.com/v1/moderations \\\n -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"omni-moderation-latest\",\n \"input\": [\n { \"type\": \"text\", \"text\": \"...text to classify goes here...\" },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"https://example.com/image.png\"\n }\n }\n ]\n }'\n" + python: "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ.get(\"OPENAI_API_KEY\"), # This is the default and can be omitted\n)\nmoderation = client.moderations.create(\n input=\"I want to kill them.\",\n)\nprint(moderation.id)" + javascript: "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nconst moderation = await openai.moderations.create({\n model: \"omni-moderation-latest\",\n input: [\n { type: \"text\", text: \"...text to classify goes here...\" },\n {\n type: \"image_url\",\n image_url: {\n url: \"https://example.com/image.png\"\n // can also use base64 encoded image URLs\n // url: \"data:image/jpeg;base64,abcdefg...\"\n }\n }\n ],\n});\n\nconsole.log(moderation);\n" + node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted\n});\n\nconst moderation = await client.moderations.create({ input: 'I want to kill them.' });\n\nconsole.log(moderation.id);" + go: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmoderation, err := client.Moderations.New(context.TODO(), openai.ModerationNewParams{\n\t\tInput: openai.ModerationNewParamsInputUnion{\n\t\t\tOfString: openai.String(\"I want to kill them.\"),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", moderation.ID)\n}\n" + java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.moderations.ModerationCreateParams;\nimport com.openai.models.moderations.ModerationCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ModerationCreateParams params = ModerationCreateParams.builder()\n .input(\"I want to kill them.\")\n .build();\n ModerationCreateResponse moderation = client.moderations().create(params);\n }\n}" + ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmoderation = openai.moderations.create(input: \"I want to kill them.\")\n\nputs(moderation)" + response: "{\n \"id\": \"modr-0d9740456c391e43c445bf0f010940c7\",\n \"model\": \"omni-moderation-latest\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"harassment\": true,\n \"harassment/threatening\": true,\n \"sexual\": false,\n \"hate\": false,\n \"hate/threatening\": false,\n \"illicit\": false,\n \"illicit/violent\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"violence\": true,\n \"violence/graphic\": true\n },\n \"category_scores\": {\n \"harassment\": 0.8189693396524255,\n \"harassment/threatening\": 0.804985420696006,\n \"sexual\": 1.573112165348997e-6,\n \"hate\": 0.007562942636942845,\n \"hate/threatening\": 0.004208854591835476,\n \"illicit\": 0.030535955153511665,\n \"illicit/violent\": 0.008925306722380033,\n \"self-harm/intent\": 0.00023023930975076432,\n \"self-harm/instructions\": 0.0002293869201073356,\n \"self-harm\": 0.012598046106750154,\n \"sexual/minors\": 2.212566909570261e-8,\n \"violence\": 0.9999992735124786,\n \"violence/graphic\": 0.843064871157054\n },\n \"category_applied_input_types\": {\n \"harassment\": [\n \"text\"\n ],\n \"harassment/threatening\": [\n \"text\"\n ],\n \"sexual\": [\n \"text\",\n \"image\"\n ],\n \"hate\": [\n \"text\"\n ],\n \"hate/threatening\": [\n \"text\"\n ],\n \"illicit\": [\n \"text\"\n ],\n \"illicit/violent\": [\n \"text\"\n ],\n \"self-harm/intent\": [\n \"text\",\n \"image\"\n ],\n \"self-harm/instructions\": [\n \"text\",\n \"image\"\n ],\n \"self-harm\": [\n \"text\",\n \"image\"\n ],\n \"sexual/minors\": [\n \"text\"\n ],\n \"violence\": [\n \"text\",\n \"image\"\n ],\n \"violence/graphic\": [\n \"text\",\n \"image\"\n ]\n }\n }\n ]\n}\n" /organization/admin_api_keys: get: - summary: List all organization and project API keys. - description: List organization API keys + summary: List organization API keys + description: Retrieve a paginated list of organization admin API keys. operationId: admin-api-keys-list parameters: - name: after in: query schema: - type: string + type: + - 'null' + - string description: Return keys with IDs that come after this ID in the pagination order. - nullable: true - name: order in: query schema: @@ -3102,16 +3291,15 @@ paths: schema: $ref: '#/components/schemas/ApiKeyList' x-oaiMeta: + name: List all organization and project API keys. + group: administration examples: request: curl: "curl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_abc\",\n \"name\": \"Main Admin Key\",\n \"redacted_value\": \"sk-admin...def\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"service_account\",\n \"object\": \"organization.service_account\",\n \"id\": \"sa_456\",\n \"name\": \"My Service Account\",\n \"created_at\": 1711471533,\n \"role\": \"member\"\n }\n }\n ],\n \"first_id\": \"key_abc\",\n \"last_id\": \"key_abc\",\n \"has_more\": false\n}\n" - group: administration - name: List all organization and project API keys. - returns: A list of admin and project API key objects. post: - summary: Create admin API key - description: Create an organization admin API key + summary: Create an organization admin API key + description: Create a new admin-level API key for the organization. operationId: admin-api-keys-create requestBody: content: @@ -3133,82 +3321,78 @@ paths: schema: $ref: '#/components/schemas/AdminApiKey' x-oaiMeta: + name: Create admin API key + group: administration examples: request: curl: "curl -X POST https://api.openai.com/v1/organization/admin_api_keys \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"New Admin Key\"\n }'\n" response: "{\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_xyz\",\n \"name\": \"New Admin Key\",\n \"redacted_value\": \"sk-admin...xyz\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"user\",\n \"object\": \"organization.user\",\n \"id\": \"user_123\",\n \"name\": \"John Doe\",\n \"created_at\": 1711471533,\n \"role\": \"owner\"\n },\n \"value\": \"sk-admin-1234abcd\"\n}\n" - group: administration - name: Create admin API key - returns: 'The created [AdminApiKey](https://platform.openai.com/docs/api-reference/admin-api-keys/object) object.' '/organization/admin_api_keys/{key_id}': - delete: - summary: Delete admin API key - description: Delete an organization admin API key - operationId: admin-api-keys-delete + get: + summary: Retrieve a single organization API key + description: Get details for a specific organization API key by its ID. + operationId: admin-api-keys-get parameters: - name: key_id in: path required: true schema: type: string - description: The ID of the API key to be deleted. + description: The ID of the API key. responses: '200': - description: Confirmation that the API key was deleted. + description: Details of the requested API key. content: application/json: schema: - type: object - properties: - deleted: - type: boolean - example: true - id: - type: string - example: key_abc - object: - type: string - example: organization.admin_api_key.deleted + $ref: '#/components/schemas/AdminApiKey' x-oaiMeta: + name: Retrieve admin API key + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"id\": \"key_abc\",\n \"object\": \"organization.admin_api_key.deleted\",\n \"deleted\": true\n}\n" - group: administration - name: Delete admin API key - returns: A confirmation object indicating the key was deleted. - get: - summary: Retrieve admin API key - description: Retrieve a single organization API key - operationId: admin-api-keys-get + curl: "curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_abc\",\n \"name\": \"Main Admin Key\",\n \"redacted_value\": \"sk-admin...xyz\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"user\",\n \"object\": \"organization.user\",\n \"id\": \"user_123\",\n \"name\": \"John Doe\",\n \"created_at\": 1711471533,\n \"role\": \"owner\"\n }\n}\n" + delete: + summary: Delete an organization admin API key + description: Delete the specified admin API key. + operationId: admin-api-keys-delete parameters: - name: key_id in: path required: true schema: type: string - description: The ID of the API key. + description: The ID of the API key to be deleted. responses: '200': - description: Details of the requested API key. + description: Confirmation that the API key was deleted. content: application/json: schema: - $ref: '#/components/schemas/AdminApiKey' + type: object + properties: + id: + type: string + example: key_abc + object: + type: string + example: organization.admin_api_key.deleted + deleted: + type: boolean + example: true x-oaiMeta: + name: Delete admin API key + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.admin_api_key\",\n \"id\": \"key_abc\",\n \"name\": \"Main Admin Key\",\n \"redacted_value\": \"sk-admin...xyz\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"owner\": {\n \"type\": \"user\",\n \"object\": \"organization.user\",\n \"id\": \"user_123\",\n \"name\": \"John Doe\",\n \"created_at\": 1711471533,\n \"role\": \"owner\"\n }\n}\n" - group: administration - name: Retrieve admin API key - returns: 'The requested [AdminApiKey](https://platform.openai.com/docs/api-reference/admin-api-keys/object) object.' + curl: "curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"id\": \"key_abc\",\n \"object\": \"organization.admin_api_key.deleted\",\n \"deleted\": true\n}\n" /organization/audit_logs: get: tags: - Audit Logs - summary: List audit logs - description: List user actions and configuration changes within this organization. + summary: List user actions and configuration changes within this organization. operationId: list-audit-logs parameters: - name: effective_at @@ -3238,7 +3422,7 @@ paths: type: string - name: 'event_types[]' in: query - description: 'Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object).' + description: 'Return only events with a `type` in one of these values. For example, `project.created`. For all options, see the documentation for the [audit log object](/docs/api-reference/audit-logs/object).' schema: type: array items: @@ -3288,19 +3472,17 @@ paths: schema: $ref: '#/components/schemas/ListAuditLogsResponse' x-oaiMeta: + name: List audit logs + group: audit-logs examples: request: curl: "curl https://api.openai.com/v1/organization/audit_logs \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"audit_log-xxx_yyyymmdd\",\n \"type\": \"project.archived\",\n \"effective_at\": 1722461446,\n \"actor\": {\n \"type\": \"api_key\",\n \"api_key\": {\n \"type\": \"user\",\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n }\n }\n },\n \"project.archived\": {\n \"id\": \"proj_abc\"\n },\n },\n {\n \"id\": \"audit_log-yyy__20240101\",\n \"type\": \"api_key.updated\",\n \"effective_at\": 1720804190,\n \"actor\": {\n \"type\": \"session\",\n \"session\": {\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n },\n \"ip_address\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\",\n \"ja3\": \"a497151ce4338a12c4418c44d375173e\",\n \"ja4\": \"q13d0313h3_55b375c5d22e_c7319ce65786\",\n \"ip_address_details\": {\n \"country\": \"US\",\n \"city\": \"San Francisco\",\n \"region\": \"California\",\n \"region_code\": \"CA\",\n \"asn\": \"1234\",\n \"latitude\": \"37.77490\",\n \"longitude\": \"-122.41940\"\n }\n }\n },\n \"api_key.updated\": {\n \"id\": \"key_xxxx\",\n \"data\": {\n \"scopes\": [\"resource_2.operation_2\"]\n }\n },\n }\n ],\n \"first_id\": \"audit_log-xxx__20240101\",\n \"last_id\": \"audit_log_yyy__20240101\",\n \"has_more\": true\n}\n" - group: audit-logs - name: List audit logs - returns: 'A list of paginated [Audit Log](https://platform.openai.com/docs/api-reference/audit-logs/object) objects.' /organization/certificates: get: tags: - Certificates - summary: List organization certificates - description: List uploaded certificates for this organization. + summary: List uploaded certificates for this organization. operationId: listOrganizationCertificates parameters: - name: limit @@ -3331,18 +3513,16 @@ paths: schema: $ref: '#/components/schemas/ListCertificatesResponse' x-oaiMeta: + name: List organization certificates + group: administration examples: request: curl: "curl https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n \"first_id\": \"cert_abc\",\n \"last_id\": \"cert_abc\",\n \"has_more\": false\n}\n" - group: administration - name: List organization certificates - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects.' post: tags: - Certificates - summary: Upload certificate - description: "Upload a certificate to the organization. This does **not** automatically activate the certificate.\n\nOrganizations can upload up to 50 certificates.\n" + summary: "Upload a certificate to the organization. This does **not** automatically activate the certificate.\n\nOrganizations can upload up to 50 certificates.\n" operationId: uploadCertificate requestBody: description: The certificate upload payload. @@ -3359,19 +3539,17 @@ paths: schema: $ref: '#/components/schemas/Certificate' x-oaiMeta: + name: Upload certificate + group: administration examples: request: curl: "curl -X POST https://api.openai.com/v1/organization/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"name\": \"My Example Certificate\",\n \"certificate\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDeT...\\\\n-----END CERTIFICATE-----\"\n}'\n" response: "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n}\n" - group: administration - name: Upload certificate - returns: 'A single [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) object.' /organization/certificates/activate: post: tags: - Certificates - summary: Activate certificates for organization - description: "Activate certificates at the organization level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n" + summary: "Activate certificates at the organization level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n" operationId: activateOrganizationCertificates requestBody: description: The certificate activation payload. @@ -3388,19 +3566,17 @@ paths: schema: $ref: '#/components/schemas/ListCertificatesResponse' x-oaiMeta: + name: Activate certificates for organization + group: administration examples: request: curl: "curl https://api.openai.com/v1/organization/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" response: "{\n \"object\": \"organization.certificate.activation\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" - group: administration - name: Activate certificates for organization - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects that were activated.' /organization/certificates/deactivate: post: tags: - Certificates - summary: Deactivate certificates for organization - description: "Deactivate certificates at the organization level.\n\nYou can atomically and idempotently deactivate up to 10 certificates at a time.\n" + summary: "Deactivate certificates at the organization level.\n\nYou can atomically and idempotently deactivate up to 10 certificates at a time.\n" operationId: deactivateOrganizationCertificates requestBody: description: The certificate deactivation payload. @@ -3417,40 +3593,17 @@ paths: schema: $ref: '#/components/schemas/ListCertificatesResponse' x-oaiMeta: + name: Deactivate certificates for organization + group: administration examples: request: curl: "curl https://api.openai.com/v1/organization/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" response: "{\n \"object\": \"organization.certificate.deactivation\",\n \"data\": [\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" - group: administration - name: Deactivate certificates for organization - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects that were deactivated.' '/organization/certificates/{certificate_id}': - delete: - tags: - - Certificates - summary: Delete certificate - description: "Delete a certificate from the organization.\n\nThe certificate must be inactive for the organization and all projects.\n" - operationId: deleteCertificate - responses: - '200': - description: Certificate deleted successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteCertificateResponse' - x-oaiMeta: - examples: - request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" - response: "{\n \"object\": \"certificate.deleted\",\n \"id\": \"cert_abc\"\n}\n" - group: administration - name: Delete certificate - returns: A confirmation object indicating the certificate was deleted. get: tags: - Certificates - summary: Get certificate - description: "Get a certificate that has been uploaded to the organization.\n\nYou can get a certificate regardless of whether it is active or not.\n" + summary: "Get a certificate that has been uploaded to the organization.\n\nYou can get a certificate regardless of whether it is active or not.\n" operationId: getCertificate parameters: - name: certificate_id @@ -3476,19 +3629,24 @@ paths: schema: $ref: '#/components/schemas/Certificate' x-oaiMeta: + name: Get certificate + group: administration examples: request: curl: "curl \"https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" response: "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 1234567,\n \"expires_at\": 12345678,\n \"content\": \"-----BEGIN CERTIFICATE-----MIIDeT...-----END CERTIFICATE-----\"\n }\n}\n" - group: administration - name: Get certificate - returns: 'A single [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) object.' post: tags: - Certificates - summary: Modify certificate - description: "Modify a certificate. Note that only the name can be modified.\n" + summary: "Modify a certificate. Note that only the name can be modified.\n" operationId: modifyCertificate + parameters: + - name: certificate_id + in: path + description: Unique ID of the certificate to modify. + required: true + schema: + type: string requestBody: description: The certificate modification payload. content: @@ -3504,19 +3662,43 @@ paths: schema: $ref: '#/components/schemas/Certificate' x-oaiMeta: + name: Modify certificate + group: administration examples: request: curl: "curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"name\": \"Renamed Certificate\"\n}'\n" response: "{\n \"object\": \"certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"Renamed Certificate\",\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n}\n" + delete: + tags: + - Certificates + summary: "Delete a certificate from the organization.\n\nThe certificate must be inactive for the organization and all projects.\n" + operationId: deleteCertificate + parameters: + - name: certificate_id + in: path + description: Unique ID of the certificate to delete. + required: true + schema: + type: string + responses: + '200': + description: Certificate deleted successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteCertificateResponse' + x-oaiMeta: + name: Delete certificate group: administration - name: Modify certificate - returns: 'The updated [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) object.' + examples: + request: + curl: "curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" + response: "{\n \"object\": \"certificate.deleted\",\n \"id\": \"cert_abc\"\n}\n" /organization/costs: get: tags: - Usage - summary: Costs - description: Get costs details for the organization. + summary: Get costs details for the organization. operationId: usage-costs parameters: - name: start_time @@ -3574,429 +3756,487 @@ paths: schema: $ref: '#/components/schemas/UsageResponse' x-oaiMeta: + name: Costs + group: usage-costs examples: request: curl: "curl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": null,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-costs - name: Costs - returns: 'A list of paginated, time bucketed [Costs](https://platform.openai.com/docs/api-reference/usage/costs_object) objects.' - /organization/invites: + /organization/groups: get: tags: - - Invites - summary: List invites - description: Returns a list of invites in the organization. - operationId: list-invites + - Groups + summary: Lists all groups in the organization. + operationId: list-groups parameters: - name: limit in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: "A limit on the number of groups to be returned. Limit can range between 0 and 1000, and the default is 100.\n" schema: + maximum: 1000 + minimum: 0 type: integer - default: 20 + default: 100 - name: after in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: "A cursor for use in pagination. `after` is a group ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with group_abc, your subsequent call can include `after=group_abc` in order to fetch the next page of the list.\n" + schema: + type: string + - name: order + in: query + description: Specifies the sort order of the returned groups. schema: + enum: + - asc + - desc type: string + default: asc responses: '200': - description: Invites listed successfully. + description: Groups listed successfully. content: application/json: schema: - $ref: '#/components/schemas/InviteListResponse' + $ref: '#/components/schemas/GroupListResource' x-oaiMeta: + name: List groups + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n }\n ],\n \"first_id\": \"invite-abc\",\n \"last_id\": \"invite-abc\",\n \"has_more\": false\n}\n" - group: administration - name: List invites - returns: 'A list of [Invite](https://platform.openai.com/docs/api-reference/invite/object) objects.' + curl: "curl https://api.openai.com/v1/organization/groups?limit=20&order=asc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Invites - summary: Create invite - description: Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. - operationId: inviteUser + - Groups + summary: Creates a new group in the organization. + operationId: create-group requestBody: - description: The invite request payload. + description: Parameters for the group you want to create. content: application/json: schema: - $ref: '#/components/schemas/InviteRequest' + $ref: '#/components/schemas/CreateGroupBody' required: true responses: '200': - description: User invited successfully. + description: Group created successfully. content: application/json: schema: - $ref: '#/components/schemas/Invite' + $ref: '#/components/schemas/GroupResponse' x-oaiMeta: + name: Create group + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/invites \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n }'\n" - response: "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-def\",\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"status\": \"pending\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": null,\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n}\n" - group: administration - name: Create invite - returns: 'The created [Invite](https://platform.openai.com/docs/api-reference/invite/object) object.' - '/organization/invites/{invite_id}': - delete: + curl: "curl -X POST https://api.openai.com/v1/organization/groups \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Support Team\"\n }'\n" + response: "{\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n}\n" + '/organization/groups/{group_id}': + post: tags: - - Invites - summary: Delete invite - description: 'Delete an invite. If the invite has already been accepted, it cannot be deleted.' - operationId: delete-invite + - Groups + summary: Updates a group's information. + operationId: update-group parameters: - - name: invite_id + - name: group_id in: path - description: The ID of the invite to delete. + description: The ID of the group to update. required: true schema: type: string + requestBody: + description: New attributes to set on the group. + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGroupBody' + required: true responses: '200': - description: Invite deleted successfully. + description: Group updated successfully. content: application/json: schema: - $ref: '#/components/schemas/InviteDeleteResponse' + $ref: '#/components/schemas/GroupResourceWithSuccess' x-oaiMeta: + name: Update group + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.invite.deleted\",\n \"id\": \"invite-abc\",\n \"deleted\": true\n}\n" - group: administration - name: Delete invite - returns: Confirmation that the invite has been deleted - get: + curl: "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Escalations\"\n }'\n" + response: "{\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Escalations\",\n \"created_at\": 1711471533,\n \"is_scim_managed\": false\n}\n" + delete: tags: - - Invites - summary: Retrieve invite - description: Retrieves an invite. - operationId: retrieve-invite + - Groups + summary: Deletes a group from the organization. + operationId: delete-group parameters: - - name: invite_id + - name: group_id in: path - description: The ID of the invite to retrieve. + description: The ID of the group to delete. required: true schema: type: string responses: '200': - description: Invite retrieved successfully. + description: Group deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/Invite' + $ref: '#/components/schemas/GroupDeletedResource' x-oaiMeta: + name: Delete group + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n}\n" - group: administration - name: Retrieve invite - returns: 'The [Invite](https://platform.openai.com/docs/api-reference/invite/object) object matching the specified ID.' - /organization/projects: + curl: "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"group.deleted\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"deleted\": true\n}\n" + '/organization/groups/{group_id}/roles': get: tags: - - Projects - summary: List projects - description: Returns a list of projects. - operationId: list-projects + - Group organization role assignments + summary: Lists the organization roles assigned to a group within the organization. + operationId: list-group-role-assignments parameters: + - name: group_id + in: path + description: The ID of the group whose organization role assignments you want to list. + required: true + schema: + type: string - name: limit in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: A limit on the number of organization role assignments to return. schema: + maximum: 1000 + minimum: 0 type: integer - default: 20 - name: after in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing organization roles. schema: type: string - - name: include_archived + - name: order in: query - description: If `true` returns all projects including those that have been `archived`. Archived projects are not included by default. + description: Sort order for the returned organization roles. schema: - type: boolean - default: false + enum: + - asc + - desc + type: string responses: '200': - description: Projects listed successfully. + description: Group organization role assignments listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectListResponse' + $ref: '#/components/schemas/RoleListResource' x-oaiMeta: + name: List group organization role assignments + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n }\n ],\n \"first_id\": \"proj-abc\",\n \"last_id\": \"proj-xyz\",\n \"has_more\": false\n}\n" - group: administration - name: List projects - returns: 'A list of [Project](https://platform.openai.com/docs/api-reference/projects/object) objects.' + curl: "curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false,\n \"description\": \"Allows managing organization groups\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Projects - summary: Create project - description: 'Create a new project in the organization. Projects can be created and archived, but cannot be deleted.' - operationId: create-project + - Group organization role assignments + summary: Assigns an organization role to a group within the organization. + operationId: assign-group-role + parameters: + - name: group_id + in: path + description: The ID of the group that should receive the organization role. + required: true + schema: + type: string requestBody: - description: The project create request payload. + description: Identifies the organization role to assign to the group. content: application/json: schema: - $ref: '#/components/schemas/ProjectCreateRequest' + $ref: '#/components/schemas/PublicAssignOrganizationGroupRoleBody' required: true responses: '200': - description: Project created successfully. + description: Organization role assigned to the group successfully. content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: '#/components/schemas/GroupRoleAssignment' x-oaiMeta: + name: Assign organization role to group + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project ABC\"\n }'\n" - response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project ABC\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" + curl: "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8ROLE01\"\n }'\n" + response: "{\n \"object\": \"group.role\",\n \"group\": {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"scim_managed\": false\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n}\n" + '/organization/groups/{group_id}/roles/{role_id}': + delete: + tags: + - Group organization role assignments + summary: Unassigns an organization role from a group within the organization. + operationId: unassign-group-role + parameters: + - name: group_id + in: path + description: The ID of the group to modify. + required: true + schema: + type: string + - name: role_id + in: path + description: The ID of the organization role to remove from the group. + required: true + schema: + type: string + responses: + '200': + description: Organization role unassigned from the group successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedRoleAssignmentResource' + x-oaiMeta: + name: Unassign organization role from group group: administration - name: Create project - returns: 'The created [Project](https://platform.openai.com/docs/api-reference/projects/object) object.' - '/organization/projects/{project_id}': + examples: + request: + curl: "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"group.role.deleted\",\n \"deleted\": true\n}\n" + '/organization/groups/{group_id}/users': get: tags: - - Projects - summary: Retrieve project - description: Retrieves a project. - operationId: retrieve-project + - Group users + summary: Lists the users assigned to a group. + operationId: list-group-users parameters: - - name: project_id + - name: group_id in: path - description: The ID of the project. + description: The ID of the group to inspect. required: true schema: type: string + - name: limit + in: query + description: "A limit on the number of users to be returned. Limit can range between 0 and 1000, and the default is 100.\n" + schema: + maximum: 1000 + minimum: 0 + type: integer + default: 100 + - name: after + in: query + description: "A cursor for use in pagination. Provide the ID of the last user from the previous list response to retrieve the next page.\n" + schema: + type: string + - name: order + in: query + description: Specifies the sort order of users in the list. + schema: + enum: + - asc + - desc + type: string + default: desc responses: '200': - description: Project retrieved successfully. + description: Group users listed successfully. content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: '#/components/schemas/UserListResource' x-oaiMeta: - description: Retrieve a project. + name: List group users + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" - group: administration - name: Retrieve project - returns: 'The [Project](https://platform.openai.com/docs/api-reference/projects/object) object matching the specified ID.' + curl: "curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.user\",\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Projects - summary: Modify project - description: Modifies a project in the organization. - operationId: modify-project + - Group users + summary: Adds a user to a group. + operationId: add-group-user parameters: - - name: project_id + - name: group_id in: path - description: The ID of the project. + description: The ID of the group to update. required: true schema: type: string requestBody: - description: The project update request payload. + description: Identifies the user that should be added to the group. content: application/json: schema: - $ref: '#/components/schemas/ProjectUpdateRequest' + $ref: '#/components/schemas/CreateGroupUserBody' required: true responses: '200': - description: Project updated successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - '400': - description: Error response when updating the default project. + description: User added to the group successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/GroupUserAssignment' x-oaiMeta: + name: Add group user + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project DEF\"\n }'\n" - response: '' - group: administration - name: Modify project - returns: 'The updated [Project](https://platform.openai.com/docs/api-reference/projects/object) object.' - '/organization/projects/{project_id}/api_keys': - get: + curl: "curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"user_abc123\"\n }'\n" + response: "{\n \"object\": \"group.user\",\n \"user_id\": \"user_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\"\n}\n" + '/organization/groups/{group_id}/users/{user_id}': + delete: tags: - - Projects - summary: List project API keys - description: Returns a list of API keys in the project. - operationId: list-project-api-keys + - Group users + summary: Removes a user from a group. + operationId: remove-group-user parameters: - - name: project_id + - name: group_id in: path - description: The ID of the project. + description: The ID of the group to update. required: true schema: type: string - - name: limit - in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" - schema: - type: integer - default: 20 - - name: after - in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + - name: user_id + in: path + description: The ID of the user to remove from the group. + required: true schema: type: string responses: '200': - description: Project API keys listed successfully. + description: User removed from the group successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectApiKeyListResponse' + $ref: '#/components/schemas/GroupUserDeletedResource' x-oaiMeta: + name: Remove group user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n }\n }\n ],\n \"first_id\": \"key_abc\",\n \"last_id\": \"key_xyz\",\n \"has_more\": false\n}\n" - group: administration - name: List project API keys - returns: 'A list of [ProjectApiKey](https://platform.openai.com/docs/api-reference/project-api-keys/object) objects.' - '/organization/projects/{project_id}/api_keys/{key_id}': - delete: + curl: "curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"group.user.deleted\",\n \"deleted\": true\n}\n" + /organization/invites: + get: tags: - - Projects - summary: Delete project API key - description: Deletes an API key from the project. - operationId: delete-project-api-key + - Invites + summary: Returns a list of invites in the organization. + operationId: list-invites parameters: - - name: project_id - in: path - description: The ID of the project. - required: true + - name: limit + in: query + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" schema: - type: string - - name: key_id - in: path - description: The ID of the API key. - required: true + type: integer + default: 20 + - name: after + in: query + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string responses: '200': - description: Project API key deleted successfully. + description: Invites listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectApiKeyDeleteResponse' - '400': - description: Error response for various conditions. + $ref: '#/components/schemas/InviteListResponse' + x-oaiMeta: + name: List invites + group: administration + examples: + request: + curl: "curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n }\n ],\n \"first_id\": \"invite-abc\",\n \"last_id\": \"invite-abc\",\n \"has_more\": false\n}\n" + post: + tags: + - Invites + summary: Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. + operationId: inviteUser + requestBody: + description: The invite request payload. + content: + application/json: + schema: + $ref: '#/components/schemas/InviteRequest' + required: true + responses: + '200': + description: User invited successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/Invite' x-oaiMeta: + name: Create invite + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.api_key.deleted\",\n \"id\": \"key_abc\",\n \"deleted\": true\n}\n" - group: administration - name: Delete project API key - returns: Confirmation of the key's deletion or an error if the key belonged to a service account + curl: "curl -X POST https://api.openai.com/v1/organization/invites \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n }'\n" + response: "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-def\",\n \"email\": \"anotheruser@example.com\",\n \"role\": \"reader\",\n \"status\": \"pending\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": null,\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n },\n {\n \"id\": \"project-abc\",\n \"role\": \"owner\"\n }\n ]\n}\n" + '/organization/invites/{invite_id}': get: tags: - - Projects - summary: Retrieve project API key - description: Retrieves an API key in the project. - operationId: retrieve-project-api-key + - Invites + summary: Retrieves an invite. + operationId: retrieve-invite parameters: - - name: project_id - in: path - description: The ID of the project. - required: true - schema: - type: string - - name: key_id + - name: invite_id in: path - description: The ID of the API key. + description: The ID of the invite to retrieve. required: true schema: type: string responses: '200': - description: Project API key retrieved successfully. + description: Invite retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectApiKey' + $ref: '#/components/schemas/Invite' x-oaiMeta: + name: Retrieve invite + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n }\n}\n" - group: administration - name: Retrieve project API key - returns: 'The [ProjectApiKey](https://platform.openai.com/docs/api-reference/project-api-keys/object) object matching the specified ID.' - '/organization/projects/{project_id}/archive': - post: + curl: "curl https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"invited_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533\n}\n" + delete: tags: - - Projects - summary: Archive project - description: Archives a project in the organization. Archived projects cannot be used or updated. - operationId: archive-project + - Invites + summary: 'Delete an invite. If the invite has already been accepted, it cannot be deleted.' + operationId: delete-invite parameters: - - name: project_id + - name: invite_id in: path - description: The ID of the project. + description: The ID of the invite to delete. required: true schema: type: string responses: '200': - description: Project archived successfully. + description: Invite deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/Project' + $ref: '#/components/schemas/InviteDeleteResponse' x-oaiMeta: + name: Delete invite + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project DEF\",\n \"created_at\": 1711471533,\n \"archived_at\": 1711471533,\n \"status\": \"archived\"\n}\n" - group: administration - name: Archive project - returns: 'The archived [Project](https://platform.openai.com/docs/api-reference/projects/object) object.' - '/organization/projects/{project_id}/certificates': + curl: "curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.invite.deleted\",\n \"id\": \"invite-abc\",\n \"deleted\": true\n}\n" + /organization/projects: get: tags: - - Certificates - summary: List project certificates - description: List certificates for this project. - operationId: listProjectCertificates + - Projects + summary: Returns a list of projects. + operationId: list-projects parameters: - - name: project_id - in: path - description: The ID of the project. - required: true - schema: - type: string - name: limit in: query description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" @@ -4008,37 +4248,58 @@ paths: description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string - - name: order + - name: include_archived in: query - description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" + description: If `true` returns all projects including those that have been `archived`. Archived projects are not included by default. schema: - enum: - - asc - - desc - type: string - default: desc + type: boolean + default: false responses: '200': - description: Certificates listed successfully. + description: Projects listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ListCertificatesResponse' + $ref: '#/components/schemas/ProjectListResponse' x-oaiMeta: + name: List projects + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n \"first_id\": \"cert_abc\",\n \"last_id\": \"cert_abc\",\n \"has_more\": false\n}\n" - group: administration - name: List project certificates - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects.' - '/organization/projects/{project_id}/certificates/activate': + curl: "curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n }\n ],\n \"first_id\": \"proj-abc\",\n \"last_id\": \"proj-xyz\",\n \"has_more\": false\n}\n" post: tags: - - Certificates - summary: Activate certificates for project - description: "Activate certificates at the project level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n" - operationId: activateProjectCertificates + - Projects + summary: 'Create a new project in the organization. Projects can be created and archived, but cannot be deleted.' + operationId: create-project + requestBody: + description: The project create request payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCreateRequest' + required: true + responses: + '200': + description: Project created successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + x-oaiMeta: + name: Create project + group: administration + examples: + request: + curl: "curl -X POST https://api.openai.com/v1/organization/projects \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project ABC\"\n }'\n" + response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project ABC\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" + '/organization/projects/{project_id}': + get: + tags: + - Projects + summary: Retrieves a project. + operationId: retrieve-project parameters: - name: project_id in: path @@ -4046,35 +4307,26 @@ paths: required: true schema: type: string - requestBody: - description: The certificate activation payload. - content: - application/json: - schema: - $ref: '#/components/schemas/ToggleCertificatesRequest' - required: true responses: '200': - description: Certificates activated successfully. + description: Project retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ListCertificatesResponse' + $ref: '#/components/schemas/Project' x-oaiMeta: + name: Retrieve project + group: administration + description: Retrieve a project. examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" - response: "{\n \"object\": \"organization.project.certificate.activation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" - group: administration - name: Activate certificates for project - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects that were activated.' - '/organization/projects/{project_id}/certificates/deactivate': + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project example\",\n \"created_at\": 1711471533,\n \"archived_at\": null,\n \"status\": \"active\"\n}\n" post: tags: - - Certificates - summary: Deactivate certificates for project - description: "Deactivate certificates at the project level. You can atomically and \nidempotently deactivate up to 10 certificates at a time.\n" - operationId: deactivateProjectCertificates + - Projects + summary: Modifies a project in the organization. + operationId: modify-project parameters: - name: project_id in: path @@ -4083,34 +4335,38 @@ paths: schema: type: string requestBody: - description: The certificate deactivation payload. + description: The project update request payload. content: application/json: schema: - $ref: '#/components/schemas/ToggleCertificatesRequest' + $ref: '#/components/schemas/ProjectUpdateRequest' required: true responses: '200': - description: Certificates deactivated successfully. + description: Project updated successfully. content: application/json: schema: - $ref: '#/components/schemas/ListCertificatesResponse' + $ref: '#/components/schemas/Project' + '400': + description: Error response when updating the default project. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Modify project + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" - response: "{\n \"object\": \"organization.project.certificate.deactivation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" - group: administration - name: Deactivate certificates for project - returns: 'A list of [Certificate](https://platform.openai.com/docs/api-reference/certificates/object) objects that were deactivated.' - '/organization/projects/{project_id}/rate_limits': + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Project DEF\"\n }'\n" + response: '' + '/organization/projects/{project_id}/api_keys': get: tags: - Projects - summary: List project rate limits - description: Returns the rate limits per model for a project. - operationId: list-project-rate-limits + summary: Returns a list of API keys in the project. + operationId: list-project-api-keys parameters: - name: project_id in: path @@ -4120,43 +4376,35 @@ paths: type: string - name: limit in: query - description: "A limit on the number of objects to be returned. The default is 100.\n" + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" schema: type: integer - default: 100 + default: 20 - name: after in: query description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string - - name: before - in: query - description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" - schema: - type: string responses: '200': - description: Project rate limits listed successfully. + description: Project API keys listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectRateLimitListResponse' + $ref: '#/components/schemas/ProjectApiKeyListResponse' x-oaiMeta: + name: List project API keys + group: administration examples: - error_response: "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n ],\n \"first_id\": \"rl-ada\",\n \"last_id\": \"rl-ada\",\n \"has_more\": false\n}\n" - group: administration - name: List project rate limits - returns: 'A list of [ProjectRateLimit](https://platform.openai.com/docs/api-reference/project-rate-limits/object) objects.' - '/organization/projects/{project_id}/rate_limits/{rate_limit_id}': - post: - tags: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n }\n }\n ],\n \"first_id\": \"key_abc\",\n \"last_id\": \"key_xyz\",\n \"has_more\": false\n}\n" + '/organization/projects/{project_id}/api_keys/{key_id}': + get: + tags: - Projects - summary: Modify project rate limit - description: Updates a project rate limit. - operationId: update-project-rate-limits + summary: Retrieves an API key in the project. + operationId: retrieve-project-api-key parameters: - name: project_id in: path @@ -4164,48 +4412,31 @@ paths: required: true schema: type: string - - name: rate_limit_id + - name: key_id in: path - description: The ID of the rate limit. + description: The ID of the API key. required: true schema: type: string - requestBody: - description: The project rate limit update request payload. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectRateLimitUpdateRequest' - required: true responses: '200': - description: Project rate limit updated successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectRateLimit' - '400': - description: Error response for various conditions. + description: Project API key retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProjectApiKey' x-oaiMeta: + name: Retrieve project API key + group: administration examples: - error_response: "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"max_requests_per_1_minute\": 500\n }'\n" - response: "{\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n" - group: administration - name: Modify project rate limit - returns: 'The updated [ProjectRateLimit](https://platform.openai.com/docs/api-reference/project-rate-limits/object) object.' - '/organization/projects/{project_id}/service_accounts': - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.api_key\",\n \"redacted_value\": \"sk-abc...def\",\n \"name\": \"My API Key\",\n \"created_at\": 1711471533,\n \"last_used_at\": 1711471534,\n \"id\": \"key_abc\",\n \"owner\": {\n \"type\": \"user\",\n \"user\": {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n }\n}\n" + delete: tags: - Projects - summary: List project service accounts - description: Returns a list of service accounts in the project. - operationId: list-project-service-accounts + summary: "Deletes an API key from the project.\n\nReturns confirmation of the key deletion, or an error if the key belonged to\na service account.\n" + operationId: delete-project-api-key parameters: - name: project_id in: path @@ -4213,44 +4444,38 @@ paths: required: true schema: type: string - - name: limit - in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" - schema: - type: integer - default: 20 - - name: after - in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + - name: key_id + in: path + description: The ID of the API key. + required: true schema: type: string responses: '200': - description: Project service accounts listed successfully. + description: Project API key deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectServiceAccountListResponse' + $ref: '#/components/schemas/ProjectApiKeyDeleteResponse' '400': - description: Error response when project is archived. + description: Error response for various conditions. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Delete project API key + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n }\n ],\n \"first_id\": \"svc_acct_abc\",\n \"last_id\": \"svc_acct_xyz\",\n \"has_more\": false\n}\n" - group: administration - name: List project service accounts - returns: 'A list of [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object) objects.' + curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.api_key.deleted\",\n \"id\": \"key_abc\",\n \"deleted\": true\n}\n" + '/organization/projects/{project_id}/archive': post: tags: - Projects - summary: Create project service account - description: Creates a new service account in the project. This also returns an unredacted API key for the service account. - operationId: create-project-service-account + summary: Archives a project in the organization. Archived projects cannot be used or updated. + operationId: archive-project parameters: - name: project_id in: path @@ -4258,41 +4483,26 @@ paths: required: true schema: type: string - requestBody: - description: The project service account create request payload. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectServiceAccountCreateRequest' - required: true responses: '200': - description: Project service account created successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectServiceAccountCreateResponse' - '400': - description: Error response when project is archived. + description: Project archived successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/Project' x-oaiMeta: + name: Archive project + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Production App\"\n }'\n" - response: "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Production App\",\n \"role\": \"member\",\n \"created_at\": 1711471533,\n \"api_key\": {\n \"object\": \"organization.project.service_account.api_key\",\n \"value\": \"sk-abcdefghijklmnop123\",\n \"name\": \"Secret Key\",\n \"created_at\": 1711471533,\n \"id\": \"key_abc\"\n }\n}\n" - group: administration - name: Create project service account - returns: 'The created [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object) object.' - '/organization/projects/{project_id}/service_accounts/{service_account_id}': - delete: + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"id\": \"proj_abc\",\n \"object\": \"organization.project\",\n \"name\": \"Project DEF\",\n \"created_at\": 1711471533,\n \"archived_at\": 1711471533,\n \"status\": \"archived\"\n}\n" + '/organization/projects/{project_id}/certificates': + get: tags: - - Projects - summary: Delete project service account - description: Deletes a service account from the project. - operationId: delete-project-service-account + - Certificates + summary: List certificates for this project. + operationId: listProjectCertificates parameters: - name: project_id in: path @@ -4300,33 +4510,46 @@ paths: required: true schema: type: string - - name: service_account_id - in: path - description: The ID of the service account. - required: true + - name: limit + in: query + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" schema: + type: integer + default: 20 + - name: after + in: query + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + schema: + type: string + - name: order + in: query + description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" + schema: + enum: + - asc + - desc type: string + default: desc responses: '200': - description: Project service account deleted successfully. + description: Certificates listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectServiceAccountDeleteResponse' + $ref: '#/components/schemas/ListCertificatesResponse' x-oaiMeta: + name: List project certificates + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.service_account.deleted\",\n \"id\": \"svc_acct_abc\",\n \"deleted\": true\n}\n" - group: administration - name: Delete project service account - returns: 'Confirmation of service account being deleted, or an error in case of an archived project, which has no service accounts' - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n \"first_id\": \"cert_abc\",\n \"last_id\": \"cert_abc\",\n \"has_more\": false\n}\n" + '/organization/projects/{project_id}/certificates/activate': + post: tags: - - Projects - summary: Retrieve project service account - description: Retrieves a service account in the project. - operationId: retrieve-project-service-account + - Certificates + summary: "Activate certificates at the project level.\n\nYou can atomically and idempotently activate up to 10 certificates at a time.\n" + operationId: activateProjectCertificates parameters: - name: project_id in: path @@ -4334,161 +4557,182 @@ paths: required: true schema: type: string - - name: service_account_id + requestBody: + description: The certificate activation payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ToggleCertificatesRequest' + required: true + responses: + '200': + description: Certificates activated successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/ListCertificatesResponse' + x-oaiMeta: + name: Activate certificates for project + group: administration + examples: + request: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" + response: "{\n \"object\": \"organization.project.certificate.activation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": true,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + '/organization/projects/{project_id}/certificates/deactivate': + post: + tags: + - Certificates + summary: "Deactivate certificates at the project level. You can atomically and \nidempotently deactivate up to 10 certificates at a time.\n" + operationId: deactivateProjectCertificates + parameters: + - name: project_id in: path - description: The ID of the service account. + description: The ID of the project. required: true schema: type: string + requestBody: + description: The certificate deactivation payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ToggleCertificatesRequest' + required: true responses: '200': - description: Project service account retrieved successfully. + description: Certificates deactivated successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectServiceAccount' + $ref: '#/components/schemas/ListCertificatesResponse' x-oaiMeta: + name: Deactivate certificates for project + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n}\n" - group: administration - name: Retrieve project service account - returns: 'The [ProjectServiceAccount](https://platform.openai.com/docs/api-reference/project-service-accounts/object) object matching the specified ID.' - '/organization/projects/{project_id}/users': + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"data\": [\"cert_abc\", \"cert_def\"]\n}'\n" + response: "{\n \"object\": \"organization.project.certificate.deactivation\",\n \"data\": [\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_abc\",\n \"name\": \"My Example Certificate\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n {\n \"object\": \"organization.project.certificate\",\n \"id\": \"cert_def\",\n \"name\": \"My Example Certificate 2\",\n \"active\": false,\n \"created_at\": 1234567,\n \"certificate_details\": {\n \"valid_at\": 12345667,\n \"expires_at\": 12345678\n }\n },\n ],\n}\n" + '/organization/projects/{project_id}/groups': get: tags: - - Projects - summary: List project users - description: Returns a list of users in the project. - operationId: list-project-users + - Project groups + summary: Lists the groups that have access to a project. + operationId: list-project-groups parameters: - name: project_id in: path - description: The ID of the project. + description: The ID of the project to inspect. required: true schema: type: string - name: limit in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: A limit on the number of project groups to return. Defaults to 20. schema: + maximum: 100 + minimum: 0 type: integer default: 20 - name: after in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: Cursor for pagination. Provide the ID of the last group from the previous response to fetch the next page. + schema: + type: string + - name: order + in: query + description: Sort order for the returned groups. schema: + enum: + - asc + - desc type: string + default: asc responses: '200': - description: Project users listed successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUserListResponse' - '400': - description: Error response when project is archived. + description: Project groups listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProjectGroupListResource' x-oaiMeta: + name: List project groups + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" - group: administration - name: List project users - returns: 'A list of [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object) objects.' + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc123/groups?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"project.group\",\n \"project_id\": \"proj_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"group_name\": \"Support Team\",\n \"created_at\": 1711471533\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Projects - summary: Create project user - description: Adds a user to the project. Users must already be members of the organization to be added to a project. - operationId: create-project-user + - Project groups + summary: Grants a group access to a project. + operationId: add-project-group parameters: - name: project_id in: path - description: The ID of the project. + description: The ID of the project to update. required: true schema: type: string requestBody: - description: The project user create request payload. + description: Identifies the group and role to assign to the project. content: application/json: schema: - $ref: '#/components/schemas/ProjectUserCreateRequest' + $ref: '#/components/schemas/InviteProjectGroupBody' required: true responses: '200': - description: User added to project successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUser' - '400': - description: Error response for various conditions. + description: Group granted access to the project successfully. content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProjectGroup' x-oaiMeta: + name: Add project group + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"user_abc\",\n \"role\": \"member\"\n }'\n" - response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" - group: administration - name: Create project user - returns: 'The created [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object) object.' - '/organization/projects/{project_id}/users/{user_id}': + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc123/groups \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"role\": \"role_01J1F8PROJ\"\n }'\n" + response: "{\n \"object\": \"project.group\",\n \"project_id\": \"proj_abc123\",\n \"group_id\": \"group_01J1F8ABCDXYZ\",\n \"group_name\": \"Support Team\",\n \"created_at\": 1711471533\n}\n" + '/organization/projects/{project_id}/groups/{group_id}': delete: tags: - - Projects - summary: Delete project user - description: Deletes a user from the project. - operationId: delete-project-user + - Project groups + summary: Revokes a group's access to a project. + operationId: remove-project-group parameters: - name: project_id in: path - description: The ID of the project. + description: The ID of the project to update. required: true schema: type: string - - name: user_id + - name: group_id in: path - description: The ID of the user. + description: The ID of the group to remove from the project. required: true schema: type: string responses: '200': - description: Project user deleted successfully. + description: Group removed from the project successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectUserDeleteResponse' - '400': - description: Error response for various conditions. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ProjectGroupDeletedResource' x-oaiMeta: + name: Remove project group + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" - group: administration - name: Delete project user - returns: 'Confirmation that project has been deleted or an error in case of an archived project, which has no users' + curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"project.group.deleted\",\n \"deleted\": true\n}\n" + '/organization/projects/{project_id}/rate_limits': get: tags: - Projects - summary: Retrieve project user - description: Retrieves a user in the project. - operationId: retrieve-project-user + summary: Returns the rate limits per model for a project. + operationId: list-project-rate-limits parameters: - name: project_id in: path @@ -4496,33 +4740,43 @@ paths: required: true schema: type: string - - name: user_id - in: path - description: The ID of the user. - required: true + - name: limit + in: query + description: "A limit on the number of objects to be returned. The default is 100.\n" + schema: + type: integer + default: 100 + - name: after + in: query + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + schema: + type: string + - name: before + in: query + description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" schema: type: string responses: '200': - description: Project user retrieved successfully. + description: Project rate limits listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectUser' + $ref: '#/components/schemas/ProjectRateLimitListResponse' x-oaiMeta: + name: List project rate limits + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" - group: administration - name: Retrieve project user - returns: 'The [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object) object matching the specified ID.' + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n ],\n \"first_id\": \"rl-ada\",\n \"last_id\": \"rl-ada\",\n \"has_more\": false\n}\n" + error_response: "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" + '/organization/projects/{project_id}/rate_limits/{rate_limit_id}': post: tags: - Projects - summary: Modify project user - description: Modifies a user's role in the project. - operationId: modify-project-user + summary: Updates a project rate limit. + operationId: update-project-rate-limits parameters: - name: project_id in: path @@ -4530,26 +4784,26 @@ paths: required: true schema: type: string - - name: user_id + - name: rate_limit_id in: path - description: The ID of the user. + description: The ID of the rate limit. required: true schema: type: string requestBody: - description: The project user update request payload. + description: The project rate limit update request payload. content: application/json: schema: - $ref: '#/components/schemas/ProjectUserUpdateRequest' + $ref: '#/components/schemas/ProjectRateLimitUpdateRequest' required: true responses: '200': - description: Project user's role updated successfully. + description: Project rate limit updated successfully. content: application/json: schema: - $ref: '#/components/schemas/ProjectUser' + $ref: '#/components/schemas/ProjectRateLimit' '400': description: Error response for various conditions. content: @@ -4557,826 +4811,334 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Modify project rate limit + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n" - response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" - group: administration - name: Modify project user - returns: 'The updated [ProjectUser](https://platform.openai.com/docs/api-reference/project-users/object) object.' - /organization/usage/audio_speeches: + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"max_requests_per_1_minute\": 500\n }'\n" + response: "{\n \"object\": \"project.rate_limit\",\n \"id\": \"rl-ada\",\n \"model\": \"ada\",\n \"max_requests_per_1_minute\": 600,\n \"max_tokens_per_1_minute\": 150000,\n \"max_images_per_1_minute\": 10\n }\n" + error_response: "{\n \"code\": 404,\n \"message\": \"The project {project_id} was not found\"\n}\n" + '/organization/projects/{project_id}/service_accounts': get: tags: - - Usage - summary: Audio speeches - description: Get audio speeches usage details for the organization. - operationId: usage-audio-speeches + - Projects + summary: Returns a list of service accounts in the project. + operationId: list-project-service-accounts parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - type: string - name: limit in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" schema: type: integer - - name: page + default: 20 + - name: after in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string responses: '200': - description: Usage data retrieved successfully. + description: Project service accounts listed successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectServiceAccountListResponse' + '400': + description: Error response when project is archived. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: List project service accounts + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-audio-speeches - name: Audio speeches - returns: 'A list of paginated, time bucketed [Audio speeches usage](https://platform.openai.com/docs/api-reference/usage/audio_speeches_object) objects.' - /organization/usage/audio_transcriptions: - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n }\n ],\n \"first_id\": \"svc_acct_abc\",\n \"last_id\": \"svc_acct_xyz\",\n \"has_more\": false\n}\n" + post: tags: - - Usage - summary: Audio transcriptions - description: Get audio transcriptions usage details for the organization. - operationId: usage-audio-transcriptions + - Projects + summary: Creates a new service account in the project. This also returns an unredacted API key for the service account. + operationId: create-project-service-account parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true - schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d - type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string + requestBody: + description: The project service account create request payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectServiceAccountCreateRequest' + required: true responses: '200': - description: Usage data retrieved successfully. + description: Project service account created successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectServiceAccountCreateResponse' + '400': + description: Error response when project is archived. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Create project service account + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-audio-transcriptions - name: Audio transcriptions - returns: 'A list of paginated, time bucketed [Audio transcriptions usage](https://platform.openai.com/docs/api-reference/usage/audio_transcriptions_object) objects.' - /organization/usage/code_interpreter_sessions: + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"name\": \"Production App\"\n }'\n" + response: "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Production App\",\n \"role\": \"member\",\n \"created_at\": 1711471533,\n \"api_key\": {\n \"object\": \"organization.project.service_account.api_key\",\n \"value\": \"sk-abcdefghijklmnop123\",\n \"name\": \"Secret Key\",\n \"created_at\": 1711471533,\n \"id\": \"key_abc\"\n }\n}\n" + '/organization/projects/{project_id}/service_accounts/{service_account_id}': get: tags: - - Usage - summary: Code interpreter sessions - description: Get code interpreter sessions usage details for the organization. - operationId: usage-code-interpreter-sessions + - Projects + summary: Retrieves a service account in the project. + operationId: retrieve-project-service-account parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: Group the usage data by the specified fields. Support fields include `project_id`. - schema: - type: array - items: - enum: - - project_id - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + - name: service_account_id + in: path + description: The ID of the service account. + required: true schema: type: string responses: '200': - description: Usage data retrieved successfully. + description: Project service account retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectServiceAccount' x-oaiMeta: + name: Retrieve project service account + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.code_interpreter_sessions.result\",\n \"num_sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-code-interpreter-sessions - name: Code interpreter sessions - returns: 'A list of paginated, time bucketed [Code interpreter sessions usage](https://platform.openai.com/docs/api-reference/usage/code_interpreter_sessions_object) objects.' - /organization/usage/completions: - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.service_account\",\n \"id\": \"svc_acct_abc\",\n \"name\": \"Service Account\",\n \"role\": \"owner\",\n \"created_at\": 1711471533\n}\n" + delete: tags: - - Usage - summary: Completions - description: Get completions usage details for the organization. - operationId: usage-completions + - Projects + summary: "Deletes a service account from the project.\n\nReturns confirmation of service account deletion, or an error if the project\nis archived (archived projects have no service accounts).\n" + operationId: delete-project-service-account parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: batch - in: query - description: "If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both.\n" - schema: - type: boolean - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - - batch - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + - name: service_account_id + in: path + description: The ID of the service account. + required: true schema: type: string responses: '200': - description: Usage data retrieved successfully. + description: Project service account deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectServiceAccountDeleteResponse' x-oaiMeta: + name: Delete project service account + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"input_audio_tokens\": 0,\n \"output_audio_tokens\": 0,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"page_AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" - group: usage-completions - name: Completions - returns: 'A list of paginated, time bucketed [Completions usage](https://platform.openai.com/docs/api-reference/usage/completions_object) objects.' - /organization/usage/embeddings: + curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.service_account.deleted\",\n \"id\": \"svc_acct_abc\",\n \"deleted\": true\n}\n" + '/organization/projects/{project_id}/users': get: tags: - - Usage - summary: Embeddings - description: Get embeddings usage details for the organization. - operationId: usage-embeddings + - Projects + summary: Returns a list of users in the project. + operationId: list-project-users parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - type: string - name: limit in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" schema: type: integer - - name: page + default: 20 + - name: after in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string responses: '200': - description: Usage data retrieved successfully. + description: Project users listed successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectUserListResponse' + '400': + description: Error response when project is archived. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: List project users + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-embeddings - name: Embeddings - returns: 'A list of paginated, time bucketed [Embeddings usage](https://platform.openai.com/docs/api-reference/usage/embeddings_object) objects.' - /organization/usage/images: - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" + post: tags: - - Usage - summary: Images - description: Get images usage details for the organization. - operationId: usage-images + - Projects + summary: Adds a user to the project. Users must already be members of the organization to be added to a project. + operationId: create-project-user parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true - schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d - type: string - default: 1d - - name: sources - in: query - description: 'Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.' - schema: - type: array - items: - enum: - - image.generation - - image.edit - - image.variation - type: string - - name: sizes - in: query - description: 'Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.' - schema: - type: array - items: - enum: - - 256x256 - - 512x512 - - 1024x1024 - - 1792x1792 - - 1024x1792 - type: string - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - - size - - source - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string + requestBody: + description: The project user create request payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUserCreateRequest' + required: true responses: '200': - description: Usage data retrieved successfully. + description: User added to project successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectUser' + '400': + description: Error response for various conditions. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Create project user + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-images - name: Images - returns: 'A list of paginated, time bucketed [Images usage](https://platform.openai.com/docs/api-reference/usage/images_object) objects.' - /organization/usage/moderations: + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"user_abc\",\n \"role\": \"member\"\n }'\n" + response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + '/organization/projects/{project_id}/users/{user_id}': get: tags: - - Usage - summary: Moderations - description: Get moderations usage details for the organization. - operationId: usage-moderations + - Projects + summary: Retrieves a user in the project. + operationId: retrieve-project-user parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: user_ids - in: query - description: Return only usage for these users. - schema: - type: array - items: - type: string - - name: api_key_ids - in: query - description: Return only usage for these API keys. - schema: - type: array - items: - type: string - - name: models - in: query - description: Return only usage for these models. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' - schema: - type: array - items: - enum: - - project_id - - user_id - - api_key_id - - model - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + - name: user_id + in: path + description: The ID of the user. + required: true schema: type: string responses: '200': - description: Usage data retrieved successfully. + description: Project user retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' + $ref: '#/components/schemas/ProjectUser' x-oaiMeta: + name: Retrieve project user + group: administration examples: request: - curl: "curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-moderations - name: Moderations - returns: 'A list of paginated, time bucketed [Moderations usage](https://platform.openai.com/docs/api-reference/usage/moderations_object) objects.' - /organization/usage/vector_stores: - get: + curl: "curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + post: tags: - - Usage - summary: Vector stores - description: Get vector stores usage details for the organization. - operationId: usage-vector-stores + - Projects + summary: Modifies a user's role in the project. + operationId: modify-project-user parameters: - - name: start_time - in: query - description: 'Start time (Unix seconds) of the query time range, inclusive.' + - name: project_id + in: path + description: The ID of the project. required: true schema: - type: integer - - name: end_time - in: query - description: 'End time (Unix seconds) of the query time range, exclusive.' - schema: - type: integer - - name: bucket_width - in: query - description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' - schema: - enum: - - 1m - - 1h - - 1d type: string - default: 1d - - name: project_ids - in: query - description: Return only usage for these projects. - schema: - type: array - items: - type: string - - name: group_by - in: query - description: Group the usage data by the specified fields. Support fields include `project_id`. - schema: - type: array - items: - enum: - - project_id - type: string - - name: limit - in: query - description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" - schema: - type: integer - - name: page - in: query - description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + - name: user_id + in: path + description: The ID of the user. + required: true schema: type: string + requestBody: + description: The project user update request payload. + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUserUpdateRequest' + required: true responses: '200': - description: Usage data retrieved successfully. + description: Project user's role updated successfully. content: application/json: schema: - $ref: '#/components/schemas/UsageResponse' - x-oaiMeta: - examples: - request: - curl: "curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" - group: usage-vector-stores - name: Vector stores - returns: 'A list of paginated, time bucketed [Vector stores usage](https://platform.openai.com/docs/api-reference/usage/vector_stores_object) objects.' - /organization/users: - get: - tags: - - Users - summary: List users - description: Lists all of the users in the organization. - operationId: list-users - parameters: - - name: limit - in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" - schema: - type: integer - default: 20 - - name: after - in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" - schema: - type: string - - name: emails - in: query - description: Filter by the email address of users. - schema: - type: array - items: - type: string - responses: - '200': - description: Users listed successfully. + $ref: '#/components/schemas/ProjectUser' + '400': + description: Error response for various conditions. content: application/json: schema: - $ref: '#/components/schemas/UserListResponse' + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Modify project user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" - group: administration - name: List users - returns: 'A list of [User](https://platform.openai.com/docs/api-reference/users/object) objects.' - '/organization/users/{user_id}': + curl: "curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n" + response: "{\n \"object\": \"organization.project.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" delete: tags: - - Users - summary: Delete user - description: Deletes a user from the organization. - operationId: delete-user + - Projects + summary: "Deletes a user from the project.\n\nReturns confirmation of project user deletion, or an error if the project is\narchived (archived projects have no users).\n" + operationId: delete-project-user parameters: - - name: user_id + - name: project_id in: path - description: The ID of the user. + description: The ID of the project. required: true schema: type: string - responses: - '200': - description: User deleted successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/UserDeleteResponse' - x-oaiMeta: - examples: - request: - curl: "curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" - group: administration - name: Delete user - returns: Confirmation of the deleted user - get: - tags: - - Users - summary: Retrieve user - description: Retrieves a user by their identifier. - operationId: retrieve-user - parameters: - name: user_id in: path description: The ID of the user. @@ -5385,1966 +5147,2245 @@ paths: type: string responses: '200': - description: User retrieved successfully. + description: Project user deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/ProjectUserDeleteResponse' + '400': + description: Error response for various conditions. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: + name: Delete project user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" - group: administration - name: Retrieve user - returns: 'The [User](https://platform.openai.com/docs/api-reference/users/object) object matching the specified ID.' - post: + curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.project.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" + /organization/roles: + get: tags: - - Users - summary: Modify user - description: Modifies a user's role in the organization. - operationId: modify-user + - Roles + summary: Lists the roles configured for the organization. + operationId: list-roles parameters: - - name: user_id - in: path - description: The ID of the user. - required: true + - name: limit + in: query + description: A limit on the number of roles to return. Defaults to 1000. + schema: + maximum: 1000 + minimum: 0 + type: integer + default: 1000 + - name: after + in: query + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing roles. schema: type: string - requestBody: - description: The new user role to modify. This must be one of `owner` or `member`. - content: - application/json: - schema: - $ref: '#/components/schemas/UserRoleUpdateRequest' - required: true + - name: order + in: query + description: Sort order for the returned roles. + schema: + enum: + - asc + - desc + type: string + default: asc responses: '200': - description: User role updated successfully. + description: Roles listed successfully. content: application/json: schema: - $ref: '#/components/schemas/User' + $ref: '#/components/schemas/PublicRoleListResource' x-oaiMeta: - examples: - request: - curl: "curl -X POST https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n" - response: "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + name: List organization roles group: administration - name: Modify user - returns: 'The updated [User](https://platform.openai.com/docs/api-reference/users/object) object.' - /realtime/client_secrets: - post: - tags: - - Realtime - summary: Create client secret - description: "Create a Realtime client secret with an associated session configuration.\n" - operationId: create-realtime-client-secret - requestBody: - description: Create a client secret with the given session configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/RealtimeCreateClientSecretRequest' - required: true - responses: - '200': - description: Client secret created successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/RealtimeCreateClientSecretResponse' - x-oaiMeta: examples: request: - curl: "curl -X POST https://api.openai.com/v1/realtime/client_secrets \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"expires_after\": {\n \"anchor\": \"created_at\",\n \"seconds\": 600\n },\n \"session\": {\n \"type\": \"realtime\",\n \"model\": \"gpt-realtime\",\n \"instructions\": \"You are a friendly assistant.\"\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/realtime\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n clientSecret, err := client.Realtime.ClientSecrets.New(context.TODO(), realtime.ClientSecretNewParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", clientSecret.ExpiresAt)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.realtime.clientsecrets.ClientSecretCreateParams;\nimport com.openai.models.realtime.clientsecrets.ClientSecretCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ClientSecretCreateResponse clientSecret = client.realtime().clientSecrets().create();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst clientSecret = await client.realtime.clientSecrets.create();\n\nconsole.log(clientSecret.expires_at);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nclient_secret = client.realtime.client_secrets.create()\nprint(client_secret.expires_at)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nclient_secret = openai.realtime.client_secrets.create\n\nputs(client_secret)" - response: "{\n \"value\": \"ek_68af296e8e408191a1120ab6383263c2\",\n \"expires_at\": 1756310470,\n \"session\": {\n \"type\": \"realtime\",\n \"object\": \"realtime.session\",\n \"id\": \"sess_C9CiUVUzUzYIssh3ELY1d\",\n \"model\": \"gpt-realtime\",\n \"output_modalities\": [\n \"audio\"\n ],\n \"instructions\": \"You are a friendly assistant.\",\n \"tools\": [],\n \"tool_choice\": \"auto\",\n \"max_output_tokens\": \"inf\",\n \"tracing\": null,\n \"truncation\": \"auto\",\n \"prompt\": null,\n \"expires_at\": 0,\n \"audio\": {\n \"input\": {\n \"format\": {\n \"type\": \"audio/pcm\",\n \"rate\": 24000\n },\n \"transcription\": null,\n \"noise_reduction\": null,\n \"turn_detection\": {\n \"type\": \"server_vad\",\n }\n },\n \"output\": {\n \"format\": {\n \"type\": \"audio/pcm\",\n \"rate\": 24000\n },\n \"voice\": \"alloy\",\n \"speed\": 1.0\n }\n },\n \"include\": null\n }\n}\n" - group: realtime - name: Create client secret - returns: The created client secret and the effective session object. The client secret is a string that looks like `ek_1234`. - /realtime/sessions: + curl: "curl https://api.openai.com/v1/organization/roles?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Realtime - summary: Create session - description: "Create an ephemeral API token for use in client-side applications with the\nRealtime API. Can be configured with the same session parameters as the\n`session.update` client event.\n\nIt responds with a session object, plus a `client_secret` key which contains\na usable ephemeral API token that can be used to authenticate browser clients\nfor the Realtime API.\n" - operationId: create-realtime-session + - Roles + summary: Creates a custom role for the organization. + operationId: create-role requestBody: - description: Create an ephemeral API key with the given session configuration. + description: Parameters for the role you want to create. content: application/json: schema: - $ref: '#/components/schemas/RealtimeSessionCreateRequest' + $ref: '#/components/schemas/PublicCreateOrganizationRoleBody' required: true responses: '200': - description: Session created successfully. + description: Role created successfully. content: application/json: schema: - $ref: '#/components/schemas/RealtimeSessionCreateResponse' + $ref: '#/components/schemas/Role' x-oaiMeta: + name: Create organization role + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/realtime/sessions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"gpt-realtime\",\n \"modalities\": [\"audio\", \"text\"],\n \"instructions\": \"You are a friendly assistant.\"\n }'\n" - response: "{\n \"id\": \"sess_001\",\n \"object\": \"realtime.session\",\n \"model\": \"gpt-realtime-2025-08-25\",\n \"modalities\": [\"audio\", \"text\"],\n \"instructions\": \"You are a friendly assistant.\",\n \"voice\": \"alloy\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"whisper-1\"\n },\n \"turn_detection\": null,\n \"tools\": [],\n \"tool_choice\": \"none\",\n \"temperature\": 0.7,\n \"max_response_output_tokens\": 200,\n \"speed\": 1.1,\n \"tracing\": \"auto\",\n \"client_secret\": {\n \"value\": \"ek_abc123\", \n \"expires_at\": 1234567890\n }\n}\n" - group: realtime - name: Create session - returns: 'The created Realtime session object, plus an ephemeral key' - /realtime/transcription_sessions: + curl: "curl -X POST https://api.openai.com/v1/organization/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"description\": \"Allows managing organization groups\"\n }'\n" + response: "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n}\n" + '/organization/roles/{role_id}': post: tags: - - Realtime - summary: Create transcription session - description: "Create an ephemeral API token for use in client-side applications with the\nRealtime API specifically for realtime transcriptions. \nCan be configured with the same session parameters as the `transcription_session.update` client event.\n\nIt responds with a session object, plus a `client_secret` key which contains\na usable ephemeral API token that can be used to authenticate browser clients\nfor the Realtime API.\n" - operationId: create-realtime-transcription-session + - Roles + summary: Updates an existing organization role. + operationId: update-role + parameters: + - name: role_id + in: path + description: The ID of the role to update. + required: true + schema: + type: string requestBody: - description: Create an ephemeral API key with the given session configuration. + description: Fields to update on the role. content: application/json: schema: - $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateRequest' + $ref: '#/components/schemas/PublicUpdateOrganizationRoleBody' required: true responses: '200': - description: Session created successfully. + description: Role updated successfully. content: application/json: schema: - $ref: '#/components/schemas/RealtimeTranscriptionSessionCreateResponse' + $ref: '#/components/schemas/Role' x-oaiMeta: + name: Update organization role + group: administration examples: request: - curl: "curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'\n" - response: "{\n \"id\": \"sess_BBwZc7cFV3XizEyKGDCGL\",\n \"object\": \"realtime.transcription_session\",\n \"modalities\": [\"audio\", \"text\"],\n \"turn_detection\": {\n \"type\": \"server_vad\",\n \"threshold\": 0.5,\n \"prefix_padding_ms\": 300,\n \"silence_duration_ms\": 200\n },\n \"input_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"gpt-4o-transcribe\",\n \"language\": null,\n \"prompt\": \"\"\n },\n \"client_secret\": null\n}\n" - group: realtime - name: Create transcription session - returns: 'The created [Realtime transcription session object](https://platform.openai.com/docs/api-reference/realtime-sessions/transcription_session_object), plus an ephemeral key' - /responses: - post: - tags: - - Responses - summary: Create a model response - description: "Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or\n[image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text)\nor [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call\nyour own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in\n[tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search)\nor [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data\nas input for the model's response.\n" - operationId: createResponse - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateResponse' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Response' - text/event-stream: - schema: - $ref: '#/components/schemas/ResponseStreamEvent' - x-oaiMeta: - example: - request: - csharp: "using System;\nusing OpenAI.Responses;\n\nOpenAIResponseClient client = new(\n model: \"gpt-4.1\",\n apiKey: Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")\n);\n\nOpenAIResponse response = client.CreateResponse(\"Tell me a three sentence bedtime story about a unicorn.\");\n\nConsole.WriteLine(response.GetOutputText());\n" - curl: "curl https://api.openai.com/v1/responses \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"gpt-4.1\",\n \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.Responses.New(context.TODO(), responses.ResponseNewParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.Response;\nimport com.openai.models.responses.ResponseCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Response response = client.responses().create();\n }\n}" - javascript: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst response = await openai.responses.create({\n model: \"gpt-4.1\",\n input: \"Tell me a three sentence bedtime story about a unicorn.\"\n});\n\nconsole.log(response);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.responses.create();\n\nconsole.log(response.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.responses.create()\nprint(response.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.responses.create\n\nputs(response)" - response: "{\n \"id\": \"resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b\",\n \"object\": \"response\",\n \"created_at\": 1741476542,\n \"status\": \"completed\",\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4.1-2025-04-14\",\n \"output\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b\",\n \"status\": \"completed\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.\",\n \"annotations\": []\n }\n ]\n }\n ],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1.0,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 36,\n \"input_tokens_details\": {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 87,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 123\n },\n \"user\": null,\n \"metadata\": {}\n}\n" - title: Text input - group: responses - name: Create a model response - path: create - returns: "Returns a [Response](https://platform.openai.com/docs/api-reference/responses/object) object.\n" - '/responses/{response_id}': + curl: "curl -X POST https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"description\": \"Allows managing organization groups\"\n }'\n" + response: "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n}\n" delete: tags: - - Responses - summary: Delete a model response - description: "Deletes a model response with the given ID.\n" - operationId: deleteResponse + - Roles + summary: Deletes a custom role from the organization. + operationId: delete-role parameters: - - name: response_id + - name: role_id in: path - description: The ID of the response to delete. + description: The ID of the role to delete. required: true schema: type: string - example: resp_677efb5139a88190b512bc3fef8e535d responses: '200': - description: OK - '404': - description: Not Found + description: Role deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/RoleDeletedResource' x-oaiMeta: + name: Delete organization role + group: administration examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/responses/resp_123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n err := client.Responses.Delete(context.TODO(), \"resp_677efb5139a88190b512bc3fef8e535d\")\n if err != nil {\n panic(err.Error())\n }\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.ResponseDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n client.responses().delete(\"resp_677efb5139a88190b512bc3fef8e535d\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.delete(\"resp_123\");\nconsole.log(response);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nawait client.responses.delete('resp_677efb5139a88190b512bc3fef8e535d');" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nclient.responses.delete(\n \"resp_677efb5139a88190b512bc3fef8e535d\",\n)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresult = openai.responses.delete(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\nputs(result)" - response: "{\n \"id\": \"resp_6786a1bec27481909a17d673315b29f6\",\n \"object\": \"response\",\n \"deleted\": true\n}\n" - group: responses - name: Delete a model response - returns: "A success message.\n" + curl: "curl -X DELETE https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"role.deleted\",\n \"id\": \"role_01J1F8ROLE01\",\n \"deleted\": true\n}\n" + /organization/usage/audio_speeches: get: tags: - - Responses - summary: Get a model response - description: "Retrieves a model response with the given ID.\n" - operationId: getResponse + - Usage + summary: Get audio speeches usage details for the organization. + operationId: usage-audio-speeches parameters: - - name: response_id - in: path - description: The ID of the response to retrieve. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d type: string - example: resp_677efb5139a88190b512bc3fef8e535d - - name: include + default: 1d + - name: project_ids in: query - description: "Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n" + description: Return only usage for these projects. schema: type: array items: - $ref: '#/components/schemas/Includable' - - name: stream + type: string + - name: user_ids in: query - description: "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)\nfor more information.\n" + description: Return only usage for these users. schema: - type: boolean - - name: starting_after + type: array + items: + type: string + - name: api_key_ids in: query - description: "The sequence number of the event after which to start streaming.\n" + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" schema: type: integer - - name: include_obfuscation + - name: page in: query - description: "When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events\nto normalize payload sizes as a mitigation to certain side-channel\nattacks. These obfuscation fields are included by default, but add a\nsmall amount of overhead to the data stream. You can set\n`include_obfuscation` to false to optimize for bandwidth if you trust\nthe network links between your application and the OpenAI API.\n" + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: - type: boolean + type: string responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: + name: Audio speeches + group: usage-audio-speeches examples: request: - curl: "curl https://api.openai.com/v1/responses/resp_123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.Responses.Get(\n context.TODO(),\n \"resp_677efb5139a88190b512bc3fef8e535d\",\n responses.ResponseGetParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.Response;\nimport com.openai.models.responses.ResponseRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Response response = client.responses().retrieve(\"resp_677efb5139a88190b512bc3fef8e535d\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.retrieve(\"resp_123\");\nconsole.log(response);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.responses.retrieve('resp_677efb5139a88190b512bc3fef8e535d');\n\nconsole.log(response.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.responses.retrieve(\n response_id=\"resp_677efb5139a88190b512bc3fef8e535d\",\n)\nprint(response.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.responses.retrieve(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\nputs(response)" - response: "{\n \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n \"object\": \"response\",\n \"created_at\": 1741386163,\n \"status\": \"completed\",\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n \"status\": \"completed\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"Silent circuits hum, \\nThoughts emerge in data streams— \\nDigital dawn breaks.\",\n \"annotations\": []\n }\n ]\n }\n ],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1.0,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 32,\n \"input_tokens_details\": {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 18,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 50\n },\n \"user\": null,\n \"metadata\": {}\n}\n" - group: responses - name: Get a model response - returns: "The [Response](https://platform.openai.com/docs/api-reference/responses/object) object matching the\nspecified ID.\n" - '/responses/{response_id}/cancel': - post: + curl: "curl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/audio_transcriptions: + get: tags: - - Responses - summary: Cancel a response - description: "Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled. \n[Learn more](https://platform.openai.com/docs/guides/background).\n" - operationId: cancelResponse + - Usage + summary: Get audio transcriptions usage details for the organization. + operationId: usage-audio-transcriptions parameters: - - name: response_id - in: path - description: The ID of the response to cancel. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string - example: resp_677efb5139a88190b512bc3fef8e535d responses: '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Response' - '404': - description: Not Found + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: + name: Audio transcriptions + group: usage-audio-transcriptions examples: request: - curl: "curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n response, err := client.Responses.Cancel(context.TODO(), \"resp_677efb5139a88190b512bc3fef8e535d\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", response.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.Response;\nimport com.openai.models.responses.ResponseCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Response response = client.responses().cancel(\"resp_677efb5139a88190b512bc3fef8e535d\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.cancel(\"resp_123\");\nconsole.log(response); \n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst response = await client.responses.cancel('resp_677efb5139a88190b512bc3fef8e535d');\n\nconsole.log(response.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nresponse = client.responses.cancel(\n \"resp_677efb5139a88190b512bc3fef8e535d\",\n)\nprint(response.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nresponse = openai.responses.cancel(\"resp_677efb5139a88190b512bc3fef8e535d\")\n\nputs(response)" - response: "{\n \"id\": \"resp_67cb71b351908190a308f3859487620d06981a8637e6bc44\",\n \"object\": \"response\",\n \"created_at\": 1741386163,\n \"status\": \"completed\",\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [\n {\n \"type\": \"message\",\n \"id\": \"msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44\",\n \"status\": \"completed\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"Silent circuits hum, \\nThoughts emerge in data streams— \\nDigital dawn breaks.\",\n \"annotations\": []\n }\n ]\n }\n ],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1.0,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 32,\n \"input_tokens_details\": {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 18,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 50\n },\n \"user\": null,\n \"metadata\": {}\n}\n" - group: responses - name: Cancel a response - returns: "A [Response](https://platform.openai.com/docs/api-reference/responses/object) object.\n" - '/responses/{response_id}/input_items': + curl: "curl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/code_interpreter_sessions: get: tags: - - Responses - summary: List input items - description: Returns a list of input items for a given response. - operationId: listInputItems + - Usage + summary: Get code interpreter sessions usage details for the organization. + operationId: usage-code-interpreter-sessions parameters: - - name: response_id - in: path - description: The ID of the response to retrieve input items for. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: - type: string - - name: limit + type: integer + - name: end_time in: query - description: "A limit on the number of objects to be returned. Limit can range between\n1 and 100, and the default is 20.\n" + description: 'End time (Unix seconds) of the query time range, exclusive.' schema: type: integer - default: 20 - - name: order + - name: bucket_width in: query - description: "The order to return the input items in. Default is `desc`.\n- `asc`: Return the input items in ascending order.\n- `desc`: Return the input items in descending order.\n" + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' schema: enum: - - asc - - desc + - 1m + - 1h + - 1d type: string - - name: after + default: 1d + - name: project_ids in: query - description: "An item ID to list items after, used in pagination.\n" + description: Return only usage for these projects. schema: - type: string - - name: include + type: array + items: + type: string + - name: group_by in: query - description: "Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n" + description: Group the usage data by the specified fields. Support fields include `project_id`. schema: type: array items: - $ref: '#/components/schemas/Includable' + enum: + - project_id + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ResponseItemList' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: + name: Code interpreter sessions + group: usage-code-interpreter-sessions examples: request: - curl: "curl https://api.openai.com/v1/responses/resp_abc123/input_items \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Responses.InputItems.List(\n context.TODO(),\n \"response_id\",\n responses.InputItemListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.inputitems.InputItemListPage;\nimport com.openai.models.responses.inputitems.InputItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n InputItemListPage page = client.responses().inputItems().list(\"response_id\");\n }\n}" - javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.inputItems.list(\"resp_123\");\nconsole.log(response.data);\n" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const responseItem of client.responses.inputItems.list('response_id')) {\n console.log(responseItem);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.responses.input_items.list(\n response_id=\"response_id\",\n)\npage = page.data[0]\nprint(page)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.responses.input_items.list(\"response_id\")\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"msg_abc123\",\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": \"Tell me a three sentence bedtime story about a unicorn.\"\n }\n ]\n }\n ],\n \"first_id\": \"msg_abc123\",\n \"last_id\": \"msg_abc123\",\n \"has_more\": false\n}\n" - group: responses - name: List input items - returns: A list of input item objects. - /threads: - post: - tags: - - Assistants - summary: Create thread - description: Create a thread. - operationId: createThread - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateThreadRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ThreadObject' - x-oaiMeta: - beta: true - example: - request: - curl: "curl https://api.openai.com/v1/threads \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d ''\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n thread, err := client.Beta.Threads.New(context.TODO(), openai.BetaThreadNewParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", thread.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.Thread;\nimport com.openai.models.beta.threads.ThreadCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Thread thread = client.beta().threads().create();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst thread = await client.beta.threads.create();\n\nconsole.log(thread.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nthread = client.beta.threads.create()\nprint(thread.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nthread = openai.beta.threads.create\n\nputs(thread)" - response: "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699012949,\n \"metadata\": {},\n \"tool_resources\": {}\n}\n" - title: Empty - group: threads - name: Create thread - returns: 'A [thread](https://platform.openai.com/docs/api-reference/threads) object.' - /threads/runs: - post: - tags: - - Assistants - summary: Create thread and run - description: Create a thread and run it in one request. - operationId: createThreadAndRun - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateThreadAndRunRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/RunObject' - x-oaiMeta: - beta: true - example: - request: - curl: "curl https://api.openai.com/v1/threads/runs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"assistant_id\": \"asst_abc123\",\n \"thread\": {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Explain deep learning to a 5 year old.\"}\n ]\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.NewAndRun(context.TODO(), openai.BetaThreadNewAndRunParams{\n AssistantID: \"assistant_id\",\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.ThreadCreateAndRunParams;\nimport com.openai.models.beta.threads.runs.Run;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ThreadCreateAndRunParams params = ThreadCreateAndRunParams.builder()\n .assistantId(\"assistant_id\")\n .build();\n Run run = client.beta().threads().createAndRun(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.createAndRun({ assistant_id: 'assistant_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.create_and_run(\n assistant_id=\"assistant_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.create_and_run(assistant_id: \"assistant_id\")\n\nputs(run)" - response: "{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699076792,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"queued\",\n \"started_at\": null,\n \"expires_at\": 1699077392,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"required_action\": null,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You are a helpful assistant.\",\n \"tools\": [],\n \"tool_resources\": {},\n \"metadata\": {},\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completion_tokens\": null,\n \"max_prompt_tokens\": null,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"incomplete_details\": null,\n \"usage\": null,\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - title: Default - group: threads - name: Create thread and run - returns: 'A [run](https://platform.openai.com/docs/api-reference/runs/object) object.' - '/threads/{thread_id}': - delete: - tags: - - Assistants - summary: Delete thread - description: Delete a thread. - operationId: deleteThread - parameters: - - name: thread_id - in: path - description: The ID of the thread to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteThreadResponse' - x-oaiMeta: - beta: true - examples: - request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X DELETE\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n threadDeleted, err := client.Beta.Threads.Delete(context.TODO(), \"thread_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", threadDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.ThreadDeleteParams;\nimport com.openai.models.beta.threads.ThreadDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ThreadDeleted threadDeleted = client.beta().threads().delete(\"thread_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst threadDeleted = await client.beta.threads.delete('thread_id');\n\nconsole.log(threadDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nthread_deleted = client.beta.threads.delete(\n \"thread_id\",\n)\nprint(thread_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nthread_deleted = openai.beta.threads.delete(\"thread_id\")\n\nputs(thread_deleted)" - response: "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread.deleted\",\n \"deleted\": true\n}\n" - group: threads - name: Delete thread - returns: Deletion status + curl: "curl \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.code_interpreter_sessions.result\",\n \"num_sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/completions: get: tags: - - Assistants - summary: Retrieve thread - description: Retrieves a thread. - operationId: getThread + - Usage + summary: Get completions usage details for the organization. + operationId: usage-completions parameters: - - name: thread_id - in: path - description: The ID of the thread to retrieve. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ThreadObject' - x-oaiMeta: - beta: true - examples: - request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n thread, err := client.Beta.Threads.Get(context.TODO(), \"thread_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", thread.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.Thread;\nimport com.openai.models.beta.threads.ThreadRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Thread thread = client.beta().threads().retrieve(\"thread_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst thread = await client.beta.threads.retrieve('thread_id');\n\nconsole.log(thread.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nthread = client.beta.threads.retrieve(\n \"thread_id\",\n)\nprint(thread.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nthread = openai.beta.threads.retrieve(\"thread_id\")\n\nputs(thread)" - response: "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699014083,\n \"metadata\": {},\n \"tool_resources\": {\n \"code_interpreter\": {\n \"file_ids\": []\n }\n }\n}\n" - group: threads - name: Retrieve thread - returns: 'The [thread](https://platform.openai.com/docs/api-reference/threads/object) object matching the specified ID.' - post: - tags: - - Assistants - summary: Modify thread - description: Modifies a thread. - operationId: modifyThread - parameters: - - name: thread_id - in: path - description: The ID of the thread to modify. Only the `metadata` can be modified. - required: true + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: batch + in: query + description: "If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both.\n" + schema: + type: boolean + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + - batch + - service_tier + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ModifyThreadRequest' - required: true responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ThreadObject' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: - beta: true + name: Completions + group: usage-completions examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n thread, err := client.Beta.Threads.Update(\n context.TODO(),\n \"thread_id\",\n openai.BetaThreadUpdateParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", thread.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.Thread;\nimport com.openai.models.beta.threads.ThreadUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Thread thread = client.beta().threads().update(\"thread_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst thread = await client.beta.threads.update('thread_id');\n\nconsole.log(thread.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nthread = client.beta.threads.update(\n thread_id=\"thread_id\",\n)\nprint(thread.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nthread = openai.beta.threads.update(\"thread_id\")\n\nputs(thread)" - response: "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699014083,\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n },\n \"tool_resources\": {}\n}\n" - group: threads - name: Modify thread - returns: 'The modified [thread](https://platform.openai.com/docs/api-reference/threads/object) object matching the specified ID.' - '/threads/{thread_id}/messages': + curl: "curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"input_audio_tokens\": 0,\n \"output_audio_tokens\": 0,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null,\n \"service_tier\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"page_AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" + /organization/usage/embeddings: get: tags: - - Assistants - summary: List messages - description: Returns a list of messages for a given thread. - operationId: listMessages + - Usage + summary: Get embeddings usage details for the organization. + operationId: usage-embeddings parameters: - - name: thread_id - in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) the messages belong to.' + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: - type: string - - name: limit + type: integer + - name: end_time in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: 'End time (Unix seconds) of the query time range, exclusive.' schema: type: integer - default: 20 - - name: order + - name: bucket_width in: query - description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' schema: enum: - - asc - - desc + - 1m + - 1h + - 1d type: string - default: desc - - name: after + default: 1d + - name: project_ids in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: Return only usage for these projects. schema: - type: string - - name: before + type: array + items: + type: string + - name: user_ids in: query - description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" + description: Return only usage for these users. schema: - type: string - - name: run_id + type: array + items: + type: string + - name: api_key_ids in: query - description: "Filter messages by the run ID that generated them.\n" + description: Return only usage for these API keys. schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ListMessagesResponse' - x-oaiMeta: - beta: true - examples: - request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Beta.Threads.Messages.List(\n context.TODO(),\n \"thread_id\",\n openai.BetaThreadMessageListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.messages.MessageListPage;\nimport com.openai.models.beta.threads.messages.MessageListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageListPage page = client.beta().threads().messages().list(\"thread_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const message of client.beta.threads.messages.list('thread_id')) {\n console.log(message.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.beta.threads.messages.list(\n thread_id=\"thread_id\",\n)\npage = page.data[0]\nprint(page.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.beta.threads.messages.list(\"thread_id\")\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699016383,\n \"assistant_id\": null,\n \"thread_id\": \"thread_abc123\",\n \"run_id\": null,\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"attachments\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"msg_abc456\",\n \"object\": \"thread.message\",\n \"created_at\": 1699016383,\n \"assistant_id\": null,\n \"thread_id\": \"thread_abc123\",\n \"run_id\": null,\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"Hello, what is AI?\",\n \"annotations\": []\n }\n }\n ],\n \"attachments\": [],\n \"metadata\": {}\n }\n ],\n \"first_id\": \"msg_abc123\",\n \"last_id\": \"msg_abc456\",\n \"has_more\": false\n}\n" - group: threads - name: List messages - returns: 'A list of [message](https://platform.openai.com/docs/api-reference/messages) objects.' - post: - tags: - - Assistants - summary: Create message - description: Create a message. - operationId: createMessage - parameters: - - name: thread_id - in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to create a message for.' - required: true + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateMessageRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/MessageObject' - x-oaiMeta: - beta: true - examples: - request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"role\": \"user\",\n \"content\": \"How does AI work? Explain it in simple terms.\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n message, err := client.Beta.Threads.Messages.New(\n context.TODO(),\n \"thread_id\",\n openai.BetaThreadMessageNewParams{\n Content: openai.BetaThreadMessageNewParamsContentUnion{\n OfString: openai.String(\"string\"),\n },\n Role: openai.BetaThreadMessageNewParamsRoleUser,\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", message.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.messages.Message;\nimport com.openai.models.beta.threads.messages.MessageCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageCreateParams params = MessageCreateParams.builder()\n .threadId(\"thread_id\")\n .content(\"string\")\n .role(MessageCreateParams.Role.USER)\n .build();\n Message message = client.beta().threads().messages().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst message = await client.beta.threads.messages.create('thread_id', { content: 'string', role: 'user' });\n\nconsole.log(message.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmessage = client.beta.threads.messages.create(\n thread_id=\"thread_id\",\n content=\"string\",\n role=\"user\",\n)\nprint(message.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmessage = openai.beta.threads.messages.create(\"thread_id\", content: \"string\", role: :user)\n\nputs(message)" - response: "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1713226573,\n \"assistant_id\": null,\n \"thread_id\": \"thread_abc123\",\n \"run_id\": null,\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"attachments\": [],\n \"metadata\": {}\n}\n" - group: threads - name: Create message - returns: 'A [message](https://platform.openai.com/docs/api-reference/messages/object) object.' - '/threads/{thread_id}/messages/{message_id}': - delete: - tags: - - Assistants - summary: Delete message - description: Deletes a message. - operationId: deleteMessage - parameters: - - name: thread_id - in: path - description: The ID of the thread to which this message belongs. - required: true + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' schema: - type: string - - name: message_id - in: path - description: The ID of the message to delete. - required: true + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/DeleteMessageResponse' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: - beta: true + name: Embeddings + group: usage-embeddings examples: request: - curl: "curl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n messageDeleted, err := client.Beta.Threads.Messages.Delete(\n context.TODO(),\n \"thread_id\",\n \"message_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", messageDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.messages.MessageDeleteParams;\nimport com.openai.models.beta.threads.messages.MessageDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageDeleteParams params = MessageDeleteParams.builder()\n .threadId(\"thread_id\")\n .messageId(\"message_id\")\n .build();\n MessageDeleted messageDeleted = client.beta().threads().messages().delete(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst messageDeleted = await client.beta.threads.messages.delete('message_id', { thread_id: 'thread_id' });\n\nconsole.log(messageDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmessage_deleted = client.beta.threads.messages.delete(\n message_id=\"message_id\",\n thread_id=\"thread_id\",\n)\nprint(message_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmessage_deleted = openai.beta.threads.messages.delete(\"message_id\", thread_id: \"thread_id\")\n\nputs(message_deleted)" - response: "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message.deleted\",\n \"deleted\": true\n}\n" - group: threads - name: Delete message - returns: Deletion status + curl: "curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/images: get: tags: - - Assistants - summary: Retrieve message - description: Retrieve a message. - operationId: getMessage + - Usage + summary: Get images usage details for the organization. + operationId: usage-images parameters: - - name: thread_id - in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this message belongs.' + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d type: string - - name: message_id - in: path - description: The ID of the message to retrieve. - required: true + default: 1d + - name: sources + in: query + description: 'Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.' + schema: + type: array + items: + enum: + - image.generation + - image.edit + - image.variation + type: string + - name: sizes + in: query + description: 'Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.' + schema: + type: array + items: + enum: + - 256x256 + - 512x512 + - 1024x1024 + - 1792x1792 + - 1024x1792 + type: string + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + - size + - source + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/MessageObject' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: - beta: true + name: Images + group: usage-images examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n message, err := client.Beta.Threads.Messages.Get(\n context.TODO(),\n \"thread_id\",\n \"message_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", message.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.messages.Message;\nimport com.openai.models.beta.threads.messages.MessageRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageRetrieveParams params = MessageRetrieveParams.builder()\n .threadId(\"thread_id\")\n .messageId(\"message_id\")\n .build();\n Message message = client.beta().threads().messages().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst message = await client.beta.threads.messages.retrieve('message_id', { thread_id: 'thread_id' });\n\nconsole.log(message.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmessage = client.beta.threads.messages.retrieve(\n message_id=\"message_id\",\n thread_id=\"thread_id\",\n)\nprint(message.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmessage = openai.beta.threads.messages.retrieve(\"message_id\", thread_id: \"thread_id\")\n\nputs(message)" - response: "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699017614,\n \"assistant_id\": null,\n \"thread_id\": \"thread_abc123\",\n \"run_id\": null,\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"attachments\": [],\n \"metadata\": {}\n}\n" - group: threads - name: Retrieve message - returns: 'The [message](https://platform.openai.com/docs/api-reference/messages/object) object matching the specified ID.' - post: + curl: "curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/moderations: + get: tags: - - Assistants - summary: Modify message - description: Modifies a message. - operationId: modifyMessage + - Usage + summary: Get moderations usage details for the organization. + operationId: usage-moderations parameters: - - name: thread_id - in: path - description: The ID of the thread to which this message belongs. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: - type: string - - name: message_id - in: path - description: The ID of the message to modify. - required: true + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ModifyMessageRequest' - required: true responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/MessageObject' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: - beta: true + name: Moderations + group: usage-moderations examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n message, err := client.Beta.Threads.Messages.Update(\n context.TODO(),\n \"thread_id\",\n \"message_id\",\n openai.BetaThreadMessageUpdateParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", message.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.messages.Message;\nimport com.openai.models.beta.threads.messages.MessageUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n MessageUpdateParams params = MessageUpdateParams.builder()\n .threadId(\"thread_id\")\n .messageId(\"message_id\")\n .build();\n Message message = client.beta().threads().messages().update(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst message = await client.beta.threads.messages.update('message_id', { thread_id: 'thread_id' });\n\nconsole.log(message.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nmessage = client.beta.threads.messages.update(\n message_id=\"message_id\",\n thread_id=\"thread_id\",\n)\nprint(message.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nmessage = openai.beta.threads.messages.update(\"message_id\", thread_id: \"thread_id\")\n\nputs(message)" - response: "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699017614,\n \"assistant_id\": null,\n \"thread_id\": \"thread_abc123\",\n \"run_id\": null,\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n}\n" - group: threads - name: Modify message - returns: 'The modified [message](https://platform.openai.com/docs/api-reference/messages/object) object.' - '/threads/{thread_id}/runs': + curl: "curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/vector_stores: get: tags: - - Assistants - summary: List runs - description: Returns a list of runs belonging to a thread. - operationId: listRuns + - Usage + summary: Get vector stores usage details for the organization. + operationId: usage-vector-stores parameters: - - name: thread_id - in: path - description: The ID of the thread the run belongs to. + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' required: true schema: - type: string - - name: limit + type: integer + - name: end_time in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: 'End time (Unix seconds) of the query time range, exclusive.' schema: type: integer - default: 20 - - name: order + - name: bucket_width in: query - description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' schema: enum: - - asc - - desc + - 1m + - 1h + - 1d type: string - default: desc - - name: after + default: 1d + - name: project_ids in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: Return only usage for these projects. schema: - type: string - - name: before + type: array + items: + type: string + - name: group_by in: query - description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" + description: Group the usage data by the specified fields. Support fields include `project_id`. + schema: + type: array + items: + enum: + - project_id + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. schema: type: string responses: '200': - description: OK + description: Usage data retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/ListRunsResponse' + $ref: '#/components/schemas/UsageResponse' x-oaiMeta: - beta: true + name: Vector stores + group: usage-vector-stores examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Beta.Threads.Runs.List(\n context.TODO(),\n \"thread_id\",\n openai.BetaThreadRunListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.RunListPage;\nimport com.openai.models.beta.threads.runs.RunListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunListPage page = client.beta().threads().runs().list(\"thread_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const run of client.beta.threads.runs.list('thread_id')) {\n console.log(run.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.beta.threads.runs.list(\n thread_id=\"thread_id\",\n)\npage = page.data[0]\nprint(page.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.beta.threads.runs.list(\"thread_id\")\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"incomplete_details\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"tool_resources\": {\n \"code_interpreter\": {\n \"file_ids\": [\n \"file-abc123\",\n \"file-abc456\"\n ]\n }\n },\n \"metadata\": {},\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n },\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n },\n {\n \"id\": \"run_abc456\",\n \"object\": \"thread.run\",\n \"created_at\": 1699063290,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"completed\",\n \"started_at\": 1699063290,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699063291,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"incomplete_details\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"tool_resources\": {\n \"code_interpreter\": {\n \"file_ids\": [\n \"file-abc123\",\n \"file-abc456\"\n ]\n }\n },\n \"metadata\": {},\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n },\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n }\n ],\n \"first_id\": \"run_abc123\",\n \"last_id\": \"run_abc456\",\n \"has_more\": false\n}\n" - group: threads - name: List runs - returns: 'A list of [run](https://platform.openai.com/docs/api-reference/runs/object) objects.' - post: + curl: "curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/users: + get: tags: - - Assistants - summary: Create run - description: Create a run. - operationId: createRun + - Users + summary: Lists all of the users in the organization. + operationId: list-users parameters: - - name: thread_id - in: path - description: The ID of the thread to run. - required: true + - name: limit + in: query + description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + schema: + type: integer + default: 20 + - name: after + in: query + description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" schema: type: string - - name: 'include[]' + - name: emails in: query - description: "A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n\nSee the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n" + description: Filter by the email address of users. schema: type: array items: - enum: - - 'step_details.tool_calls[*].file_search.results[*].content' type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateRunRequest' - required: true responses: '200': - description: OK + description: Users listed successfully. content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: '#/components/schemas/UserListResponse' x-oaiMeta: - beta: true - example: + name: List users + group: administration + examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"assistant_id\": \"asst_abc123\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.Runs.New(\n context.TODO(),\n \"thread_id\",\n openai.BetaThreadRunNewParams{\n AssistantID: \"assistant_id\",\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.Run;\nimport com.openai.models.beta.threads.runs.RunCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCreateParams params = RunCreateParams.builder()\n .threadId(\"thread_id\")\n .assistantId(\"assistant_id\")\n .build();\n Run run = client.beta().threads().runs().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.runs.create('thread_id', { assistant_id: 'assistant_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.runs.create(\n thread_id=\"thread_id\",\n assistant_id=\"assistant_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.runs.create(\"thread_id\", assistant_id: \"assistant_id\")\n\nputs(run)" - response: "{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699063290,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"queued\",\n \"started_at\": 1699063290,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699063291,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"incomplete_details\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"metadata\": {},\n \"usage\": null,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - title: Default - group: threads - name: Create run - returns: 'A [run](https://platform.openai.com/docs/api-reference/runs/object) object.' - '/threads/{thread_id}/runs/{run_id}': + curl: "curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n }\n ],\n \"first_id\": \"user-abc\",\n \"last_id\": \"user-xyz\",\n \"has_more\": false\n}\n" + '/organization/users/{user_id}': get: tags: - - Assistants - summary: Retrieve run - description: Retrieves a run. - operationId: getRun + - Users + summary: Retrieves a user by their identifier. + operationId: retrieve-user parameters: - - name: thread_id - in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.' - required: true - schema: - type: string - - name: run_id + - name: user_id in: path - description: The ID of the run to retrieve. + description: The ID of the user. required: true schema: type: string responses: '200': - description: OK + description: User retrieved successfully. content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: '#/components/schemas/User' x-oaiMeta: - beta: true + name: Retrieve user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.Runs.Get(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.Run;\nimport com.openai.models.beta.threads.runs.RunRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunRetrieveParams params = RunRetrieveParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .build();\n Run run = client.beta().threads().runs().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.runs.retrieve('run_id', { thread_id: 'thread_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.runs.retrieve(\n run_id=\"run_id\",\n thread_id=\"thread_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.runs.retrieve(\"run_id\", thread_id: \"thread_id\")\n\nputs(run)" - response: "{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"incomplete_details\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"metadata\": {},\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n },\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - group: threads - name: Retrieve run - returns: 'The [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the specified ID.' + curl: "curl https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" post: tags: - - Assistants - summary: Modify run - description: Modifies a run. - operationId: modifyRun + - Users + summary: Modifies a user's role in the organization. + operationId: modify-user parameters: - - name: thread_id - in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.' - required: true - schema: - type: string - - name: run_id + - name: user_id in: path - description: The ID of the run to modify. + description: The ID of the user. required: true schema: type: string requestBody: + description: The new user role to modify. This must be one of `owner` or `member`. content: application/json: schema: - $ref: '#/components/schemas/ModifyRunRequest' + $ref: '#/components/schemas/UserRoleUpdateRequest' required: true responses: '200': - description: OK + description: User role updated successfully. content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: '#/components/schemas/User' x-oaiMeta: - beta: true + name: Modify user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"metadata\": {\n \"user_id\": \"user_abc123\"\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.Runs.Update(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n openai.BetaThreadRunUpdateParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.Run;\nimport com.openai.models.beta.threads.runs.RunUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunUpdateParams params = RunUpdateParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .build();\n Run run = client.beta().threads().runs().update(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.runs.update('run_id', { thread_id: 'thread_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.runs.update(\n run_id=\"run_id\",\n thread_id=\"thread_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.runs.update(\"run_id\", thread_id: \"thread_id\")\n\nputs(run)" - response: "{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"incomplete_details\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"tool_resources\": {\n \"code_interpreter\": {\n \"file_ids\": [\n \"file-abc123\",\n \"file-abc456\"\n ]\n }\n },\n \"metadata\": {\n \"user_id\": \"user_abc123\"\n },\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n },\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - group: threads - name: Modify run - returns: 'The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the specified ID.' - '/threads/{thread_id}/runs/{run_id}/cancel': - post: + curl: "curl -X POST https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role\": \"owner\"\n }'\n" + response: "{\n \"object\": \"organization.user\",\n \"id\": \"user_abc\",\n \"name\": \"First Last\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711471533\n}\n" + delete: tags: - - Assistants - summary: Cancel a run - description: Cancels a run that is `in_progress`. - operationId: cancelRun + - Users + summary: Deletes a user from the organization. + operationId: delete-user parameters: - - name: thread_id + - name: user_id in: path - description: The ID of the thread to which this run belongs. - required: true - schema: - type: string - - name: run_id - in: path - description: The ID of the run to cancel. + description: The ID of the user. required: true schema: type: string responses: '200': - description: OK + description: User deleted successfully. content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: '#/components/schemas/UserDeleteResponse' x-oaiMeta: - beta: true + name: Delete user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X POST\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.Runs.Cancel(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.Run;\nimport com.openai.models.beta.threads.runs.RunCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunCancelParams params = RunCancelParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .build();\n Run run = client.beta().threads().runs().cancel(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.runs.cancel('run_id', { thread_id: 'thread_id' });\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.runs.cancel(\n run_id=\"run_id\",\n thread_id=\"thread_id\",\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.runs.cancel(\"run_id\", thread_id: \"thread_id\")\n\nputs(run)" - response: "{\n \"id\": \"run_abc123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699076126,\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"status\": \"cancelling\",\n \"started_at\": 1699076126,\n \"expires_at\": 1699076726,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": \"You summarize books.\",\n \"tools\": [\n {\n \"type\": \"file_search\"\n }\n ],\n \"tool_resources\": {\n \"file_search\": {\n \"vector_store_ids\": [\"vs_123\"]\n }\n },\n \"metadata\": {},\n \"usage\": null,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - group: threads - name: Cancel a run - returns: 'The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the specified ID.' - '/threads/{thread_id}/runs/{run_id}/steps': + curl: "curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"organization.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" + '/organization/users/{user_id}/roles': get: tags: - - Assistants - summary: List run steps - description: Returns a list of run steps belonging to a run. - operationId: listRunSteps + - User organization role assignments + summary: Lists the organization roles assigned to a user within the organization. + operationId: list-user-role-assignments parameters: - - name: thread_id - in: path - description: The ID of the thread the run and run steps belong to. - required: true - schema: - type: string - - name: run_id + - name: user_id in: path - description: The ID of the run the run steps belong to. + description: The ID of the user to inspect. required: true schema: type: string - name: limit in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: A limit on the number of organization role assignments to return. schema: + maximum: 1000 + minimum: 0 type: integer - default: 20 + - name: after + in: query + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing organization roles. + schema: + type: string - name: order in: query - description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" + description: Sort order for the returned organization roles. schema: enum: - asc - desc type: string - default: desc - - name: after - in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + responses: + '200': + description: User organization role assignments listed successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleListResource' + x-oaiMeta: + name: List user organization role assignments + group: administration + examples: + request: + curl: "curl https://api.openai.com/v1/organization/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false,\n \"description\": \"Allows managing organization groups\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" + post: + tags: + - User organization role assignments + summary: Assigns an organization role to a user within the organization. + operationId: assign-user-role + parameters: + - name: user_id + in: path + description: The ID of the user that should receive the organization role. + required: true schema: type: string - - name: before - in: query - description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" + requestBody: + description: Identifies the organization role to assign to the user. + content: + application/json: + schema: + $ref: '#/components/schemas/PublicAssignOrganizationGroupRoleBody' + required: true + responses: + '200': + description: Organization role assigned to the user successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UserRoleAssignment' + x-oaiMeta: + name: Assign organization role to user + group: administration + examples: + request: + curl: "curl -X POST https://api.openai.com/v1/organization/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8ROLE01\"\n }'\n" + response: "{\n \"object\": \"user.role\",\n \"user\": {\n \"object\": \"organization.user\",\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711470000\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8ROLE01\",\n \"name\": \"API Group Manager\",\n \"description\": \"Allows managing organization groups\",\n \"permissions\": [\n \"api.groups.read\",\n \"api.groups.write\"\n ],\n \"resource_type\": \"api.organization\",\n \"predefined_role\": false\n }\n}\n" + '/organization/users/{user_id}/roles/{role_id}': + delete: + tags: + - User organization role assignments + summary: Unassigns an organization role from a user within the organization. + operationId: unassign-user-role + parameters: + - name: user_id + in: path + description: The ID of the user to modify. + required: true schema: type: string - - name: 'include[]' - in: query - description: "A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n\nSee the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n" + - name: role_id + in: path + description: The ID of the organization role to remove from the user. + required: true schema: - type: array - items: - enum: - - 'step_details.tool_calls[*].file_search.results[*].content' - type: string + type: string responses: '200': - description: OK + description: Organization role unassigned from the user successfully. content: application/json: schema: - $ref: '#/components/schemas/ListRunStepsResponse' + $ref: '#/components/schemas/DeletedRoleAssignmentResource' x-oaiMeta: - beta: true + name: Unassign organization role from user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.Beta.Threads.Runs.Steps.List(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n openai.BetaThreadRunStepListParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.steps.StepListPage;\nimport com.openai.models.beta.threads.runs.steps.StepListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n StepListParams params = StepListParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .build();\n StepListPage page = client.beta().threads().runs().steps().list(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const runStep of client.beta.threads.runs.steps.list('run_id', { thread_id: 'thread_id' })) {\n console.log(runStep.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.beta.threads.runs.steps.list(\n run_id=\"run_id\",\n thread_id=\"thread_id\",\n)\npage = page.data[0]\nprint(page.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.beta.threads.runs.steps.list(\"run_id\", thread_id: \"thread_id\")\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"step_abc123\",\n \"object\": \"thread.run.step\",\n \"created_at\": 1699063291,\n \"run_id\": \"run_abc123\",\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"type\": \"message_creation\",\n \"status\": \"completed\",\n \"cancelled_at\": null,\n \"completed_at\": 1699063291,\n \"expired_at\": null,\n \"failed_at\": null,\n \"last_error\": null,\n \"step_details\": {\n \"type\": \"message_creation\",\n \"message_creation\": {\n \"message_id\": \"msg_abc123\"\n }\n },\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n }\n }\n ],\n \"first_id\": \"step_abc123\",\n \"last_id\": \"step_abc456\",\n \"has_more\": false\n}\n" - group: threads - name: List run steps - returns: 'A list of [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) objects.' - '/threads/{thread_id}/runs/{run_id}/steps/{step_id}': + curl: "curl -X DELETE https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"user.role.deleted\",\n \"deleted\": true\n}\n" + '/projects/{project_id}/groups/{group_id}/roles': get: tags: - - Assistants - summary: Retrieve run step - description: Retrieves a run step. - operationId: getRunStep + - Project group role assignments + summary: Lists the project roles assigned to a group within a project. + operationId: list-project-group-role-assignments parameters: - - name: thread_id + - name: project_id in: path - description: The ID of the thread to which the run and run step belongs. + description: The ID of the project to inspect. required: true schema: type: string - - name: run_id + - name: group_id in: path - description: The ID of the run to which the run step belongs. + description: The ID of the group to inspect. required: true schema: type: string - - name: step_id - in: path - description: The ID of the run step to retrieve. - required: true + - name: limit + in: query + description: A limit on the number of project role assignments to return. + schema: + maximum: 1000 + minimum: 0 + type: integer + - name: after + in: query + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing project roles. schema: type: string - - name: 'include[]' + - name: order in: query - description: "A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.\n\nSee the [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings) for more information.\n" + description: Sort order for the returned project roles. schema: - type: array - items: - enum: - - 'step_details.tool_calls[*].file_search.results[*].content' - type: string + enum: + - asc + - desc + type: string responses: '200': - description: OK + description: Project group role assignments listed successfully. content: application/json: schema: - $ref: '#/components/schemas/RunStepObject' + $ref: '#/components/schemas/RoleListResource' x-oaiMeta: - beta: true + name: List project group role assignments + group: administration examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps/step_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n runStep, err := client.Beta.Threads.Runs.Steps.Get(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n \"step_id\",\n openai.BetaThreadRunStepGetParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", runStep.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.steps.RunStep;\nimport com.openai.models.beta.threads.runs.steps.StepRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n StepRetrieveParams params = StepRetrieveParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .stepId(\"step_id\")\n .build();\n RunStep runStep = client.beta().threads().runs().steps().retrieve(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst runStep = await client.beta.threads.runs.steps.retrieve('step_id', {\n thread_id: 'thread_id',\n run_id: 'run_id',\n});\n\nconsole.log(runStep.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun_step = client.beta.threads.runs.steps.retrieve(\n step_id=\"step_id\",\n thread_id=\"thread_id\",\n run_id=\"run_id\",\n)\nprint(run_step.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun_step = openai.beta.threads.runs.steps.retrieve(\"step_id\", thread_id: \"thread_id\", run_id: \"run_id\")\n\nputs(run_step)" - response: "{\n \"id\": \"step_abc123\",\n \"object\": \"thread.run.step\",\n \"created_at\": 1699063291,\n \"run_id\": \"run_abc123\",\n \"assistant_id\": \"asst_abc123\",\n \"thread_id\": \"thread_abc123\",\n \"type\": \"message_creation\",\n \"status\": \"completed\",\n \"cancelled_at\": null,\n \"completed_at\": 1699063291,\n \"expired_at\": null,\n \"failed_at\": null,\n \"last_error\": null,\n \"step_details\": {\n \"type\": \"message_creation\",\n \"message_creation\": {\n \"message_id\": \"msg_abc123\"\n }\n },\n \"usage\": {\n \"prompt_tokens\": 123,\n \"completion_tokens\": 456,\n \"total_tokens\": 579\n }\n}\n" - group: threads - name: Retrieve run step - returns: 'The [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) object matching the specified ID.' - '/threads/{thread_id}/runs/{run_id}/submit_tool_outputs': + curl: "curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false,\n \"description\": \"Allows managing API keys for the project\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Assistants - summary: Submit tool outputs to run - description: "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n" - operationId: submitToolOuputsToRun + - Project group role assignments + summary: Assigns a project role to a group within a project. + operationId: assign-project-group-role parameters: - - name: thread_id + - name: project_id in: path - description: 'The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) to which this run belongs.' + description: The ID of the project to update. required: true schema: type: string - - name: run_id + - name: group_id in: path - description: The ID of the run that requires the tool output submission. + description: The ID of the group that should receive the project role. required: true schema: type: string requestBody: + description: Identifies the project role to assign to the group. content: application/json: schema: - $ref: '#/components/schemas/SubmitToolOutputsRunRequest' + $ref: '#/components/schemas/PublicAssignOrganizationGroupRoleBody' required: true responses: '200': - description: OK + description: Project role assigned to the group successfully. content: application/json: schema: - $ref: '#/components/schemas/RunObject' + $ref: '#/components/schemas/GroupRoleAssignment' x-oaiMeta: - beta: true - example: + name: Assign project role to group + group: administration + examples: request: - curl: "curl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"tool_outputs\": [\n {\n \"tool_call_id\": \"call_001\",\n \"output\": \"70 degrees and sunny.\"\n }\n ]\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n run, err := client.Beta.Threads.Runs.SubmitToolOutputs(\n context.TODO(),\n \"thread_id\",\n \"run_id\",\n openai.BetaThreadRunSubmitToolOutputsParams{\n ToolOutputs: []openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{openai.BetaThreadRunSubmitToolOutputsParamsToolOutput{\n\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", run.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.beta.threads.runs.Run;\nimport com.openai.models.beta.threads.runs.RunSubmitToolOutputsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n RunSubmitToolOutputsParams params = RunSubmitToolOutputsParams.builder()\n .threadId(\"thread_id\")\n .runId(\"run_id\")\n .addToolOutput(RunSubmitToolOutputsParams.ToolOutput.builder().build())\n .build();\n Run run = client.beta().threads().runs().submitToolOutputs(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst run = await client.beta.threads.runs.submitToolOutputs('run_id', {\n thread_id: 'thread_id',\n tool_outputs: [{}],\n});\n\nconsole.log(run.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nrun = client.beta.threads.runs.submit_tool_outputs(\n run_id=\"run_id\",\n thread_id=\"thread_id\",\n tool_outputs=[{}],\n)\nprint(run.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nrun = openai.beta.threads.runs.submit_tool_outputs(\"run_id\", thread_id: \"thread_id\", tool_outputs: [{}])\n\nputs(run)" - response: "{\n \"id\": \"run_123\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075592,\n \"assistant_id\": \"asst_123\",\n \"thread_id\": \"thread_123\",\n \"status\": \"queued\",\n \"started_at\": 1699075592,\n \"expires_at\": 1699076192,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"last_error\": null,\n \"model\": \"gpt-4o\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\"celsius\", \"fahrenheit\"]\n }\n },\n \"required\": [\"location\"]\n }\n }\n }\n ],\n \"metadata\": {},\n \"usage\": null,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_prompt_tokens\": 1000,\n \"max_completion_tokens\": 1000,\n \"truncation_strategy\": {\n \"type\": \"auto\",\n \"last_messages\": null\n },\n \"response_format\": \"auto\",\n \"tool_choice\": \"auto\",\n \"parallel_tool_calls\": true\n}\n" - title: Default - group: threads - name: Submit tool outputs to run - returns: 'The modified [run](https://platform.openai.com/docs/api-reference/runs/object) object matching the specified ID.' - /uploads: - post: + curl: "curl -X POST https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8PROJ\"\n }'\n" + response: "{\n \"object\": \"group.role\",\n \"group\": {\n \"object\": \"group\",\n \"id\": \"group_01J1F8ABCDXYZ\",\n \"name\": \"Support Team\",\n \"created_at\": 1711471533,\n \"scim_managed\": false\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n}\n" + '/projects/{project_id}/groups/{group_id}/roles/{role_id}': + delete: tags: - - Uploads - summary: Create upload - description: "Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object\nthat you can add [Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.\nCurrently, an Upload can accept at most 8 GB in total and expires after an\nhour after you create it.\n\nOnce you complete the Upload, we will create a\n[File](https://platform.openai.com/docs/api-reference/files/object) object that contains all the parts\nyou uploaded. This File is usable in the rest of our platform as a regular\nFile object.\n\nFor certain `purpose` values, the correct `mime_type` must be specified. \nPlease refer to documentation for the \n[supported MIME types for your use case](https://platform.openai.com/docs/assistants/tools/file-search#supported-files).\n\nFor guidance on the proper filename extensions for each purpose, please\nfollow the documentation on [creating a\nFile](https://platform.openai.com/docs/api-reference/files/create).\n" - operationId: createUpload - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateUploadRequest' - required: true + - Project group role assignments + summary: Unassigns a project role from a group within a project. + operationId: unassign-project-group-role + parameters: + - name: project_id + in: path + description: The ID of the project to modify. + required: true + schema: + type: string + - name: group_id + in: path + description: The ID of the group whose project role assignment should be removed. + required: true + schema: + type: string + - name: role_id + in: path + description: The ID of the project role to remove from the group. + required: true + schema: + type: string responses: '200': - description: OK + description: Project role unassigned from the group successfully. content: application/json: schema: - $ref: '#/components/schemas/Upload' + $ref: '#/components/schemas/DeletedRoleAssignmentResource' x-oaiMeta: + name: Unassign project role from group + group: administration examples: request: - curl: "curl https://api.openai.com/v1/uploads \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"purpose\": \"fine-tune\",\n \"filename\": \"training_examples.jsonl\",\n \"bytes\": 2147483648,\n \"mime_type\": \"text/jsonl\",\n \"expires_after\": {\n \"anchor\": \"created_at\",\n \"seconds\": 3600\n }\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n upload, err := client.Uploads.New(context.TODO(), openai.UploadNewParams{\n Bytes: 0,\n Filename: \"filename\",\n MimeType: \"mime_type\",\n Purpose: openai.FilePurposeAssistants,\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", upload.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FilePurpose;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UploadCreateParams params = UploadCreateParams.builder()\n .bytes(0L)\n .filename(\"filename\")\n .mimeType(\"mime_type\")\n .purpose(FilePurpose.ASSISTANTS)\n .build();\n Upload upload = client.uploads().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst upload = await client.uploads.create({\n bytes: 0,\n filename: 'filename',\n mime_type: 'mime_type',\n purpose: 'assistants',\n});\n\nconsole.log(upload.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nupload = client.uploads.create(\n bytes=0,\n filename=\"filename\",\n mime_type=\"mime_type\",\n purpose=\"assistants\",\n)\nprint(upload.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nupload = openai.uploads.create(bytes: 0, filename: \"filename\", mime_type: \"mime_type\", purpose: :assistants)\n\nputs(upload)" - response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"pending\",\n \"expires_at\": 1719127296\n}\n" - group: uploads - name: Create upload - returns: 'The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status `pending`.' - '/uploads/{upload_id}/cancel': - post: + curl: "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"group.role.deleted\",\n \"deleted\": true\n}\n" + '/projects/{project_id}/roles': + get: tags: - - Uploads - summary: Cancel upload - description: "Cancels the Upload. No Parts may be added after an Upload is cancelled.\n" - operationId: cancelUpload + - Roles + summary: Lists the roles configured for a project. + operationId: list-project-roles parameters: - - name: upload_id + - name: project_id in: path - description: "The ID of the Upload.\n" + description: The ID of the project to inspect. required: true schema: type: string - example: upload_abc123 + - name: limit + in: query + description: A limit on the number of roles to return. Defaults to 1000. + schema: + maximum: 1000 + minimum: 0 + type: integer + default: 1000 + - name: after + in: query + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing roles. + schema: + type: string + - name: order + in: query + description: Sort order for the returned roles. + schema: + enum: + - asc + - desc + type: string + default: asc responses: '200': - description: OK + description: Project roles listed successfully. content: application/json: schema: - $ref: '#/components/schemas/Upload' + $ref: '#/components/schemas/PublicRoleListResource' x-oaiMeta: + name: List project roles + group: administration examples: request: - curl: "curl https://api.openai.com/v1/uploads/upload_abc123/cancel\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n upload, err := client.Uploads.Cancel(context.TODO(), \"upload_abc123\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", upload.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n Upload upload = client.uploads().cancel(\"upload_abc123\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst upload = await client.uploads.cancel('upload_abc123');\n\nconsole.log(upload.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nupload = client.uploads.cancel(\n \"upload_abc123\",\n)\nprint(upload.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nupload = openai.uploads.cancel(\"upload_abc123\")\n\nputs(upload)" - response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"cancelled\",\n \"expires_at\": 1719127296\n}\n" - group: uploads - name: Cancel upload - returns: 'The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status `cancelled`.' - '/uploads/{upload_id}/complete': + curl: "curl https://api.openai.com/v1/projects/proj_abc123/roles?limit=20 \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Uploads - summary: Complete upload - description: "Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). \n\nWithin the returned Upload object, there is a nested [File](https://platform.openai.com/docs/api-reference/files/object) object that is ready to use in the rest of the platform.\n\nYou can specify the order of the Parts by passing in an ordered list of the Part IDs.\n\nThe number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.\n" - operationId: completeUpload + - Roles + summary: Creates a custom role for a project. + operationId: create-project-role parameters: - - name: upload_id + - name: project_id in: path - description: "The ID of the Upload.\n" + description: The ID of the project to update. required: true schema: type: string - example: upload_abc123 requestBody: + description: Parameters for the project role you want to create. content: application/json: schema: - $ref: '#/components/schemas/CompleteUploadRequest' + $ref: '#/components/schemas/PublicCreateOrganizationRoleBody' required: true responses: '200': - description: OK + description: Project role created successfully. content: application/json: schema: - $ref: '#/components/schemas/Upload' + $ref: '#/components/schemas/Role' x-oaiMeta: + name: Create project role + group: administration examples: request: - curl: "curl https://api.openai.com/v1/uploads/upload_abc123/complete\n -d '{\n \"part_ids\": [\"part_def456\", \"part_ghi789\"]\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n upload, err := client.Uploads.Complete(\n context.TODO(),\n \"upload_abc123\",\n openai.UploadCompleteParams{\n PartIDs: []string{\"string\"},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", upload.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.Upload;\nimport com.openai.models.uploads.UploadCompleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n UploadCompleteParams params = UploadCompleteParams.builder()\n .uploadId(\"upload_abc123\")\n .addPartId(\"string\")\n .build();\n Upload upload = client.uploads().complete(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst upload = await client.uploads.complete('upload_abc123', { part_ids: ['string'] });\n\nconsole.log(upload.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nupload = client.uploads.complete(\n upload_id=\"upload_abc123\",\n part_ids=[\"string\"],\n)\nprint(upload.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nupload = openai.uploads.complete(\"upload_abc123\", part_ids: [\"string\"])\n\nputs(upload)" - response: "{\n \"id\": \"upload_abc123\",\n \"object\": \"upload\",\n \"bytes\": 2147483648,\n \"created_at\": 1719184911,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n \"status\": \"completed\",\n \"expires_at\": 1719127296,\n \"file\": {\n \"id\": \"file-xyz321\",\n \"object\": \"file\",\n \"bytes\": 2147483648,\n \"created_at\": 1719186911,\n \"expires_at\": 1719127296,\n \"filename\": \"training_examples.jsonl\",\n \"purpose\": \"fine-tune\",\n }\n}\n" - group: uploads - name: Complete upload - returns: 'The [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object with status `completed` with an additional `file` property containing the created usable File object.' - '/uploads/{upload_id}/parts': + curl: "curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"description\": \"Allows managing API keys for the project\"\n }'\n" + response: "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n}\n" + '/projects/{project_id}/roles/{role_id}': post: tags: - - Uploads - summary: Add upload part - description: "Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. \n\nEach Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.\n\nIt is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).\n" - operationId: addUploadPart + - Roles + summary: Updates an existing project role. + operationId: update-project-role parameters: - - name: upload_id + - name: project_id in: path - description: "The ID of the Upload.\n" + description: The ID of the project to update. + required: true + schema: + type: string + - name: role_id + in: path + description: The ID of the role to update. required: true schema: type: string - example: upload_abc123 requestBody: + description: Fields to update on the project role. content: - multipart/form-data: + application/json: schema: - $ref: '#/components/schemas/AddUploadPartRequest' + $ref: '#/components/schemas/PublicUpdateOrganizationRoleBody' required: true responses: '200': - description: OK + description: Project role updated successfully. content: application/json: schema: - $ref: '#/components/schemas/UploadPart' + $ref: '#/components/schemas/Role' x-oaiMeta: + name: Update project role + group: administration examples: request: - curl: "curl https://api.openai.com/v1/uploads/upload_abc123/parts\n -F data=\"aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz...\"\n" - go: "package main\n\nimport (\n \"bytes\"\n \"context\"\n \"fmt\"\n \"io\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n uploadPart, err := client.Uploads.Parts.New(\n context.TODO(),\n \"upload_abc123\",\n openai.UploadPartNewParams{\n Data: io.Reader(bytes.NewBuffer([]byte(\"some file contents\"))),\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", uploadPart.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.uploads.parts.PartCreateParams;\nimport com.openai.models.uploads.parts.UploadPart;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n PartCreateParams params = PartCreateParams.builder()\n .uploadId(\"upload_abc123\")\n .data(ByteArrayInputStream(\"some content\".getBytes()))\n .build();\n UploadPart uploadPart = client.uploads().parts().create(params);\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst uploadPart = await client.uploads.parts.create('upload_abc123', {\n data: fs.createReadStream('path/to/file'),\n});\n\nconsole.log(uploadPart.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nupload_part = client.uploads.parts.create(\n upload_id=\"upload_abc123\",\n data=b\"raw file contents\",\n)\nprint(upload_part.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nupload_part = openai.uploads.parts.create(\"upload_abc123\", data: Pathname(__FILE__))\n\nputs(upload_part)" - response: "{\n \"id\": \"part_def456\",\n \"object\": \"upload.part\",\n \"created_at\": 1719185911,\n \"upload_id\": \"upload_abc123\"\n}\n" - group: uploads - name: Add upload part - returns: 'The upload [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) object.' - /vector_stores: + curl: "curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"description\": \"Allows managing API keys for the project\"\n }'\n" + response: "{\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n}\n" + delete: + tags: + - Roles + summary: Deletes a custom role from a project. + operationId: delete-project-role + parameters: + - name: project_id + in: path + description: The ID of the project to update. + required: true + schema: + type: string + - name: role_id + in: path + description: The ID of the role to delete. + required: true + schema: + type: string + responses: + '200': + description: Project role deleted successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDeletedResource' + x-oaiMeta: + name: Delete project role + group: administration + examples: + request: + curl: "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"role.deleted\",\n \"id\": \"role_01J1F8PROJ\",\n \"deleted\": true\n}\n" + '/projects/{project_id}/users/{user_id}/roles': get: tags: - - Vector stores - summary: List vector stores - description: Returns a list of vector stores. - operationId: listVectorStores + - Project user role assignments + summary: Lists the project roles assigned to a user within a project. + operationId: list-project-user-role-assignments parameters: + - name: project_id + in: path + description: The ID of the project to inspect. + required: true + schema: + type: string + - name: user_id + in: path + description: The ID of the user to inspect. + required: true + schema: + type: string - name: limit in: query - description: "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n" + description: A limit on the number of project role assignments to return. schema: + maximum: 1000 + minimum: 0 type: integer - default: 20 - - name: order - in: query - description: "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n" - schema: - enum: - - asc - - desc - type: string - default: desc - name: after in: query - description: "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n" + description: Cursor for pagination. Provide the value from the previous response's `next` field to continue listing project roles. schema: type: string - - name: before + - name: order in: query - description: "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n" + description: Sort order for the returned project roles. schema: + enum: + - asc + - desc type: string responses: '200': - description: OK + description: Project user role assignments listed successfully. content: application/json: schema: - $ref: '#/components/schemas/ListVectorStoresResponse' + $ref: '#/components/schemas/RoleListResource' x-oaiMeta: + name: List project user role assignments + group: administration examples: request: - curl: "curl https://api.openai.com/v1/vector_stores \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n page, err := client.VectorStores.List(context.TODO(), openai.VectorStoreListParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", page)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.vectorstores.VectorStoreListPage;\nimport com.openai.models.vectorstores.VectorStoreListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VectorStoreListPage page = client.vectorStores().list();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vectorStore of client.vectorStores.list()) {\n console.log(vectorStore.id);\n}" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\npage = client.vector_stores.list()\npage = page.data[0]\nprint(page.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\npage = openai.vector_stores.list\n\nputs(page)" - response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"vs_abc123\",\n \"object\": \"vector_store\",\n \"created_at\": 1699061776,\n \"name\": \"Support FAQ\",\n \"bytes\": 139920,\n \"file_counts\": {\n \"in_progress\": 0,\n \"completed\": 3,\n \"failed\": 0,\n \"cancelled\": 0,\n \"total\": 3\n }\n },\n {\n \"id\": \"vs_abc456\",\n \"object\": \"vector_store\",\n \"created_at\": 1699061776,\n \"name\": \"Support FAQ v2\",\n \"bytes\": 139920,\n \"file_counts\": {\n \"in_progress\": 0,\n \"completed\": 3,\n \"failed\": 0,\n \"cancelled\": 0,\n \"total\": 3\n }\n }\n ],\n \"first_id\": \"vs_abc123\",\n \"last_id\": \"vs_abc456\",\n \"has_more\": false\n}\n" - group: vector_stores - name: List vector stores - returns: 'A list of [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) objects.' + curl: "curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false,\n \"description\": \"Allows managing API keys for the project\",\n \"created_at\": 1711471533,\n \"updated_at\": 1711472599,\n \"created_by\": \"user_abc123\",\n \"created_by_user_obj\": {\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\"\n },\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"next\": null\n}\n" post: tags: - - Vector stores - summary: Create vector store - description: Create a vector store. - operationId: createVectorStore + - Project user role assignments + summary: Assigns a project role to a user within a project. + operationId: assign-project-user-role + parameters: + - name: project_id + in: path + description: The ID of the project to update. + required: true + schema: + type: string + - name: user_id + in: path + description: The ID of the user that should receive the project role. + required: true + schema: + type: string requestBody: + description: Identifies the project role to assign to the user. content: application/json: schema: - $ref: '#/components/schemas/CreateVectorStoreRequest' + $ref: '#/components/schemas/PublicAssignOrganizationGroupRoleBody' required: true responses: '200': - description: OK + description: Project role assigned to the user successfully. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/UserRoleAssignment' x-oaiMeta: + name: Assign project role to user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/vector_stores \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -d '{\n \"name\": \"Support FAQ\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n vectorStore, err := client.VectorStores.New(context.TODO(), openai.VectorStoreNewParams{\n\n })\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", vectorStore.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.vectorstores.VectorStore;\nimport com.openai.models.vectorstores.VectorStoreCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VectorStore vectorStore = client.vectorStores().create();\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst vectorStore = await client.vectorStores.create();\n\nconsole.log(vectorStore.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nvector_store = client.vector_stores.create()\nprint(vector_store.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nvector_store = openai.vector_stores.create\n\nputs(vector_store)" - response: "{\n \"id\": \"vs_abc123\",\n \"object\": \"vector_store\",\n \"created_at\": 1699061776,\n \"name\": \"Support FAQ\",\n \"bytes\": 139920,\n \"file_counts\": {\n \"in_progress\": 0,\n \"completed\": 3,\n \"failed\": 0,\n \"cancelled\": 0,\n \"total\": 3\n }\n}\n" - group: vector_stores - name: Create vector store - returns: 'A [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) object.' - '/vector_stores/{vector_store_id}': + curl: "curl -X POST https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"role_id\": \"role_01J1F8PROJ\"\n }'\n" + response: "{\n \"object\": \"user.role\",\n \"user\": {\n \"object\": \"organization.user\",\n \"id\": \"user_abc123\",\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"role\": \"owner\",\n \"added_at\": 1711470000\n },\n \"role\": {\n \"object\": \"role\",\n \"id\": \"role_01J1F8PROJ\",\n \"name\": \"API Project Key Manager\",\n \"description\": \"Allows managing API keys for the project\",\n \"permissions\": [\n \"api.organization.projects.api_keys.read\",\n \"api.organization.projects.api_keys.write\"\n ],\n \"resource_type\": \"api.project\",\n \"predefined_role\": false\n }\n}\n" + '/projects/{project_id}/users/{user_id}/roles/{role_id}': delete: tags: - - Vector stores - summary: Delete vector store - description: Delete a vector store. - operationId: deleteVectorStore + - Project user role assignments + summary: Unassigns a project role from a user within a project. + operationId: unassign-project-user-role parameters: - - name: vector_store_id + - name: project_id in: path - description: The ID of the vector store to delete. + description: The ID of the project to modify. required: true schema: type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteVectorStoreResponse' - x-oaiMeta: - examples: - request: - curl: "curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\" \\\n -X DELETE\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n vectorStoreDeleted, err := client.VectorStores.Delete(context.TODO(), \"vector_store_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", vectorStoreDeleted.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.vectorstores.VectorStoreDeleteParams;\nimport com.openai.models.vectorstores.VectorStoreDeleted;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VectorStoreDeleted vectorStoreDeleted = client.vectorStores().delete(\"vector_store_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst vectorStoreDeleted = await client.vectorStores.delete('vector_store_id');\n\nconsole.log(vectorStoreDeleted.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nvector_store_deleted = client.vector_stores.delete(\n \"vector_store_id\",\n)\nprint(vector_store_deleted.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nvector_store_deleted = openai.vector_stores.delete(\"vector_store_id\")\n\nputs(vector_store_deleted)" - response: "{\n id: \"vs_abc123\",\n object: \"vector_store.deleted\",\n deleted: true\n}\n" - group: vector_stores - name: Delete vector store - returns: Deletion status - get: - tags: - - Vector stores - summary: Retrieve vector store - description: Retrieves a vector store. - operationId: getVectorStore - parameters: - - name: vector_store_id + - name: user_id in: path - description: The ID of the vector store to retrieve. + description: The ID of the user whose project role assignment should be removed. + required: true + schema: + type: string + - name: role_id + in: path + description: The ID of the project role to remove from the user. required: true schema: type: string responses: '200': - description: OK + description: Project role unassigned from the user successfully. content: application/json: schema: - $ref: '#/components/schemas/VectorStoreObject' + $ref: '#/components/schemas/DeletedRoleAssignmentResource' x-oaiMeta: + name: Unassign project role from user + group: administration examples: request: - curl: "curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n vectorStore, err := client.VectorStores.Get(context.TODO(), \"vector_store_id\")\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", vectorStore.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.vectorstores.VectorStore;\nimport com.openai.models.vectorstores.VectorStoreRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VectorStore vectorStore = client.vectorStores().retrieve(\"vector_store_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst vectorStore = await client.vectorStores.retrieve('vector_store_id');\n\nconsole.log(vectorStore.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nvector_store = client.vector_stores.retrieve(\n \"vector_store_id\",\n)\nprint(vector_store.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nvector_store = openai.vector_stores.retrieve(\"vector_store_id\")\n\nputs(vector_store)" - response: "{\n \"id\": \"vs_abc123\",\n \"object\": \"vector_store\",\n \"created_at\": 1699061776\n}\n" - group: vector_stores - name: Retrieve vector store - returns: 'The [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) object matching the specified ID.' + curl: "curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"user.role.deleted\",\n \"deleted\": true\n}\n" + /realtime/calls: post: tags: - - Vector stores - summary: Modify vector store - description: Modifies a vector store. - operationId: modifyVectorStore - parameters: - - name: vector_store_id - in: path - description: The ID of the vector store to modify. - required: true - schema: - type: string + - Realtime + summary: "Create a new Realtime API call over WebRTC and receive the SDP answer needed\nto complete the peer connection." + operationId: create-realtime-call requestBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/UpdateVectorStoreRequest' + $ref: '#/components/schemas/RealtimeCallCreateRequest' + encoding: + sdp: + contentType: application/sdp + session: + contentType: application/json + application/sdp: + schema: + type: string + description: "WebRTC SDP offer. Use this variant when you have previously created an\nephemeral **session token** and are authenticating the request with it.\nRealtime session parameters will be retrieved from the session token." required: true responses: - '200': - description: OK + '201': + description: Realtime call created successfully. + headers: + Location: + description: Relative URL containing the call ID for subsequent control requests. + schema: + type: string content: - application/json: + application/sdp: schema: - $ref: '#/components/schemas/VectorStoreObject' + type: string + description: SDP answer produced by OpenAI for the peer connection. x-oaiMeta: + name: Create call + group: realtime + returns: "Returns `201 Created` with the SDP answer in the response body. The\n`Location` response header includes the call ID for follow-up requests,\ne.g., establishing a monitoring WebSocket or hanging up the call." examples: request: - curl: "curl https://api.openai.com/v1/vector_stores/vs_abc123 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"OpenAI-Beta: assistants=v2\"\n -d '{\n \"name\": \"Support FAQ\"\n }'\n" - go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n vectorStore, err := client.VectorStores.Update(\n context.TODO(),\n \"vector_store_id\",\n openai.VectorStoreUpdateParams{\n\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", vectorStore.ID)\n}\n" - java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.vectorstores.VectorStore;\nimport com.openai.models.vectorstores.VectorStoreUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n VectorStore vectorStore = client.vectorStores().update(\"vector_store_id\");\n }\n}" - node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst vectorStore = await client.vectorStores.update('vector_store_id');\n\nconsole.log(vectorStore.id);" - python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nvector_store = client.vector_stores.update(\n vector_store_id=\"vector_store_id\",\n)\nprint(vector_store.id)" - ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nvector_store = openai.vector_stores.update(\"vector_store_id\")\n\nputs(vector_store)" - response: "{\n \"id\": \"vs_abc123\",\n \"object\": \"vector_store\",\n \"created_at\": 1699061776,\n \"name\": \"Support FAQ\",\n \"bytes\": 139920,\n \"file_counts\": {\n \"in_progress\": 0,\n \"completed\": 3,\n \"failed\": 0,\n \"cancelled\": 0,\n \"total\": 3\n }\n}\n" - group: vector_stores - name: Modify vector store - returns: 'The modified [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object) object.' - '/vector_stores/{vector_store_id}/file_batches': + curl: "curl -X POST https://api.openai.com/v1/realtime/calls \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F \"sdp=